@aws/agentcore-cdk 0.1.0-alpha.50 → 0.1.0-alpha.51
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.
- package/README.md +6 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts +45 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js +179 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/AgentCoreCapacityProvider.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts +2 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.d.ts.map +1 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.js +6 -0
- package/dist/cdk/constructs/components/primitives/capacity-provider/index.js.map +1 -0
- package/dist/cdk/constructs/components/primitives/index.d.ts +1 -0
- package/dist/cdk/constructs/components/primitives/index.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/index.js +3 -1
- package/dist/cdk/constructs/components/primitives/index.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js +1 -0
- package/dist/cdk/constructs/components/primitives/memory/AgentCoreMemory.js.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts +8 -0
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.d.ts.map +1 -1
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js +68 -21
- package/dist/cdk/constructs/components/primitives/runtime/AgentCoreRuntime.js.map +1 -1
- package/dist/cdk/constructs/index.d.ts +2 -2
- package/dist/cdk/constructs/index.d.ts.map +1 -1
- package/dist/cdk/constructs/index.js +3 -1
- package/dist/cdk/constructs/index.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts +16 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentCoreApplication.js +70 -0
- package/dist/cdk/constructs/l3/AgentCoreApplication.js.map +1 -1
- package/dist/cdk/constructs/l3/AgentCorePayments.d.ts +21 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.d.ts.map +1 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.js +149 -0
- package/dist/cdk/constructs/l3/AgentCorePayments.js.map +1 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts +5 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/AgentEnvironment.js +2 -0
- package/dist/cdk/constructs/l3/AgentEnvironment.js.map +1 -1
- package/dist/cdk/constructs/l3/index.d.ts +1 -0
- package/dist/cdk/constructs/l3/index.d.ts.map +1 -1
- package/dist/cdk/constructs/l3/index.js +3 -1
- package/dist/cdk/constructs/l3/index.js.map +1 -1
- package/dist/cdk/index.d.ts +1 -1
- package/dist/cdk/index.d.ts.map +1 -1
- package/dist/cdk/index.js +2 -1
- package/dist/cdk/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +22 -1
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +43 -3
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +63 -0
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +30 -7
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/auth.d.ts +7 -0
- package/dist/schema/schemas/auth.d.ts.map +1 -1
- package/dist/schema/schemas/auth.js +9 -10
- package/dist/schema/schemas/auth.js.map +1 -1
- package/dist/schema/schemas/aws-targets.d.ts +6 -0
- package/dist/schema/schemas/aws-targets.d.ts.map +1 -1
- package/dist/schema/schemas/aws-targets.js +2 -0
- package/dist/schema/schemas/aws-targets.js.map +1 -1
- package/dist/schema/schemas/primitives/capacity-provider.d.ts +239 -0
- package/dist/schema/schemas/primitives/capacity-provider.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/capacity-provider.js +220 -0
- package/dist/schema/schemas/primitives/capacity-provider.js.map +1 -0
- package/dist/schema/schemas/primitives/index.d.ts +2 -0
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +17 -2
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,2BAA2B;;;;EAA4C,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;EAAoC,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,2BAA2B;;;;EAA4C,CAAC;AACrF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,2BAA2B;;;EAAoC,CAAC;AAC7E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,C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BAA6B;;;;;;;;;;;;;;;;;;kBAK/B,CAAC;AACZ,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAepF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsExC,CAAC;AAEL,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,sFAAsF;AACtF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyB,CAAC;AACpE,gFAAgF;AAChF,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GatewayAuthorizerConfigSchema = exports.AuthorizerConfigSchema = exports.CustomJwtAuthorizerConfigSchema = exports.PrivateEndpointOverrideSchema = exports.PrivateEndpointSchema = exports.ManagedVpcResourceSchema = exports.SelfManagedLatticeResourceSchema = exports.EndpointIpAddressTypeSchema = exports.CustomClaimValidationSchema = exports.InboundTokenClaimValueTypeSchema = exports.ClaimMatchValueSchema = exports.ClaimMatchOperatorSchema = exports.RuntimeAuthorizerTypeSchema = exports.GatewayAuthorizerTypeSchema = void 0;
|
|
3
|
+
exports.GatewayAuthorizerConfigSchema = exports.AuthorizerConfigSchema = exports.CustomJwtAuthorizerConfigSchema = exports.PrivateEndpointOverrideSchema = exports.PrivateEndpointSchema = exports.ManagedVpcResourceSchema = exports.SelfManagedLatticeResourceSchema = exports.EndpointIpAddressTypeSchema = exports.CustomClaimValidationSchema = exports.InboundTokenClaimValueTypeSchema = exports.ClaimMatchValueSchema = exports.ClaimMatchOperatorSchema = exports.AllowedScopeSchema = exports.OidcDiscoveryUrlSchema = exports.RuntimeAuthorizerTypeSchema = exports.GatewayAuthorizerTypeSchema = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
const tags_1 = require("./primitives/tags");
|
|
6
6
|
const zod_1 = require("zod");
|
|
@@ -16,7 +16,7 @@ const OIDC_WELL_KNOWN_SUFFIX = '/.well-known/openid-configuration';
|
|
|
16
16
|
* Must be a valid URL ending with the standard OIDC well-known endpoint.
|
|
17
17
|
* @see https://openid.net/specs/openid-connect-discovery-1_0.html
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
exports.OidcDiscoveryUrlSchema = zod_1.z
|
|
20
20
|
.string()
|
|
21
21
|
.url('Must be a valid URL')
|
|
22
22
|
.refine(url => url.startsWith('https://'), {
|
|
@@ -31,6 +31,11 @@ const MATCH_VALUE_PATTERN = /^[A-Za-z0-9_.-]+$/;
|
|
|
31
31
|
// OAuth scope token: printable ASCII excluding space (0x20) and double-quote (0x22).
|
|
32
32
|
// Mirrors CFN CustomJWTAuthorizerConfiguration.AllowedScopes.items pattern byte-for-byte.
|
|
33
33
|
const ALLOWED_SCOPE_PATTERN = /^[\x21\x23-\x5B\x5D-\x7E]+$/;
|
|
34
|
+
exports.AllowedScopeSchema = zod_1.z
|
|
35
|
+
.string()
|
|
36
|
+
.min(1)
|
|
37
|
+
.max(255)
|
|
38
|
+
.regex(ALLOWED_SCOPE_PATTERN, 'Scope must be printable ASCII with no spaces or quotes');
|
|
34
39
|
const CLAIM_NAME_PATTERN = /^[A-Za-z0-9_.:-]+$/;
|
|
35
40
|
// Server-side reserved claim names (not regex-documented; API rejects these at deploy time)
|
|
36
41
|
const RESERVED_CLAIM_NAMES = ['client_id'];
|
|
@@ -156,19 +161,13 @@ function privateEndpointArm(pe) {
|
|
|
156
161
|
exports.CustomJwtAuthorizerConfigSchema = zod_1.z
|
|
157
162
|
.object({
|
|
158
163
|
/** OIDC discovery URL (e.g., https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/openid-configuration) */
|
|
159
|
-
discoveryUrl: OidcDiscoveryUrlSchema,
|
|
164
|
+
discoveryUrl: exports.OidcDiscoveryUrlSchema,
|
|
160
165
|
/** List of allowed audiences (typically client IDs) */
|
|
161
166
|
allowedAudience: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
162
167
|
/** List of allowed client IDs */
|
|
163
168
|
allowedClients: zod_1.z.array(zod_1.z.string().min(1)).optional(),
|
|
164
169
|
/** List of allowed scopes (printable ASCII, no space/quote; ≤255 chars each — CFN parity) */
|
|
165
|
-
allowedScopes: zod_1.z
|
|
166
|
-
.array(zod_1.z
|
|
167
|
-
.string()
|
|
168
|
-
.min(1)
|
|
169
|
-
.max(255)
|
|
170
|
-
.regex(ALLOWED_SCOPE_PATTERN, 'Scope must be printable ASCII with no spaces or quotes'))
|
|
171
|
-
.optional(),
|
|
170
|
+
allowedScopes: zod_1.z.array(exports.AllowedScopeSchema).optional(),
|
|
172
171
|
/** Custom claim validations */
|
|
173
172
|
customClaims: zod_1.z.array(exports.CustomClaimValidationSchema).min(1).optional(),
|
|
174
173
|
/** PrivateLink inbound: how to reach the OIDC discovery endpoint over a private network. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/schema/schemas/auth.ts"],"names":[],"mappings":";;;AAAA,4CAA4F;AAC5F,4CAA+C;AAC/C,6BAAwB;AAExB,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAElE,QAAA,2BAA2B,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,CAA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,GAAG,CAAC,QAAQ,CAAC;wBACX,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;wBAC3B,OAAO,EACL,0IAA0I;wBAC5I,IAAI,EAAE,CAAC,0BAA0B,EAAE,CAAC,EAAE,iBAAiB,CAAC;qBACzD,CAAC,CAAC;gBACL,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;QAED,sCAAsC;QACtC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACzB,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;gBACvB,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;oBAC3B,OAAO,EAAE,6CAA6C,CAAC,CAAC,MAAM,EAAE;oBAChE,IAAI,EAAE,CAAC,0BAA0B,EAAE,CAAC,EAAE,QAAQ,CAAC;iBAChD,CAAC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC;AAIL;;;GAGG;AACU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,mBAAmB,EAAE,uCAA+B,CAAC,QAAQ,EAAE;CAChE,CAAC,CAAC;AAIH,sFAAsF;AACzE,QAAA,6BAA6B,GAAG,8BAAsB,CAAC"}
|
|
@@ -3,6 +3,7 @@ export declare const AgentCoreRegionSchema: z.ZodEnum<{
|
|
|
3
3
|
"ap-northeast-1": "ap-northeast-1";
|
|
4
4
|
"ap-northeast-2": "ap-northeast-2";
|
|
5
5
|
"ap-south-1": "ap-south-1";
|
|
6
|
+
"ap-south-2": "ap-south-2";
|
|
6
7
|
"ap-southeast-1": "ap-southeast-1";
|
|
7
8
|
"ap-southeast-2": "ap-southeast-2";
|
|
8
9
|
"ap-southeast-5": "ap-southeast-5";
|
|
@@ -18,6 +19,7 @@ export declare const AgentCoreRegionSchema: z.ZodEnum<{
|
|
|
18
19
|
"sa-east-1": "sa-east-1";
|
|
19
20
|
"us-east-1": "us-east-1";
|
|
20
21
|
"us-east-2": "us-east-2";
|
|
22
|
+
"us-west-1": "us-west-1";
|
|
21
23
|
"us-west-2": "us-west-2";
|
|
22
24
|
"us-gov-west-1": "us-gov-west-1";
|
|
23
25
|
}>;
|
|
@@ -32,6 +34,7 @@ export declare const AwsDeploymentTargetSchema: z.ZodObject<{
|
|
|
32
34
|
"ap-northeast-1": "ap-northeast-1";
|
|
33
35
|
"ap-northeast-2": "ap-northeast-2";
|
|
34
36
|
"ap-south-1": "ap-south-1";
|
|
37
|
+
"ap-south-2": "ap-south-2";
|
|
35
38
|
"ap-southeast-1": "ap-southeast-1";
|
|
36
39
|
"ap-southeast-2": "ap-southeast-2";
|
|
37
40
|
"ap-southeast-5": "ap-southeast-5";
|
|
@@ -47,6 +50,7 @@ export declare const AwsDeploymentTargetSchema: z.ZodObject<{
|
|
|
47
50
|
"sa-east-1": "sa-east-1";
|
|
48
51
|
"us-east-1": "us-east-1";
|
|
49
52
|
"us-east-2": "us-east-2";
|
|
53
|
+
"us-west-1": "us-west-1";
|
|
50
54
|
"us-west-2": "us-west-2";
|
|
51
55
|
"us-gov-west-1": "us-gov-west-1";
|
|
52
56
|
}>;
|
|
@@ -60,6 +64,7 @@ export declare const AwsDeploymentTargetsSchema: z.ZodArray<z.ZodObject<{
|
|
|
60
64
|
"ap-northeast-1": "ap-northeast-1";
|
|
61
65
|
"ap-northeast-2": "ap-northeast-2";
|
|
62
66
|
"ap-south-1": "ap-south-1";
|
|
67
|
+
"ap-south-2": "ap-south-2";
|
|
63
68
|
"ap-southeast-1": "ap-southeast-1";
|
|
64
69
|
"ap-southeast-2": "ap-southeast-2";
|
|
65
70
|
"ap-southeast-5": "ap-southeast-5";
|
|
@@ -75,6 +80,7 @@ export declare const AwsDeploymentTargetsSchema: z.ZodArray<z.ZodObject<{
|
|
|
75
80
|
"sa-east-1": "sa-east-1";
|
|
76
81
|
"us-east-1": "us-east-1";
|
|
77
82
|
"us-east-2": "us-east-2";
|
|
83
|
+
"us-west-1": "us-west-1";
|
|
78
84
|
"us-west-2": "us-west-2";
|
|
79
85
|
"us-gov-west-1": "us-gov-west-1";
|
|
80
86
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-targets.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"aws-targets.d.ts","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;EAuBhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAMpE,eAAO,MAAM,0BAA0B,aAQmB,CAAC;AAM3D,eAAO,MAAM,kBAAkB,aAGF,CAAC;AAM9B,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAM5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKtC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -11,6 +11,7 @@ exports.AgentCoreRegionSchema = zod_1.z.enum([
|
|
|
11
11
|
'ap-northeast-1',
|
|
12
12
|
'ap-northeast-2',
|
|
13
13
|
'ap-south-1',
|
|
14
|
+
'ap-south-2',
|
|
14
15
|
'ap-southeast-1',
|
|
15
16
|
'ap-southeast-2',
|
|
16
17
|
'ap-southeast-5',
|
|
@@ -26,6 +27,7 @@ exports.AgentCoreRegionSchema = zod_1.z.enum([
|
|
|
26
27
|
'sa-east-1',
|
|
27
28
|
'us-east-1',
|
|
28
29
|
'us-east-2',
|
|
30
|
+
'us-west-1',
|
|
29
31
|
'us-west-2',
|
|
30
32
|
'us-gov-west-1',
|
|
31
33
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aws-targets.js","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,6BAAwB;AAExB,+EAA+E;AAC/E,oBAAoB;AACpB,0GAA0G;AAC1G,+EAA+E;AAElE,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1C,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,eAAe;CAChB,CAAC,CAAC;AAGH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC;KACxC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,0BAA0B,EAC1B,kGAAkG,CACnG;KACA,QAAQ,CAAC,6CAA6C,CAAC,CAAC;AAE3D,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAElE,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,EAAE;KACR,KAAK,CAAC,aAAa,EAAE,0CAA0C,CAAC;KAChE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE9B,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAElE,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,kCAA0B;IAChC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAkB;IAC3B,MAAM,EAAE,6BAAqB;CAC9B,CAAC,CAAC;AAIH,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC,WAAW,CACtF,IAAA,mBAAQ,EACN,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EACrB,IAAI,CAAC,EAAE,CAAC,qCAAqC,IAAI,EAAE,CACpD,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"aws-targets.js","sourceRoot":"","sources":["../../../src/schema/schemas/aws-targets.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,6BAAwB;AAExB,+EAA+E;AAC/E,oBAAoB;AACpB,0GAA0G;AAC1G,+EAA+E;AAElE,QAAA,qBAAqB,GAAG,OAAC,CAAC,IAAI,CAAC;IAC1C,gBAAgB;IAChB,gBAAgB;IAChB,YAAY;IACZ,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,eAAe;CAChB,CAAC,CAAC;AAGH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC;KACxC,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CACJ,0BAA0B,EAC1B,kGAAkG,CACnG;KACA,QAAQ,CAAC,6CAA6C,CAAC,CAAC;AAE3D,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAElE,QAAA,kBAAkB,GAAG,OAAC;KAChC,MAAM,EAAE;KACR,KAAK,CAAC,aAAa,EAAE,0CAA0C,CAAC;KAChE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAE9B,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAElE,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,kCAA0B;IAChC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAC3C,OAAO,EAAE,0BAAkB;IAC3B,MAAM,EAAE,6BAAqB;CAC9B,CAAC,CAAC;AAIH,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAElE,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC,WAAW,CACtF,IAAA,mBAAQ,EACN,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EACrB,IAAI,CAAC,EAAE,CAAC,qCAAqC,IAAI,EAAE,CACpD,CACF,CAAC"}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Capacity provider name validation.
|
|
4
|
+
* Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$ (matches the CFN Name property).
|
|
5
|
+
*/
|
|
6
|
+
export declare const CapacityProviderNameSchema: z.ZodString;
|
|
7
|
+
/**
|
|
8
|
+
* Pattern for the capacity provider operator role ARN, matching the CFN
|
|
9
|
+
* resource contract exactly. The account segment is OPTIONAL — the service
|
|
10
|
+
* accepts role ARNs without an account id, so we must not force 12 digits.
|
|
11
|
+
*/
|
|
12
|
+
export declare const CAPACITY_PROVIDER_OPERATOR_ROLE_ARN_PATTERN: RegExp;
|
|
13
|
+
export declare const OperatorRoleArnSchema: z.ZodString;
|
|
14
|
+
export declare function isValidOperatorRoleArn(value: string): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Partition-agnostic capacity-provider ARN (arn:[^:]+: per multi-partition rules). The resource
|
|
17
|
+
* segment is the service capacityProviderId — `{name}-{10 alnum}` — not a free-form string, so a
|
|
18
|
+
* malformed external ARN is rejected at validate/synth time instead of only failing at deploy.
|
|
19
|
+
* Keep this in sync with the agentcore-cli copy.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CAPACITY_PROVIDER_ARN_PATTERN: RegExp;
|
|
22
|
+
export declare const CapacityProviderArnSchema: z.ZodString;
|
|
23
|
+
/**
|
|
24
|
+
* Route a `--capacity-provider <name-or-arn>` value: an `arn:` prefix means an
|
|
25
|
+
* external CP referenced by ARN, otherwise it is an in-project sibling name.
|
|
26
|
+
*/
|
|
27
|
+
export declare function isCapacityProviderArn(value: string): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Runtime -> capacity-provider reference. Exactly one of `capacityProviderArn`
|
|
30
|
+
* (external CP) or `capacityProviderName` (in-project sibling) must be set.
|
|
31
|
+
*/
|
|
32
|
+
export declare const CapacityProviderConfigurationSchema: z.ZodObject<{
|
|
33
|
+
/** ARN of an external capacity provider (not defined in this project). */
|
|
34
|
+
capacityProviderArn: z.ZodOptional<z.ZodString>;
|
|
35
|
+
/** Name of an in-project capacity provider (a `capacityProviders[]` sibling). */
|
|
36
|
+
capacityProviderName: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>;
|
|
38
|
+
export type CapacityProviderConfiguration = z.infer<typeof CapacityProviderConfigurationSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* Logical name of a capacity-provider volume, referenced by a runtime's
|
|
41
|
+
* `capacityProviderVolume` filesystem mount. Must match the name of a volume
|
|
42
|
+
* defined on the capacity provider (EbsVolumeConfiguration.name).
|
|
43
|
+
*/
|
|
44
|
+
export declare const CapacityProviderVolumeNameSchema: z.ZodString;
|
|
45
|
+
export declare const OperatingSystemSchema: z.ZodEnum<{
|
|
46
|
+
LINUX_X86_64: "LINUX_X86_64";
|
|
47
|
+
LINUX_ARM64: "LINUX_ARM64";
|
|
48
|
+
}>;
|
|
49
|
+
export type OperatingSystem = z.infer<typeof OperatingSystemSchema>;
|
|
50
|
+
export declare const VpcConfigurationSchema: z.ZodObject<{
|
|
51
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
52
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type VpcConfiguration = z.infer<typeof VpcConfigurationSchema>;
|
|
55
|
+
export declare const InstanceRequirementsSchema: z.ZodObject<{
|
|
56
|
+
allowedInstanceTypes: z.ZodArray<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type InstanceRequirements = z.infer<typeof InstanceRequirementsSchema>;
|
|
59
|
+
export declare const LaunchParametersSchema: z.ZodObject<{
|
|
60
|
+
operatingSystem: z.ZodEnum<{
|
|
61
|
+
LINUX_X86_64: "LINUX_X86_64";
|
|
62
|
+
LINUX_ARM64: "LINUX_ARM64";
|
|
63
|
+
}>;
|
|
64
|
+
instanceRequirements: z.ZodObject<{
|
|
65
|
+
allowedInstanceTypes: z.ZodArray<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
instanceProfileArn: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, z.core.$loose>;
|
|
69
|
+
export type LaunchParameters = z.infer<typeof LaunchParametersSchema>;
|
|
70
|
+
export declare const EbsVolumeConfigurationSchema: z.ZodObject<{
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
sizeGiB: z.ZodNumber;
|
|
73
|
+
volumeType: z.ZodOptional<z.ZodEnum<{
|
|
74
|
+
standard: "standard";
|
|
75
|
+
io1: "io1";
|
|
76
|
+
io2: "io2";
|
|
77
|
+
gp2: "gp2";
|
|
78
|
+
sc1: "sc1";
|
|
79
|
+
st1: "st1";
|
|
80
|
+
gp3: "gp3";
|
|
81
|
+
}>>;
|
|
82
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
kmsKeyId: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$loose>;
|
|
85
|
+
export type EbsVolumeConfiguration = z.infer<typeof EbsVolumeConfigurationSchema>;
|
|
86
|
+
export declare const VolumeConfigurationSchema: z.ZodObject<{
|
|
87
|
+
ebsConfiguration: z.ZodObject<{
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
sizeGiB: z.ZodNumber;
|
|
90
|
+
volumeType: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
standard: "standard";
|
|
92
|
+
io1: "io1";
|
|
93
|
+
io2: "io2";
|
|
94
|
+
gp2: "gp2";
|
|
95
|
+
sc1: "sc1";
|
|
96
|
+
st1: "st1";
|
|
97
|
+
gp3: "gp3";
|
|
98
|
+
}>>;
|
|
99
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
kmsKeyId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
}, z.core.$loose>;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export type VolumeConfiguration = z.infer<typeof VolumeConfigurationSchema>;
|
|
104
|
+
export declare const InstanceLifecycleConfigurationSchema: z.ZodObject<{
|
|
105
|
+
idleInstanceTimeout: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
maxLifetime: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type InstanceLifecycleConfiguration = z.infer<typeof InstanceLifecycleConfigurationSchema>;
|
|
109
|
+
export declare const Ec2ConfigurationSchema: z.ZodObject<{
|
|
110
|
+
launchTemplateSource: z.ZodObject<{
|
|
111
|
+
launchParameters: z.ZodObject<{
|
|
112
|
+
operatingSystem: z.ZodEnum<{
|
|
113
|
+
LINUX_X86_64: "LINUX_X86_64";
|
|
114
|
+
LINUX_ARM64: "LINUX_ARM64";
|
|
115
|
+
}>;
|
|
116
|
+
instanceRequirements: z.ZodObject<{
|
|
117
|
+
allowedInstanceTypes: z.ZodArray<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
instanceProfileArn: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$loose>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
vpcConfiguration: z.ZodObject<{
|
|
123
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
124
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
127
|
+
ebsConfiguration: z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
sizeGiB: z.ZodNumber;
|
|
130
|
+
volumeType: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
standard: "standard";
|
|
132
|
+
io1: "io1";
|
|
133
|
+
io2: "io2";
|
|
134
|
+
gp2: "gp2";
|
|
135
|
+
sc1: "sc1";
|
|
136
|
+
st1: "st1";
|
|
137
|
+
gp3: "gp3";
|
|
138
|
+
}>>;
|
|
139
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
kmsKeyId: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, z.core.$loose>;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
lifecycleConfiguration: z.ZodOptional<z.ZodObject<{
|
|
144
|
+
idleInstanceTimeout: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
maxLifetime: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
}, z.core.$strip>>;
|
|
147
|
+
}, z.core.$loose>;
|
|
148
|
+
export type Ec2Configuration = z.infer<typeof Ec2ConfigurationSchema>;
|
|
149
|
+
export declare const ComputeConfigurationSchema: z.ZodObject<{
|
|
150
|
+
ec2Configuration: z.ZodObject<{
|
|
151
|
+
launchTemplateSource: z.ZodObject<{
|
|
152
|
+
launchParameters: z.ZodObject<{
|
|
153
|
+
operatingSystem: z.ZodEnum<{
|
|
154
|
+
LINUX_X86_64: "LINUX_X86_64";
|
|
155
|
+
LINUX_ARM64: "LINUX_ARM64";
|
|
156
|
+
}>;
|
|
157
|
+
instanceRequirements: z.ZodObject<{
|
|
158
|
+
allowedInstanceTypes: z.ZodArray<z.ZodString>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
instanceProfileArn: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$loose>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
vpcConfiguration: z.ZodObject<{
|
|
164
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
165
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
ebsConfiguration: z.ZodObject<{
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
sizeGiB: z.ZodNumber;
|
|
171
|
+
volumeType: z.ZodOptional<z.ZodEnum<{
|
|
172
|
+
standard: "standard";
|
|
173
|
+
io1: "io1";
|
|
174
|
+
io2: "io2";
|
|
175
|
+
gp2: "gp2";
|
|
176
|
+
sc1: "sc1";
|
|
177
|
+
st1: "st1";
|
|
178
|
+
gp3: "gp3";
|
|
179
|
+
}>>;
|
|
180
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
181
|
+
kmsKeyId: z.ZodOptional<z.ZodString>;
|
|
182
|
+
}, z.core.$loose>;
|
|
183
|
+
}, z.core.$strip>>>;
|
|
184
|
+
lifecycleConfiguration: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
idleInstanceTimeout: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
maxLifetime: z.ZodOptional<z.ZodNumber>;
|
|
187
|
+
}, z.core.$strip>>;
|
|
188
|
+
}, z.core.$loose>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
export type ComputeConfiguration = z.infer<typeof ComputeConfigurationSchema>;
|
|
191
|
+
export declare const CapacityProviderSchema: z.ZodObject<{
|
|
192
|
+
name: z.ZodString;
|
|
193
|
+
description: z.ZodOptional<z.ZodString>;
|
|
194
|
+
operatorRoleArn: z.ZodOptional<z.ZodString>;
|
|
195
|
+
computeConfiguration: z.ZodObject<{
|
|
196
|
+
ec2Configuration: z.ZodObject<{
|
|
197
|
+
launchTemplateSource: z.ZodObject<{
|
|
198
|
+
launchParameters: z.ZodObject<{
|
|
199
|
+
operatingSystem: z.ZodEnum<{
|
|
200
|
+
LINUX_X86_64: "LINUX_X86_64";
|
|
201
|
+
LINUX_ARM64: "LINUX_ARM64";
|
|
202
|
+
}>;
|
|
203
|
+
instanceRequirements: z.ZodObject<{
|
|
204
|
+
allowedInstanceTypes: z.ZodArray<z.ZodString>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
instanceProfileArn: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$loose>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
vpcConfiguration: z.ZodObject<{
|
|
210
|
+
subnets: z.ZodArray<z.ZodString>;
|
|
211
|
+
securityGroups: z.ZodArray<z.ZodString>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
volumes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
214
|
+
ebsConfiguration: z.ZodObject<{
|
|
215
|
+
name: z.ZodString;
|
|
216
|
+
sizeGiB: z.ZodNumber;
|
|
217
|
+
volumeType: z.ZodOptional<z.ZodEnum<{
|
|
218
|
+
standard: "standard";
|
|
219
|
+
io1: "io1";
|
|
220
|
+
io2: "io2";
|
|
221
|
+
gp2: "gp2";
|
|
222
|
+
sc1: "sc1";
|
|
223
|
+
st1: "st1";
|
|
224
|
+
gp3: "gp3";
|
|
225
|
+
}>>;
|
|
226
|
+
encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
kmsKeyId: z.ZodOptional<z.ZodString>;
|
|
228
|
+
}, z.core.$loose>;
|
|
229
|
+
}, z.core.$strip>>>;
|
|
230
|
+
lifecycleConfiguration: z.ZodOptional<z.ZodObject<{
|
|
231
|
+
idleInstanceTimeout: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
maxLifetime: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$loose>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
tags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
export type CapacityProvider = z.infer<typeof CapacityProviderSchema>;
|
|
239
|
+
//# sourceMappingURL=capacity-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacity-provider.d.ts","sourceRoot":"","sources":["../../../../src/schema/schemas/primitives/capacity-provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;;GAGG;AACH,eAAO,MAAM,0BAA0B,aAOpC,CAAC;AAMJ;;;;GAIG;AAEH,eAAO,MAAM,2CAA2C,QAA2C,CAAC;AAEpG,eAAO,MAAM,qBAAqB,aAO/B,CAAC;AAEJ,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE7D;AAcD;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,QACuE,CAAC;AAElH,eAAO,MAAM,yBAAyB,aAKnC,CAAC;AAEJ;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;GAGG;AACH,eAAO,MAAM,mCAAmC;IAE5C,0EAA0E;;IAE1E,iFAAiF;;kBAUjF,CAAC;AACL,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAA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;;;;;;;;;;;;;;;;;;;;iBAErC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAejC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CapacityProviderSchema = exports.ComputeConfigurationSchema = exports.Ec2ConfigurationSchema = exports.InstanceLifecycleConfigurationSchema = exports.VolumeConfigurationSchema = exports.EbsVolumeConfigurationSchema = exports.LaunchParametersSchema = exports.InstanceRequirementsSchema = exports.VpcConfigurationSchema = exports.OperatingSystemSchema = exports.CapacityProviderVolumeNameSchema = exports.CapacityProviderConfigurationSchema = exports.CapacityProviderArnSchema = exports.CAPACITY_PROVIDER_ARN_PATTERN = exports.OperatorRoleArnSchema = exports.CAPACITY_PROVIDER_OPERATOR_ROLE_ARN_PATTERN = exports.CapacityProviderNameSchema = void 0;
|
|
4
|
+
exports.isValidOperatorRoleArn = isValidOperatorRoleArn;
|
|
5
|
+
exports.isCapacityProviderArn = isCapacityProviderArn;
|
|
6
|
+
const tags_1 = require("./tags");
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Capacity Provider Types
|
|
10
|
+
//
|
|
11
|
+
// Models the AWS::BedrockAgentCore::CapacityProvider CFN resource. Known fields
|
|
12
|
+
// are typed and validated here so bad input is rejected at `add` time instead
|
|
13
|
+
// of failing late at deploy/CFN time; the long tail of launch parameters is
|
|
14
|
+
// accepted via `.passthrough()` and validated by CFN on deploy.
|
|
15
|
+
//
|
|
16
|
+
// NOTE: This schema is duplicated in @aws/agentcore-cdk
|
|
17
|
+
// (src/schema/schemas/primitives/capacity-provider.ts). Keep the two in sync.
|
|
18
|
+
// ============================================================================
|
|
19
|
+
/**
|
|
20
|
+
* Capacity provider name validation.
|
|
21
|
+
* Pattern: ^[a-zA-Z][a-zA-Z0-9_]{0,47}$ (matches the CFN Name property).
|
|
22
|
+
*/
|
|
23
|
+
exports.CapacityProviderNameSchema = zod_1.z
|
|
24
|
+
.string()
|
|
25
|
+
.min(1, 'Capacity provider name is required')
|
|
26
|
+
.max(48)
|
|
27
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_]{0,47}$/, 'Must begin with a letter and contain only alphanumeric characters and underscores (max 48 chars)');
|
|
28
|
+
// ============================================================================
|
|
29
|
+
// Operator Role ARN Validation
|
|
30
|
+
// ============================================================================
|
|
31
|
+
/**
|
|
32
|
+
* Pattern for the capacity provider operator role ARN, matching the CFN
|
|
33
|
+
* resource contract exactly. The account segment is OPTIONAL — the service
|
|
34
|
+
* accepts role ARNs without an account id, so we must not force 12 digits.
|
|
35
|
+
*/
|
|
36
|
+
// eslint-disable-next-line security/detect-unsafe-regex -- anchored ARN pattern, no backtracking risk
|
|
37
|
+
exports.CAPACITY_PROVIDER_OPERATOR_ROLE_ARN_PATTERN = /^arn:[^:]+:iam::([0-9]{12})?:role\/.+$/;
|
|
38
|
+
exports.OperatorRoleArnSchema = zod_1.z
|
|
39
|
+
.string()
|
|
40
|
+
.min(1, 'Operator role ARN is required')
|
|
41
|
+
.max(2048)
|
|
42
|
+
.regex(exports.CAPACITY_PROVIDER_OPERATOR_ROLE_ARN_PATTERN, 'Must be a valid IAM role ARN (e.g. arn:<partition>:iam::123456789012:role/MyOperatorRole)');
|
|
43
|
+
function isValidOperatorRoleArn(value) {
|
|
44
|
+
return exports.CAPACITY_PROVIDER_OPERATOR_ROLE_ARN_PATTERN.test(value);
|
|
45
|
+
}
|
|
46
|
+
// ============================================================================
|
|
47
|
+
// Capacity Provider Attach (runtime -> capacity provider reference)
|
|
48
|
+
//
|
|
49
|
+
// A runtime attaches to a capacity provider via `capacityProviderConfiguration`.
|
|
50
|
+
// The reference is EITHER an in-project sibling (by name) OR an external CP (by
|
|
51
|
+
// ARN) — exactly one. At synth the CDK app resolves a sibling name to the created
|
|
52
|
+
// CP's ARN, or passes the ARN through, then injects
|
|
53
|
+
// CapacityProviderConfiguration.CapacityProviderArn onto the CfnRuntime.
|
|
54
|
+
//
|
|
55
|
+
// NOTE: This block is duplicated in the agentcore-cli repo. Keep the two in sync.
|
|
56
|
+
// ============================================================================
|
|
57
|
+
/**
|
|
58
|
+
* Partition-agnostic capacity-provider ARN (arn:[^:]+: per multi-partition rules). The resource
|
|
59
|
+
* segment is the service capacityProviderId — `{name}-{10 alnum}` — not a free-form string, so a
|
|
60
|
+
* malformed external ARN is rejected at validate/synth time instead of only failing at deploy.
|
|
61
|
+
* Keep this in sync with the agentcore-cli copy.
|
|
62
|
+
*/
|
|
63
|
+
exports.CAPACITY_PROVIDER_ARN_PATTERN = /^arn:[^:]+:bedrock-agentcore:[a-z0-9-]+:\d{12}:capacity-provider\/[a-zA-Z][a-zA-Z0-9_]{0,47}-[a-zA-Z0-9]{10}$/;
|
|
64
|
+
exports.CapacityProviderArnSchema = zod_1.z
|
|
65
|
+
.string()
|
|
66
|
+
.regex(exports.CAPACITY_PROVIDER_ARN_PATTERN, 'Must be a valid bedrock-agentcore capacity provider ARN (…:capacity-provider/{name}-{10 alphanumerics})');
|
|
67
|
+
/**
|
|
68
|
+
* Route a `--capacity-provider <name-or-arn>` value: an `arn:` prefix means an
|
|
69
|
+
* external CP referenced by ARN, otherwise it is an in-project sibling name.
|
|
70
|
+
*/
|
|
71
|
+
function isCapacityProviderArn(value) {
|
|
72
|
+
return value.startsWith('arn:');
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Runtime -> capacity-provider reference. Exactly one of `capacityProviderArn`
|
|
76
|
+
* (external CP) or `capacityProviderName` (in-project sibling) must be set.
|
|
77
|
+
*/
|
|
78
|
+
exports.CapacityProviderConfigurationSchema = zod_1.z
|
|
79
|
+
.strictObject({
|
|
80
|
+
/** ARN of an external capacity provider (not defined in this project). */
|
|
81
|
+
capacityProviderArn: exports.CapacityProviderArnSchema.optional(),
|
|
82
|
+
/** Name of an in-project capacity provider (a `capacityProviders[]` sibling). */
|
|
83
|
+
capacityProviderName: exports.CapacityProviderNameSchema.optional(),
|
|
84
|
+
})
|
|
85
|
+
.superRefine((data, ctx) => {
|
|
86
|
+
if ((data.capacityProviderArn !== undefined) === (data.capacityProviderName !== undefined)) {
|
|
87
|
+
ctx.addIssue({
|
|
88
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
89
|
+
message: 'capacityProviderConfiguration must set exactly one of capacityProviderArn or capacityProviderName',
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
/**
|
|
94
|
+
* Logical name of a capacity-provider volume, referenced by a runtime's
|
|
95
|
+
* `capacityProviderVolume` filesystem mount. Must match the name of a volume
|
|
96
|
+
* defined on the capacity provider (EbsVolumeConfiguration.name).
|
|
97
|
+
*/
|
|
98
|
+
exports.CapacityProviderVolumeNameSchema = zod_1.z
|
|
99
|
+
.string()
|
|
100
|
+
.min(1, 'Capacity provider volume name is required')
|
|
101
|
+
.max(48)
|
|
102
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,47}$/, 'Volume name must begin with a letter and contain only alphanumerics, underscores, and hyphens (max 48 chars)');
|
|
103
|
+
// ============================================================================
|
|
104
|
+
// Operating System
|
|
105
|
+
//
|
|
106
|
+
// The CFN resource enum lists four values (LINUX_X86_64, LINUX_ARM64,
|
|
107
|
+
// MAC_ARM64, WINDOWS_X86_64), but the service API contract only supports the
|
|
108
|
+
// two Linux values today; the extra two leaked into the CFN autogen ahead of
|
|
109
|
+
// real support. The CLI follows the API and exposes only the Linux values.
|
|
110
|
+
// ============================================================================
|
|
111
|
+
exports.OperatingSystemSchema = zod_1.z.enum(['LINUX_X86_64', 'LINUX_ARM64']);
|
|
112
|
+
// ============================================================================
|
|
113
|
+
// VPC Configuration
|
|
114
|
+
// ============================================================================
|
|
115
|
+
exports.VpcConfigurationSchema = zod_1.z.object({
|
|
116
|
+
subnets: zod_1.z
|
|
117
|
+
.array(zod_1.z.string().regex(/^subnet-[0-9a-zA-Z]{8,17}$/, 'Must be a valid subnet ID'))
|
|
118
|
+
.min(1, 'At least one subnet is required')
|
|
119
|
+
.max(16),
|
|
120
|
+
securityGroups: zod_1.z
|
|
121
|
+
.array(zod_1.z.string().regex(/^sg-[0-9a-zA-Z]{8,17}$/, 'Must be a valid security group ID'))
|
|
122
|
+
.min(1, 'At least one security group is required')
|
|
123
|
+
.max(16),
|
|
124
|
+
});
|
|
125
|
+
// ============================================================================
|
|
126
|
+
// Instance Requirements
|
|
127
|
+
// ============================================================================
|
|
128
|
+
exports.InstanceRequirementsSchema = zod_1.z.object({
|
|
129
|
+
allowedInstanceTypes: zod_1.z.array(zod_1.z.string().min(1).max(255)).min(1, 'At least one instance type is required').max(30),
|
|
130
|
+
});
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// Launch Parameters
|
|
133
|
+
//
|
|
134
|
+
// Known fields are typed; the long tail (sshKeyName, monitoring,
|
|
135
|
+
// licenseSpecifications, capacityReservationSpecification, ephemeralVolumes,
|
|
136
|
+
// propagatedTags) is accepted via `.passthrough()` and validated by CFN.
|
|
137
|
+
// ============================================================================
|
|
138
|
+
exports.LaunchParametersSchema = zod_1.z
|
|
139
|
+
.object({
|
|
140
|
+
operatingSystem: exports.OperatingSystemSchema,
|
|
141
|
+
instanceRequirements: exports.InstanceRequirementsSchema,
|
|
142
|
+
instanceProfileArn: zod_1.z
|
|
143
|
+
.string()
|
|
144
|
+
.regex(/^arn:[^:]+:iam::[0-9]{12}:instance-profile\/.+$/, 'Must be a valid IAM instance profile ARN')
|
|
145
|
+
.optional(),
|
|
146
|
+
})
|
|
147
|
+
.passthrough();
|
|
148
|
+
// ============================================================================
|
|
149
|
+
// EBS Volume Configuration
|
|
150
|
+
//
|
|
151
|
+
// Known fields typed; EBS long-tail tuning (iops, throughput, snapshotId) is
|
|
152
|
+
// accepted via `.passthrough()`.
|
|
153
|
+
// ============================================================================
|
|
154
|
+
exports.EbsVolumeConfigurationSchema = zod_1.z
|
|
155
|
+
.object({
|
|
156
|
+
name: zod_1.z
|
|
157
|
+
.string()
|
|
158
|
+
.min(1)
|
|
159
|
+
.max(48)
|
|
160
|
+
.regex(/^[a-zA-Z][a-zA-Z0-9_-]{0,47}$/, 'Volume name must begin with a letter and contain only alphanumerics, underscores, and hyphens (max 48 chars)'),
|
|
161
|
+
sizeGiB: zod_1.z.number().int().min(1).max(65536),
|
|
162
|
+
volumeType: zod_1.z.enum(['standard', 'io1', 'io2', 'gp2', 'sc1', 'st1', 'gp3']).optional(),
|
|
163
|
+
encrypted: zod_1.z.boolean().optional(),
|
|
164
|
+
kmsKeyId: zod_1.z
|
|
165
|
+
.string()
|
|
166
|
+
.regex(/^arn:[^:]+:kms:[a-z0-9-]+:[0-9]{12}:key\/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/, 'Must be a valid KMS key ARN')
|
|
167
|
+
.optional(),
|
|
168
|
+
})
|
|
169
|
+
.passthrough();
|
|
170
|
+
exports.VolumeConfigurationSchema = zod_1.z.object({
|
|
171
|
+
ebsConfiguration: exports.EbsVolumeConfigurationSchema,
|
|
172
|
+
});
|
|
173
|
+
// ============================================================================
|
|
174
|
+
// Instance Lifecycle Configuration
|
|
175
|
+
// ============================================================================
|
|
176
|
+
const LIFECYCLE_SECONDS_MIN = 60;
|
|
177
|
+
const LIFECYCLE_SECONDS_MAX = 1209600;
|
|
178
|
+
exports.InstanceLifecycleConfigurationSchema = zod_1.z.object({
|
|
179
|
+
idleInstanceTimeout: zod_1.z.number().int().min(LIFECYCLE_SECONDS_MIN).max(LIFECYCLE_SECONDS_MAX).optional(),
|
|
180
|
+
maxLifetime: zod_1.z.number().int().min(LIFECYCLE_SECONDS_MIN).max(LIFECYCLE_SECONDS_MAX).optional(),
|
|
181
|
+
});
|
|
182
|
+
// ============================================================================
|
|
183
|
+
// Compute Configuration
|
|
184
|
+
//
|
|
185
|
+
// `rootVolume` is accepted via `.passthrough()` on ec2Configuration (long-tail,
|
|
186
|
+
// service-managed).
|
|
187
|
+
// ============================================================================
|
|
188
|
+
exports.Ec2ConfigurationSchema = zod_1.z
|
|
189
|
+
.object({
|
|
190
|
+
launchTemplateSource: zod_1.z.object({
|
|
191
|
+
launchParameters: exports.LaunchParametersSchema,
|
|
192
|
+
}),
|
|
193
|
+
vpcConfiguration: exports.VpcConfigurationSchema,
|
|
194
|
+
volumes: zod_1.z.array(exports.VolumeConfigurationSchema).max(5).optional(),
|
|
195
|
+
lifecycleConfiguration: exports.InstanceLifecycleConfigurationSchema.optional(),
|
|
196
|
+
})
|
|
197
|
+
.passthrough();
|
|
198
|
+
exports.ComputeConfigurationSchema = zod_1.z.object({
|
|
199
|
+
ec2Configuration: exports.Ec2ConfigurationSchema,
|
|
200
|
+
});
|
|
201
|
+
// ============================================================================
|
|
202
|
+
// Capacity Provider Schema
|
|
203
|
+
// ============================================================================
|
|
204
|
+
exports.CapacityProviderSchema = zod_1.z.object({
|
|
205
|
+
/** Capacity provider name (immutable after creation). */
|
|
206
|
+
name: exports.CapacityProviderNameSchema,
|
|
207
|
+
/** Optional description (max 4096 chars). The only mutable field besides tags. */
|
|
208
|
+
description: zod_1.z.string().min(1).max(4096).optional(),
|
|
209
|
+
/**
|
|
210
|
+
* ARN of the IAM role AgentCore assumes to manage the capacity provider (immutable). Optional:
|
|
211
|
+
* when omitted, an operator role with the required trust policy and managed permissions is
|
|
212
|
+
* created automatically at deploy time.
|
|
213
|
+
*/
|
|
214
|
+
operatorRoleArn: exports.OperatorRoleArnSchema.optional(),
|
|
215
|
+
/** Compute resources for the capacity provider (immutable after creation). */
|
|
216
|
+
computeConfiguration: exports.ComputeConfigurationSchema,
|
|
217
|
+
/** Optional resource tags. */
|
|
218
|
+
tags: tags_1.TagsSchema.optional(),
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=capacity-provider.js.map
|