Skip to content

Commit b9c1896

Browse files
author
awstools
committed
feat(client-bedrock): Release includes an increase to the maximum policy build document size, an update to DeleteAutomatedReasoningPolicyBuildWorkflow to add ResourceInUseException, and corrections to UpdateAutomatedReasoningPolicyTestCaseRequest.
1 parent 1f05819 commit b9c1896

File tree

5 files changed

+38
-39
lines changed

5 files changed

+38
-39
lines changed

clients/client-bedrock/src/commands/DeleteAutomatedReasoningPolicyBuildWorkflowCommand.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ export interface DeleteAutomatedReasoningPolicyBuildWorkflowCommandOutput
7272
* @throws {@link InternalServerException} (server fault)
7373
* <p>An internal server error occurred. Retry your request.</p>
7474
*
75+
* @throws {@link ResourceInUseException} (client fault)
76+
* <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>
77+
*
7578
* @throws {@link ResourceNotFoundException} (client fault)
7679
* <p>The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.</p>
7780
*

clients/client-bedrock/src/commands/UpdateAutomatedReasoningPolicyTestCaseCommand.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export interface UpdateAutomatedReasoningPolicyTestCaseCommandOutput
5555
* lastUpdatedAt: new Date("TIMESTAMP"), // required
5656
* expectedAggregatedFindingsResult: "VALID" || "INVALID" || "SATISFIABLE" || "IMPOSSIBLE" || "TRANSLATION_AMBIGUOUS" || "TOO_COMPLEX" || "NO_TRANSLATION", // required
5757
* confidenceThreshold: Number("double"),
58-
* kmsKeyArn: "STRING_VALUE",
5958
* clientRequestToken: "STRING_VALUE",
6059
* };
6160
* const command = new UpdateAutomatedReasoningPolicyTestCaseCommand(input);

clients/client-bedrock/src/models/models_0.ts

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,26 @@ export interface DeleteAutomatedReasoningPolicyBuildWorkflowRequest {
672672
*/
673673
export interface DeleteAutomatedReasoningPolicyBuildWorkflowResponse {}
674674

675+
/**
676+
* <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>
677+
* @public
678+
*/
679+
export class ResourceInUseException extends __BaseException {
680+
readonly name: "ResourceInUseException" = "ResourceInUseException";
681+
readonly $fault: "client" = "client";
682+
/**
683+
* @internal
684+
*/
685+
constructor(opts: __ExceptionOptionType<ResourceInUseException, __BaseException>) {
686+
super({
687+
name: "ResourceInUseException",
688+
$fault: "client",
689+
...opts,
690+
});
691+
Object.setPrototypeOf(this, ResourceInUseException.prototype);
692+
}
693+
}
694+
675695
/**
676696
* @public
677697
*/
@@ -700,26 +720,6 @@ export interface DeleteAutomatedReasoningPolicyTestCaseRequest {
700720
*/
701721
export interface DeleteAutomatedReasoningPolicyTestCaseResponse {}
702722

703-
/**
704-
* <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>
705-
* @public
706-
*/
707-
export class ResourceInUseException extends __BaseException {
708-
readonly name: "ResourceInUseException" = "ResourceInUseException";
709-
readonly $fault: "client" = "client";
710-
/**
711-
* @internal
712-
*/
713-
constructor(opts: __ExceptionOptionType<ResourceInUseException, __BaseException>) {
714-
super({
715-
name: "ResourceInUseException",
716-
$fault: "client",
717-
...opts,
718-
});
719-
Object.setPrototypeOf(this, ResourceInUseException.prototype);
720-
}
721-
}
722-
723723
/**
724724
* @public
725725
*/
@@ -3823,12 +3823,6 @@ export interface UpdateAutomatedReasoningPolicyTestCaseRequest {
38233823
*/
38243824
confidenceThreshold?: number | undefined;
38253825

3826-
/**
3827-
* <p>The KMS key ARN for encrypting the test at rest. If not provided, the key will not be updated. Use <code>DISCARD</code> to remove the key.</p>
3828-
* @public
3829-
*/
3830-
kmsKeyArn?: string | undefined;
3831-
38323826
/**
38333827
* <p>A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.</p>
38343828
* @public
@@ -8368,6 +8362,7 @@ export const AutomatedReasoningPolicyBuildWorkflowDocumentFilterSensitiveLog = (
83688362
obj: AutomatedReasoningPolicyBuildWorkflowDocument
83698363
): any => ({
83708364
...obj,
8365+
...(obj.document && { document: SENSITIVE_STRING }),
83718366
...(obj.documentName && { documentName: SENSITIVE_STRING }),
83728367
...(obj.documentDescription && { documentDescription: SENSITIVE_STRING }),
83738368
});

clients/client-bedrock/src/protocols/Aws_restJson1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,6 @@ export const se_UpdateAutomatedReasoningPolicyTestCaseCommand = async (
24372437
confidenceThreshold: (_) => __serializeFloat(_),
24382438
expectedAggregatedFindingsResult: [],
24392439
guardContent: [],
2440-
kmsKeyArn: [],
24412440
lastUpdatedAt: (_) => __serializeDateTime(_),
24422441
queryContent: [],
24432442
})

codegen/sdk-codegen/aws-models/bedrock.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1779,6 +1779,16 @@
17791779
"target": "com.amazonaws.bedrock#AutomatedReasoningPolicyArn"
17801780
}
17811781
},
1782+
"com.amazonaws.bedrock#AutomatedReasoningPolicyBuildDocumentBlob": {
1783+
"type": "blob",
1784+
"traits": {
1785+
"smithy.api#length": {
1786+
"min": 1,
1787+
"max": 5000000
1788+
},
1789+
"smithy.api#sensitive": {}
1790+
}
1791+
},
17821792
"com.amazonaws.bedrock#AutomatedReasoningPolicyBuildDocumentContentType": {
17831793
"type": "enum",
17841794
"members": {
@@ -2022,13 +2032,9 @@
20222032
"type": "structure",
20232033
"members": {
20242034
"document": {
2025-
"target": "smithy.api#Blob",
2035+
"target": "com.amazonaws.bedrock#AutomatedReasoningPolicyBuildDocumentBlob",
20262036
"traits": {
20272037
"smithy.api#documentation": "<p>The actual content of the source document that will be analyzed to extract policy rules and concepts.</p>",
2028-
"smithy.api#length": {
2029-
"min": 1,
2030-
"max": 4500000
2031-
},
20322038
"smithy.api#required": {}
20332039
}
20342040
},
@@ -6603,6 +6609,9 @@
66036609
{
66046610
"target": "com.amazonaws.bedrock#InternalServerException"
66056611
},
6612+
{
6613+
"target": "com.amazonaws.bedrock#ResourceInUseException"
6614+
},
66066615
{
66076616
"target": "com.amazonaws.bedrock#ResourceNotFoundException"
66086617
},
@@ -20528,12 +20537,6 @@
2052820537
"smithy.api#documentation": "<p>The updated minimum confidence level for logic validation. If null is provided, the threshold will be removed.</p>"
2052920538
}
2053020539
},
20531-
"kmsKeyArn": {
20532-
"target": "com.amazonaws.bedrock#KmsKeyArn",
20533-
"traits": {
20534-
"smithy.api#documentation": "<p>The KMS key ARN for encrypting the test at rest. If not provided, the key will not be updated. Use <code>DISCARD</code> to remove the key.</p>"
20535-
}
20536-
},
2053720540
"clientRequestToken": {
2053820541
"target": "com.amazonaws.bedrock#IdempotencyToken",
2053920542
"traits": {

0 commit comments

Comments
 (0)