@intentius/chant-lexicon-aws 0.18.24 → 0.18.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,6 +54,18 @@ export interface AgentCoreAgentProps {
54
54
  environmentVariables?: Record<string, string>;
55
55
  /** RuntimeEndpoint name — the alias a version-promotion capability would repoint (deferred, see #882). Default: "DEFAULT". */
56
56
  endpointName?: string;
57
+ /**
58
+ * Create the `RuntimeEndpoint` in this template. **Default: false.** A
59
+ * RuntimeEndpoint can only be created once the Runtime's agent *version* is
60
+ * READY, which is asynchronous and is NOT gated by the Runtime resource's own
61
+ * CloudFormation `CREATE_COMPLETE` — so creating the endpoint in the same apply
62
+ * as the Runtime races and fails on a real deploy ("Agent version 1 must be in
63
+ * READY status. Current status: CREATING", #978). Leave this off and create the
64
+ * endpoint out-of-band once the runtime is READY — which is what Bedrock
65
+ * AgentCore's own tooling (and Loom's app) does. Opt in only when you know the
66
+ * Runtime will already be READY (e.g. a version-promotion flow on an existing runtime).
67
+ */
68
+ provisionEndpoint?: boolean;
57
69
  /** Memory event retention, in days. CFN bounds: 3-365. Default: 30. */
58
70
  memoryEventExpiryDays?: number;
59
71
  /** Gateway authorizer. Mirrors the generated `BedrockAgentCoreGateway_AuthorizerType` CFN enum. Default: "AWS_IAM". */
@@ -79,7 +91,8 @@ export type AgentCoreAgentResult = {
79
91
  role: InstanceType<typeof Role>;
80
92
  gatewayRole: InstanceType<typeof Role>;
81
93
  runtime: InstanceType<typeof Runtime>;
82
- endpoint: InstanceType<typeof RuntimeEndpoint>;
94
+ /** Present only when `provisionEndpoint` is set — see that prop (#978). */
95
+ endpoint?: InstanceType<typeof RuntimeEndpoint>;
83
96
  memory: InstanceType<typeof Memory>;
84
97
  workloadIdentity: InstanceType<typeof WorkloadIdentity>;
85
98
  gateway: InstanceType<typeof BedrockAgentCoreGateway>;
@@ -1 +1 @@
1
- {"version":3,"file":"agentcore-agent.d.ts","sourceRoot":"","sources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CAAC,OAAO,IAAI,CAAC,CAAC;IACvC,OAAO,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;IACtC,QAAQ,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAC/C,MAAM,EAAE,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACxD,OAAO,EAAE,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;IACtD,aAAa,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,2FAqHP,CAAC"}
1
+ {"version":3,"file":"agentcore-agent.d.ts","sourceRoot":"","sources":["../../src/composites/agentcore-agent.ts"],"names":[],"mappings":"AACA,OAAO,EACL,IAAI,EACJ,WAAW,EACX,OAAO,EAOP,eAAe,EACf,MAAM,EACN,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAEtB;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,GACb,aAAa,CAAC;AAmBlB;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6FAA6F;IAC7F,OAAO,EAAE,mBAAmB,CAAC;IAC7B,uGAAuG;IACvG,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,qB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,CAAC,CAAC,CAAC,CAAC;QACrE,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5E,aAAa,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,gBAAgB,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC/E,CAAC;CACH;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IAChC,WAAW,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IACvC,OAAO,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;IACtC,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,YAAY,CAAC,OAAO,eAAe,CAAC,CAAC;IAChD,MAAM,EAAE,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;IACxD,OAAO,EAAE,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;IACtD,aAAa,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;CACnD,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc,2FAyHP,CAAC"}
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "52ae6e9623bc2eb09530f0d3a0cb05da75fb609e718222c532d2fa3883801475",
4
+ "manifest.json": "370aa573df1c2270d86ee7b0f4e8987b049d7559783f9641f6f51251497411ca",
5
5
  "meta.json": "cfe8a6d95016522d834ea5c50a48f2adbdb95996267985a69a95faeba68f32fa",
6
- "types/index.d.ts": "f0255702fde8c1d1a369d4d1d2e164829fcd7155f3d111164414f715df9d6f3e",
6
+ "types/index.d.ts": "6b3a4fd70fc64002a5c648c6e0cabffa04d058efc55d28cc1e3ffa0f23b3108e",
7
7
  "rules/hardcoded-region.ts": "5a0eaf7ab391231fe6cd51426ece29539cb4b36f31c8dd060956638fed55722a",
8
8
  "rules/iam-wildcard.ts": "135d7217d278fef50939e605c5da32603ba35674b8c4b5c4d66a06c77903e945",
9
9
  "rules/s3-encryption.ts": "c4f9f8aa8dc382ed98c7b04e820a600590cc75335a8db2e087cbfbfe4003d09e",
@@ -58,5 +58,5 @@
58
58
  "skills/chant-aws.md": "4d65eb160e001f2af42eb7c622a5b498c2fd1f5afbd6c8155615c010fb265c63",
59
59
  "skills/chant-aws-eks.md": "8789255709ff004ad0a875fd5999edcdc66fc6e33d710db058d9f42703bcfdfe"
60
60
  },
61
- "composite": "5b37014e10761043f71edeeb8bac9371b76b1eadb746a21f2d2375e861a26bfa"
61
+ "composite": "dad7c99ce0851b3e558421f461f19d8a0a41f4811d21c0a3a2bdf108332e09f6"
62
62
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws",
3
- "version": "0.18.24",
3
+ "version": "0.18.25",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "AWS",
6
6
  "intrinsics": [
@@ -8659,30 +8659,30 @@ export declare class DataSyncAgent {
8659
8659
 
8660
8660
  export declare class DataTable {
8661
8661
  constructor(props: {
8662
+ /** The identifier of the Amazon Connect instance. */
8663
+ InstanceArn: string;
8664
+ /** The name of the Data Table */
8665
+ Name: string;
8666
+ /** The status of the Data Table */
8667
+ Status: "PUBLISHED";
8668
+ /** The time zone of the Data Table */
8669
+ TimeZone: string;
8670
+ /** The value lock level of the Data Table */
8671
+ ValueLockLevel: "ATTRIBUTE" | "DATA_TABLE" | "NONE" | "PRIMARY_VALUE" | "VALUE";
8662
8672
  /** The arn of the Data Table */
8663
8673
  Arn?: string;
8664
8674
  /** The creation time of the Data Table */
8665
8675
  CreatedTime?: number;
8666
8676
  /** The description of the Data Table. */
8667
8677
  Description?: string;
8668
- /** The identifier of the Amazon Connect instance. */
8669
- InstanceArn?: string;
8670
8678
  /** Last modified region. */
8671
8679
  LastModifiedRegion?: string;
8672
8680
  /** Last modified time. */
8673
8681
  LastModifiedTime?: number;
8674
8682
  /** The lock version of the Data Table */
8675
8683
  LockVersion?: Record<string, unknown>;
8676
- /** The name of the Data Table */
8677
- Name?: string;
8678
- /** The status of the Data Table */
8679
- Status?: "PUBLISHED";
8680
8684
  /** One or more tags. */
8681
8685
  Tags?: DataTable_Tag[];
8682
- /** The time zone of the Data Table */
8683
- TimeZone?: string;
8684
- /** The value lock level of the Data Table */
8685
- ValueLockLevel?: "ATTRIBUTE" | "DATA_TABLE" | "NONE" | "PRIMARY_VALUE" | "VALUE";
8686
8686
  }, attributes?: CFResourceAttributes);
8687
8687
  readonly Arn: string;
8688
8688
  readonly CreatedTime: number;
@@ -8693,17 +8693,17 @@ export declare class DataTable {
8693
8693
 
8694
8694
  export declare class DataTableAttribute {
8695
8695
  constructor(props: {
8696
+ DataTableArn: string;
8697
+ InstanceArn: string;
8698
+ Name: string;
8699
+ ValueType: "BOOLEAN" | "NUMBER" | "NUMBER_LIST" | "TEXT" | "TEXT_LIST";
8696
8700
  AttributeId?: string;
8697
- DataTableArn?: string;
8698
8701
  Description?: string;
8699
- InstanceArn?: string;
8700
8702
  LastModifiedRegion?: string;
8701
8703
  LastModifiedTime?: number;
8702
8704
  LockVersion?: Record<string, unknown>;
8703
- Name?: string;
8704
8705
  Primary?: boolean;
8705
8706
  Validation?: Record<string, unknown>;
8706
- ValueType?: "BOOLEAN" | "NUMBER" | "NUMBER_LIST" | "TEXT" | "TEXT_LIST";
8707
8707
  }, attributes?: CFResourceAttributes);
8708
8708
  readonly AttributeId: string;
8709
8709
  readonly LastModifiedRegion: string;
@@ -8713,9 +8713,9 @@ export declare class DataTableAttribute {
8713
8713
 
8714
8714
  export declare class DataTableRecord {
8715
8715
  constructor(props: {
8716
- DataTableArn?: string;
8717
- DataTableRecord?: Record<string, unknown>;
8718
- InstanceArn?: string;
8716
+ DataTableArn: string;
8717
+ DataTableRecord: Record<string, unknown>;
8718
+ InstanceArn: string;
8719
8719
  RecordId?: string;
8720
8720
  }, attributes?: CFResourceAttributes);
8721
8721
  readonly RecordId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-aws",
3
- "version": "0.18.24",
3
+ "version": "0.18.25",
4
4
  "description": "AWS CloudFormation lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -80,7 +80,7 @@
80
80
  "typescript": "^5.9.3"
81
81
  },
82
82
  "peerDependencies": {
83
- "@intentius/chant": "^0.18.24",
83
+ "@intentius/chant": "^0.18.25",
84
84
  "typescript": "^5.9.3"
85
85
  }
86
86
  }
@@ -15,13 +15,24 @@ const baseProps = {
15
15
  containerUri: "123456789012.dkr.ecr.us-east-1.amazonaws.com/support-agent:latest",
16
16
  };
17
17
 
18
+ // The endpoint is opt-in (#978) — it races the Runtime's async version-READY when
19
+ // created in the same apply. Tests that exercise the endpoint pass this variant.
20
+ const withEndpoint = { ...baseProps, provisionEndpoint: true };
21
+
18
22
  describe("AgentCoreAgent", () => {
19
- test("returns all 8 members", () => {
23
+ test("returns 7 members by default; the endpoint is opt-in (#978)", () => {
20
24
  const instance = AgentCoreAgent(baseProps);
21
25
  expect(Object.keys(instance.members)).toEqual([
22
- "role", "gatewayRole", "runtime", "endpoint", "memory",
26
+ "role", "gatewayRole", "runtime", "memory",
23
27
  "workloadIdentity", "gateway", "gatewayTarget",
24
28
  ]);
29
+ expect((instance as any).endpoint).toBeUndefined();
30
+ });
31
+
32
+ test("provisionEndpoint adds the endpoint as an 8th member", () => {
33
+ const instance = AgentCoreAgent(withEndpoint);
34
+ expect(Object.keys(instance.members)).toContain("endpoint");
35
+ expect(Object.keys(instance.members)).toHaveLength(8);
25
36
  });
26
37
 
27
38
  test("expandComposite produces correct logical names", () => {
@@ -29,12 +40,14 @@ describe("AgentCoreAgent", () => {
29
40
  expect(expanded.has("agentRole")).toBe(true);
30
41
  expect(expanded.has("agentGatewayRole")).toBe(true);
31
42
  expect(expanded.has("agentRuntime")).toBe(true);
32
- expect(expanded.has("agentEndpoint")).toBe(true);
43
+ expect(expanded.has("agentEndpoint")).toBe(false); // opt-in (#978)
33
44
  expect(expanded.has("agentMemory")).toBe(true);
34
45
  expect(expanded.has("agentWorkloadIdentity")).toBe(true);
35
46
  expect(expanded.has("agentGateway")).toBe(true);
36
47
  expect(expanded.has("agentGatewayTarget")).toBe(true);
37
- expect(expanded.size).toBe(8);
48
+ expect(expanded.size).toBe(7);
49
+ // With the endpoint opted in, it appears as agentEndpoint.
50
+ expect(expandComposite("agent", AgentCoreAgent(withEndpoint)).has("agentEndpoint")).toBe(true);
38
51
  });
39
52
 
40
53
  test("role and gatewayRole trust bedrock-agentcore.amazonaws.com", () => {
@@ -50,7 +63,7 @@ describe("AgentCoreAgent", () => {
50
63
  });
51
64
 
52
65
  test("kebab-case name is sanitized for Runtime/RuntimeEndpoint/Memory (no hyphens)", () => {
53
- const instance = AgentCoreAgent(baseProps);
66
+ const instance = AgentCoreAgent(withEndpoint);
54
67
  const runtimeProps = (instance.runtime as any).props;
55
68
  const endpointProps = (instance.endpoint as any).props;
56
69
  const memoryProps = (instance.memory as any).props;
@@ -182,8 +195,8 @@ describe("AgentCoreAgent", () => {
182
195
  );
183
196
  });
184
197
 
185
- test("RuntimeEndpoint references runtime.AgentRuntimeId", () => {
186
- const instance = AgentCoreAgent(baseProps);
198
+ test("RuntimeEndpoint references runtime.AgentRuntimeId (when opted in)", () => {
199
+ const instance = AgentCoreAgent(withEndpoint);
187
200
  const endpointProps = (instance.endpoint as any).props;
188
201
  expect(endpointProps.AgentRuntimeId).toBeInstanceOf(AttrRef);
189
202
  });
@@ -222,7 +235,7 @@ describe("AgentCoreAgent", () => {
222
235
 
223
236
  test("per-member defaults are applied (e.g. custom endpoint description)", () => {
224
237
  const instance = AgentCoreAgent({
225
- ...baseProps,
238
+ ...withEndpoint,
226
239
  defaults: { endpoint: { Description: "prod alias" } },
227
240
  });
228
241
  const endpointProps = (instance.endpoint as any).props;
@@ -230,7 +243,7 @@ describe("AgentCoreAgent", () => {
230
243
  });
231
244
 
232
245
  test("serializes to a valid CloudFormation template with the expected resource types", () => {
233
- const expanded = expandComposite("agent", AgentCoreAgent(baseProps));
246
+ const expanded = expandComposite("agent", AgentCoreAgent(withEndpoint));
234
247
  resolveAttrRefs(expanded);
235
248
  const output = awsSerializer.serialize(expanded);
236
249
  const template = JSON.parse(output);
@@ -96,6 +96,18 @@ export interface AgentCoreAgentProps {
96
96
  environmentVariables?: Record<string, string>;
97
97
  /** RuntimeEndpoint name — the alias a version-promotion capability would repoint (deferred, see #882). Default: "DEFAULT". */
98
98
  endpointName?: string;
99
+ /**
100
+ * Create the `RuntimeEndpoint` in this template. **Default: false.** A
101
+ * RuntimeEndpoint can only be created once the Runtime's agent *version* is
102
+ * READY, which is asynchronous and is NOT gated by the Runtime resource's own
103
+ * CloudFormation `CREATE_COMPLETE` — so creating the endpoint in the same apply
104
+ * as the Runtime races and fails on a real deploy ("Agent version 1 must be in
105
+ * READY status. Current status: CREATING", #978). Leave this off and create the
106
+ * endpoint out-of-band once the runtime is READY — which is what Bedrock
107
+ * AgentCore's own tooling (and Loom's app) does. Opt in only when you know the
108
+ * Runtime will already be READY (e.g. a version-promotion flow on an existing runtime).
109
+ */
110
+ provisionEndpoint?: boolean;
99
111
  /** Memory event retention, in days. CFN bounds: 3-365. Default: 30. */
100
112
  memoryEventExpiryDays?: number;
101
113
  /** Gateway authorizer. Mirrors the generated `BedrockAgentCoreGateway_AuthorizerType` CFN enum. Default: "AWS_IAM". */
@@ -122,7 +134,8 @@ export type AgentCoreAgentResult = {
122
134
  role: InstanceType<typeof Role>;
123
135
  gatewayRole: InstanceType<typeof Role>;
124
136
  runtime: InstanceType<typeof Runtime>;
125
- endpoint: InstanceType<typeof RuntimeEndpoint>;
137
+ /** Present only when `provisionEndpoint` is set — see that prop (#978). */
138
+ endpoint?: InstanceType<typeof RuntimeEndpoint>;
126
139
  memory: InstanceType<typeof Memory>;
127
140
  workloadIdentity: InstanceType<typeof WorkloadIdentity>;
128
141
  gateway: InstanceType<typeof BedrockAgentCoreGateway>;
@@ -228,10 +241,14 @@ export const AgentCoreAgent = Composite<AgentCoreAgentProps, AgentCoreAgentResul
228
241
  EnvironmentVariables: props.environmentVariables,
229
242
  }, defaults?.runtime));
230
243
 
231
- const endpoint = new RuntimeEndpoint(mergeDefaults({
232
- AgentRuntimeId: runtime.AgentRuntimeId,
233
- Name: toRuntimeIdentifier(props.endpointName ?? "DEFAULT"),
234
- }, defaults?.endpoint));
244
+ // Opt-in only (#978): the endpoint races the Runtime's async version-READY when
245
+ // created in the same apply. Off by default; create it out-of-band post-READY.
246
+ const endpoint = props.provisionEndpoint
247
+ ? new RuntimeEndpoint(mergeDefaults({
248
+ AgentRuntimeId: runtime.AgentRuntimeId,
249
+ Name: toRuntimeIdentifier(props.endpointName ?? "DEFAULT"),
250
+ }, defaults?.endpoint))
251
+ : undefined;
235
252
 
236
253
  const memory = new Memory(mergeDefaults({
237
254
  Name: `${runtimeName}Memory`.slice(0, 48),
@@ -264,5 +281,5 @@ export const AgentCoreAgent = Composite<AgentCoreAgentProps, AgentCoreAgentResul
264
281
  },
265
282
  }, defaults?.gatewayTarget));
266
283
 
267
- return { role, gatewayRole, runtime, endpoint, memory, workloadIdentity, gateway, gatewayTarget };
284
+ return { role, gatewayRole, runtime, ...(endpoint ? { endpoint } : {}), memory, workloadIdentity, gateway, gatewayTarget };
268
285
  }, "AgentCoreAgent");
@@ -8659,30 +8659,30 @@ export declare class DataSyncAgent {
8659
8659
 
8660
8660
  export declare class DataTable {
8661
8661
  constructor(props: {
8662
+ /** The identifier of the Amazon Connect instance. */
8663
+ InstanceArn: string;
8664
+ /** The name of the Data Table */
8665
+ Name: string;
8666
+ /** The status of the Data Table */
8667
+ Status: "PUBLISHED";
8668
+ /** The time zone of the Data Table */
8669
+ TimeZone: string;
8670
+ /** The value lock level of the Data Table */
8671
+ ValueLockLevel: "ATTRIBUTE" | "DATA_TABLE" | "NONE" | "PRIMARY_VALUE" | "VALUE";
8662
8672
  /** The arn of the Data Table */
8663
8673
  Arn?: string;
8664
8674
  /** The creation time of the Data Table */
8665
8675
  CreatedTime?: number;
8666
8676
  /** The description of the Data Table. */
8667
8677
  Description?: string;
8668
- /** The identifier of the Amazon Connect instance. */
8669
- InstanceArn?: string;
8670
8678
  /** Last modified region. */
8671
8679
  LastModifiedRegion?: string;
8672
8680
  /** Last modified time. */
8673
8681
  LastModifiedTime?: number;
8674
8682
  /** The lock version of the Data Table */
8675
8683
  LockVersion?: Record<string, unknown>;
8676
- /** The name of the Data Table */
8677
- Name?: string;
8678
- /** The status of the Data Table */
8679
- Status?: "PUBLISHED";
8680
8684
  /** One or more tags. */
8681
8685
  Tags?: DataTable_Tag[];
8682
- /** The time zone of the Data Table */
8683
- TimeZone?: string;
8684
- /** The value lock level of the Data Table */
8685
- ValueLockLevel?: "ATTRIBUTE" | "DATA_TABLE" | "NONE" | "PRIMARY_VALUE" | "VALUE";
8686
8686
  }, attributes?: CFResourceAttributes);
8687
8687
  readonly Arn: string;
8688
8688
  readonly CreatedTime: number;
@@ -8693,17 +8693,17 @@ export declare class DataTable {
8693
8693
 
8694
8694
  export declare class DataTableAttribute {
8695
8695
  constructor(props: {
8696
+ DataTableArn: string;
8697
+ InstanceArn: string;
8698
+ Name: string;
8699
+ ValueType: "BOOLEAN" | "NUMBER" | "NUMBER_LIST" | "TEXT" | "TEXT_LIST";
8696
8700
  AttributeId?: string;
8697
- DataTableArn?: string;
8698
8701
  Description?: string;
8699
- InstanceArn?: string;
8700
8702
  LastModifiedRegion?: string;
8701
8703
  LastModifiedTime?: number;
8702
8704
  LockVersion?: Record<string, unknown>;
8703
- Name?: string;
8704
8705
  Primary?: boolean;
8705
8706
  Validation?: Record<string, unknown>;
8706
- ValueType?: "BOOLEAN" | "NUMBER" | "NUMBER_LIST" | "TEXT" | "TEXT_LIST";
8707
8707
  }, attributes?: CFResourceAttributes);
8708
8708
  readonly AttributeId: string;
8709
8709
  readonly LastModifiedRegion: string;
@@ -8713,9 +8713,9 @@ export declare class DataTableAttribute {
8713
8713
 
8714
8714
  export declare class DataTableRecord {
8715
8715
  constructor(props: {
8716
- DataTableArn?: string;
8717
- DataTableRecord?: Record<string, unknown>;
8718
- InstanceArn?: string;
8716
+ DataTableArn: string;
8717
+ DataTableRecord: Record<string, unknown>;
8718
+ InstanceArn: string;
8719
8719
  RecordId?: string;
8720
8720
  }, attributes?: CFResourceAttributes);
8721
8721
  readonly RecordId: string;