|
| 1 | +[@cdklabs/generative-ai-cdk-constructs](../README.md) / BaseClass |
| 2 | + |
| 3 | +# Class: BaseClass |
| 4 | + |
| 5 | +## Hierarchy |
| 6 | + |
| 7 | +- `Construct` |
| 8 | + |
| 9 | + ↳ **`BaseClass`** |
| 10 | + |
| 11 | + ↳↳ [`RagAppsyncStepfnOpensearch`](RagAppsyncStepfnOpensearch.md) |
| 12 | + |
| 13 | + ↳↳ [`SummarizationAppsyncStepfn`](SummarizationAppsyncStepfn.md) |
| 14 | + |
| 15 | + ↳↳ [`QaAppsyncOpensearch`](QaAppsyncOpensearch.md) |
| 16 | + |
| 17 | + ↳↳ [`SageMakerEndpointBase`](SageMakerEndpointBase.md) |
| 18 | + |
| 19 | + ↳↳ [`ContentGenerationAppSyncLambda`](ContentGenerationAppSyncLambda.md) |
| 20 | + |
| 21 | +## Table of contents |
| 22 | + |
| 23 | +### Constructors |
| 24 | + |
| 25 | +- [constructor](BaseClass.md#constructor) |
| 26 | + |
| 27 | +### Properties |
| 28 | + |
| 29 | +- [constructTrackingCode](BaseClass.md#constructtrackingcode) |
| 30 | +- [enablexray](BaseClass.md#enablexray) |
| 31 | +- [fieldLogLevel](BaseClass.md#fieldloglevel) |
| 32 | +- [lambdaTracing](BaseClass.md#lambdatracing) |
| 33 | +- [node](BaseClass.md#node) |
| 34 | +- [retention](BaseClass.md#retention) |
| 35 | +- [stage](BaseClass.md#stage) |
| 36 | + |
| 37 | +### Methods |
| 38 | + |
| 39 | +- [addObservabilityToConstruct](BaseClass.md#addobservabilitytoconstruct) |
| 40 | +- [toString](BaseClass.md#tostring) |
| 41 | +- [updateConstructTrackingCode](BaseClass.md#updateconstructtrackingcode) |
| 42 | +- [updateEnvSuffix](BaseClass.md#updateenvsuffix) |
| 43 | +- [isConstruct](BaseClass.md#isconstruct) |
| 44 | + |
| 45 | +## Constructors |
| 46 | + |
| 47 | +### constructor |
| 48 | + |
| 49 | +• **new BaseClass**(`scope`, `id`): [`BaseClass`](BaseClass.md) |
| 50 | + |
| 51 | +#### Parameters |
| 52 | + |
| 53 | +| Name | Type | |
| 54 | +| :------ | :------ | |
| 55 | +| `scope` | `Construct` | |
| 56 | +| `id` | `string` | |
| 57 | + |
| 58 | +#### Returns |
| 59 | + |
| 60 | +[`BaseClass`](BaseClass.md) |
| 61 | + |
| 62 | +#### Overrides |
| 63 | + |
| 64 | +Construct.constructor |
| 65 | + |
| 66 | +## Properties |
| 67 | + |
| 68 | +### constructTrackingCode |
| 69 | + |
| 70 | +• `Readonly` **constructTrackingCode**: ``"uksb-1tupboc45"`` |
| 71 | + |
| 72 | +construct tracking code, added in template description |
| 73 | + |
| 74 | +___ |
| 75 | + |
| 76 | +### enablexray |
| 77 | + |
| 78 | +• **enablexray**: `boolean` = `true` |
| 79 | + |
| 80 | +enable disable xray tracing |
| 81 | + |
| 82 | +**`Default`** |
| 83 | + |
| 84 | +```ts |
| 85 | +- True |
| 86 | +``` |
| 87 | + |
| 88 | +___ |
| 89 | + |
| 90 | +### fieldLogLevel |
| 91 | + |
| 92 | +• **fieldLogLevel**: `FieldLogLevel` = `appsync.FieldLogLevel.ALL` |
| 93 | + |
| 94 | +Default log config for all constructs |
| 95 | + |
| 96 | +___ |
| 97 | + |
| 98 | +### lambdaTracing |
| 99 | + |
| 100 | +• **lambdaTracing**: `Tracing` = `lambda.Tracing.ACTIVE` |
| 101 | + |
| 102 | +enable disable lambda tracing |
| 103 | + |
| 104 | +**`Default`** |
| 105 | + |
| 106 | +```ts |
| 107 | +- Active |
| 108 | +``` |
| 109 | + |
| 110 | +___ |
| 111 | + |
| 112 | +### node |
| 113 | + |
| 114 | +• `Readonly` **node**: `Node` |
| 115 | + |
| 116 | +The tree node. |
| 117 | + |
| 118 | +#### Inherited from |
| 119 | + |
| 120 | +Construct.node |
| 121 | + |
| 122 | +___ |
| 123 | + |
| 124 | +### retention |
| 125 | + |
| 126 | +• **retention**: `RetentionDays` = `logs.RetentionDays.TEN_YEARS` |
| 127 | + |
| 128 | +Default log retention config for all constructs |
| 129 | + |
| 130 | +___ |
| 131 | + |
| 132 | +### stage |
| 133 | + |
| 134 | +• **stage**: `string` |
| 135 | + |
| 136 | +Value will be appended to resources name. |
| 137 | + |
| 138 | +**`Default`** |
| 139 | + |
| 140 | +```ts |
| 141 | +- _dev |
| 142 | +``` |
| 143 | + |
| 144 | +## Methods |
| 145 | + |
| 146 | +### addObservabilityToConstruct |
| 147 | + |
| 148 | +▸ **addObservabilityToConstruct**(`props`): `void` |
| 149 | + |
| 150 | +#### Parameters |
| 151 | + |
| 152 | +| Name | Type | |
| 153 | +| :------ | :------ | |
| 154 | +| `props` | [`BaseClassProps`](../interfaces/BaseClassProps.md) | |
| 155 | + |
| 156 | +#### Returns |
| 157 | + |
| 158 | +`void` |
| 159 | + |
| 160 | +___ |
| 161 | + |
| 162 | +### toString |
| 163 | + |
| 164 | +▸ **toString**(): `string` |
| 165 | + |
| 166 | +Returns a string representation of this construct. |
| 167 | + |
| 168 | +#### Returns |
| 169 | + |
| 170 | +`string` |
| 171 | + |
| 172 | +#### Inherited from |
| 173 | + |
| 174 | +Construct.toString |
| 175 | + |
| 176 | +___ |
| 177 | + |
| 178 | +### updateConstructTrackingCode |
| 179 | + |
| 180 | +▸ **updateConstructTrackingCode**(`props`, `scope`, `lambdaFunctions`): `void` |
| 181 | + |
| 182 | +#### Parameters |
| 183 | + |
| 184 | +| Name | Type | |
| 185 | +| :------ | :------ | |
| 186 | +| `props` | [`BaseClassProps`](../interfaces/BaseClassProps.md) | |
| 187 | +| `scope` | `Construct` | |
| 188 | +| `lambdaFunctions` | `DockerImageFunction`[] | |
| 189 | + |
| 190 | +#### Returns |
| 191 | + |
| 192 | +`void` |
| 193 | + |
| 194 | +___ |
| 195 | + |
| 196 | +### updateEnvSuffix |
| 197 | + |
| 198 | +▸ **updateEnvSuffix**(`props`): `void` |
| 199 | + |
| 200 | +#### Parameters |
| 201 | + |
| 202 | +| Name | Type | |
| 203 | +| :------ | :------ | |
| 204 | +| `props` | [`BaseClassProps`](../interfaces/BaseClassProps.md) | |
| 205 | + |
| 206 | +#### Returns |
| 207 | + |
| 208 | +`void` |
| 209 | + |
| 210 | +___ |
| 211 | + |
| 212 | +### isConstruct |
| 213 | + |
| 214 | +▸ **isConstruct**(`x`): x is Construct |
| 215 | + |
| 216 | +Checks if `x` is a construct. |
| 217 | + |
| 218 | +Use this method instead of `instanceof` to properly detect `Construct` |
| 219 | +instances, even when the construct library is symlinked. |
| 220 | + |
| 221 | +Explanation: in JavaScript, multiple copies of the `constructs` library on |
| 222 | +disk are seen as independent, completely different libraries. As a |
| 223 | +consequence, the class `Construct` in each copy of the `constructs` library |
| 224 | +is seen as a different class, and an instance of one class will not test as |
| 225 | +`instanceof` the other class. `npm install` will not create installations |
| 226 | +like this, but users may manually symlink construct libraries together or |
| 227 | +use a monorepo tool: in those cases, multiple copies of the `constructs` |
| 228 | +library can be accidentally installed, and `instanceof` will behave |
| 229 | +unpredictably. It is safest to avoid using `instanceof`, and using |
| 230 | +this type-testing method instead. |
| 231 | + |
| 232 | +#### Parameters |
| 233 | + |
| 234 | +| Name | Type | Description | |
| 235 | +| :------ | :------ | :------ | |
| 236 | +| `x` | `any` | Any object | |
| 237 | + |
| 238 | +#### Returns |
| 239 | + |
| 240 | +x is Construct |
| 241 | + |
| 242 | +true if `x` is an object created from a class which extends `Construct`. |
| 243 | + |
| 244 | +#### Inherited from |
| 245 | + |
| 246 | +Construct.isConstruct |
0 commit comments