@aws-sdk/client-bedrock 3.910.0 → 3.911.0

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.
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const s = "required", t = "fn", u = "argv", v = "ref";
5
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
5
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "string" }, i = { [s]: true, "default": false, "type": "boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
6
6
  const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://bedrock.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
7
7
  exports.ruleSet = _data;
package/dist-cjs/index.js CHANGED
@@ -2062,6 +2062,7 @@ const se_CreateAutomatedReasoningPolicyCommand = async (input, context) => {
2062
2062
  body = JSON.stringify(smithyClient.take(input, {
2063
2063
  clientRequestToken: [true, (_) => _ ?? uuid.v4()],
2064
2064
  description: [],
2065
+ kmsKeyId: [],
2065
2066
  name: [],
2066
2067
  policyDefinition: (_) => smithyClient._json(_),
2067
2068
  tags: (_) => smithyClient._json(_),
@@ -2378,8 +2379,11 @@ const se_DeleteAutomatedReasoningPolicyCommand = async (input, context) => {
2378
2379
  const headers = {};
2379
2380
  b.bp("/automated-reasoning-policies/{policyArn}");
2380
2381
  b.p("policyArn", () => input.policyArn, "{policyArn}", false);
2382
+ const query = smithyClient.map({
2383
+ [_f]: [() => input.force !== void 0, () => input[_f].toString()],
2384
+ });
2381
2385
  let body;
2382
- b.m("DELETE").h(headers).b(body);
2386
+ b.m("DELETE").h(headers).q(query).b(body);
2383
2387
  return b.build();
2384
2388
  };
2385
2389
  const se_DeleteAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
@@ -3749,6 +3753,7 @@ const de_GetAutomatedReasoningPolicyCommand = async (output, context) => {
3749
3753
  createdAt: (_) => smithyClient.expectNonNull(smithyClient.parseRfc3339DateTimeWithOffset(_)),
3750
3754
  definitionHash: smithyClient.expectString,
3751
3755
  description: smithyClient.expectString,
3756
+ kmsKeyArn: smithyClient.expectString,
3752
3757
  name: smithyClient.expectString,
3753
3758
  policyArn: smithyClient.expectString,
3754
3759
  policyId: smithyClient.expectString,
@@ -6165,6 +6170,7 @@ const _cB = "createdBefore";
6165
6170
  const _cRT = "clientRequestToken";
6166
6171
  const _cTA = "creationTimeAfter";
6167
6172
  const _cTB = "creationTimeBefore";
6173
+ const _f = "force";
6168
6174
  const _fMAE = "foundationModelArnEquals";
6169
6175
  const _gI = "guardrailIdentifier";
6170
6176
  const _gV = "guardrailVersion";
@@ -1,4 +1,4 @@
1
1
  const s = "required", t = "fn", u = "argv", v = "ref";
2
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "String" }, i = { [s]: true, "default": false, "type": "Boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
2
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = { [s]: false, "type": "string" }, i = { [s]: true, "default": false, "type": "boolean" }, j = { [v]: "Endpoint" }, k = { [t]: c, [u]: [{ [v]: "UseFIPS" }, true] }, l = { [t]: c, [u]: [{ [v]: "UseDualStack" }, true] }, m = {}, n = { [t]: "getAttr", [u]: [{ [v]: g }, "supportsFIPS"] }, o = { [t]: c, [u]: [true, { [t]: "getAttr", [u]: [{ [v]: g }, "supportsDualStack"] }] }, p = [k], q = [l], r = [{ [v]: "Region" }];
3
3
  const _data = { version: "1.0", parameters: { Region: h, UseDualStack: i, UseFIPS: i, Endpoint: h }, rules: [{ conditions: [{ [t]: b, [u]: [j] }], rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: j, properties: m, headers: m }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [t]: b, [u]: r }], rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: g }], rules: [{ conditions: [k, l], rules: [{ conditions: [{ [t]: c, [u]: [a, n] }, o], rules: [{ rules: [{ endpoint: { url: "https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: p, rules: [{ conditions: [{ [t]: c, [u]: [n, a] }], rules: [{ rules: [{ endpoint: { url: "https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: q, rules: [{ conditions: [o], rules: [{ rules: [{ endpoint: { url: "https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { rules: [{ endpoint: { url: "https://bedrock.{Region}.{PartitionResult#dnsSuffix}", properties: m, headers: m }, type: e }], type: f }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] };
4
4
  export const ruleSet = _data;
@@ -38,6 +38,7 @@ export const se_CreateAutomatedReasoningPolicyCommand = async (input, context) =
38
38
  body = JSON.stringify(take(input, {
39
39
  clientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
40
40
  description: [],
41
+ kmsKeyId: [],
41
42
  name: [],
42
43
  policyDefinition: (_) => _json(_),
43
44
  tags: (_) => _json(_),
@@ -354,8 +355,11 @@ export const se_DeleteAutomatedReasoningPolicyCommand = async (input, context) =
354
355
  const headers = {};
355
356
  b.bp("/automated-reasoning-policies/{policyArn}");
356
357
  b.p("policyArn", () => input.policyArn, "{policyArn}", false);
358
+ const query = map({
359
+ [_f]: [() => input.force !== void 0, () => input[_f].toString()],
360
+ });
357
361
  let body;
358
- b.m("DELETE").h(headers).b(body);
362
+ b.m("DELETE").h(headers).q(query).b(body);
359
363
  return b.build();
360
364
  };
361
365
  export const se_DeleteAutomatedReasoningPolicyBuildWorkflowCommand = async (input, context) => {
@@ -1725,6 +1729,7 @@ export const de_GetAutomatedReasoningPolicyCommand = async (output, context) =>
1725
1729
  createdAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
1726
1730
  definitionHash: __expectString,
1727
1731
  description: __expectString,
1732
+ kmsKeyArn: __expectString,
1728
1733
  name: __expectString,
1729
1734
  policyArn: __expectString,
1730
1735
  policyId: __expectString,
@@ -4142,6 +4147,7 @@ const _cB = "createdBefore";
4142
4147
  const _cRT = "clientRequestToken";
4143
4148
  const _cTA = "creationTimeAfter";
4144
4149
  const _cTB = "creationTimeBefore";
4150
+ const _f = "force";
4145
4151
  const _fMAE = "foundationModelArnEquals";
4146
4152
  const _gI = "guardrailIdentifier";
4147
4153
  const _gV = "guardrailVersion";
@@ -69,6 +69,7 @@ declare const CreateAutomatedReasoningPolicyCommand_base: {
69
69
  * },
70
70
  * ],
71
71
  * },
72
+ * kmsKeyId: "STRING_VALUE",
72
73
  * tags: [ // TagList
73
74
  * { // Tag
74
75
  * key: "STRING_VALUE", // required
@@ -38,6 +38,7 @@ declare const DeleteAutomatedReasoningPolicyCommand_base: {
38
38
  * const client = new BedrockClient(config);
39
39
  * const input = { // DeleteAutomatedReasoningPolicyRequest
40
40
  * policyArn: "STRING_VALUE", // required
41
+ * force: true || false,
41
42
  * };
42
43
  * const command = new DeleteAutomatedReasoningPolicyCommand(input);
43
44
  * const response = await client.send(command);
@@ -54,9 +55,15 @@ declare const DeleteAutomatedReasoningPolicyCommand_base: {
54
55
  * @throws {@link AccessDeniedException} (client fault)
55
56
  * <p>The request is denied because of missing access permissions.</p>
56
57
  *
58
+ * @throws {@link ConflictException} (client fault)
59
+ * <p>Error occurred because of a conflict while performing an operation.</p>
60
+ *
57
61
  * @throws {@link InternalServerException} (server fault)
58
62
  * <p>An internal server error occurred. Retry your request.</p>
59
63
  *
64
+ * @throws {@link ResourceInUseException} (client fault)
65
+ * <p>Thrown when attempting to delete or modify a resource that is currently being used by other resources or operations. For example, trying to delete an Automated Reasoning policy that is referenced by an active guardrail.</p>
66
+ *
60
67
  * @throws {@link ResourceNotFoundException} (client fault)
61
68
  * <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
62
69
  *
@@ -48,6 +48,7 @@ declare const GetAutomatedReasoningPolicyCommand_base: {
48
48
  * // policyId: "STRING_VALUE", // required
49
49
  * // description: "STRING_VALUE",
50
50
  * // definitionHash: "STRING_VALUE", // required
51
+ * // kmsKeyArn: "STRING_VALUE",
51
52
  * // createdAt: new Date("TIMESTAMP"),
52
53
  * // updatedAt: new Date("TIMESTAMP"), // required
53
54
  * // };
@@ -298,6 +298,11 @@ export interface CreateAutomatedReasoningPolicyRequest {
298
298
  * @public
299
299
  */
300
300
  policyDefinition?: AutomatedReasoningPolicyDefinition | undefined;
301
+ /**
302
+ * <p>The identifier of the KMS key to use for encrypting the automated reasoning policy and its associated artifacts. If you don't specify a KMS key, Amazon Bedrock uses an KMS managed key for encryption. For enhanced security and control, you can specify a customer managed KMS key.</p>
303
+ * @public
304
+ */
305
+ kmsKeyId?: string | undefined;
301
306
  /**
302
307
  * <p>A list of tags to associate with the Automated Reasoning policy. Tags help you organize and manage your policies.</p>
303
308
  * @public
@@ -509,12 +514,29 @@ export interface DeleteAutomatedReasoningPolicyRequest {
509
514
  * @public
510
515
  */
511
516
  policyArn: string | undefined;
517
+ /**
518
+ * <p>Specifies whether to force delete the automated reasoning policy even if it has active resources. When <code>false</code>, Amazon Bedrock validates if all artifacts have been deleted (e.g. policy version, test case, test result) for a policy before deletion. When <code>true</code>, Amazon Bedrock will delete the policy and all its artifacts without validation. Default is <code>false</code>. </p>
519
+ * @public
520
+ */
521
+ force?: boolean | undefined;
512
522
  }
513
523
  /**
514
524
  * @public
515
525
  */
516
526
  export interface DeleteAutomatedReasoningPolicyResponse {
517
527
  }
528
+ /**
529
+ * <p>Thrown when attempting to delete or modify a resource that is currently being used by other resources or operations. For example, trying to delete an Automated Reasoning policy that is referenced by an active guardrail.</p>
530
+ * @public
531
+ */
532
+ export declare class ResourceInUseException extends __BaseException {
533
+ readonly name: "ResourceInUseException";
534
+ readonly $fault: "client";
535
+ /**
536
+ * @internal
537
+ */
538
+ constructor(opts: __ExceptionOptionType<ResourceInUseException, __BaseException>);
539
+ }
518
540
  /**
519
541
  * @public
520
542
  */
@@ -540,18 +562,6 @@ export interface DeleteAutomatedReasoningPolicyBuildWorkflowRequest {
540
562
  */
541
563
  export interface DeleteAutomatedReasoningPolicyBuildWorkflowResponse {
542
564
  }
543
- /**
544
- * <p>Thrown when attempting to delete or modify a resource that is currently being used by other resources or operations. For example, trying to delete an Automated Reasoning policy that is referenced by an active guardrail.</p>
545
- * @public
546
- */
547
- export declare class ResourceInUseException extends __BaseException {
548
- readonly name: "ResourceInUseException";
549
- readonly $fault: "client";
550
- /**
551
- * @internal
552
- */
553
- constructor(opts: __ExceptionOptionType<ResourceInUseException, __BaseException>);
554
- }
555
565
  /**
556
566
  * @public
557
567
  */
@@ -641,6 +651,11 @@ export interface GetAutomatedReasoningPolicyResponse {
641
651
  * @public
642
652
  */
643
653
  definitionHash: string | undefined;
654
+ /**
655
+ * <p>The Amazon Resource Name (ARN) of the KMS key used to encrypt the automated reasoning policy and its associated artifacts. If a KMS key is not provided during the initial CreateAutomatedReasoningPolicyRequest, the kmsKeyArn won't be included in the GetAutomatedReasoningPolicyResponse. </p>
656
+ * @public
657
+ */
658
+ kmsKeyArn?: string | undefined;
644
659
  /**
645
660
  * <p>The timestamp when the policy was created.</p>
646
661
  * @public
@@ -100,6 +100,7 @@ export interface CreateAutomatedReasoningPolicyRequest {
100
100
  description?: string | undefined;
101
101
  clientRequestToken?: string | undefined;
102
102
  policyDefinition?: AutomatedReasoningPolicyDefinition | undefined;
103
+ kmsKeyId?: string | undefined;
103
104
  tags?: Tag[] | undefined;
104
105
  }
105
106
  export interface CreateAutomatedReasoningPolicyResponse {
@@ -165,14 +166,9 @@ export interface CreateAutomatedReasoningPolicyVersionResponse {
165
166
  }
166
167
  export interface DeleteAutomatedReasoningPolicyRequest {
167
168
  policyArn: string | undefined;
169
+ force?: boolean | undefined;
168
170
  }
169
171
  export interface DeleteAutomatedReasoningPolicyResponse {}
170
- export interface DeleteAutomatedReasoningPolicyBuildWorkflowRequest {
171
- policyArn: string | undefined;
172
- buildWorkflowId: string | undefined;
173
- lastUpdatedAt: Date | undefined;
174
- }
175
- export interface DeleteAutomatedReasoningPolicyBuildWorkflowResponse {}
176
172
  export declare class ResourceInUseException extends __BaseException {
177
173
  readonly name: "ResourceInUseException";
178
174
  readonly $fault: "client";
@@ -180,6 +176,12 @@ export declare class ResourceInUseException extends __BaseException {
180
176
  opts: __ExceptionOptionType<ResourceInUseException, __BaseException>
181
177
  );
182
178
  }
179
+ export interface DeleteAutomatedReasoningPolicyBuildWorkflowRequest {
180
+ policyArn: string | undefined;
181
+ buildWorkflowId: string | undefined;
182
+ lastUpdatedAt: Date | undefined;
183
+ }
184
+ export interface DeleteAutomatedReasoningPolicyBuildWorkflowResponse {}
183
185
  export interface DeleteAutomatedReasoningPolicyTestCaseRequest {
184
186
  policyArn: string | undefined;
185
187
  testCaseId: string | undefined;
@@ -202,6 +204,7 @@ export interface GetAutomatedReasoningPolicyResponse {
202
204
  policyId: string | undefined;
203
205
  description?: string | undefined;
204
206
  definitionHash: string | undefined;
207
+ kmsKeyArn?: string | undefined;
205
208
  createdAt?: Date | undefined;
206
209
  updatedAt: Date | undefined;
207
210
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock",
3
3
  "description": "AWS SDK for JavaScript Bedrock Client for Node.js, Browser and React Native",
4
- "version": "3.910.0",
4
+ "version": "3.911.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock",
@@ -20,18 +20,18 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/core": "3.910.0",
24
- "@aws-sdk/credential-provider-node": "3.910.0",
23
+ "@aws-sdk/core": "3.911.0",
24
+ "@aws-sdk/credential-provider-node": "3.911.0",
25
25
  "@aws-sdk/middleware-host-header": "3.910.0",
26
26
  "@aws-sdk/middleware-logger": "3.910.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.910.0",
28
- "@aws-sdk/middleware-user-agent": "3.910.0",
28
+ "@aws-sdk/middleware-user-agent": "3.911.0",
29
29
  "@aws-sdk/region-config-resolver": "3.910.0",
30
- "@aws-sdk/token-providers": "3.910.0",
30
+ "@aws-sdk/token-providers": "3.911.0",
31
31
  "@aws-sdk/types": "3.910.0",
32
32
  "@aws-sdk/util-endpoints": "3.910.0",
33
33
  "@aws-sdk/util-user-agent-browser": "3.910.0",
34
- "@aws-sdk/util-user-agent-node": "3.910.0",
34
+ "@aws-sdk/util-user-agent-node": "3.911.0",
35
35
  "@smithy/config-resolver": "^4.3.2",
36
36
  "@smithy/core": "^3.16.1",
37
37
  "@smithy/fetch-http-handler": "^5.3.3",