@intentius/chant-lexicon-aws 0.0.4 → 0.0.5

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.
@@ -25833,96 +25833,57 @@ export declare class ReplicationConfiguration {
25833
25833
 
25834
25834
  export declare class ReplicationGroup {
25835
25835
  constructor(props: {
25836
- /** A user-created description for the replication group. */
25837
25836
  replicationGroupDescription: string;
25838
- /** A flag that enables encryption at rest when set to true.AtRestEncryptionEnabled after the replication group is created. To enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to true when you create the replication group. */
25839
25837
  atRestEncryptionEnabled?: boolean;
25840
- /** Reserved parameter. The password used to access a password protected server.AuthToken can be specified only on replication groups where TransitEncryptionEnabled is true. For more information. */
25841
25838
  authToken?: string;
25842
- /** Specifies whether a read-only replica is automatically promoted to read/write primary if the existing primary fails. AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) replication groups. */
25843
25839
  automaticFailoverEnabled?: boolean;
25844
- /** This parameter is currently disabled. */
25845
25840
  autoMinorVersionUpgrade?: boolean;
25846
- /** The compute and memory capacity of the nodes in the node group (shard). */
25847
25841
  cacheNodeType?: string;
25848
- /** The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. */
25849
25842
  cacheParameterGroupName?: string;
25850
- /** A list of cache security group names to associate with this replication group. */
25851
25843
  cacheSecurityGroupNames?: string[];
25852
- /** The name of the cache subnet group to be used for the replication group. */
25853
25844
  cacheSubnetGroupName?: string;
25854
- /** Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled. For more information, see Modify cluster mode. */
25855
25845
  clusterMode?: string;
25856
- /** The configuration details of the replication group. */
25857
- configurationEndPoint?: ReplicationGroup_Endpoint;
25858
- /** Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes. */
25846
+ configurationEndPointAddress?: string;
25847
+ configurationEndPointPort?: string;
25859
25848
  dataTieringEnabled?: boolean;
25860
- /** The name of the cache engine to be used for the clusters in this replication group. */
25861
25849
  engine?: string;
25862
- /** The version number of the cache engine to be used for the clusters in this replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation. */
25863
25850
  engineVersion?: string;
25864
- /** The name of the Global datastore */
25865
25851
  globalReplicationGroupId?: string;
25866
- /** The network type you choose when creating a replication group, either ipv4 | ipv6. IPv6 is supported for workloads using Redis OSS engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system. */
25867
25852
  ipDiscovery?: string;
25868
- /** The ID of the KMS key used to encrypt the disk on the cluster. */
25869
25853
  kmsKeyId?: string;
25870
- /** Specifies the destination, format and type of the logs. */
25871
25854
  logDeliveryConfigurations?: ReplicationGroup_LogDeliveryConfigurationRequest[];
25872
- /** A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see Minimizing Downtime: Multi-AZ. */
25873
25855
  multiAZEnabled?: boolean;
25874
- /** Must be either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads using Redis OSS engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system */
25875
25856
  networkType?: string;
25876
- /** NodeGroupConfiguration is a property of the AWS::ElastiCache::ReplicationGroup resource that configures an Amazon ElastiCache (ElastiCache) Redis cluster node group. */
25877
25857
  nodeGroupConfiguration?: ReplicationGroup_NodeGroupConfiguration[];
25878
- /** The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. */
25879
25858
  notificationTopicArn?: string;
25880
- /** The number of clusters this replication group initially has.This parameter is not used if there is more than one node group (shard). You should use ReplicasPerNodeGroup instead. */
25881
25859
  numCacheClusters?: number;
25882
- /** An optional parameter that specifies the number of node groups (shards) for this Redis (cluster mode enabled) replication group. For Redis (cluster mode disabled) either omit this parameter or set it to 1. */
25883
25860
  numNodeGroups?: number;
25884
- /** The port number on which each member of the replication group accepts connections. */
25885
25861
  port?: number;
25886
- /** A list of EC2 Availability Zones in which the replication group's clusters are created. The order of the Availability Zones in the list is the order in which clusters are allocated. The primary cluster is created in the first AZ in the list. This parameter is not used if there is more than one node group (shard). You should use NodeGroupConfiguration instead. */
25887
25862
  preferredCacheClusterAZs?: string[];
25888
- /** Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. */
25889
25863
  preferredMaintenanceWindow?: string;
25890
- /** The identifier of the cluster that serves as the primary for this replication group. This cluster must already exist and have a status of available. */
25891
25864
  primaryClusterId?: string;
25892
- /** The primary endpoint configuration */
25893
- primaryEndPoint?: ReplicationGroup_Endpoint;
25894
- readEndPoint?: Record<string, unknown>;
25895
- /** The endpoint of the reader node in the replication group. */
25896
- readerEndPoint?: ReplicationGroup_Endpoint;
25897
- /** An optional parameter that specifies the number of replica nodes in each node group (shard). Valid values are 0 to 5. */
25865
+ primaryEndPointAddress?: string;
25866
+ primaryEndPointPort?: string;
25867
+ readEndPointAddresses?: string;
25868
+ readEndPointAddressesList?: string[];
25869
+ readEndPointPorts?: string;
25870
+ readEndPointPortsList?: string[];
25871
+ readerEndPointAddress?: string;
25872
+ readerEndPointPort?: string;
25898
25873
  replicasPerNodeGroup?: number;
25899
- /** The replication group identifier. This parameter is stored as a lowercase string. */
25900
25874
  replicationGroupId?: string;
25901
- /** One or more Amazon VPC security groups associated with this replication group. */
25902
25875
  securityGroupIds?: string[];
25903
- /** A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB snapshot files stored in Amazon S3. */
25904
25876
  snapshotArns?: string[];
25905
- /** The name of a snapshot from which to restore data into the new replication group. The snapshot status changes to restoring while the new replication group is being created. */
25906
25877
  snapshotName?: string;
25907
- /** The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted. */
25908
25878
  snapshotRetentionLimit?: number;
25909
- /** The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Redis (cluster mode enabled) replication groups. */
25910
25879
  snapshottingClusterId?: string;
25911
- /** The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). */
25912
25880
  snapshotWindow?: string;
25913
- /** A list of cost allocation tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue. */
25914
25881
  tags?: ReplicationGroup_Tag[];
25915
- /** A flag that enables in-transit encryption when set to true. */
25916
25882
  transitEncryptionEnabled?: boolean;
25917
- /** A setting that allows you to migrate your clients to use in-transit encryption, with no downtime. When setting TransitEncryptionEnabled to true, you can set your TransitEncryptionMode to preferred in the same request, to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Redis OSS clients to use encrypted connections you can modify the value to required to allow encrypted connections only. Setting TransitEncryptionMode to required is a two-step process that requires you to first set the TransitEncryptionMode to preferred, after that you can set TransitEncryptionMode to required. This process will not trigger the replacement of the replication group. */
25918
25883
  transitEncryptionMode?: string;
25919
- /** The ID of user group to associate with the replication group. */
25920
25884
  userGroupIds?: string[];
25921
25885
  });
25922
- readonly configurationEndPoint: ReplicationGroup_Endpoint;
25923
- readonly primaryEndPoint: ReplicationGroup_Endpoint;
25924
- readonly readEndPoint: Record<string, unknown>;
25925
- readonly readerEndPoint: ReplicationGroup_Endpoint;
25886
+ readonly replicationGroupId: string;
25926
25887
  }
25927
25888
 
25928
25889
  export declare class ReplicationInstance {
@@ -108499,15 +108460,10 @@ export declare class Nodegroup_UpdateConfig {
108499
108460
 
108500
108461
  export declare class NodeGroupConfiguration {
108501
108462
  constructor(props: {
108502
- /** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to. */
108503
108463
  nodeGroupId?: string;
108504
- /** The Availability Zone where the primary node of this node group (shard) is launched. */
108505
108464
  primaryAvailabilityZone?: string;
108506
- /** A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of ReplicaCount or ReplicasPerNodeGroup if not specified. */
108507
108465
  replicaAvailabilityZones?: string[];
108508
- /** The number of read replica nodes in this node group (shard). */
108509
108466
  replicaCount?: number;
108510
- /** A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot. The following example specifies three slots (numbered 0, 1, and 2): 0,1,2,0-4999,5000-9999,10000-16,383. */
108511
108467
  slots?: string;
108512
108468
  });
108513
108469
  }
@@ -129319,7 +129275,6 @@ export declare class ReplicationConfiguration_RepositoryFilter {
129319
129275
 
129320
129276
  export declare class ReplicationGroup_CloudWatchLogsDestinationDetails {
129321
129277
  constructor(props: {
129322
- /** The name of the CloudWatch Logs log group. */
129323
129278
  logGroup: string;
129324
129279
  });
129325
129280
  }
@@ -129331,18 +129286,8 @@ export declare class ReplicationGroup_DestinationDetails {
129331
129286
  });
129332
129287
  }
129333
129288
 
129334
- export declare class ReplicationGroup_Endpoint {
129335
- constructor(props: {
129336
- /** The DNS hostname of the cache node. */
129337
- address?: string;
129338
- /** The port number that the cache engine is listening on. */
129339
- port?: string;
129340
- });
129341
- }
129342
-
129343
129289
  export declare class ReplicationGroup_KinesisFirehoseDestinationDetails {
129344
129290
  constructor(props: {
129345
- /** The name of the Kinesis Data Firehose delivery stream. */
129346
129291
  deliveryStream: string;
129347
129292
  });
129348
129293
  }
@@ -129350,35 +129295,25 @@ export declare class ReplicationGroup_KinesisFirehoseDestinationDetails {
129350
129295
  export declare class ReplicationGroup_LogDeliveryConfigurationRequest {
129351
129296
  constructor(props: {
129352
129297
  destinationDetails: ReplicationGroup_DestinationDetails;
129353
- /** Specify either CloudWatch Logs or Kinesis Data Firehose as the destination type. Valid values are either cloudwatch-logs or kinesis-firehose. */
129354
129298
  destinationType: string;
129355
- /** Valid values are either json or text. */
129356
129299
  logFormat: string;
129357
- /** Valid value is either slow-log, which refers to slow-log or engine-log. */
129358
129300
  logType: string;
129359
129301
  });
129360
129302
  }
129361
129303
 
129362
129304
  export declare class ReplicationGroup_NodeGroupConfiguration {
129363
129305
  constructor(props: {
129364
- /** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to. */
129365
129306
  nodeGroupId?: string;
129366
- /** The Availability Zone where the primary node of this node group (shard) is launched. */
129367
129307
  primaryAvailabilityZone?: string;
129368
- /** A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of ReplicaCount or ReplicasPerNodeGroup if not specified. */
129369
129308
  replicaAvailabilityZones?: string[];
129370
- /** The number of read replica nodes in this node group (shard). */
129371
129309
  replicaCount?: number;
129372
- /** A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot. The following example specifies three slots (numbered 0, 1, and 2): 0,1,2,0-4999,5000-9999,10000-16,383. */
129373
129310
  slots?: string;
129374
129311
  });
129375
129312
  }
129376
129313
 
129377
129314
  export declare class ReplicationGroup_Tag {
129378
129315
  constructor(props: {
129379
- /** The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */
129380
129316
  key: string;
129381
- /** The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */
129382
129317
  value: string;
129383
129318
  });
129384
129319
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-aws",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "files": ["src/", "dist/"],
@@ -22,7 +22,7 @@
22
22
  "prepack": "bun run bundle && bun run validate"
23
23
  },
24
24
  "dependencies": {
25
- "@intentius/chant": "0.0.1",
25
+ "@intentius/chant": "0.0.4",
26
26
  "fflate": "^0.8.2",
27
27
  "js-yaml": "^4.1.0"
28
28
  },
@@ -125,6 +125,7 @@ export async function generateDocs(options?: { verbose?: boolean }): Promise<voi
125
125
  outputFormat,
126
126
  serviceFromType,
127
127
  suppressPages: ["pseudo-parameters", "intrinsics", "rules"],
128
+ examplesDir: join(pkgDir, "examples"),
128
129
  extraPages: [
129
130
  {
130
131
  slug: "cloudformation",
@@ -137,13 +138,7 @@ export async function generateDocs(options?: { verbose?: boolean }): Promise<voi
137
138
  - Resolves \`AttrRef\` references to \`Fn::GetAtt\`
138
139
  - Resolves resource references to \`Ref\` intrinsics
139
140
 
140
- \`\`\`typescript
141
- // This chant declaration...
142
- export const dataBucket = new Bucket({
143
- bucketName: Sub\`\${AWS.StackName}-data\`,
144
- versioningConfiguration: $.versioningEnabled,
145
- });
146
- \`\`\`
141
+ {{file:getting-started/src/data-bucket.ts}}
147
142
 
148
143
  Produces this CloudFormation resource:
149
144
 
@@ -180,24 +175,11 @@ Common resources get fixed short names for stability. When two services define t
180
175
 
181
176
  Every chant project has a barrel file (conventionally \`_.ts\`) that re-exports the lexicon and provides cross-file references:
182
177
 
183
- \`\`\`typescript
184
- // _.ts — the barrel file
185
- export * from "@intentius/chant-lexicon-aws";
186
- import * as core from "@intentius/chant";
187
- export const $ = core.barrel(import.meta.dir);
188
- \`\`\`
178
+ {{file:getting-started/src/_.ts}}
189
179
 
190
180
  Other files import the barrel and use \`$\` to reference sibling exports:
191
181
 
192
- \`\`\`typescript
193
- // data-bucket.ts
194
- import * as _ from "./_";
195
-
196
- export const dataBucket = new _.Bucket({
197
- bucketName: _.Sub\`\${_.AWS.StackName}-data\`,
198
- serverSideEncryptionConfiguration: _.$.encryptionDefault, // from defaults.ts
199
- });
200
- \`\`\`
182
+ {{file:getting-started/src/data-bucket.ts}}
201
183
 
202
184
  The \`$\` proxy lazily resolves exports from other files in the same directory. When the serializer encounters \`_.$.encryptionDefault\`, it resolves to the actual exported value and serializes the reference as \`Fn::GetAtt\` or \`Ref\` as appropriate. This is how cross-file references work without circular imports.
203
185
 
@@ -205,14 +187,7 @@ The \`$\` proxy lazily resolves exports from other files in the same directory.
205
187
 
206
188
  CloudFormation parameters let you customize a stack at deploy time. Export a \`Parameter\` to add it to the template's \`Parameters\` section:
207
189
 
208
- \`\`\`typescript
209
- import { Parameter } from "@intentius/chant-lexicon-aws";
210
-
211
- export const environment = new Parameter("String", {
212
- description: "Deployment environment",
213
- defaultValue: "dev",
214
- });
215
- \`\`\`
190
+ {{file:getting-started/src/environment.ts}}
216
191
 
217
192
  Produces:
218
193
 
@@ -287,13 +262,7 @@ CloudFormation automatically creates dependencies between resources when you use
287
262
 
288
263
  For cases where you need an explicit dependency without a property reference, set \`dependsOn\`:
289
264
 
290
- \`\`\`typescript
291
- export const appServer = new Instance({
292
- imageId: "ami-12345678",
293
- instanceType: "t3.micro",
294
- dependsOn: ["DatabaseCluster"],
295
- });
296
- \`\`\`
265
+ {{file:docs-snippets/src/depends-on.ts}}
297
266
 
298
267
  The \`WAW010\` post-synth check warns if a \`DependsOn\` target is already referenced via \`Ref\` or \`Fn::GetAtt\` in properties — in that case the explicit dependency is redundant.
299
268
 
@@ -384,13 +353,7 @@ Principal: { Service: ["lambda.amazonaws.com", "edgelambda.amazonaws.com"] },
384
353
 
385
354
  Use the \`If\` intrinsic for conditional values within resource properties:
386
355
 
387
- \`\`\`typescript
388
- import { If } from "@intentius/chant-lexicon-aws";
389
-
390
- export const bucket = new Bucket({
391
- bucketName: If("IsProduction", "prod-data", "dev-data"),
392
- });
393
- \`\`\`
356
+ {{file:docs-snippets/src/conditions.ts}}
394
357
 
395
358
  CloudFormation \`Conditions\` blocks are recognized by the serializer when importing existing templates. For new stacks, use TypeScript logic for build-time decisions and \`If\` for deploy-time decisions.
396
359
 
@@ -445,15 +408,7 @@ See [Nested Stacks](./nested-stacks) for the full guide.
445
408
 
446
409
  Tags are standard CloudFormation \`Key\`/\`Value\` arrays. Pass them on any resource that supports tagging:
447
410
 
448
- \`\`\`typescript
449
- export const bucket = new Bucket({
450
- bucketName: "my-bucket",
451
- tags: [
452
- { key: "Environment", value: "production" },
453
- { key: "Team", value: "platform" },
454
- ],
455
- });
456
- \`\`\`
411
+ {{file:docs-snippets/src/tagging.ts}}
457
412
 
458
413
  To apply tags across all members of a composite, use [\`propagate\`](./composites#propagate--shared-properties):
459
414
 
@@ -472,9 +427,9 @@ export const api = propagate(
472
427
  description: "CloudFormation intrinsic functions and their chant syntax",
473
428
  content: `CloudFormation intrinsic functions are available as imports from the lexicon. They produce the corresponding \`Fn::\` calls in the serialized template.
474
429
 
475
- \`\`\`typescript
476
- import { Sub, Ref, GetAtt, If, Join, Select, Split, Base64, AWS } from "@intentius/chant-lexicon-aws";
477
- \`\`\`
430
+ Here is a complete example using all intrinsic functions:
431
+
432
+ {{file:docs-snippets/src/intrinsics.ts}}
478
433
 
479
434
  ## \`Sub\` — string substitution
480
435
 
@@ -871,13 +826,13 @@ Lint rules analyze your TypeScript source code before build.
871
826
 
872
827
  Flags hardcoded AWS region strings like \`us-east-1\`. Use \`AWS.Region\` instead so templates are portable across regions.
873
828
 
874
- \`\`\`typescript
875
- // Triggers WAW001
876
- const endpoint = "s3.us-east-1.amazonaws.com";
829
+ **Bad** — triggers WAW001:
877
830
 
878
- // Fixed
879
- const endpoint = Sub\`s3.\${AWS.Region}.amazonaws.com\`;
880
- \`\`\`
831
+ {{file:docs-snippets/src/lint-waw001-bad.ts}}
832
+
833
+ **Good** — uses \`AWS.Region\`:
834
+
835
+ {{file:docs-snippets/src/lint-waw001-good.ts}}
881
836
 
882
837
  ### WAW006 — S3 Bucket Encryption
883
838
 
@@ -885,20 +840,13 @@ const endpoint = Sub\`s3.\${AWS.Region}.amazonaws.com\`;
885
840
 
886
841
  Flags S3 buckets that don't configure server-side encryption. AWS recommends enabling encryption on all buckets.
887
842
 
888
- \`\`\`typescript
889
- // Triggers WAW006
890
- export const bucket = new Bucket({ bucketName: "my-bucket" });
843
+ **Bad** — triggers WAW006:
891
844
 
892
- // Fixed — add encryption configuration
893
- export const bucket = new Bucket({
894
- bucketName: "my-bucket",
895
- bucketEncryption: {
896
- serverSideEncryptionConfiguration: [{
897
- serverSideEncryptionByDefault: { sseAlgorithm: "AES256" },
898
- }],
899
- },
900
- });
901
- \`\`\`
845
+ {{file:docs-snippets/src/lint-waw006-bad.ts}}
846
+
847
+ **Good** — encryption configured:
848
+
849
+ {{file:docs-snippets/src/lint-waw006-good.ts}}
902
850
 
903
851
  ### WAW009 — IAM Wildcard Resource
904
852
 
@@ -906,13 +854,13 @@ export const bucket = new Bucket({
906
854
 
907
855
  Flags IAM policy statements that use \`"Resource": "*"\`. Prefer scoped resource ARNs following the principle of least privilege.
908
856
 
909
- \`\`\`typescript
910
- // Triggers WAW009
911
- { Effect: "Allow", Action: ["s3:GetObject"], Resource: "*" }
857
+ **Bad** — triggers WAW009:
912
858
 
913
- // Fixed — scope to a specific bucket
914
- { Effect: "Allow", Action: ["s3:GetObject"], Resource: Sub\`arn:aws:s3:::\${AWS.StackName}-data/*\` }
915
- \`\`\`
859
+ {{file:docs-snippets/src/lint-waw009-bad.ts}}
860
+
861
+ **Good** — scoped ARN:
862
+
863
+ {{file:docs-snippets/src/lint-waw009-good.ts}}
916
864
 
917
865
  IAM policy documents use PascalCase keys (\`Effect\`, \`Action\`, \`Resource\`) matching the IAM JSON Policy Language spec. The \`PolicyDocument\` and \`IamPolicyStatement\` types provide full autocomplete for these fields.
918
866
 
@@ -1092,23 +1040,7 @@ src/
1092
1040
  3. **Cross-resource references** — \`_.$.dataBucket.arn\` in \`handler.ts\` serializes to \`Fn::GetAtt\` in the template
1093
1041
  4. **Intrinsics** — \`Sub\` tagged templates with pseudo-parameters for dynamic naming
1094
1042
 
1095
- \`\`\`typescript
1096
- // handler.ts — Lambda function referencing other resources
1097
- import * as _ from "./_";
1098
-
1099
- const lambdaCode = { zipFile: "exports.handler = async () => ({ statusCode: 200 });" };
1100
-
1101
- export const handler = new _.Function({
1102
- functionName: _.Sub\`\${_.AWS.StackName}-handler\`,
1103
- handler: "index.handler",
1104
- runtime: "nodejs20.x",
1105
- role: _.$.functionRole.arn, // → Fn::GetAtt
1106
- code: lambdaCode,
1107
- environment: {
1108
- variables: { BUCKET_ARN: _.$.dataBucket.arn }, // → Fn::GetAtt
1109
- },
1110
- });
1111
- \`\`\`
1043
+ {{file:getting-started/src/handler.ts}}
1112
1044
 
1113
1045
  ## Advanced
1114
1046
 
@@ -1160,34 +1092,9 @@ src/
1160
1092
  3. **Multi-file output** — build produces \`template.json\` (parent) and \`network.template.json\` (child)
1161
1093
  4. **TemplateBasePath** — auto-generated parameter for configuring child template URLs per environment
1162
1094
 
1163
- \`\`\`typescript
1164
- // network/outputs.ts — child declares what the parent can reference
1165
- import * as _ from "./_";
1166
- import { stackOutput } from "@intentius/chant";
1167
-
1168
- export const vpcId = stackOutput(_.$.vpc.vpcId, { description: "VPC ID" });
1169
- export const subnetId = stackOutput(_.$.subnet.subnetId, { description: "Public subnet ID" });
1170
- export const lambdaSgId = stackOutput(_.$.lambdaSg.groupId, { description: "Lambda security group ID" });
1171
- \`\`\`
1095
+ {{file:nested-stacks/src/network/outputs.ts}}
1172
1096
 
1173
- \`\`\`typescript
1174
- // app.ts — parent references child project
1175
- import * as _ from "./_";
1176
-
1177
- const network = _.nestedStack("network", import.meta.dir + "/network");
1178
-
1179
- export const handler = new _.Function({
1180
- functionName: _.Sub\`\${_.AWS.StackName}-handler\`,
1181
- runtime: "nodejs20.x",
1182
- handler: "index.handler",
1183
- role: _.Ref("LambdaExecutionRole"),
1184
- code: { zipFile: "exports.handler = async () => ({ statusCode: 200 });" },
1185
- vpcConfig: {
1186
- subnetIds: [network.outputs.subnetId],
1187
- securityGroupIds: [network.outputs.lambdaSgId],
1188
- },
1189
- });
1190
- \`\`\`
1097
+ {{file:nested-stacks/src/app.ts}}
1191
1098
 
1192
1099
  See [Nested Stacks](./nested-stacks) for the full guide.`,
1193
1100
  },
@@ -25833,96 +25833,57 @@ export declare class ReplicationConfiguration {
25833
25833
 
25834
25834
  export declare class ReplicationGroup {
25835
25835
  constructor(props: {
25836
- /** A user-created description for the replication group. */
25837
25836
  replicationGroupDescription: string;
25838
- /** A flag that enables encryption at rest when set to true.AtRestEncryptionEnabled after the replication group is created. To enable encryption at rest on a replication group you must set AtRestEncryptionEnabled to true when you create the replication group. */
25839
25837
  atRestEncryptionEnabled?: boolean;
25840
- /** Reserved parameter. The password used to access a password protected server.AuthToken can be specified only on replication groups where TransitEncryptionEnabled is true. For more information. */
25841
25838
  authToken?: string;
25842
- /** Specifies whether a read-only replica is automatically promoted to read/write primary if the existing primary fails. AutomaticFailoverEnabled must be enabled for Redis (cluster mode enabled) replication groups. */
25843
25839
  automaticFailoverEnabled?: boolean;
25844
- /** This parameter is currently disabled. */
25845
25840
  autoMinorVersionUpgrade?: boolean;
25846
- /** The compute and memory capacity of the nodes in the node group (shard). */
25847
25841
  cacheNodeType?: string;
25848
- /** The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. */
25849
25842
  cacheParameterGroupName?: string;
25850
- /** A list of cache security group names to associate with this replication group. */
25851
25843
  cacheSecurityGroupNames?: string[];
25852
- /** The name of the cache subnet group to be used for the replication group. */
25853
25844
  cacheSubnetGroupName?: string;
25854
- /** Enabled or Disabled. To modify cluster mode from Disabled to Enabled, you must first set the cluster mode to Compatible. Compatible mode allows your Redis OSS clients to connect using both cluster mode enabled and cluster mode disabled. After you migrate all Redis OSS clients to use cluster mode enabled, you can then complete cluster mode configuration and set the cluster mode to Enabled. For more information, see Modify cluster mode. */
25855
25845
  clusterMode?: string;
25856
- /** The configuration details of the replication group. */
25857
- configurationEndPoint?: ReplicationGroup_Endpoint;
25858
- /** Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes. */
25846
+ configurationEndPointAddress?: string;
25847
+ configurationEndPointPort?: string;
25859
25848
  dataTieringEnabled?: boolean;
25860
- /** The name of the cache engine to be used for the clusters in this replication group. */
25861
25849
  engine?: string;
25862
- /** The version number of the cache engine to be used for the clusters in this replication group. To view the supported cache engine versions, use the DescribeCacheEngineVersions operation. */
25863
25850
  engineVersion?: string;
25864
- /** The name of the Global datastore */
25865
25851
  globalReplicationGroupId?: string;
25866
- /** The network type you choose when creating a replication group, either ipv4 | ipv6. IPv6 is supported for workloads using Redis OSS engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system. */
25867
25852
  ipDiscovery?: string;
25868
- /** The ID of the KMS key used to encrypt the disk on the cluster. */
25869
25853
  kmsKeyId?: string;
25870
- /** Specifies the destination, format and type of the logs. */
25871
25854
  logDeliveryConfigurations?: ReplicationGroup_LogDeliveryConfigurationRequest[];
25872
- /** A flag indicating if you have Multi-AZ enabled to enhance fault tolerance. For more information, see Minimizing Downtime: Multi-AZ. */
25873
25855
  multiAZEnabled?: boolean;
25874
- /** Must be either ipv4 | ipv6 | dual_stack. IPv6 is supported for workloads using Redis OSS engine version 6.2 onward or Memcached engine version 1.6.6 on all instances built on the Nitro system */
25875
25856
  networkType?: string;
25876
- /** NodeGroupConfiguration is a property of the AWS::ElastiCache::ReplicationGroup resource that configures an Amazon ElastiCache (ElastiCache) Redis cluster node group. */
25877
25857
  nodeGroupConfiguration?: ReplicationGroup_NodeGroupConfiguration[];
25878
- /** The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic to which notifications are sent. */
25879
25858
  notificationTopicArn?: string;
25880
- /** The number of clusters this replication group initially has.This parameter is not used if there is more than one node group (shard). You should use ReplicasPerNodeGroup instead. */
25881
25859
  numCacheClusters?: number;
25882
- /** An optional parameter that specifies the number of node groups (shards) for this Redis (cluster mode enabled) replication group. For Redis (cluster mode disabled) either omit this parameter or set it to 1. */
25883
25860
  numNodeGroups?: number;
25884
- /** The port number on which each member of the replication group accepts connections. */
25885
25861
  port?: number;
25886
- /** A list of EC2 Availability Zones in which the replication group's clusters are created. The order of the Availability Zones in the list is the order in which clusters are allocated. The primary cluster is created in the first AZ in the list. This parameter is not used if there is more than one node group (shard). You should use NodeGroupConfiguration instead. */
25887
25862
  preferredCacheClusterAZs?: string[];
25888
- /** Specifies the weekly time range during which maintenance on the cluster is performed. It is specified as a range in the format ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. */
25889
25863
  preferredMaintenanceWindow?: string;
25890
- /** The identifier of the cluster that serves as the primary for this replication group. This cluster must already exist and have a status of available. */
25891
25864
  primaryClusterId?: string;
25892
- /** The primary endpoint configuration */
25893
- primaryEndPoint?: ReplicationGroup_Endpoint;
25894
- readEndPoint?: Record<string, unknown>;
25895
- /** The endpoint of the reader node in the replication group. */
25896
- readerEndPoint?: ReplicationGroup_Endpoint;
25897
- /** An optional parameter that specifies the number of replica nodes in each node group (shard). Valid values are 0 to 5. */
25865
+ primaryEndPointAddress?: string;
25866
+ primaryEndPointPort?: string;
25867
+ readEndPointAddresses?: string;
25868
+ readEndPointAddressesList?: string[];
25869
+ readEndPointPorts?: string;
25870
+ readEndPointPortsList?: string[];
25871
+ readerEndPointAddress?: string;
25872
+ readerEndPointPort?: string;
25898
25873
  replicasPerNodeGroup?: number;
25899
- /** The replication group identifier. This parameter is stored as a lowercase string. */
25900
25874
  replicationGroupId?: string;
25901
- /** One or more Amazon VPC security groups associated with this replication group. */
25902
25875
  securityGroupIds?: string[];
25903
- /** A list of Amazon Resource Names (ARN) that uniquely identify the Redis RDB snapshot files stored in Amazon S3. */
25904
25876
  snapshotArns?: string[];
25905
- /** The name of a snapshot from which to restore data into the new replication group. The snapshot status changes to restoring while the new replication group is being created. */
25906
25877
  snapshotName?: string;
25907
- /** The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted. */
25908
25878
  snapshotRetentionLimit?: number;
25909
- /** The cluster ID that is used as the daily snapshot source for the replication group. This parameter cannot be set for Redis (cluster mode enabled) replication groups. */
25910
25879
  snapshottingClusterId?: string;
25911
- /** The daily time range (in UTC) during which ElastiCache begins taking a daily snapshot of your node group (shard). */
25912
25880
  snapshotWindow?: string;
25913
- /** A list of cost allocation tags to be added to this resource. Tags are comma-separated key,value pairs (e.g. Key=myKey, Value=myKeyValue. You can include multiple tags as shown following: Key=myKey, Value=myKeyValue Key=mySecondKey, Value=mySecondKeyValue. */
25914
25881
  tags?: ReplicationGroup_Tag[];
25915
- /** A flag that enables in-transit encryption when set to true. */
25916
25882
  transitEncryptionEnabled?: boolean;
25917
- /** A setting that allows you to migrate your clients to use in-transit encryption, with no downtime. When setting TransitEncryptionEnabled to true, you can set your TransitEncryptionMode to preferred in the same request, to allow both encrypted and unencrypted connections at the same time. Once you migrate all your Redis OSS clients to use encrypted connections you can modify the value to required to allow encrypted connections only. Setting TransitEncryptionMode to required is a two-step process that requires you to first set the TransitEncryptionMode to preferred, after that you can set TransitEncryptionMode to required. This process will not trigger the replacement of the replication group. */
25918
25883
  transitEncryptionMode?: string;
25919
- /** The ID of user group to associate with the replication group. */
25920
25884
  userGroupIds?: string[];
25921
25885
  });
25922
- readonly configurationEndPoint: ReplicationGroup_Endpoint;
25923
- readonly primaryEndPoint: ReplicationGroup_Endpoint;
25924
- readonly readEndPoint: Record<string, unknown>;
25925
- readonly readerEndPoint: ReplicationGroup_Endpoint;
25886
+ readonly replicationGroupId: string;
25926
25887
  }
25927
25888
 
25928
25889
  export declare class ReplicationInstance {
@@ -108499,15 +108460,10 @@ export declare class Nodegroup_UpdateConfig {
108499
108460
 
108500
108461
  export declare class NodeGroupConfiguration {
108501
108462
  constructor(props: {
108502
- /** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to. */
108503
108463
  nodeGroupId?: string;
108504
- /** The Availability Zone where the primary node of this node group (shard) is launched. */
108505
108464
  primaryAvailabilityZone?: string;
108506
- /** A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of ReplicaCount or ReplicasPerNodeGroup if not specified. */
108507
108465
  replicaAvailabilityZones?: string[];
108508
- /** The number of read replica nodes in this node group (shard). */
108509
108466
  replicaCount?: number;
108510
- /** A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot. The following example specifies three slots (numbered 0, 1, and 2): 0,1,2,0-4999,5000-9999,10000-16,383. */
108511
108467
  slots?: string;
108512
108468
  });
108513
108469
  }
@@ -129319,7 +129275,6 @@ export declare class ReplicationConfiguration_RepositoryFilter {
129319
129275
 
129320
129276
  export declare class ReplicationGroup_CloudWatchLogsDestinationDetails {
129321
129277
  constructor(props: {
129322
- /** The name of the CloudWatch Logs log group. */
129323
129278
  logGroup: string;
129324
129279
  });
129325
129280
  }
@@ -129331,18 +129286,8 @@ export declare class ReplicationGroup_DestinationDetails {
129331
129286
  });
129332
129287
  }
129333
129288
 
129334
- export declare class ReplicationGroup_Endpoint {
129335
- constructor(props: {
129336
- /** The DNS hostname of the cache node. */
129337
- address?: string;
129338
- /** The port number that the cache engine is listening on. */
129339
- port?: string;
129340
- });
129341
- }
129342
-
129343
129289
  export declare class ReplicationGroup_KinesisFirehoseDestinationDetails {
129344
129290
  constructor(props: {
129345
- /** The name of the Kinesis Data Firehose delivery stream. */
129346
129291
  deliveryStream: string;
129347
129292
  });
129348
129293
  }
@@ -129350,35 +129295,25 @@ export declare class ReplicationGroup_KinesisFirehoseDestinationDetails {
129350
129295
  export declare class ReplicationGroup_LogDeliveryConfigurationRequest {
129351
129296
  constructor(props: {
129352
129297
  destinationDetails: ReplicationGroup_DestinationDetails;
129353
- /** Specify either CloudWatch Logs or Kinesis Data Firehose as the destination type. Valid values are either cloudwatch-logs or kinesis-firehose. */
129354
129298
  destinationType: string;
129355
- /** Valid values are either json or text. */
129356
129299
  logFormat: string;
129357
- /** Valid value is either slow-log, which refers to slow-log or engine-log. */
129358
129300
  logType: string;
129359
129301
  });
129360
129302
  }
129361
129303
 
129362
129304
  export declare class ReplicationGroup_NodeGroupConfiguration {
129363
129305
  constructor(props: {
129364
- /** Either the ElastiCache for Redis supplied 4-digit id or a user supplied id for the node group these configuration values apply to. */
129365
129306
  nodeGroupId?: string;
129366
- /** The Availability Zone where the primary node of this node group (shard) is launched. */
129367
129307
  primaryAvailabilityZone?: string;
129368
- /** A list of Availability Zones to be used for the read replicas. The number of Availability Zones in this list must match the value of ReplicaCount or ReplicasPerNodeGroup if not specified. */
129369
129308
  replicaAvailabilityZones?: string[];
129370
- /** The number of read replica nodes in this node group (shard). */
129371
129309
  replicaCount?: number;
129372
- /** A string of comma-separated values where the first set of values are the slot numbers (zero based), and the second set of values are the keyspaces for each slot. The following example specifies three slots (numbered 0, 1, and 2): 0,1,2,0-4999,5000-9999,10000-16,383. */
129373
129310
  slots?: string;
129374
129311
  });
129375
129312
  }
129376
129313
 
129377
129314
  export declare class ReplicationGroup_Tag {
129378
129315
  constructor(props: {
129379
- /** The key name of the tag. You can specify a value that is 1 to 128 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */
129380
129316
  key: string;
129381
- /** The value for the tag. You can specify a value that is 0 to 256 Unicode characters in length and cannot be prefixed with aws:. You can use any of the following characters: the set of Unicode letters, digits, whitespace, _, ., /, =, +, and -. */
129382
129317
  value: string;
129383
129318
  });
129384
129319
  }