From c0fa0e41b1eb0d44dca553a7c54fb24636429069 Mon Sep 17 00:00:00 2001 From: Josh Elkins Date: Mon, 2 Oct 2023 15:14:22 -0500 Subject: [PATCH] fix: Correct serde for restJson1 event streams that contain errors (#1160) --- .../bedrock-runtime.2023-09-30.json | 1163 ++++++ .../aws-models/bedrock.2023-04-20.json | 3294 +++++++++++++++++ .../AWSHttpBindingProtocolGenerator.kt | 4 +- .../codegen/MessageUnmarshallableGenerator.kt | 4 +- .../awsquery/AwsQueryProtocolGenerator.kt | 2 +- .../ec2query/Ec2QueryProtocolGenerator.kt | 2 +- .../restxml/RestXmlProtocolGenerator.kt | 2 +- 7 files changed, 4465 insertions(+), 6 deletions(-) create mode 100644 codegen/sdk-codegen/aws-models/bedrock-runtime.2023-09-30.json create mode 100644 codegen/sdk-codegen/aws-models/bedrock.2023-04-20.json diff --git a/codegen/sdk-codegen/aws-models/bedrock-runtime.2023-09-30.json b/codegen/sdk-codegen/aws-models/bedrock-runtime.2023-09-30.json new file mode 100644 index 00000000000..0a5468ad977 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/bedrock-runtime.2023-09-30.json @@ -0,0 +1,1163 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.bedrockruntime#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The request is denied because of missing access permissions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.bedrockruntime#AmazonBedrockFrontendService": { + "type": "service", + "version": "2023-09-30", + "resources": [ + { + "target": "com.amazonaws.bedrockruntime#InferenceResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Bedrock Runtime", + "endpointPrefix": "bedrock-runtime", + "cloudTrailEventSource": "bedrock.amazonaws.com" + }, + "aws.auth#sigv4": { + "name": "bedrock" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

Describes the API operations for running inference using Bedrock models.

", + "smithy.api#title": "Amazon Bedrock Runtime", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-runtime-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-runtime-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-runtime.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-runtime.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-runtime.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.bedrockruntime#Body": { + "type": "blob", + "traits": { + "smithy.api#length": { + "max": 25000000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockruntime#InferenceResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrockruntime#InvokeModel" + }, + { + "target": "com.amazonaws.bedrockruntime#InvokeModelWithResponseStream" + } + ] + }, + "com.amazonaws.bedrockruntime#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

An internal server error occurred. Retry your request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.bedrockruntime#InvokeModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockruntime#InvokeModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrockruntime#InvokeModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelErrorException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelNotReadyException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelTimeoutException" + }, + { + "target": "com.amazonaws.bedrockruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Invokes the specified Bedrock model to run inference using the input provided in the request body. \n You use InvokeModel to run inference for text models, image models, and embedding models.

\n

For more information about invoking models, see Using the API in the Bedrock User Guide.

\n

For example requests, see Examples (after the Errors section).

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/model/{modelId}/invoke" + } + } + }, + "com.amazonaws.bedrockruntime#InvokeModelIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|([0-9]{12}:provisioned-model/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][_-]?)+)$" + } + }, + "com.amazonaws.bedrockruntime#InvokeModelRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.amazonaws.bedrockruntime#Body", + "traits": { + "smithy.api#documentation": "

Input data in the format specified in the content-type request header. To see the format and content of this field for different models, refer to Inference parameters.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The MIME type of the input data in the request. The default value is\n application/json.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "accept": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The desired MIME type of the inference body in the response. The default value is\n application/json.

", + "smithy.api#httpHeader": "Accept" + } + }, + "modelId": { + "target": "com.amazonaws.bedrockruntime#InvokeModelIdentifier", + "traits": { + "smithy.api#documentation": "

Identifier of the model.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockruntime#InvokeModelResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.amazonaws.bedrockruntime#Body", + "traits": { + "smithy.api#documentation": "

Inference response from the model in the format specified in the content-type header field. To see the format and content of this field for different models, refer to Inference parameters.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The MIME type of the inference result.

", + "smithy.api#httpHeader": "Content-Type", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockruntime#InvokeModelWithResponseStream": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamRequest" + }, + "output": { + "target": "com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrockruntime#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrockruntime#InternalServerException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelErrorException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelNotReadyException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelStreamErrorException" + }, + { + "target": "com.amazonaws.bedrockruntime#ModelTimeoutException" + }, + { + "target": "com.amazonaws.bedrockruntime#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrockruntime#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrockruntime#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrockruntime#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Invoke the specified Bedrock model to run inference using the input provided.\n Return the response in a stream.

\n

For more information about invoking models, see Using the API in the Bedrock User Guide.

\n

For an example request and response, see Examples (after the Errors section).

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/model/{modelId}/invoke-with-response-stream" + } + } + }, + "com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamRequest": { + "type": "structure", + "members": { + "body": { + "target": "com.amazonaws.bedrockruntime#Body", + "traits": { + "smithy.api#documentation": "

Inference input in the format specified by the \n content-type. To see the format and content of this field for different models, refer to Inference parameters.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The MIME type of the input data in the request. The default value is\n application/json.

", + "smithy.api#httpHeader": "Content-Type" + } + }, + "accept": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The desired MIME type of the inference body in the response. The default value is\n application/json.

", + "smithy.api#httpHeader": "X-Amzn-Bedrock-Accept" + } + }, + "modelId": { + "target": "com.amazonaws.bedrockruntime#InvokeModelIdentifier", + "traits": { + "smithy.api#documentation": "

Id of the model to invoke using the streaming request.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrockruntime#InvokeModelWithResponseStreamResponse": { + "type": "structure", + "members": { + "body": { + "target": "com.amazonaws.bedrockruntime#ResponseStream", + "traits": { + "smithy.api#documentation": "

Inference response from the model in the format specified by Content-Type. To see the format and content of this field for different models, refer to Inference parameters.

", + "smithy.api#httpPayload": {}, + "smithy.api#required": {} + } + }, + "contentType": { + "target": "com.amazonaws.bedrockruntime#MimeType", + "traits": { + "smithy.api#documentation": "

The MIME type of the inference result.

", + "smithy.api#httpHeader": "X-Amzn-Bedrock-Content-Type", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrockruntime#MimeType": { + "type": "string" + }, + "com.amazonaws.bedrockruntime#ModelErrorException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + }, + "originalStatusCode": { + "target": "com.amazonaws.bedrockruntime#StatusCode", + "traits": { + "smithy.api#documentation": "

The original status code.

" + } + }, + "resourceName": { + "target": "com.amazonaws.bedrockruntime#NonBlankString", + "traits": { + "smithy.api#documentation": "

The resource name.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request failed due to an error while processing the model.

", + "smithy.api#error": "client", + "smithy.api#httpError": 424 + } + }, + "com.amazonaws.bedrockruntime#ModelNotReadyException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The model specified in the request is not ready to serve inference requests.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.bedrockruntime#ModelStreamErrorException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + }, + "originalStatusCode": { + "target": "com.amazonaws.bedrockruntime#StatusCode", + "traits": { + "smithy.api#documentation": "

The original status code.

" + } + }, + "originalMessage": { + "target": "com.amazonaws.bedrockruntime#NonBlankString", + "traits": { + "smithy.api#documentation": "

The original message.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

An error occurred while streaming the response.

", + "smithy.api#error": "client", + "smithy.api#httpError": 424 + } + }, + "com.amazonaws.bedrockruntime#ModelTimeoutException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The request took too long to process. Processing time exceeded the model timeout length.

", + "smithy.api#error": "client", + "smithy.api#httpError": 408 + } + }, + "com.amazonaws.bedrockruntime#NonBlankString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, + "com.amazonaws.bedrockruntime#PartBody": { + "type": "blob", + "traits": { + "smithy.api#length": { + "max": 1000000 + }, + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockruntime#PayloadPart": { + "type": "structure", + "members": { + "bytes": { + "target": "com.amazonaws.bedrockruntime#PartBody", + "traits": { + "smithy.api#documentation": "

Base64-encoded bytes of payload data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Payload content included in the response.

", + "smithy.api#sensitive": {} + } + }, + "com.amazonaws.bedrockruntime#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The specified resource ARN was not found. Check the ARN and try your request again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.bedrockruntime#ResponseStream": { + "type": "union", + "members": { + "chunk": { + "target": "com.amazonaws.bedrockruntime#PayloadPart", + "traits": { + "smithy.api#documentation": "

Content included in the response.

" + } + }, + "internalServerException": { + "target": "com.amazonaws.bedrockruntime#InternalServerException" + }, + "modelStreamErrorException": { + "target": "com.amazonaws.bedrockruntime#ModelStreamErrorException" + }, + "validationException": { + "target": "com.amazonaws.bedrockruntime#ValidationException" + }, + "throttlingException": { + "target": "com.amazonaws.bedrockruntime#ThrottlingException" + } + }, + "traits": { + "smithy.api#documentation": "

Definition of content in the response stream.

", + "smithy.api#streaming": {} + } + }, + "com.amazonaws.bedrockruntime#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The number of requests exceeds the service quota. Resubmit your request later.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrockruntime#StatusCode": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 100, + "max": 599 + } + } + }, + "com.amazonaws.bedrockruntime#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The number of requests exceeds the limit. Resubmit your request later.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.bedrockruntime#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrockruntime#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

Input validation failed. Check your request parameters and retry the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + } + } +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/bedrock.2023-04-20.json b/codegen/sdk-codegen/aws-models/bedrock.2023-04-20.json new file mode 100644 index 00000000000..9bbba4caa64 --- /dev/null +++ b/codegen/sdk-codegen/aws-models/bedrock.2023-04-20.json @@ -0,0 +1,3294 @@ +{ + "smithy": "2.0", + "shapes": { + "com.amazonaws.bedrock#AccessDeniedException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The request is denied because of missing access permissions.

", + "smithy.api#error": "client", + "smithy.api#httpError": 403 + } + }, + "com.amazonaws.bedrock#AmazonBedrockControlPlaneService": { + "type": "service", + "version": "2023-04-20", + "resources": [ + { + "target": "com.amazonaws.bedrock#LoggingResource" + }, + { + "target": "com.amazonaws.bedrock#ModelResource" + }, + { + "target": "com.amazonaws.bedrock#ProvisionedModelThroughputResource" + }, + { + "target": "com.amazonaws.bedrock#SubscriptionResource" + }, + { + "target": "com.amazonaws.bedrock#TaggingResource" + }, + { + "target": "com.amazonaws.bedrock#TrainingResource" + } + ], + "traits": { + "aws.api#service": { + "sdkId": "Bedrock", + "endpointPrefix": "bedrock" + }, + "aws.auth#sigv4": { + "name": "bedrock" + }, + "aws.protocols#restJson1": {}, + "smithy.api#documentation": "

Describes the API operations for creating and managing Bedrock models.

", + "smithy.api#title": "Amazon Bedrock", + "smithy.rules#endpointRuleSet": { + "version": "1.0", + "parameters": { + "Region": { + "builtIn": "AWS::Region", + "required": false, + "documentation": "The AWS region used to dispatch the request.", + "type": "String" + }, + "UseDualStack": { + "builtIn": "AWS::UseDualStack", + "required": true, + "default": false, + "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", + "type": "Boolean" + }, + "UseFIPS": { + "builtIn": "AWS::UseFIPS", + "required": true, + "default": false, + "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", + "type": "Boolean" + }, + "Endpoint": { + "builtIn": "SDK::Endpoint", + "required": false, + "documentation": "Override the endpoint used to send this request", + "type": "String" + } + }, + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Endpoint" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "error": "Invalid Configuration: FIPS and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "aws.partition", + "argv": [ + { + "ref": "Region" + } + ], + "assign": "PartitionResult" + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + }, + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS and DualStack are enabled, but this partition does not support one or both", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseFIPS" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock-fips.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "FIPS is enabled but this partition does not support FIPS", + "type": "error" + } + ] + }, + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [ + { + "fn": "booleanEquals", + "argv": [ + true, + { + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsDualStack" + ] + } + ] + } + ], + "type": "tree", + "rules": [ + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock.{Region}.{PartitionResult#dualStackDnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" + } + ] + }, + { + "conditions": [], + "type": "tree", + "rules": [ + { + "conditions": [], + "endpoint": { + "url": "https://bedrock.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" + } + ] + } + ] + } + ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" + } + ] + } + ] + }, + "smithy.rules#endpointTests": { + "testCases": [ + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.api.aws" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.api.amazonwebservices.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.cn-north-1.amazonaws.com.cn" + } + }, + "params": { + "Region": "cn-north-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.api.aws" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-gov-east-1.amazonaws.com" + } + }, + "params": { + "Region": "us-gov-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-iso-east-1.c2s.ic.gov" + } + }, + "params": { + "Region": "us-iso-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", + "expect": { + "error": "FIPS and DualStack are enabled, but this partition does not support one or both" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock-fips.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": true, + "UseDualStack": false + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", + "expect": { + "error": "DualStack is enabled but this partition does not support DualStack" + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": true + } + }, + { + "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", + "expect": { + "endpoint": { + "url": "https://bedrock.us-isob-east-1.sc2s.sgov.gov" + } + }, + "params": { + "Region": "us-isob-east-1", + "UseFIPS": false, + "UseDualStack": false + } + }, + { + "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", + "expect": { + "endpoint": { + "url": "https://example.com" + } + }, + "params": { + "UseFIPS": false, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips enabled and dualstack disabled", + "expect": { + "error": "Invalid Configuration: FIPS and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": true, + "UseDualStack": false, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "For custom endpoint with fips disabled and dualstack enabled", + "expect": { + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" + }, + "params": { + "Region": "us-east-1", + "UseFIPS": false, + "UseDualStack": true, + "Endpoint": "https://example.com" + } + }, + { + "documentation": "Missing region", + "expect": { + "error": "Invalid Configuration: Missing Region" + } + } + ], + "version": "1.0" + } + } + }, + "com.amazonaws.bedrock#BaseModelIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2})|(([0-9a-zA-Z][_-]?)+)$" + } + }, + "com.amazonaws.bedrock#BedrockModelId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 140 + }, + "smithy.api#pattern": "^[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}(/[a-z0-9]{12}|)$" + } + }, + "com.amazonaws.bedrock#BrandedName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 20 + }, + "smithy.api#pattern": "^.*$" + } + }, + "com.amazonaws.bedrock#BucketName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 3, + "max": 63 + } + } + }, + "com.amazonaws.bedrock#CloudWatchConfig": { + "type": "structure", + "members": { + "logGroupName": { + "target": "com.amazonaws.bedrock#LogGroupName", + "traits": { + "smithy.api#documentation": "

The log group name.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "

The role ARN.

", + "smithy.api#required": {} + } + }, + "largeDataDeliveryS3Config": { + "target": "com.amazonaws.bedrock#S3Config", + "traits": { + "smithy.api#documentation": "

S3 configuration for delivering a large amount of data.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

CloudWatch logging configuration.

" + } + }, + "com.amazonaws.bedrock#ConflictException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

Error occurred because of a conflict while performing an operation.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#TooManyTagsException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates a fine-tuning job to customize a base model.

\n

You specify the base foundation model and the location of the training data.\n After the model-customization job completes successfully, your custom model resource will be ready to use. Training data\n contains input and output text for each record in a JSONL format. Optionally, you can specify validation data\n in the same format as the training data. Bedrock returns validation loss metrics and output generations \n after the job completes.\n

\n

\n Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size.\n To monitor a job, use the GetModelCustomizationJob operation to retrieve the job status.

\n

For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 201, + "method": "POST", + "uri": "/model-customization-jobs" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "

Enter a unique name for the fine-tuning job.

", + "smithy.api#required": {} + } + }, + "customModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

Enter a name for the custom model.

", + "smithy.api#required": {} + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to perform tasks on your behalf.\n For example, during model training, Bedrock needs your permission to read input data from an S3 bucket, write model artifacts to an S3 bucket.\n To pass this role to Bedrock, the caller of this API must have the iam:PassRole permission.\n

", + "smithy.api#required": {} + } + }, + "clientRequestToken": { + "target": "com.amazonaws.bedrock#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

Unique token value that you can provide. The GetModelCustomizationJob response includes the same token value.

", + "smithy.api#idempotencyToken": {} + } + }, + "baseModelIdentifier": { + "target": "com.amazonaws.bedrock#BaseModelIdentifier", + "traits": { + "smithy.api#documentation": "

Name of the base model.

", + "smithy.api#required": {} + } + }, + "customModelKmsKeyId": { + "target": "com.amazonaws.bedrock#KmsKeyId", + "traits": { + "smithy.api#documentation": "

The custom model is encrypted at rest using this key.

", + "smithy.api#tags": [ + "customer-managed-key" + ] + } + }, + "jobTags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

Assign tags to the job.

" + } + }, + "customModelTags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

Assign tags to the custom model.

" + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#documentation": "

Information about the training dataset.

", + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig", + "traits": { + "smithy.api#documentation": "

Information about the validation dataset.

" + } + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "

S3 location for the output data.

", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "

Parameters related to tuning the model.

", + "smithy.api#required": {} + } + }, + "vpcConfig": { + "target": "com.amazonaws.bedrock#VpcConfig", + "traits": { + "smithy.api#documentation": "

VPC configuration (optional). Configuration parameters for the\n private Virtual Private Cloud (VPC) that contains the resources you are using for this job.

", + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#CreateModelCustomizationJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "

ARN of the fine tuning job

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#CustomModelArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12}$" + } + }, + "com.amazonaws.bedrock#CustomModelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^([0-9a-zA-Z][_-]?)+$" + } + }, + "com.amazonaws.bedrock#CustomModelSummary": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "

The ARN of the custom model.

", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

The name of the custom model.

", + "smithy.api#required": {} + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Creation time of the model.

", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "

The base model ARN.

", + "smithy.api#required": {} + } + }, + "baseModelName": { + "target": "com.amazonaws.bedrock#ModelName", + "traits": { + "smithy.api#documentation": "

The base model name.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information for a custom model.

" + } + }, + "com.amazonaws.bedrock#CustomModelSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#CustomModelSummary" + } + }, + "com.amazonaws.bedrock#DeleteCustomModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteCustomModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteCustomModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes a custom model that you created earlier. For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/custom-models/{modelIdentifier}" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#DeleteCustomModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "

Name of the model to delete.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteCustomModelResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Delete the invocation logging.

", + "smithy.api#http": { + "code": 200, + "method": "DELETE", + "uri": "/logging/modelinvocations" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ErrorMessage": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + } + } + }, + "com.amazonaws.bedrock#FineTuningJobStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopping" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopped" + } + } + } + }, + "com.amazonaws.bedrock#FoundationModelArn": { + "type": "string", + "traits": { + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}$" + } + }, + "com.amazonaws.bedrock#FoundationModelDetails": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "

The model ARN.

", + "smithy.api#required": {} + } + }, + "modelId": { + "target": "com.amazonaws.bedrock#BedrockModelId", + "traits": { + "smithy.api#documentation": "

The model identifier.

", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "

The model name.

" + } + }, + "providerName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "

he model's provider name.

" + } + }, + "inputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "

The input modalities that the model supports.

" + } + }, + "outputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "

The output modalities that the model supports.

" + } + }, + "responseStreamingSupported": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the model supports streaming.

" + } + }, + "customizationsSupported": { + "target": "com.amazonaws.bedrock#ModelCustomizationList", + "traits": { + "smithy.api#documentation": "

The customization that the model supports.

" + } + }, + "inferenceTypesSupported": { + "target": "com.amazonaws.bedrock#InferenceTypeList", + "traits": { + "smithy.api#documentation": "

The inference types that the model supports.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a foundation model.

" + } + }, + "com.amazonaws.bedrock#FoundationModelSummary": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "

The ARN of the foundation model.

", + "smithy.api#required": {} + } + }, + "modelId": { + "target": "com.amazonaws.bedrock#BedrockModelId", + "traits": { + "smithy.api#documentation": "

The model Id of the foundation model.

", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "

The name of the model.

" + } + }, + "providerName": { + "target": "com.amazonaws.bedrock#BrandedName", + "traits": { + "smithy.api#documentation": "

The model's provider name.

" + } + }, + "inputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "

The input modalities that the model supports.

" + } + }, + "outputModalities": { + "target": "com.amazonaws.bedrock#ModelModalityList", + "traits": { + "smithy.api#documentation": "

The output modalities that the model supports.

" + } + }, + "responseStreamingSupported": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Indicates whether the model supports streaming.

" + } + }, + "customizationsSupported": { + "target": "com.amazonaws.bedrock#ModelCustomizationList", + "traits": { + "smithy.api#documentation": "

Whether the model supports fine-tuning or continual pre-training.

" + } + }, + "inferenceTypesSupported": { + "target": "com.amazonaws.bedrock#InferenceTypeList", + "traits": { + "smithy.api#documentation": "

The inference types that the model supports.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Summary information for a foundation model.

" + } + }, + "com.amazonaws.bedrock#FoundationModelSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#FoundationModelSummary" + } + }, + "com.amazonaws.bedrock#GetCustomModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetCustomModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetCustomModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Get the properties associated with a Bedrock custom model that you have created.For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/custom-models/{modelIdentifier}" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#GetCustomModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "

Name or ARN of the custom model.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetCustomModelResponse": { + "type": "structure", + "members": { + "modelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "

ARN associated with this model.

", + "smithy.api#required": {} + } + }, + "modelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

Model name associated with this model.

", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "

Job name associated with this model.

" + } + }, + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "

Job ARN associated with this model.

", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "

ARN of the base model.

", + "smithy.api#required": {} + } + }, + "modelKmsKeyArn": { + "target": "com.amazonaws.bedrock#KmsKeyArn", + "traits": { + "smithy.api#documentation": "

The custom model is encrypted at rest using this key.

", + "smithy.api#tags": [ + "customer-managed-key" + ] + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "

Hyperparameter values associated with this model.

" + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#documentation": "

Information about the training dataset.

", + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig" + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "

Output data configuration associated with this custom model.

", + "smithy.api#required": {} + } + }, + "trainingMetrics": { + "target": "com.amazonaws.bedrock#TrainingMetrics", + "traits": { + "smithy.api#documentation": "

The training metrics from the job creation.

" + } + }, + "validationMetrics": { + "target": "com.amazonaws.bedrock#ValidationMetrics", + "traits": { + "smithy.api#documentation": "

The validation metrics from the job creation.

" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Creation time of the model.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModel": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetFoundationModelRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetFoundationModelResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Get details about a Bedrock foundation model.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/foundation-models/{modelIdentifier}" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModelRequest": { + "type": "structure", + "members": { + "modelIdentifier": { + "target": "com.amazonaws.bedrock#ModelIdentifier", + "traits": { + "smithy.api#documentation": "

The model identifier.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetFoundationModelResponse": { + "type": "structure", + "members": { + "modelDetails": { + "target": "com.amazonaws.bedrock#FoundationModelDetails", + "traits": { + "smithy.api#documentation": "

Information about the foundation model.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetModelCustomizationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Retrieves the properties associated with a model-customization job, including the status of the job.\n For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/model-customization-jobs/{jobIdentifier}" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobIdentifier": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobIdentifier", + "traits": { + "smithy.api#documentation": "

Identifier for the customization job.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetModelCustomizationJobResponse": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "

The ARN of the customization job.

", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "

The name of the customization job.

", + "smithy.api#required": {} + } + }, + "outputModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

The name of the output model.

", + "smithy.api#required": {} + } + }, + "outputModelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "

The ARN of the output model.

" + } + }, + "clientRequestToken": { + "target": "com.amazonaws.bedrock#IdempotencyToken", + "traits": { + "smithy.api#documentation": "

The token that you specified in the CreateCustomizationJob request.

" + } + }, + "roleArn": { + "target": "com.amazonaws.bedrock#RoleArn", + "traits": { + "smithy.api#documentation": "

The ARN of the IAM role.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobStatus", + "traits": { + "smithy.api#documentation": "

The status of the job. A successful job transitions from in-progress to completed when the output model is ready to use.\n If the job failed, the failure message contains information about why the job failed.

" + } + }, + "failureMessage": { + "target": "com.amazonaws.bedrock#ErrorMessage", + "traits": { + "smithy.api#documentation": "

Information about why the job failed.

" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Time that the resource was created.

", + "smithy.api#required": {} + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Time that the resource was last modified.

" + } + }, + "endTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Time that the resource transitioned to terminal state.

" + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "

ARN of the base model.

", + "smithy.api#required": {} + } + }, + "hyperParameters": { + "target": "com.amazonaws.bedrock#ModelCustomizationHyperParameters", + "traits": { + "smithy.api#documentation": "

The hyperparameter values for the job.

", + "smithy.api#required": {} + } + }, + "trainingDataConfig": { + "target": "com.amazonaws.bedrock#TrainingDataConfig", + "traits": { + "smithy.api#required": {} + } + }, + "validationDataConfig": { + "target": "com.amazonaws.bedrock#ValidationDataConfig", + "traits": { + "smithy.api#required": {} + } + }, + "outputDataConfig": { + "target": "com.amazonaws.bedrock#OutputDataConfig", + "traits": { + "smithy.api#documentation": "

Output data configuration

", + "smithy.api#required": {} + } + }, + "outputModelKmsKeyArn": { + "target": "com.amazonaws.bedrock#KmsKeyArn", + "traits": { + "smithy.api#documentation": "

The custom model is encrypted at rest using this key.

", + "smithy.api#tags": [ + "customer-managed-key" + ] + } + }, + "trainingMetrics": { + "target": "com.amazonaws.bedrock#TrainingMetrics" + }, + "validationMetrics": { + "target": "com.amazonaws.bedrock#ValidationMetrics", + "traits": { + "smithy.api#documentation": "

The loss metric for each validator that you provided in the createjob request.

" + } + }, + "vpcConfig": { + "target": "com.amazonaws.bedrock#VpcConfig", + "traits": { + "smithy.api#documentation": "

VPC configuration for the custom model job.

", + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "

Get the current configuration values for model invocation logging.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/logging/modelinvocations" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#GetModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": { + "loggingConfig": { + "target": "com.amazonaws.bedrock#LoggingConfig", + "traits": { + "smithy.api#documentation": "

The current configuration values.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#IdempotencyToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*$" + } + }, + "com.amazonaws.bedrock#InferenceType": { + "type": "enum", + "members": { + "ON_DEMAND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ON_DEMAND" + } + }, + "PROVISIONED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PROVISIONED" + } + } + } + }, + "com.amazonaws.bedrock#InferenceTypeList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#InferenceType" + } + }, + "com.amazonaws.bedrock#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

An internal server error occurred. Retry your request.

", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.bedrock#JobName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9\\+\\-\\.])*$" + } + }, + "com.amazonaws.bedrock#KeyPrefix": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1024 + } + } + }, + "com.amazonaws.bedrock#KmsKeyArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$" + } + }, + "com.amazonaws.bedrock#KmsKeyId": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:((key/[a-zA-Z0-9-]{36})|(alias/[a-zA-Z0-9-_/]+))$" + } + }, + "com.amazonaws.bedrock#ListCustomModels": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListCustomModelsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListCustomModelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of the custom models that you have created with the CreateModelCustomizationJob operation.

\n

For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/custom-models" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "modelSummaries" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#ListCustomModelsRequest": { + "type": "structure", + "members": { + "creationTimeBefore": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Return custom models created before the specified time.

", + "smithy.api#httpQuery": "creationTimeBefore" + } + }, + "creationTimeAfter": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Return custom models created after the specified time.

", + "smithy.api#httpQuery": "creationTimeAfter" + } + }, + "nameContains": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

Return custom models only if the job name contains these characters.

", + "smithy.api#httpQuery": "nameContains" + } + }, + "baseModelArnEquals": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "

Return custom models only if the base model ARN matches this parameter.

", + "smithy.api#httpQuery": "baseModelArnEquals" + } + }, + "foundationModelArnEquals": { + "target": "com.amazonaws.bedrock#FoundationModelArn", + "traits": { + "smithy.api#documentation": "

Return custom models only if the foundation model ARN matches this parameter.

", + "smithy.api#httpQuery": "foundationModelArnEquals" + } + }, + "maxResults": { + "target": "com.amazonaws.bedrock#MaxResults", + "traits": { + "smithy.api#documentation": "

Maximum number of results to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "

Continuation token from the previous response, for Bedrock to list the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "sortBy": { + "target": "com.amazonaws.bedrock#SortModelsBy", + "traits": { + "smithy.api#documentation": "

The field to sort by in the returned list of models.

", + "smithy.api#httpQuery": "sortBy" + } + }, + "sortOrder": { + "target": "com.amazonaws.bedrock#SortOrder", + "traits": { + "smithy.api#documentation": "

The sort order of the results.

", + "smithy.api#httpQuery": "sortOrder" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListCustomModelsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "

Continuation token for the next request to list the next set of results.

" + } + }, + "modelSummaries": { + "target": "com.amazonaws.bedrock#CustomModelSummaryList", + "traits": { + "smithy.api#documentation": "

Model summaries.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModels": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListFoundationModelsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListFoundationModelsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List of Bedrock foundation models that you can use. For more information, see Foundation models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/foundation-models" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModelsRequest": { + "type": "structure", + "members": { + "byProvider": { + "target": "com.amazonaws.bedrock#Provider", + "traits": { + "smithy.api#documentation": "

A Bedrock model provider.

", + "smithy.api#httpQuery": "byProvider" + } + }, + "byCustomizationType": { + "target": "com.amazonaws.bedrock#ModelCustomization", + "traits": { + "smithy.api#documentation": "

List by customization type.

", + "smithy.api#httpQuery": "byCustomizationType" + } + }, + "byOutputModality": { + "target": "com.amazonaws.bedrock#ModelModality", + "traits": { + "smithy.api#documentation": "

List by output modality type.

", + "smithy.api#httpQuery": "byOutputModality" + } + }, + "byInferenceType": { + "target": "com.amazonaws.bedrock#InferenceType", + "traits": { + "smithy.api#documentation": "

List by inference type.

", + "smithy.api#httpQuery": "byInferenceType" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListFoundationModelsResponse": { + "type": "structure", + "members": { + "modelSummaries": { + "target": "com.amazonaws.bedrock#FoundationModelSummaryList", + "traits": { + "smithy.api#documentation": "

A list of bedrock foundation models.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobs": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobsRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on\n one or more criteria.

\n

For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "GET", + "uri": "/model-customization-jobs" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "modelCustomizationJobSummaries" + }, + "smithy.api#readonly": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobsRequest": { + "type": "structure", + "members": { + "creationTimeAfter": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Return customization jobs created after the specified time.

", + "smithy.api#httpQuery": "creationTimeAfter" + } + }, + "creationTimeBefore": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Return customization jobs created before the specified time.

", + "smithy.api#httpQuery": "creationTimeBefore" + } + }, + "statusEquals": { + "target": "com.amazonaws.bedrock#FineTuningJobStatus", + "traits": { + "smithy.api#documentation": "

Return customization jobs with the specified status.

", + "smithy.api#httpQuery": "statusEquals" + } + }, + "nameContains": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "

Return customization jobs only if the job name contains these characters.

", + "smithy.api#httpQuery": "nameContains" + } + }, + "maxResults": { + "target": "com.amazonaws.bedrock#MaxResults", + "traits": { + "smithy.api#documentation": "

Maximum number of results to return in the response.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "

Continuation token from the previous response, for Bedrock to list the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "sortBy": { + "target": "com.amazonaws.bedrock#SortJobsBy", + "traits": { + "smithy.api#documentation": "

The field to sort by in the returned list of jobs.

", + "smithy.api#httpQuery": "sortBy" + } + }, + "sortOrder": { + "target": "com.amazonaws.bedrock#SortOrder", + "traits": { + "smithy.api#documentation": "

The sort order of the results.

", + "smithy.api#httpQuery": "sortOrder" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListModelCustomizationJobsResponse": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.bedrock#PaginationToken", + "traits": { + "smithy.api#documentation": "

Page continuation token to use in the next request.

" + } + }, + "modelCustomizationJobSummaries": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobSummaries", + "traits": { + "smithy.api#documentation": "

Job summaries.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

List the tags associated with the specified resource.

\n

For more information, see Tagging resources in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/listTagsForResource" + }, + "smithy.api#tags": [ + "tagging" + ] + } + }, + "com.amazonaws.bedrock#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

An array of the tags associated with this resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#LogGroupName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 512 + } + } + }, + "com.amazonaws.bedrock#LoggingConfig": { + "type": "structure", + "members": { + "cloudWatchConfig": { + "target": "com.amazonaws.bedrock#CloudWatchConfig", + "traits": { + "smithy.api#documentation": "

CloudWatch logging configuration.

" + } + }, + "s3Config": { + "target": "com.amazonaws.bedrock#S3Config", + "traits": { + "smithy.api#documentation": "

S3 configuration for storing log data.

" + } + }, + "textDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Set to include text data in the log delivery.

" + } + }, + "imageDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Set to include image data in the log delivery.

" + } + }, + "embeddingDataDeliveryEnabled": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "

Set to include embeddings data in the log delivery.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Configuration fields for invokation logging.

" + } + }, + "com.amazonaws.bedrock#LoggingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#DeleteModelInvocationLoggingConfiguration" + }, + { + "target": "com.amazonaws.bedrock#GetModelInvocationLoggingConfiguration" + }, + { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfiguration" + } + ] + }, + "com.amazonaws.bedrock#MaxResults": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 1, + "max": 1000 + } + } + }, + "com.amazonaws.bedrock#MetricFloat": { + "type": "float" + }, + "com.amazonaws.bedrock#ModelArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}))$" + } + }, + "com.amazonaws.bedrock#ModelCustomization": { + "type": "enum", + "members": { + "FINE_TUNING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "FINE_TUNING" + } + } + } + }, + "com.amazonaws.bedrock#ModelCustomizationHyperParameters": { + "type": "map", + "key": { + "target": "smithy.api#String" + }, + "value": { + "target": "smithy.api#String" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1011 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-customization-job/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12}$" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 1011 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:model-customization-job/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12})|([a-zA-Z0-9](-*[a-zA-Z0-9\\+\\-\\.])*)$" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobStatus": { + "type": "enum", + "members": { + "IN_PROGRESS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "InProgress" + } + }, + "COMPLETED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Completed" + } + }, + "FAILED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Failed" + } + }, + "STOPPING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopping" + } + }, + "STOPPED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Stopped" + } + } + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobSummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobSummary" + } + }, + "com.amazonaws.bedrock#ModelCustomizationJobSummary": { + "type": "structure", + "members": { + "jobArn": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobArn", + "traits": { + "smithy.api#documentation": "

ARN of the customization job.

", + "smithy.api#required": {} + } + }, + "baseModelArn": { + "target": "com.amazonaws.bedrock#ModelArn", + "traits": { + "smithy.api#documentation": "

ARN of the base model.

", + "smithy.api#required": {} + } + }, + "jobName": { + "target": "com.amazonaws.bedrock#JobName", + "traits": { + "smithy.api#documentation": "

Name of the customization job.

", + "smithy.api#required": {} + } + }, + "status": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobStatus", + "traits": { + "smithy.api#documentation": "

Status of the customization job.

", + "smithy.api#required": {} + } + }, + "lastModifiedTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Time that the customization job was last modified.

" + } + }, + "creationTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Creation time of the custom model.

", + "smithy.api#required": {} + } + }, + "endTime": { + "target": "com.amazonaws.bedrock#Timestamp", + "traits": { + "smithy.api#documentation": "

Time that the customization job ended.

" + } + }, + "customModelArn": { + "target": "com.amazonaws.bedrock#CustomModelArn", + "traits": { + "smithy.api#documentation": "

ARN of the custom model.

" + } + }, + "customModelName": { + "target": "com.amazonaws.bedrock#CustomModelName", + "traits": { + "smithy.api#documentation": "

Name of the custom model.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about one customization job

" + } + }, + "com.amazonaws.bedrock#ModelCustomizationList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelCustomization" + } + }, + "com.amazonaws.bedrock#ModelIdentifier": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^(arn:aws(-[^:]+)?:amazon-bedrock:[a-zA-Z0-9-]*:(([0-9]{12})|(aws))?:(custom|built-in)-model/.+)|(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))))|(([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))|(([0-9a-zA-Z][_-]?)+)$" + } + }, + "com.amazonaws.bedrock#ModelModality": { + "type": "enum", + "members": { + "TEXT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "TEXT" + } + }, + "IMAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "IMAGE" + } + }, + "EMBEDDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EMBEDDING" + } + } + } + }, + "com.amazonaws.bedrock#ModelModalityList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ModelModality" + } + }, + "com.amazonaws.bedrock#ModelName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 63 + }, + "smithy.api#pattern": "^([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63})$" + } + }, + "com.amazonaws.bedrock#ModelResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#DeleteCustomModel" + }, + { + "target": "com.amazonaws.bedrock#GetCustomModel" + }, + { + "target": "com.amazonaws.bedrock#GetFoundationModel" + }, + { + "target": "com.amazonaws.bedrock#ListCustomModels" + }, + { + "target": "com.amazonaws.bedrock#ListFoundationModels" + } + ] + }, + "com.amazonaws.bedrock#NonBlankString": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[\\s\\S]*$" + } + }, + "com.amazonaws.bedrock#OutputDataConfig": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "

The S3 URI where the output data is stored.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

S3 Location of the output data.

" + } + }, + "com.amazonaws.bedrock#PaginationToken": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 2048 + }, + "smithy.api#pattern": "^\\S*$" + } + }, + "com.amazonaws.bedrock#Provider": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-z0-9-]{1,63}$" + } + }, + "com.amazonaws.bedrock#ProvisionedModelThroughputResource": { + "type": "resource" + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfiguration": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Set the configuration values for model invocation logging.

", + "smithy.api#http": { + "code": 200, + "method": "PUT", + "uri": "/logging/modelinvocations" + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationRequest": { + "type": "structure", + "members": { + "loggingConfig": { + "target": "com.amazonaws.bedrock#LoggingConfig", + "traits": { + "smithy.api#documentation": "

The logging configuration values to set.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#PutModelInvocationLoggingConfigurationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ResourceNotFoundException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The specified resource ARN was not found. Check the ARN and try your request again.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, + "com.amazonaws.bedrock#RoleArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 2048 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+$" + } + }, + "com.amazonaws.bedrock#S3Config": { + "type": "structure", + "members": { + "bucketName": { + "target": "com.amazonaws.bedrock#BucketName", + "traits": { + "smithy.api#documentation": "

S3 bucket name.

", + "smithy.api#required": {} + } + }, + "keyPrefix": { + "target": "com.amazonaws.bedrock#KeyPrefix", + "traits": { + "smithy.api#documentation": "

S3 prefix.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

S3 configuration for storing log data.

" + } + }, + "com.amazonaws.bedrock#S3Uri": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1024 + }, + "smithy.api#pattern": "^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$" + } + }, + "com.amazonaws.bedrock#SecurityGroupId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$", + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + }, + "com.amazonaws.bedrock#SecurityGroupIds": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#SecurityGroupId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + }, + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + }, + "com.amazonaws.bedrock#ServiceQuotaExceededException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The number of requests exceeds the service quota. Resubmit your request later.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#SortJobsBy": { + "type": "enum", + "members": { + "CREATION_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationTime" + } + } + } + }, + "com.amazonaws.bedrock#SortModelsBy": { + "type": "enum", + "members": { + "CREATION_TIME": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CreationTime" + } + } + } + }, + "com.amazonaws.bedrock#SortOrder": { + "type": "enum", + "members": { + "ASCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Ascending" + } + }, + "DESCENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "Descending" + } + } + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJob": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#StopModelCustomizationJobRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#StopModelCustomizationJobResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#ConflictException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Stops an active model customization job. For more information, see Custom models in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/model-customization-jobs/{jobIdentifier}/stop" + }, + "smithy.api#idempotent": {}, + "smithy.api#tags": [ + "model-customization" + ] + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJobRequest": { + "type": "structure", + "members": { + "jobIdentifier": { + "target": "com.amazonaws.bedrock#ModelCustomizationJobIdentifier", + "traits": { + "smithy.api#documentation": "

Job identifier of the job to stop.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#StopModelCustomizationJobResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#SubnetId": { + "type": "string", + "traits": { + "smithy.api#length": { + "max": 32 + }, + "smithy.api#pattern": "^[-0-9a-zA-Z]+$", + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + }, + "com.amazonaws.bedrock#SubnetIds": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#SubnetId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 16 + }, + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + }, + "com.amazonaws.bedrock#SubscriptionResource": { + "type": "resource" + }, + "com.amazonaws.bedrock#Tag": { + "type": "structure", + "members": { + "key": { + "target": "com.amazonaws.bedrock#TagKey", + "traits": { + "smithy.api#documentation": "

Key for the tag.

", + "smithy.api#required": {} + } + }, + "value": { + "target": "com.amazonaws.bedrock#TagValue", + "traits": { + "smithy.api#documentation": "

Value for the tag.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Definition of the key/value pair for a tag.

" + } + }, + "com.amazonaws.bedrock#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrock#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bedrock#TagList": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#Tag" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.bedrock#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#TooManyTagsException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Associate tags with a resource. For more information, see Tagging resources in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/tagResource" + }, + "smithy.api#tags": [ + "tagging" + ] + } + }, + "com.amazonaws.bedrock#TagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource to tag.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.bedrock#TagList", + "traits": { + "smithy.api#documentation": "

Tags to associate with the resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + }, + "smithy.api#pattern": "^[a-zA-Z0-9\\s._:/=+@-]*$" + } + }, + "com.amazonaws.bedrock#TaggableResourcesArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 20, + "max": 1011 + }, + "smithy.api#pattern": "(^arn:aws(-[^:]+)?:amazon-bedrock:[a-zA-Z0-9-]*:[0-9]{12}:(fine-tuning-job|custom-model)/.+$)|([a-zA-Z0-9][a-zA-Z0-9\\-]*$)|(^arn:aws(|-cn|-us-gov):bedrock:[a-z0-9-]{1,20}:([0-9]{12}|):(fine-tuning-job|model-customization-job|custom-model)/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}(/[a-z0-9]{12})$)|(^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:provisioned-model/[a-z0-9]{12}$)" + } + }, + "com.amazonaws.bedrock#TaggingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#ListTagsForResource" + }, + { + "target": "com.amazonaws.bedrock#TagResource" + }, + { + "target": "com.amazonaws.bedrock#UntagResource" + } + ] + }, + "com.amazonaws.bedrock#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

The number of requests exceeds the limit. Resubmit your request later.

", + "smithy.api#error": "client", + "smithy.api#httpError": 429 + } + }, + "com.amazonaws.bedrock#Timestamp": { + "type": "timestamp", + "traits": { + "smithy.api#timestampFormat": "date-time" + } + }, + "com.amazonaws.bedrock#TooManyTagsException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + }, + "resourceName": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "

The name of the resource with too many tags.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The request contains more tags than can be associated with a resource (50 tags per resource). \n The maximum number of tags includes both existing tags and those included in your current request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#TrainingDataConfig": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "

The S3 URI where the training data is stored.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

S3 Location of the training data.

" + } + }, + "com.amazonaws.bedrock#TrainingMetrics": { + "type": "structure", + "members": { + "trainingLoss": { + "target": "com.amazonaws.bedrock#MetricFloat", + "traits": { + "smithy.api#documentation": "

Loss metric associated with the custom job.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Metrics associated with the custom job.

" + } + }, + "com.amazonaws.bedrock#TrainingResource": { + "type": "resource", + "operations": [ + { + "target": "com.amazonaws.bedrock#CreateModelCustomizationJob" + }, + { + "target": "com.amazonaws.bedrock#GetModelCustomizationJob" + }, + { + "target": "com.amazonaws.bedrock#ListModelCustomizationJobs" + }, + { + "target": "com.amazonaws.bedrock#StopModelCustomizationJob" + } + ] + }, + "com.amazonaws.bedrock#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.bedrock#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.bedrock#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.bedrock#AccessDeniedException" + }, + { + "target": "com.amazonaws.bedrock#InternalServerException" + }, + { + "target": "com.amazonaws.bedrock#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.bedrock#ThrottlingException" + }, + { + "target": "com.amazonaws.bedrock#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Remove one or more tags from a resource. For more information, see Tagging resources in the Bedrock User Guide.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/untagResource" + }, + "smithy.api#tags": [ + "tagging" + ] + } + }, + "com.amazonaws.bedrock#UntagResourceRequest": { + "type": "structure", + "members": { + "resourceARN": { + "target": "com.amazonaws.bedrock#TaggableResourcesArn", + "traits": { + "smithy.api#documentation": "

The ARN of the resource to untag.

", + "smithy.api#required": {} + } + }, + "tagKeys": { + "target": "com.amazonaws.bedrock#TagKeyList", + "traits": { + "smithy.api#documentation": "

Tag keys of the tags to remove from the resource.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.bedrock#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.bedrock#ValidationDataConfig": { + "type": "structure", + "members": { + "validators": { + "target": "com.amazonaws.bedrock#Validators", + "traits": { + "smithy.api#documentation": "

Information about the validators.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Array of up to 10 validators.

" + } + }, + "com.amazonaws.bedrock#ValidationException": { + "type": "structure", + "members": { + "message": { + "target": "com.amazonaws.bedrock#NonBlankString" + } + }, + "traits": { + "smithy.api#documentation": "

Input validation failed. Check your request parameters and retry the request.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.bedrock#ValidationMetrics": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#ValidatorMetric" + } + }, + "com.amazonaws.bedrock#Validator": { + "type": "structure", + "members": { + "s3Uri": { + "target": "com.amazonaws.bedrock#S3Uri", + "traits": { + "smithy.api#documentation": "

The S3 URI where the validation data is stored.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a validator.

" + } + }, + "com.amazonaws.bedrock#ValidatorMetric": { + "type": "structure", + "members": { + "validationLoss": { + "target": "com.amazonaws.bedrock#MetricFloat", + "traits": { + "smithy.api#documentation": "

The validation loss associated with this validator.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The metric for the validator.

" + } + }, + "com.amazonaws.bedrock#Validators": { + "type": "list", + "member": { + "target": "com.amazonaws.bedrock#Validator" + }, + "traits": { + "smithy.api#length": { + "max": 10 + } + } + }, + "com.amazonaws.bedrock#VpcConfig": { + "type": "structure", + "members": { + "subnetIds": { + "target": "com.amazonaws.bedrock#SubnetIds", + "traits": { + "smithy.api#documentation": "

VPC configuration subnets.

", + "smithy.api#required": {} + } + }, + "securityGroupIds": { + "target": "com.amazonaws.bedrock#SecurityGroupIds", + "traits": { + "smithy.api#documentation": "

VPC configuration security group Ids.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

VPC configuration.

", + "smithy.api#tags": [ + "model-customization-vpc" + ] + } + } + } +} \ No newline at end of file diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt index a65a2927406..704664f02af 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/AWSHttpBindingProtocolGenerator.kt @@ -98,9 +98,9 @@ abstract class AWSHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String? ) { - val encodeGenerator = StructEncodeGenerator(ctx, members, writer, defaultTimestampFormat) + val encodeGenerator = StructEncodeGenerator(ctx, members, writer, defaultTimestampFormat, path) encodeGenerator.render() } diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/MessageUnmarshallableGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/MessageUnmarshallableGenerator.kt index 5ef6e89b2a3..9f40c0d0ae7 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/MessageUnmarshallableGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/MessageUnmarshallableGenerator.kt @@ -75,7 +75,9 @@ class MessageUnmarshallableGenerator(val ctx: ProtocolGenerator.GenerationContex streamShape.eventStreamErrors(ctx.model).forEach { member -> writer.write("case \"${member.memberName}\":") writer.indent { - writer.write("return try decoder.decode(responseBody: message.payload) as ${member.memberName}") + val targetShape = ctx.model.expectShape(member.target) + val symbol = ctx.symbolProvider.toSymbol(targetShape) + writer.write("return try decoder.decode(responseBody: message.payload) as \$N", symbol) } } writer.write("default:") diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt index 8649ed45ba3..60fc0e06b3b 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/awsquery/AwsQueryProtocolGenerator.kt @@ -65,7 +65,7 @@ open class AwsQueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String? ) { val customizations = AwsQueryFormURLEncodeCustomizations() val encoder = StructEncodeFormURLGenerator(ctx, customizations, shapeContainingMembers, shapeMetadata, members, writer, defaultTimestampFormat) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt index 2fddfdf6032..92eee9046b2 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/ec2query/Ec2QueryProtocolGenerator.kt @@ -61,7 +61,7 @@ class Ec2QueryProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String? ) { val customizations = Ec2QueryFormURLEncodeCustomizations() val encoder = StructEncodeFormURLGenerator(ctx, customizations, shapeContainingMembers, shapeMetadata, members, writer, defaultTimestampFormat) diff --git a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt index 8349d98de4a..29e8a09822d 100644 --- a/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt +++ b/codegen/smithy-aws-swift-codegen/src/main/kotlin/software/amazon/smithy/aws/swift/codegen/restxml/RestXmlProtocolGenerator.kt @@ -56,7 +56,7 @@ class RestXmlProtocolGenerator : AWSHttpBindingProtocolGenerator() { members: List, writer: SwiftWriter, defaultTimestampFormat: TimestampFormatTrait.Format, - path: String + path: String? ) { val encoder = StructEncodeXMLGenerator(ctx, shapeContainingMembers, members, writer, defaultTimestampFormat) encoder.render()