From 737322b8f8b54fc78d076334d1e433e2e5f2993d Mon Sep 17 00:00:00 2001 From: aws-sdk-go-automation <43143561+aws-sdk-go-automation@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:29:03 -0700 Subject: [PATCH] Release v1.45.19 (2023-09-28) (#5006) Release v1.45.19 (2023-09-28) === ### Service Client Updates * `service/bedrock`: Updates service API, documentation, paginators, and examples * `service/bedrock-runtime`: Adds new service * `service/budgets`: Updates service API and documentation * Update DescribeBudgets and DescribeBudgetNotificationsForAccount MaxResults limit to 1000. * `service/ec2`: Updates service API and documentation * Adds support for Customer Managed Key encryption for Amazon Verified Access resources * `service/iotfleetwise`: Updates service API and documentation * `service/sagemaker`: Updates service API and documentation * Online store feature groups supports Standard and InMemory tier storage types for low latency storage for real-time data retrieval. The InMemory tier supports collection types List, Set, and Vector. * `service/sagemaker-featurestore-runtime`: Updates service API and documentation * `service/wafv2`: Updates service documentation --- CHANGELOG.md | 16 + aws/endpoints/defaults.go | 44 + aws/version.go | 2 +- .../bedrock-runtime/2023-09-30/api-2.json | 305 + .../bedrock-runtime/2023-09-30/docs-2.json | 152 + .../2023-09-30/endpoint-rule-set-1.json | 350 ++ .../2023-09-30/endpoint-tests-1.json | 314 + .../2023-09-30/examples-1.json | 5 + .../2023-09-30/paginators-1.json | 4 + models/apis/bedrock/2023-04-20/api-2.json | 1219 ++++ models/apis/bedrock/2023-04-20/docs-2.json | 725 +++ .../2023-04-20/endpoint-rule-set-1.json | 350 ++ .../bedrock/2023-04-20/endpoint-tests-1.json | 314 + .../apis/bedrock/2023-04-20/examples-1.json | 5 + .../apis/bedrock/2023-04-20/paginators-1.json | 16 + models/apis/budgets/2016-10-20/api-2.json | 12 +- models/apis/budgets/2016-10-20/docs-2.json | 19 +- models/apis/ec2/2016-11-15/api-2.json | 69 +- models/apis/ec2/2016-11-15/docs-2.json | 34 +- .../apis/iotfleetwise/2021-06-17/api-2.json | 88 + .../apis/iotfleetwise/2021-06-17/docs-2.json | 45 +- .../2021-06-17/endpoint-rule-set-1.json | 344 +- .../2020-07-01/api-2.json | 14 +- .../2020-07-01/docs-2.json | 11 +- .../2020-07-01/endpoint-rule-set-1.json | 344 +- models/apis/sagemaker/2017-07-24/api-2.json | 41 +- models/apis/sagemaker/2017-07-24/docs-2.json | 94 +- models/apis/wafv2/2019-07-29/docs-2.json | 6 +- models/endpoints/endpoints.json | 20 + service/bedrock/api.go | 5056 +++++++++++++++++ service/bedrock/bedrockiface/interface.go | 130 + service/bedrock/doc.go | 28 + service/bedrock/errors.go | 72 + service/bedrock/service.go | 106 + service/bedrockruntime/api.go | 1667 ++++++ .../bedrockruntimeiface/interface.go | 72 + service/bedrockruntime/doc.go | 28 + service/bedrockruntime/errors.go | 85 + service/bedrockruntime/eventstream_test.go | 346 ++ service/bedrockruntime/service.go | 109 + service/budgets/api.go | 26 +- service/ec2/api.go | 207 +- service/iotfleetwise/api.go | 453 +- .../iotfleetwiseiface/interface.go | 8 + service/sagemaker/api.go | 297 +- service/sagemakerfeaturestoreruntime/api.go | 25 +- service/wafv2/api.go | 42 +- 47 files changed, 13169 insertions(+), 550 deletions(-) create mode 100644 models/apis/bedrock-runtime/2023-09-30/api-2.json create mode 100644 models/apis/bedrock-runtime/2023-09-30/docs-2.json create mode 100644 models/apis/bedrock-runtime/2023-09-30/endpoint-rule-set-1.json create mode 100644 models/apis/bedrock-runtime/2023-09-30/endpoint-tests-1.json create mode 100644 models/apis/bedrock-runtime/2023-09-30/examples-1.json create mode 100644 models/apis/bedrock-runtime/2023-09-30/paginators-1.json create mode 100644 models/apis/bedrock/2023-04-20/api-2.json create mode 100644 models/apis/bedrock/2023-04-20/docs-2.json create mode 100644 models/apis/bedrock/2023-04-20/endpoint-rule-set-1.json create mode 100644 models/apis/bedrock/2023-04-20/endpoint-tests-1.json create mode 100644 models/apis/bedrock/2023-04-20/examples-1.json create mode 100644 models/apis/bedrock/2023-04-20/paginators-1.json create mode 100644 service/bedrock/api.go create mode 100644 service/bedrock/bedrockiface/interface.go create mode 100644 service/bedrock/doc.go create mode 100644 service/bedrock/errors.go create mode 100644 service/bedrock/service.go create mode 100644 service/bedrockruntime/api.go create mode 100644 service/bedrockruntime/bedrockruntimeiface/interface.go create mode 100644 service/bedrockruntime/doc.go create mode 100644 service/bedrockruntime/errors.go create mode 100644 service/bedrockruntime/eventstream_test.go create mode 100644 service/bedrockruntime/service.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 3af72892acc..88a28ee14db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +Release v1.45.19 (2023-09-28) +=== + +### Service Client Updates +* `service/bedrock`: Updates service API, documentation, paginators, and examples +* `service/bedrock-runtime`: Adds new service +* `service/budgets`: Updates service API and documentation + * Update DescribeBudgets and DescribeBudgetNotificationsForAccount MaxResults limit to 1000. +* `service/ec2`: Updates service API and documentation + * Adds support for Customer Managed Key encryption for Amazon Verified Access resources +* `service/iotfleetwise`: Updates service API and documentation +* `service/sagemaker`: Updates service API and documentation + * Online store feature groups supports Standard and InMemory tier storage types for low latency storage for real-time data retrieval. The InMemory tier supports collection types List, Set, and Vector. +* `service/sagemaker-featurestore-runtime`: Updates service API and documentation +* `service/wafv2`: Updates service documentation + Release v1.45.18 (2023-09-27) === diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index 25c9fdc191b..462b3f92f69 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -14376,6 +14376,9 @@ var awsPartition = partition{ }, "inspector2": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, endpointKey{ Region: "ap-east-1", }: endpoint{}, @@ -14385,6 +14388,9 @@ var awsPartition = partition{ endpointKey{ Region: "ap-northeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, endpointKey{ Region: "ap-south-1", }: endpoint{}, @@ -14394,12 +14400,18 @@ var awsPartition = partition{ endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ap-southeast-3", + }: endpoint{}, endpointKey{ Region: "ca-central-1", }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-central-2", + }: endpoint{}, endpointKey{ Region: "eu-north-1", }: endpoint{}, @@ -20190,6 +20202,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "me-central-1", }: endpoint{}, @@ -29290,15 +29305,30 @@ var awsPartition = partition{ }, "tnb": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, endpointKey{ Region: "ap-southeast-2", }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, endpointKey{ Region: "eu-central-1", }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-2", + }: endpoint{}, endpointKey{ Region: "eu-west-3", }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, endpointKey{ Region: "us-east-1", }: endpoint{}, @@ -32232,6 +32262,20 @@ var awscnPartition = partition{ }, }, }, + "api.pricing": service{ + Defaults: endpointDefaults{ + defaultKey{}: endpoint{ + CredentialScope: credentialScope{ + Service: "pricing", + }, + }, + }, + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "cn-northwest-1", + }: endpoint{}, + }, + }, "api.sagemaker": service{ Endpoints: serviceEndpoints{ endpointKey{ diff --git a/aws/version.go b/aws/version.go index d9fc9a65ffd..f46db796823 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.45.18" +const SDKVersion = "1.45.19" diff --git a/models/apis/bedrock-runtime/2023-09-30/api-2.json b/models/apis/bedrock-runtime/2023-09-30/api-2.json new file mode 100644 index 00000000000..e89926b2e50 --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/api-2.json @@ -0,0 +1,305 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2023-09-30", + "endpointPrefix":"bedrock-runtime", + "jsonVersion":"1.1", + "protocol":"rest-json", + "serviceFullName":"Amazon Bedrock Runtime", + "serviceId":"Bedrock Runtime", + "signatureVersion":"v4", + "signingName":"bedrock", + "uid":"bedrock-runtime-2023-09-30" + }, + "operations":{ + "InvokeModel":{ + "name":"InvokeModel", + "http":{ + "method":"POST", + "requestUri":"/model/{modelId}/invoke", + "responseCode":200 + }, + "input":{"shape":"InvokeModelRequest"}, + "output":{"shape":"InvokeModelResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"}, + {"shape":"ModelTimeoutException"}, + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ModelNotReadyException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ModelErrorException"} + ] + }, + "InvokeModelWithResponseStream":{ + "name":"InvokeModelWithResponseStream", + "http":{ + "method":"POST", + "requestUri":"/model/{modelId}/invoke-with-response-stream", + "responseCode":200 + }, + "input":{"shape":"InvokeModelWithResponseStreamRequest"}, + "output":{"shape":"InvokeModelWithResponseStreamResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"}, + {"shape":"ModelTimeoutException"}, + {"shape":"InternalServerException"}, + {"shape":"ModelStreamErrorException"}, + {"shape":"ValidationException"}, + {"shape":"ModelNotReadyException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ModelErrorException"} + ] + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":403, + "senderFault":true + }, + "exception":true + }, + "Body":{ + "type":"blob", + "max":25000000, + "min":0, + "sensitive":true + }, + "InternalServerException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{"httpStatusCode":500}, + "exception":true, + "fault":true + }, + "InvokeModelIdentifier":{ + "type":"string", + "max":2048, + "min":1, + "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][_-]?)+)$" + }, + "InvokeModelRequest":{ + "type":"structure", + "required":[ + "body", + "modelId" + ], + "members":{ + "accept":{ + "shape":"MimeType", + "location":"header", + "locationName":"Accept" + }, + "body":{"shape":"Body"}, + "contentType":{ + "shape":"MimeType", + "location":"header", + "locationName":"Content-Type" + }, + "modelId":{ + "shape":"InvokeModelIdentifier", + "location":"uri", + "locationName":"modelId" + } + }, + "payload":"body" + }, + "InvokeModelResponse":{ + "type":"structure", + "required":[ + "body", + "contentType" + ], + "members":{ + "body":{"shape":"Body"}, + "contentType":{ + "shape":"MimeType", + "location":"header", + "locationName":"Content-Type" + } + }, + "payload":"body" + }, + "InvokeModelWithResponseStreamRequest":{ + "type":"structure", + "required":[ + "body", + "modelId" + ], + "members":{ + "accept":{ + "shape":"MimeType", + "location":"header", + "locationName":"X-Amzn-Bedrock-Accept" + }, + "body":{"shape":"Body"}, + "contentType":{ + "shape":"MimeType", + "location":"header", + "locationName":"Content-Type" + }, + "modelId":{ + "shape":"InvokeModelIdentifier", + "location":"uri", + "locationName":"modelId" + } + }, + "payload":"body" + }, + "InvokeModelWithResponseStreamResponse":{ + "type":"structure", + "required":[ + "body", + "contentType" + ], + "members":{ + "body":{"shape":"ResponseStream"}, + "contentType":{ + "shape":"MimeType", + "location":"header", + "locationName":"X-Amzn-Bedrock-Content-Type" + } + }, + "payload":"body" + }, + "MimeType":{"type":"string"}, + "ModelErrorException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"}, + "originalStatusCode":{"shape":"StatusCode"}, + "resourceName":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":424, + "senderFault":true + }, + "exception":true + }, + "ModelNotReadyException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":429, + "senderFault":true + }, + "exception":true + }, + "ModelStreamErrorException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"}, + "originalMessage":{"shape":"NonBlankString"}, + "originalStatusCode":{"shape":"StatusCode"} + }, + "error":{ + "httpStatusCode":424, + "senderFault":true + }, + "exception":true + }, + "ModelTimeoutException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":408, + "senderFault":true + }, + "exception":true + }, + "NonBlankString":{ + "type":"string", + "pattern":"^[\\s\\S]*$" + }, + "PartBody":{ + "type":"blob", + "max":1000000, + "min":0, + "sensitive":true + }, + "PayloadPart":{ + "type":"structure", + "members":{ + "bytes":{"shape":"PartBody"} + }, + "event":true, + "sensitive":true + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":404, + "senderFault":true + }, + "exception":true + }, + "ResponseStream":{ + "type":"structure", + "members":{ + "chunk":{"shape":"PayloadPart"}, + "internalServerException":{"shape":"InternalServerException"}, + "modelStreamErrorException":{"shape":"ModelStreamErrorException"}, + "throttlingException":{"shape":"ThrottlingException"}, + "validationException":{"shape":"ValidationException"} + }, + "eventstream":true + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, + "StatusCode":{ + "type":"integer", + "box":true, + "max":599, + "min":100 + }, + "ThrottlingException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":429, + "senderFault":true + }, + "exception":true + }, + "ValidationException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + } + } +} diff --git a/models/apis/bedrock-runtime/2023-09-30/docs-2.json b/models/apis/bedrock-runtime/2023-09-30/docs-2.json new file mode 100644 index 00000000000..cdb1c1db6d8 --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/docs-2.json @@ -0,0 +1,152 @@ +{ + "version": "2.0", + "service": "

Describes the API operations for running inference using Bedrock models.

", + "operations": { + "InvokeModel": "

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

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

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

", + "InvokeModelWithResponseStream": "

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

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

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

" + }, + "shapes": { + "AccessDeniedException": { + "base": "

The request is denied because of missing access permissions.

", + "refs": { + } + }, + "Body": { + "base": null, + "refs": { + "InvokeModelRequest$body": "

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.

", + "InvokeModelResponse$body": "

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.

", + "InvokeModelWithResponseStreamRequest$body": "

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

" + } + }, + "InternalServerException": { + "base": "

An internal server error occurred. Retry your request.

", + "refs": { + "ResponseStream$internalServerException": null + } + }, + "InvokeModelIdentifier": { + "base": null, + "refs": { + "InvokeModelRequest$modelId": "

Identifier of the model.

", + "InvokeModelWithResponseStreamRequest$modelId": "

Id of the model to invoke using the streaming request.

" + } + }, + "InvokeModelRequest": { + "base": null, + "refs": { + } + }, + "InvokeModelResponse": { + "base": null, + "refs": { + } + }, + "InvokeModelWithResponseStreamRequest": { + "base": null, + "refs": { + } + }, + "InvokeModelWithResponseStreamResponse": { + "base": null, + "refs": { + } + }, + "MimeType": { + "base": null, + "refs": { + "InvokeModelRequest$accept": "

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

", + "InvokeModelRequest$contentType": "

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

", + "InvokeModelResponse$contentType": "

The MIME type of the inference result.

", + "InvokeModelWithResponseStreamRequest$accept": "

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

", + "InvokeModelWithResponseStreamRequest$contentType": "

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

", + "InvokeModelWithResponseStreamResponse$contentType": "

The MIME type of the inference result.

" + } + }, + "ModelErrorException": { + "base": "

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

", + "refs": { + } + }, + "ModelNotReadyException": { + "base": "

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

", + "refs": { + } + }, + "ModelStreamErrorException": { + "base": "

An error occurred while streaming the response.

", + "refs": { + "ResponseStream$modelStreamErrorException": null + } + }, + "ModelTimeoutException": { + "base": "

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

", + "refs": { + } + }, + "NonBlankString": { + "base": null, + "refs": { + "AccessDeniedException$message": null, + "InternalServerException$message": null, + "ModelErrorException$message": null, + "ModelErrorException$resourceName": "

The resource name.

", + "ModelNotReadyException$message": null, + "ModelStreamErrorException$message": null, + "ModelStreamErrorException$originalMessage": "

The original message.

", + "ModelTimeoutException$message": null, + "ResourceNotFoundException$message": null, + "ServiceQuotaExceededException$message": null, + "ThrottlingException$message": null, + "ValidationException$message": null + } + }, + "PartBody": { + "base": null, + "refs": { + "PayloadPart$bytes": "

Base64-encoded bytes of payload data.

" + } + }, + "PayloadPart": { + "base": "

Payload content included in the response.

", + "refs": { + "ResponseStream$chunk": "

Content included in the response.

" + } + }, + "ResourceNotFoundException": { + "base": "

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

", + "refs": { + } + }, + "ResponseStream": { + "base": "

Definition of content in the response stream.

", + "refs": { + "InvokeModelWithResponseStreamResponse$body": "

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.

" + } + }, + "ServiceQuotaExceededException": { + "base": "

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

", + "refs": { + } + }, + "StatusCode": { + "base": null, + "refs": { + "ModelErrorException$originalStatusCode": "

The original status code.

", + "ModelStreamErrorException$originalStatusCode": "

The original status code.

" + } + }, + "ThrottlingException": { + "base": "

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

", + "refs": { + "ResponseStream$throttlingException": null + } + }, + "ValidationException": { + "base": "

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

", + "refs": { + "ResponseStream$validationException": null + } + } + } +} diff --git a/models/apis/bedrock-runtime/2023-09-30/endpoint-rule-set-1.json b/models/apis/bedrock-runtime/2023-09-30/endpoint-rule-set-1.json new file mode 100644 index 00000000000..be978fd08fa --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/endpoint-rule-set-1.json @@ -0,0 +1,350 @@ +{ + "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" + } + ] + } + ] +} \ No newline at end of file diff --git a/models/apis/bedrock-runtime/2023-09-30/endpoint-tests-1.json b/models/apis/bedrock-runtime/2023-09-30/endpoint-tests-1.json new file mode 100644 index 00000000000..9dbe82d206c --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "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" +} \ No newline at end of file diff --git a/models/apis/bedrock-runtime/2023-09-30/examples-1.json b/models/apis/bedrock-runtime/2023-09-30/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/bedrock-runtime/2023-09-30/paginators-1.json b/models/apis/bedrock-runtime/2023-09-30/paginators-1.json new file mode 100644 index 00000000000..5677bd8e4a2 --- /dev/null +++ b/models/apis/bedrock-runtime/2023-09-30/paginators-1.json @@ -0,0 +1,4 @@ +{ + "pagination": { + } +} diff --git a/models/apis/bedrock/2023-04-20/api-2.json b/models/apis/bedrock/2023-04-20/api-2.json new file mode 100644 index 00000000000..adb3a226b54 --- /dev/null +++ b/models/apis/bedrock/2023-04-20/api-2.json @@ -0,0 +1,1219 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2023-04-20", + "endpointPrefix":"bedrock", + "jsonVersion":"1.1", + "protocol":"rest-json", + "serviceFullName":"Amazon Bedrock", + "serviceId":"Bedrock", + "signatureVersion":"v4", + "signingName":"bedrock", + "uid":"bedrock-2023-04-20" + }, + "operations":{ + "CreateModelCustomizationJob":{ + "name":"CreateModelCustomizationJob", + "http":{ + "method":"POST", + "requestUri":"/model-customization-jobs", + "responseCode":201 + }, + "input":{"shape":"CreateModelCustomizationJobRequest"}, + "output":{"shape":"CreateModelCustomizationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"ConflictException"}, + {"shape":"InternalServerException"}, + {"shape":"TooManyTagsException"}, + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ThrottlingException"} + ], + "idempotent":true + }, + "DeleteCustomModel":{ + "name":"DeleteCustomModel", + "http":{ + "method":"DELETE", + "requestUri":"/custom-models/{modelIdentifier}", + "responseCode":200 + }, + "input":{"shape":"DeleteCustomModelRequest"}, + "output":{"shape":"DeleteCustomModelResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"ConflictException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ], + "idempotent":true + }, + "DeleteModelInvocationLoggingConfiguration":{ + "name":"DeleteModelInvocationLoggingConfiguration", + "http":{ + "method":"DELETE", + "requestUri":"/logging/modelinvocations", + "responseCode":200 + }, + "input":{"shape":"DeleteModelInvocationLoggingConfigurationRequest"}, + "output":{"shape":"DeleteModelInvocationLoggingConfigurationResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ], + "idempotent":true + }, + "GetCustomModel":{ + "name":"GetCustomModel", + "http":{ + "method":"GET", + "requestUri":"/custom-models/{modelIdentifier}", + "responseCode":200 + }, + "input":{"shape":"GetCustomModelRequest"}, + "output":{"shape":"GetCustomModelResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "GetFoundationModel":{ + "name":"GetFoundationModel", + "http":{ + "method":"GET", + "requestUri":"/foundation-models/{modelIdentifier}", + "responseCode":200 + }, + "input":{"shape":"GetFoundationModelRequest"}, + "output":{"shape":"GetFoundationModelResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "GetModelCustomizationJob":{ + "name":"GetModelCustomizationJob", + "http":{ + "method":"GET", + "requestUri":"/model-customization-jobs/{jobIdentifier}", + "responseCode":200 + }, + "input":{"shape":"GetModelCustomizationJobRequest"}, + "output":{"shape":"GetModelCustomizationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "GetModelInvocationLoggingConfiguration":{ + "name":"GetModelInvocationLoggingConfiguration", + "http":{ + "method":"GET", + "requestUri":"/logging/modelinvocations", + "responseCode":200 + }, + "input":{"shape":"GetModelInvocationLoggingConfigurationRequest"}, + "output":{"shape":"GetModelInvocationLoggingConfigurationResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "ListCustomModels":{ + "name":"ListCustomModels", + "http":{ + "method":"GET", + "requestUri":"/custom-models", + "responseCode":200 + }, + "input":{"shape":"ListCustomModelsRequest"}, + "output":{"shape":"ListCustomModelsResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "ListFoundationModels":{ + "name":"ListFoundationModels", + "http":{ + "method":"GET", + "requestUri":"/foundation-models", + "responseCode":200 + }, + "input":{"shape":"ListFoundationModelsRequest"}, + "output":{"shape":"ListFoundationModelsResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "ListModelCustomizationJobs":{ + "name":"ListModelCustomizationJobs", + "http":{ + "method":"GET", + "requestUri":"/model-customization-jobs", + "responseCode":200 + }, + "input":{"shape":"ListModelCustomizationJobsRequest"}, + "output":{"shape":"ListModelCustomizationJobsResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"POST", + "requestUri":"/listTagsForResource", + "responseCode":200 + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + }, + "PutModelInvocationLoggingConfiguration":{ + "name":"PutModelInvocationLoggingConfiguration", + "http":{ + "method":"PUT", + "requestUri":"/logging/modelinvocations", + "responseCode":200 + }, + "input":{"shape":"PutModelInvocationLoggingConfigurationRequest"}, + "output":{"shape":"PutModelInvocationLoggingConfigurationResponse"}, + "errors":[ + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ], + "idempotent":true + }, + "StopModelCustomizationJob":{ + "name":"StopModelCustomizationJob", + "http":{ + "method":"POST", + "requestUri":"/model-customization-jobs/{jobIdentifier}/stop", + "responseCode":200 + }, + "input":{"shape":"StopModelCustomizationJobRequest"}, + "output":{"shape":"StopModelCustomizationJobResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"ConflictException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ], + "idempotent":true + }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/tagResource", + "responseCode":200 + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"TooManyTagsException"}, + {"shape":"ThrottlingException"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"POST", + "requestUri":"/untagResource", + "responseCode":200 + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ValidationException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"} + ] + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":403, + "senderFault":true + }, + "exception":true + }, + "BaseModelIdentifier":{ + "type":"string", + "max":2048, + "min":1, + "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][_-]?)+)$" + }, + "BedrockModelId":{ + "type":"string", + "max":140, + "min":0, + "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}|)$" + }, + "Boolean":{ + "type":"boolean", + "box":true + }, + "BrandedName":{ + "type":"string", + "max":20, + "min":1, + "pattern":"^.*$" + }, + "BucketName":{ + "type":"string", + "max":63, + "min":3 + }, + "CloudWatchConfig":{ + "type":"structure", + "required":[ + "logGroupName", + "roleArn" + ], + "members":{ + "largeDataDeliveryS3Config":{"shape":"S3Config"}, + "logGroupName":{"shape":"LogGroupName"}, + "roleArn":{"shape":"RoleArn"} + } + }, + "ConflictException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, + "CreateModelCustomizationJobRequest":{ + "type":"structure", + "required":[ + "baseModelIdentifier", + "customModelName", + "hyperParameters", + "jobName", + "outputDataConfig", + "roleArn", + "trainingDataConfig" + ], + "members":{ + "baseModelIdentifier":{"shape":"BaseModelIdentifier"}, + "clientRequestToken":{ + "shape":"IdempotencyToken", + "idempotencyToken":true + }, + "customModelKmsKeyId":{"shape":"KmsKeyId"}, + "customModelName":{"shape":"CustomModelName"}, + "customModelTags":{"shape":"TagList"}, + "hyperParameters":{"shape":"ModelCustomizationHyperParameters"}, + "jobName":{"shape":"JobName"}, + "jobTags":{"shape":"TagList"}, + "outputDataConfig":{"shape":"OutputDataConfig"}, + "roleArn":{"shape":"RoleArn"}, + "trainingDataConfig":{"shape":"TrainingDataConfig"}, + "validationDataConfig":{"shape":"ValidationDataConfig"}, + "vpcConfig":{"shape":"VpcConfig"} + } + }, + "CreateModelCustomizationJobResponse":{ + "type":"structure", + "required":["jobArn"], + "members":{ + "jobArn":{"shape":"ModelCustomizationJobArn"} + } + }, + "CustomModelArn":{ + "type":"string", + "max":1011, + "min":20, + "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}$" + }, + "CustomModelName":{ + "type":"string", + "max":63, + "min":1, + "pattern":"^([0-9a-zA-Z][_-]?)+$" + }, + "CustomModelSummary":{ + "type":"structure", + "required":[ + "baseModelArn", + "baseModelName", + "creationTime", + "modelArn", + "modelName" + ], + "members":{ + "baseModelArn":{"shape":"ModelArn"}, + "baseModelName":{"shape":"ModelName"}, + "creationTime":{"shape":"Timestamp"}, + "modelArn":{"shape":"CustomModelArn"}, + "modelName":{"shape":"CustomModelName"} + } + }, + "CustomModelSummaryList":{ + "type":"list", + "member":{"shape":"CustomModelSummary"} + }, + "DeleteCustomModelRequest":{ + "type":"structure", + "required":["modelIdentifier"], + "members":{ + "modelIdentifier":{ + "shape":"ModelIdentifier", + "location":"uri", + "locationName":"modelIdentifier" + } + } + }, + "DeleteCustomModelResponse":{ + "type":"structure", + "members":{ + } + }, + "DeleteModelInvocationLoggingConfigurationRequest":{ + "type":"structure", + "members":{ + } + }, + "DeleteModelInvocationLoggingConfigurationResponse":{ + "type":"structure", + "members":{ + } + }, + "ErrorMessage":{ + "type":"string", + "max":2048, + "min":0 + }, + "FineTuningJobStatus":{ + "type":"string", + "enum":[ + "InProgress", + "Completed", + "Failed", + "Stopping", + "Stopped" + ] + }, + "FoundationModelArn":{ + "type":"string", + "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}$" + }, + "FoundationModelDetails":{ + "type":"structure", + "required":[ + "modelArn", + "modelId" + ], + "members":{ + "customizationsSupported":{"shape":"ModelCustomizationList"}, + "inferenceTypesSupported":{"shape":"InferenceTypeList"}, + "inputModalities":{"shape":"ModelModalityList"}, + "modelArn":{"shape":"FoundationModelArn"}, + "modelId":{"shape":"BedrockModelId"}, + "modelName":{"shape":"BrandedName"}, + "outputModalities":{"shape":"ModelModalityList"}, + "providerName":{"shape":"BrandedName"}, + "responseStreamingSupported":{"shape":"Boolean"} + } + }, + "FoundationModelSummary":{ + "type":"structure", + "required":[ + "modelArn", + "modelId" + ], + "members":{ + "customizationsSupported":{"shape":"ModelCustomizationList"}, + "inferenceTypesSupported":{"shape":"InferenceTypeList"}, + "inputModalities":{"shape":"ModelModalityList"}, + "modelArn":{"shape":"FoundationModelArn"}, + "modelId":{"shape":"BedrockModelId"}, + "modelName":{"shape":"BrandedName"}, + "outputModalities":{"shape":"ModelModalityList"}, + "providerName":{"shape":"BrandedName"}, + "responseStreamingSupported":{"shape":"Boolean"} + } + }, + "FoundationModelSummaryList":{ + "type":"list", + "member":{"shape":"FoundationModelSummary"} + }, + "GetCustomModelRequest":{ + "type":"structure", + "required":["modelIdentifier"], + "members":{ + "modelIdentifier":{ + "shape":"ModelIdentifier", + "location":"uri", + "locationName":"modelIdentifier" + } + } + }, + "GetCustomModelResponse":{ + "type":"structure", + "required":[ + "baseModelArn", + "creationTime", + "jobArn", + "modelArn", + "modelName", + "outputDataConfig", + "trainingDataConfig" + ], + "members":{ + "baseModelArn":{"shape":"ModelArn"}, + "creationTime":{"shape":"Timestamp"}, + "hyperParameters":{"shape":"ModelCustomizationHyperParameters"}, + "jobArn":{"shape":"ModelCustomizationJobArn"}, + "jobName":{"shape":"JobName"}, + "modelArn":{"shape":"ModelArn"}, + "modelKmsKeyArn":{"shape":"KmsKeyArn"}, + "modelName":{"shape":"CustomModelName"}, + "outputDataConfig":{"shape":"OutputDataConfig"}, + "trainingDataConfig":{"shape":"TrainingDataConfig"}, + "trainingMetrics":{"shape":"TrainingMetrics"}, + "validationDataConfig":{"shape":"ValidationDataConfig"}, + "validationMetrics":{"shape":"ValidationMetrics"} + } + }, + "GetFoundationModelRequest":{ + "type":"structure", + "required":["modelIdentifier"], + "members":{ + "modelIdentifier":{ + "shape":"ModelIdentifier", + "location":"uri", + "locationName":"modelIdentifier" + } + } + }, + "GetFoundationModelResponse":{ + "type":"structure", + "members":{ + "modelDetails":{"shape":"FoundationModelDetails"} + } + }, + "GetModelCustomizationJobRequest":{ + "type":"structure", + "required":["jobIdentifier"], + "members":{ + "jobIdentifier":{ + "shape":"ModelCustomizationJobIdentifier", + "location":"uri", + "locationName":"jobIdentifier" + } + } + }, + "GetModelCustomizationJobResponse":{ + "type":"structure", + "required":[ + "baseModelArn", + "creationTime", + "hyperParameters", + "jobArn", + "jobName", + "outputDataConfig", + "outputModelName", + "roleArn", + "trainingDataConfig", + "validationDataConfig" + ], + "members":{ + "baseModelArn":{"shape":"FoundationModelArn"}, + "clientRequestToken":{"shape":"IdempotencyToken"}, + "creationTime":{"shape":"Timestamp"}, + "endTime":{"shape":"Timestamp"}, + "failureMessage":{"shape":"ErrorMessage"}, + "hyperParameters":{"shape":"ModelCustomizationHyperParameters"}, + "jobArn":{"shape":"ModelCustomizationJobArn"}, + "jobName":{"shape":"JobName"}, + "lastModifiedTime":{"shape":"Timestamp"}, + "outputDataConfig":{"shape":"OutputDataConfig"}, + "outputModelArn":{"shape":"CustomModelArn"}, + "outputModelKmsKeyArn":{"shape":"KmsKeyArn"}, + "outputModelName":{"shape":"CustomModelName"}, + "roleArn":{"shape":"RoleArn"}, + "status":{"shape":"ModelCustomizationJobStatus"}, + "trainingDataConfig":{"shape":"TrainingDataConfig"}, + "trainingMetrics":{"shape":"TrainingMetrics"}, + "validationDataConfig":{"shape":"ValidationDataConfig"}, + "validationMetrics":{"shape":"ValidationMetrics"}, + "vpcConfig":{"shape":"VpcConfig"} + } + }, + "GetModelInvocationLoggingConfigurationRequest":{ + "type":"structure", + "members":{ + } + }, + "GetModelInvocationLoggingConfigurationResponse":{ + "type":"structure", + "members":{ + "loggingConfig":{"shape":"LoggingConfig"} + } + }, + "IdempotencyToken":{ + "type":"string", + "max":256, + "min":1, + "pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9])*$" + }, + "InferenceType":{ + "type":"string", + "enum":[ + "ON_DEMAND", + "PROVISIONED" + ] + }, + "InferenceTypeList":{ + "type":"list", + "member":{"shape":"InferenceType"} + }, + "InternalServerException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{"httpStatusCode":500}, + "exception":true, + "fault":true + }, + "JobName":{ + "type":"string", + "max":63, + "min":1, + "pattern":"^[a-zA-Z0-9](-*[a-zA-Z0-9\\+\\-\\.])*$" + }, + "KeyPrefix":{ + "type":"string", + "max":1024, + "min":0 + }, + "KmsKeyArn":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$" + }, + "KmsKeyId":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"^arn:aws(-[^:]+)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:((key/[a-zA-Z0-9-]{36})|(alias/[a-zA-Z0-9-_/]+))$" + }, + "ListCustomModelsRequest":{ + "type":"structure", + "members":{ + "baseModelArnEquals":{ + "shape":"ModelArn", + "location":"querystring", + "locationName":"baseModelArnEquals" + }, + "creationTimeAfter":{ + "shape":"Timestamp", + "location":"querystring", + "locationName":"creationTimeAfter" + }, + "creationTimeBefore":{ + "shape":"Timestamp", + "location":"querystring", + "locationName":"creationTimeBefore" + }, + "foundationModelArnEquals":{ + "shape":"FoundationModelArn", + "location":"querystring", + "locationName":"foundationModelArnEquals" + }, + "maxResults":{ + "shape":"MaxResults", + "location":"querystring", + "locationName":"maxResults" + }, + "nameContains":{ + "shape":"CustomModelName", + "location":"querystring", + "locationName":"nameContains" + }, + "nextToken":{ + "shape":"PaginationToken", + "location":"querystring", + "locationName":"nextToken" + }, + "sortBy":{ + "shape":"SortModelsBy", + "location":"querystring", + "locationName":"sortBy" + }, + "sortOrder":{ + "shape":"SortOrder", + "location":"querystring", + "locationName":"sortOrder" + } + } + }, + "ListCustomModelsResponse":{ + "type":"structure", + "members":{ + "modelSummaries":{"shape":"CustomModelSummaryList"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListFoundationModelsRequest":{ + "type":"structure", + "members":{ + "byCustomizationType":{ + "shape":"ModelCustomization", + "location":"querystring", + "locationName":"byCustomizationType" + }, + "byInferenceType":{ + "shape":"InferenceType", + "location":"querystring", + "locationName":"byInferenceType" + }, + "byOutputModality":{ + "shape":"ModelModality", + "location":"querystring", + "locationName":"byOutputModality" + }, + "byProvider":{ + "shape":"Provider", + "location":"querystring", + "locationName":"byProvider" + } + } + }, + "ListFoundationModelsResponse":{ + "type":"structure", + "members":{ + "modelSummaries":{"shape":"FoundationModelSummaryList"} + } + }, + "ListModelCustomizationJobsRequest":{ + "type":"structure", + "members":{ + "creationTimeAfter":{ + "shape":"Timestamp", + "location":"querystring", + "locationName":"creationTimeAfter" + }, + "creationTimeBefore":{ + "shape":"Timestamp", + "location":"querystring", + "locationName":"creationTimeBefore" + }, + "maxResults":{ + "shape":"MaxResults", + "location":"querystring", + "locationName":"maxResults" + }, + "nameContains":{ + "shape":"JobName", + "location":"querystring", + "locationName":"nameContains" + }, + "nextToken":{ + "shape":"PaginationToken", + "location":"querystring", + "locationName":"nextToken" + }, + "sortBy":{ + "shape":"SortJobsBy", + "location":"querystring", + "locationName":"sortBy" + }, + "sortOrder":{ + "shape":"SortOrder", + "location":"querystring", + "locationName":"sortOrder" + }, + "statusEquals":{ + "shape":"FineTuningJobStatus", + "location":"querystring", + "locationName":"statusEquals" + } + } + }, + "ListModelCustomizationJobsResponse":{ + "type":"structure", + "members":{ + "modelCustomizationJobSummaries":{"shape":"ModelCustomizationJobSummaries"}, + "nextToken":{"shape":"PaginationToken"} + } + }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["resourceARN"], + "members":{ + "resourceARN":{"shape":"TaggableResourcesArn"} + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "tags":{"shape":"TagList"} + } + }, + "LogGroupName":{ + "type":"string", + "max":512, + "min":1 + }, + "LoggingConfig":{ + "type":"structure", + "members":{ + "cloudWatchConfig":{"shape":"CloudWatchConfig"}, + "embeddingDataDeliveryEnabled":{"shape":"Boolean"}, + "imageDataDeliveryEnabled":{"shape":"Boolean"}, + "s3Config":{"shape":"S3Config"}, + "textDataDeliveryEnabled":{"shape":"Boolean"} + } + }, + "MaxResults":{ + "type":"integer", + "box":true, + "max":1000, + "min":1 + }, + "MetricFloat":{ + "type":"float", + "box":true + }, + "ModelArn":{ + "type":"string", + "max":1011, + "min":20, + "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}))$" + }, + "ModelCustomization":{ + "type":"string", + "enum":["FINE_TUNING"] + }, + "ModelCustomizationHyperParameters":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"} + }, + "ModelCustomizationJobArn":{ + "type":"string", + "max":1011, + "min":0, + "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}$" + }, + "ModelCustomizationJobIdentifier":{ + "type":"string", + "max":1011, + "min":0, + "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\\+\\-\\.])*)$" + }, + "ModelCustomizationJobStatus":{ + "type":"string", + "enum":[ + "InProgress", + "Completed", + "Failed", + "Stopping", + "Stopped" + ] + }, + "ModelCustomizationJobSummaries":{ + "type":"list", + "member":{"shape":"ModelCustomizationJobSummary"} + }, + "ModelCustomizationJobSummary":{ + "type":"structure", + "required":[ + "baseModelArn", + "creationTime", + "jobArn", + "jobName", + "status" + ], + "members":{ + "baseModelArn":{"shape":"ModelArn"}, + "creationTime":{"shape":"Timestamp"}, + "customModelArn":{"shape":"CustomModelArn"}, + "customModelName":{"shape":"CustomModelName"}, + "endTime":{"shape":"Timestamp"}, + "jobArn":{"shape":"ModelCustomizationJobArn"}, + "jobName":{"shape":"JobName"}, + "lastModifiedTime":{"shape":"Timestamp"}, + "status":{"shape":"ModelCustomizationJobStatus"} + } + }, + "ModelCustomizationList":{ + "type":"list", + "member":{"shape":"ModelCustomization"} + }, + "ModelIdentifier":{ + "type":"string", + "max":2048, + "min":1, + "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][_-]?)+)$" + }, + "ModelModality":{ + "type":"string", + "enum":[ + "TEXT", + "IMAGE", + "EMBEDDING" + ] + }, + "ModelModalityList":{ + "type":"list", + "member":{"shape":"ModelModality"} + }, + "ModelName":{ + "type":"string", + "max":63, + "min":1, + "pattern":"^([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63})$" + }, + "NonBlankString":{ + "type":"string", + "pattern":"^[\\s\\S]*$" + }, + "OutputDataConfig":{ + "type":"structure", + "required":["s3Uri"], + "members":{ + "s3Uri":{"shape":"S3Uri"} + } + }, + "PaginationToken":{ + "type":"string", + "max":2048, + "min":1, + "pattern":"^\\S*$" + }, + "Provider":{ + "type":"string", + "pattern":"^[a-z0-9-]{1,63}$" + }, + "PutModelInvocationLoggingConfigurationRequest":{ + "type":"structure", + "required":["loggingConfig"], + "members":{ + "loggingConfig":{"shape":"LoggingConfig"} + } + }, + "PutModelInvocationLoggingConfigurationResponse":{ + "type":"structure", + "members":{ + } + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":404, + "senderFault":true + }, + "exception":true + }, + "RoleArn":{ + "type":"string", + "max":2048, + "min":0, + "pattern":"^arn:aws(-[^:]+)?:iam::([0-9]{12})?:role/.+$" + }, + "S3Config":{ + "type":"structure", + "required":["bucketName"], + "members":{ + "bucketName":{"shape":"BucketName"}, + "keyPrefix":{"shape":"KeyPrefix"} + } + }, + "S3Uri":{ + "type":"string", + "max":1024, + "min":1, + "pattern":"^s3://[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9](/.*)?$" + }, + "SecurityGroupId":{ + "type":"string", + "max":32, + "min":0, + "pattern":"^[-0-9a-zA-Z]+$" + }, + "SecurityGroupIds":{ + "type":"list", + "member":{"shape":"SecurityGroupId"}, + "max":5, + "min":1 + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, + "SortJobsBy":{ + "type":"string", + "enum":["CreationTime"] + }, + "SortModelsBy":{ + "type":"string", + "enum":["CreationTime"] + }, + "SortOrder":{ + "type":"string", + "enum":[ + "Ascending", + "Descending" + ] + }, + "StopModelCustomizationJobRequest":{ + "type":"structure", + "required":["jobIdentifier"], + "members":{ + "jobIdentifier":{ + "shape":"ModelCustomizationJobIdentifier", + "location":"uri", + "locationName":"jobIdentifier" + } + } + }, + "StopModelCustomizationJobResponse":{ + "type":"structure", + "members":{ + } + }, + "String":{"type":"string"}, + "SubnetId":{ + "type":"string", + "max":32, + "min":0, + "pattern":"^[-0-9a-zA-Z]+$" + }, + "SubnetIds":{ + "type":"list", + "member":{"shape":"SubnetId"}, + "max":16, + "min":1 + }, + "Tag":{ + "type":"structure", + "required":[ + "key", + "value" + ], + "members":{ + "key":{"shape":"TagKey"}, + "value":{"shape":"TagValue"} + } + }, + "TagKey":{ + "type":"string", + "max":128, + "min":1, + "pattern":"^[a-zA-Z0-9\\s._:/=+@-]*$" + }, + "TagKeyList":{ + "type":"list", + "member":{"shape":"TagKey"}, + "max":200, + "min":0 + }, + "TagList":{ + "type":"list", + "member":{"shape":"Tag"}, + "max":200, + "min":0 + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "resourceARN", + "tags" + ], + "members":{ + "resourceARN":{"shape":"TaggableResourcesArn"}, + "tags":{"shape":"TagList"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagValue":{ + "type":"string", + "max":256, + "min":0, + "pattern":"^[a-zA-Z0-9\\s._:/=+@-]*$" + }, + "TaggableResourcesArn":{ + "type":"string", + "max":1011, + "min":20, + "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}$)" + }, + "ThrottlingException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":429, + "senderFault":true + }, + "exception":true + }, + "Timestamp":{ + "type":"timestamp", + "timestampFormat":"iso8601" + }, + "TooManyTagsException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"}, + "resourceName":{"shape":"TaggableResourcesArn"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, + "TrainingDataConfig":{ + "type":"structure", + "required":["s3Uri"], + "members":{ + "s3Uri":{"shape":"S3Uri"} + } + }, + "TrainingMetrics":{ + "type":"structure", + "members":{ + "trainingLoss":{"shape":"MetricFloat"} + } + }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "resourceARN", + "tagKeys" + ], + "members":{ + "resourceARN":{"shape":"TaggableResourcesArn"}, + "tagKeys":{"shape":"TagKeyList"} + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "ValidationDataConfig":{ + "type":"structure", + "required":["validators"], + "members":{ + "validators":{"shape":"Validators"} + } + }, + "ValidationException":{ + "type":"structure", + "members":{ + "message":{"shape":"NonBlankString"} + }, + "error":{ + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, + "ValidationMetrics":{ + "type":"list", + "member":{"shape":"ValidatorMetric"} + }, + "Validator":{ + "type":"structure", + "required":["s3Uri"], + "members":{ + "s3Uri":{"shape":"S3Uri"} + } + }, + "ValidatorMetric":{ + "type":"structure", + "members":{ + "validationLoss":{"shape":"MetricFloat"} + } + }, + "Validators":{ + "type":"list", + "member":{"shape":"Validator"}, + "max":10, + "min":0 + }, + "VpcConfig":{ + "type":"structure", + "required":[ + "securityGroupIds", + "subnetIds" + ], + "members":{ + "securityGroupIds":{"shape":"SecurityGroupIds"}, + "subnetIds":{"shape":"SubnetIds"} + } + } + } +} diff --git a/models/apis/bedrock/2023-04-20/docs-2.json b/models/apis/bedrock/2023-04-20/docs-2.json new file mode 100644 index 00000000000..511579e71eb --- /dev/null +++ b/models/apis/bedrock/2023-04-20/docs-2.json @@ -0,0 +1,725 @@ +{ + "version": "2.0", + "service": "

Describes the API operations for creating and managing Bedrock models.

", + "operations": { + "CreateModelCustomizationJob": "

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

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

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

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

", + "DeleteCustomModel": "

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

", + "DeleteModelInvocationLoggingConfiguration": "

Delete the invocation logging.

", + "GetCustomModel": "

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

", + "GetFoundationModel": "

Get details about a Bedrock foundation model.

", + "GetModelCustomizationJob": "

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

", + "GetModelInvocationLoggingConfiguration": "

Get the current configuration values for model invocation logging.

", + "ListCustomModels": "

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

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

", + "ListFoundationModels": "

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

", + "ListModelCustomizationJobs": "

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

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

", + "ListTagsForResource": "

List the tags associated with the specified resource.

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

", + "PutModelInvocationLoggingConfiguration": "

Set the configuration values for model invocation logging.

", + "StopModelCustomizationJob": "

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

", + "TagResource": "

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

", + "UntagResource": "

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

" + }, + "shapes": { + "AccessDeniedException": { + "base": "

The request is denied because of missing access permissions.

", + "refs": { + } + }, + "BaseModelIdentifier": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$baseModelIdentifier": "

Name of the base model.

" + } + }, + "BedrockModelId": { + "base": null, + "refs": { + "FoundationModelDetails$modelId": "

The model identifier.

", + "FoundationModelSummary$modelId": "

The model Id of the foundation model.

" + } + }, + "Boolean": { + "base": null, + "refs": { + "FoundationModelDetails$responseStreamingSupported": "

Indicates whether the model supports streaming.

", + "FoundationModelSummary$responseStreamingSupported": "

Indicates whether the model supports streaming.

", + "LoggingConfig$embeddingDataDeliveryEnabled": "

Set to include embeddings data in the log delivery.

", + "LoggingConfig$imageDataDeliveryEnabled": "

Set to include image data in the log delivery.

", + "LoggingConfig$textDataDeliveryEnabled": "

Set to include text data in the log delivery.

" + } + }, + "BrandedName": { + "base": null, + "refs": { + "FoundationModelDetails$modelName": "

The model name.

", + "FoundationModelDetails$providerName": "

he model's provider name.

", + "FoundationModelSummary$modelName": "

The name of the model.

", + "FoundationModelSummary$providerName": "

The model's provider name.

" + } + }, + "BucketName": { + "base": null, + "refs": { + "S3Config$bucketName": "

S3 bucket name.

" + } + }, + "CloudWatchConfig": { + "base": "

CloudWatch logging configuration.

", + "refs": { + "LoggingConfig$cloudWatchConfig": "

CloudWatch logging configuration.

" + } + }, + "ConflictException": { + "base": "

Error occurred because of a conflict while performing an operation.

", + "refs": { + } + }, + "CreateModelCustomizationJobRequest": { + "base": null, + "refs": { + } + }, + "CreateModelCustomizationJobResponse": { + "base": null, + "refs": { + } + }, + "CustomModelArn": { + "base": null, + "refs": { + "CustomModelSummary$modelArn": "

The ARN of the custom model.

", + "GetModelCustomizationJobResponse$outputModelArn": "

The ARN of the output model.

", + "ModelCustomizationJobSummary$customModelArn": "

ARN of the custom model.

" + } + }, + "CustomModelName": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$customModelName": "

Enter a name for the custom model.

", + "CustomModelSummary$modelName": "

The name of the custom model.

", + "GetCustomModelResponse$modelName": "

Model name associated with this model.

", + "GetModelCustomizationJobResponse$outputModelName": "

The name of the output model.

", + "ListCustomModelsRequest$nameContains": "

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

", + "ModelCustomizationJobSummary$customModelName": "

Name of the custom model.

" + } + }, + "CustomModelSummary": { + "base": "

Summary information for a custom model.

", + "refs": { + "CustomModelSummaryList$member": null + } + }, + "CustomModelSummaryList": { + "base": null, + "refs": { + "ListCustomModelsResponse$modelSummaries": "

Model summaries.

" + } + }, + "DeleteCustomModelRequest": { + "base": null, + "refs": { + } + }, + "DeleteCustomModelResponse": { + "base": null, + "refs": { + } + }, + "DeleteModelInvocationLoggingConfigurationRequest": { + "base": null, + "refs": { + } + }, + "DeleteModelInvocationLoggingConfigurationResponse": { + "base": null, + "refs": { + } + }, + "ErrorMessage": { + "base": null, + "refs": { + "GetModelCustomizationJobResponse$failureMessage": "

Information about why the job failed.

" + } + }, + "FineTuningJobStatus": { + "base": null, + "refs": { + "ListModelCustomizationJobsRequest$statusEquals": "

Return customization jobs with the specified status.

" + } + }, + "FoundationModelArn": { + "base": null, + "refs": { + "FoundationModelDetails$modelArn": "

The model ARN.

", + "FoundationModelSummary$modelArn": "

The ARN of the foundation model.

", + "GetModelCustomizationJobResponse$baseModelArn": "

ARN of the base model.

", + "ListCustomModelsRequest$foundationModelArnEquals": "

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

" + } + }, + "FoundationModelDetails": { + "base": "

Information about a foundation model.

", + "refs": { + "GetFoundationModelResponse$modelDetails": "

Information about the foundation model.

" + } + }, + "FoundationModelSummary": { + "base": "

Summary information for a foundation model.

", + "refs": { + "FoundationModelSummaryList$member": null + } + }, + "FoundationModelSummaryList": { + "base": null, + "refs": { + "ListFoundationModelsResponse$modelSummaries": "

A list of bedrock foundation models.

" + } + }, + "GetCustomModelRequest": { + "base": null, + "refs": { + } + }, + "GetCustomModelResponse": { + "base": null, + "refs": { + } + }, + "GetFoundationModelRequest": { + "base": null, + "refs": { + } + }, + "GetFoundationModelResponse": { + "base": null, + "refs": { + } + }, + "GetModelCustomizationJobRequest": { + "base": null, + "refs": { + } + }, + "GetModelCustomizationJobResponse": { + "base": null, + "refs": { + } + }, + "GetModelInvocationLoggingConfigurationRequest": { + "base": null, + "refs": { + } + }, + "GetModelInvocationLoggingConfigurationResponse": { + "base": null, + "refs": { + } + }, + "IdempotencyToken": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$clientRequestToken": "

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

", + "GetModelCustomizationJobResponse$clientRequestToken": "

The token that you specified in the CreateCustomizationJob request.

" + } + }, + "InferenceType": { + "base": null, + "refs": { + "InferenceTypeList$member": null, + "ListFoundationModelsRequest$byInferenceType": "

List by inference type.

" + } + }, + "InferenceTypeList": { + "base": null, + "refs": { + "FoundationModelDetails$inferenceTypesSupported": "

The inference types that the model supports.

", + "FoundationModelSummary$inferenceTypesSupported": "

The inference types that the model supports.

" + } + }, + "InternalServerException": { + "base": "

An internal server error occurred. Retry your request.

", + "refs": { + } + }, + "JobName": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$jobName": "

Enter a unique name for the fine-tuning job.

", + "GetCustomModelResponse$jobName": "

Job name associated with this model.

", + "GetModelCustomizationJobResponse$jobName": "

The name of the customization job.

", + "ListModelCustomizationJobsRequest$nameContains": "

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

", + "ModelCustomizationJobSummary$jobName": "

Name of the customization job.

" + } + }, + "KeyPrefix": { + "base": null, + "refs": { + "S3Config$keyPrefix": "

S3 prefix.

" + } + }, + "KmsKeyArn": { + "base": null, + "refs": { + "GetCustomModelResponse$modelKmsKeyArn": "

The custom model is encrypted at rest using this key.

", + "GetModelCustomizationJobResponse$outputModelKmsKeyArn": "

The custom model is encrypted at rest using this key.

" + } + }, + "KmsKeyId": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$customModelKmsKeyId": "

The custom model is encrypted at rest using this key.

" + } + }, + "ListCustomModelsRequest": { + "base": null, + "refs": { + } + }, + "ListCustomModelsResponse": { + "base": null, + "refs": { + } + }, + "ListFoundationModelsRequest": { + "base": null, + "refs": { + } + }, + "ListFoundationModelsResponse": { + "base": null, + "refs": { + } + }, + "ListModelCustomizationJobsRequest": { + "base": null, + "refs": { + } + }, + "ListModelCustomizationJobsResponse": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, + "LogGroupName": { + "base": null, + "refs": { + "CloudWatchConfig$logGroupName": "

The log group name.

" + } + }, + "LoggingConfig": { + "base": "

Configuration fields for invokation logging.

", + "refs": { + "GetModelInvocationLoggingConfigurationResponse$loggingConfig": "

The current configuration values.

", + "PutModelInvocationLoggingConfigurationRequest$loggingConfig": "

The logging configuration values to set.

" + } + }, + "MaxResults": { + "base": null, + "refs": { + "ListCustomModelsRequest$maxResults": "

Maximum number of results to return in the response.

", + "ListModelCustomizationJobsRequest$maxResults": "

Maximum number of results to return in the response.

" + } + }, + "MetricFloat": { + "base": null, + "refs": { + "TrainingMetrics$trainingLoss": "

Loss metric associated with the custom job.

", + "ValidatorMetric$validationLoss": "

The validation loss associated with this validator.

" + } + }, + "ModelArn": { + "base": null, + "refs": { + "CustomModelSummary$baseModelArn": "

The base model ARN.

", + "GetCustomModelResponse$baseModelArn": "

ARN of the base model.

", + "GetCustomModelResponse$modelArn": "

ARN associated with this model.

", + "ListCustomModelsRequest$baseModelArnEquals": "

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

", + "ModelCustomizationJobSummary$baseModelArn": "

ARN of the base model.

" + } + }, + "ModelCustomization": { + "base": null, + "refs": { + "ListFoundationModelsRequest$byCustomizationType": "

List by customization type.

", + "ModelCustomizationList$member": null + } + }, + "ModelCustomizationHyperParameters": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$hyperParameters": "

Parameters related to tuning the model.

", + "GetCustomModelResponse$hyperParameters": "

Hyperparameter values associated with this model.

", + "GetModelCustomizationJobResponse$hyperParameters": "

The hyperparameter values for the job.

" + } + }, + "ModelCustomizationJobArn": { + "base": null, + "refs": { + "CreateModelCustomizationJobResponse$jobArn": "

ARN of the fine tuning job

", + "GetCustomModelResponse$jobArn": "

Job ARN associated with this model.

", + "GetModelCustomizationJobResponse$jobArn": "

The ARN of the customization job.

", + "ModelCustomizationJobSummary$jobArn": "

ARN of the customization job.

" + } + }, + "ModelCustomizationJobIdentifier": { + "base": null, + "refs": { + "GetModelCustomizationJobRequest$jobIdentifier": "

Identifier for the customization job.

", + "StopModelCustomizationJobRequest$jobIdentifier": "

Job identifier of the job to stop.

" + } + }, + "ModelCustomizationJobStatus": { + "base": null, + "refs": { + "GetModelCustomizationJobResponse$status": "

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

", + "ModelCustomizationJobSummary$status": "

Status of the customization job.

" + } + }, + "ModelCustomizationJobSummaries": { + "base": null, + "refs": { + "ListModelCustomizationJobsResponse$modelCustomizationJobSummaries": "

Job summaries.

" + } + }, + "ModelCustomizationJobSummary": { + "base": "

Information about one customization job

", + "refs": { + "ModelCustomizationJobSummaries$member": null + } + }, + "ModelCustomizationList": { + "base": null, + "refs": { + "FoundationModelDetails$customizationsSupported": "

The customization that the model supports.

", + "FoundationModelSummary$customizationsSupported": "

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

" + } + }, + "ModelIdentifier": { + "base": null, + "refs": { + "DeleteCustomModelRequest$modelIdentifier": "

Name of the model to delete.

", + "GetCustomModelRequest$modelIdentifier": "

Name or ARN of the custom model.

", + "GetFoundationModelRequest$modelIdentifier": "

The model identifier.

" + } + }, + "ModelModality": { + "base": null, + "refs": { + "ListFoundationModelsRequest$byOutputModality": "

List by output modality type.

", + "ModelModalityList$member": null + } + }, + "ModelModalityList": { + "base": null, + "refs": { + "FoundationModelDetails$inputModalities": "

The input modalities that the model supports.

", + "FoundationModelDetails$outputModalities": "

The output modalities that the model supports.

", + "FoundationModelSummary$inputModalities": "

The input modalities that the model supports.

", + "FoundationModelSummary$outputModalities": "

The output modalities that the model supports.

" + } + }, + "ModelName": { + "base": null, + "refs": { + "CustomModelSummary$baseModelName": "

The base model name.

" + } + }, + "NonBlankString": { + "base": null, + "refs": { + "AccessDeniedException$message": null, + "ConflictException$message": null, + "InternalServerException$message": null, + "ResourceNotFoundException$message": null, + "ServiceQuotaExceededException$message": null, + "ThrottlingException$message": null, + "TooManyTagsException$message": null, + "ValidationException$message": null + } + }, + "OutputDataConfig": { + "base": "

S3 Location of the output data.

", + "refs": { + "CreateModelCustomizationJobRequest$outputDataConfig": "

S3 location for the output data.

", + "GetCustomModelResponse$outputDataConfig": "

Output data configuration associated with this custom model.

", + "GetModelCustomizationJobResponse$outputDataConfig": "

Output data configuration

" + } + }, + "PaginationToken": { + "base": null, + "refs": { + "ListCustomModelsRequest$nextToken": "

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

", + "ListCustomModelsResponse$nextToken": "

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

", + "ListModelCustomizationJobsRequest$nextToken": "

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

", + "ListModelCustomizationJobsResponse$nextToken": "

Page continuation token to use in the next request.

" + } + }, + "Provider": { + "base": null, + "refs": { + "ListFoundationModelsRequest$byProvider": "

A Bedrock model provider.

" + } + }, + "PutModelInvocationLoggingConfigurationRequest": { + "base": null, + "refs": { + } + }, + "PutModelInvocationLoggingConfigurationResponse": { + "base": null, + "refs": { + } + }, + "ResourceNotFoundException": { + "base": "

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

", + "refs": { + } + }, + "RoleArn": { + "base": null, + "refs": { + "CloudWatchConfig$roleArn": "

The role ARN.

", + "CreateModelCustomizationJobRequest$roleArn": "

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

", + "GetModelCustomizationJobResponse$roleArn": "

The ARN of the IAM role.

" + } + }, + "S3Config": { + "base": "

S3 configuration for storing log data.

", + "refs": { + "CloudWatchConfig$largeDataDeliveryS3Config": "

S3 configuration for delivering a large amount of data.

", + "LoggingConfig$s3Config": "

S3 configuration for storing log data.

" + } + }, + "S3Uri": { + "base": null, + "refs": { + "OutputDataConfig$s3Uri": "

The S3 URI where the output data is stored.

", + "TrainingDataConfig$s3Uri": "

The S3 URI where the training data is stored.

", + "Validator$s3Uri": "

The S3 URI where the validation data is stored.

" + } + }, + "SecurityGroupId": { + "base": null, + "refs": { + "SecurityGroupIds$member": null + } + }, + "SecurityGroupIds": { + "base": null, + "refs": { + "VpcConfig$securityGroupIds": "

VPC configuration security group Ids.

" + } + }, + "ServiceQuotaExceededException": { + "base": "

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

", + "refs": { + } + }, + "SortJobsBy": { + "base": null, + "refs": { + "ListModelCustomizationJobsRequest$sortBy": "

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

" + } + }, + "SortModelsBy": { + "base": null, + "refs": { + "ListCustomModelsRequest$sortBy": "

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

" + } + }, + "SortOrder": { + "base": null, + "refs": { + "ListCustomModelsRequest$sortOrder": "

The sort order of the results.

", + "ListModelCustomizationJobsRequest$sortOrder": "

The sort order of the results.

" + } + }, + "StopModelCustomizationJobRequest": { + "base": null, + "refs": { + } + }, + "StopModelCustomizationJobResponse": { + "base": null, + "refs": { + } + }, + "String": { + "base": null, + "refs": { + "ModelCustomizationHyperParameters$key": null, + "ModelCustomizationHyperParameters$value": null + } + }, + "SubnetId": { + "base": null, + "refs": { + "SubnetIds$member": null + } + }, + "SubnetIds": { + "base": null, + "refs": { + "VpcConfig$subnetIds": "

VPC configuration subnets.

" + } + }, + "Tag": { + "base": "

Definition of the key/value pair for a tag.

", + "refs": { + "TagList$member": null + } + }, + "TagKey": { + "base": null, + "refs": { + "Tag$key": "

Key for the tag.

", + "TagKeyList$member": null + } + }, + "TagKeyList": { + "base": null, + "refs": { + "UntagResourceRequest$tagKeys": "

Tag keys of the tags to remove from the resource.

" + } + }, + "TagList": { + "base": null, + "refs": { + "CreateModelCustomizationJobRequest$customModelTags": "

Assign tags to the custom model.

", + "CreateModelCustomizationJobRequest$jobTags": "

Assign tags to the job.

", + "ListTagsForResourceResponse$tags": "

An array of the tags associated with this resource.

", + "TagResourceRequest$tags": "

Tags to associate with the resource.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagValue": { + "base": null, + "refs": { + "Tag$value": "

Value for the tag.

" + } + }, + "TaggableResourcesArn": { + "base": null, + "refs": { + "ListTagsForResourceRequest$resourceARN": "

The ARN of the resource.

", + "TagResourceRequest$resourceARN": "

The ARN of the resource to tag.

", + "TooManyTagsException$resourceName": "

The name of the resource with too many tags.

", + "UntagResourceRequest$resourceARN": "

The ARN of the resource to untag.

" + } + }, + "ThrottlingException": { + "base": "

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

", + "refs": { + } + }, + "Timestamp": { + "base": null, + "refs": { + "CustomModelSummary$creationTime": "

Creation time of the model.

", + "GetCustomModelResponse$creationTime": "

Creation time of the model.

", + "GetModelCustomizationJobResponse$creationTime": "

Time that the resource was created.

", + "GetModelCustomizationJobResponse$endTime": "

Time that the resource transitioned to terminal state.

", + "GetModelCustomizationJobResponse$lastModifiedTime": "

Time that the resource was last modified.

", + "ListCustomModelsRequest$creationTimeAfter": "

Return custom models created after the specified time.

", + "ListCustomModelsRequest$creationTimeBefore": "

Return custom models created before the specified time.

", + "ListModelCustomizationJobsRequest$creationTimeAfter": "

Return customization jobs created after the specified time.

", + "ListModelCustomizationJobsRequest$creationTimeBefore": "

Return customization jobs created before the specified time.

", + "ModelCustomizationJobSummary$creationTime": "

Creation time of the custom model.

", + "ModelCustomizationJobSummary$endTime": "

Time that the customization job ended.

", + "ModelCustomizationJobSummary$lastModifiedTime": "

Time that the customization job was last modified.

" + } + }, + "TooManyTagsException": { + "base": "

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

", + "refs": { + } + }, + "TrainingDataConfig": { + "base": "

S3 Location of the training data.

", + "refs": { + "CreateModelCustomizationJobRequest$trainingDataConfig": "

Information about the training dataset.

", + "GetCustomModelResponse$trainingDataConfig": "

Information about the training dataset.

", + "GetModelCustomizationJobResponse$trainingDataConfig": null + } + }, + "TrainingMetrics": { + "base": "

Metrics associated with the custom job.

", + "refs": { + "GetCustomModelResponse$trainingMetrics": "

The training metrics from the job creation.

", + "GetModelCustomizationJobResponse$trainingMetrics": null + } + }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + }, + "ValidationDataConfig": { + "base": "

Array of up to 10 validators.

", + "refs": { + "CreateModelCustomizationJobRequest$validationDataConfig": "

Information about the validation dataset.

", + "GetCustomModelResponse$validationDataConfig": null, + "GetModelCustomizationJobResponse$validationDataConfig": null + } + }, + "ValidationException": { + "base": "

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

", + "refs": { + } + }, + "ValidationMetrics": { + "base": null, + "refs": { + "GetCustomModelResponse$validationMetrics": "

The validation metrics from the job creation.

", + "GetModelCustomizationJobResponse$validationMetrics": "

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

" + } + }, + "Validator": { + "base": "

Information about a validator.

", + "refs": { + "Validators$member": null + } + }, + "ValidatorMetric": { + "base": "

The metric for the validator.

", + "refs": { + "ValidationMetrics$member": null + } + }, + "Validators": { + "base": null, + "refs": { + "ValidationDataConfig$validators": "

Information about the validators.

" + } + }, + "VpcConfig": { + "base": "

VPC configuration.

", + "refs": { + "CreateModelCustomizationJobRequest$vpcConfig": "

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

", + "GetModelCustomizationJobResponse$vpcConfig": "

VPC configuration for the custom model job.

" + } + } + } +} diff --git a/models/apis/bedrock/2023-04-20/endpoint-rule-set-1.json b/models/apis/bedrock/2023-04-20/endpoint-rule-set-1.json new file mode 100644 index 00000000000..51da5236ecd --- /dev/null +++ b/models/apis/bedrock/2023-04-20/endpoint-rule-set-1.json @@ -0,0 +1,350 @@ +{ + "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" + } + ] + } + ] +} \ No newline at end of file diff --git a/models/apis/bedrock/2023-04-20/endpoint-tests-1.json b/models/apis/bedrock/2023-04-20/endpoint-tests-1.json new file mode 100644 index 00000000000..1b22fd55b8b --- /dev/null +++ b/models/apis/bedrock/2023-04-20/endpoint-tests-1.json @@ -0,0 +1,314 @@ +{ + "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" +} \ No newline at end of file diff --git a/models/apis/bedrock/2023-04-20/examples-1.json b/models/apis/bedrock/2023-04-20/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/bedrock/2023-04-20/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/bedrock/2023-04-20/paginators-1.json b/models/apis/bedrock/2023-04-20/paginators-1.json new file mode 100644 index 00000000000..6e21ec33639 --- /dev/null +++ b/models/apis/bedrock/2023-04-20/paginators-1.json @@ -0,0 +1,16 @@ +{ + "pagination": { + "ListCustomModels": { + "input_token": "nextToken", + "output_token": "nextToken", + "limit_key": "maxResults", + "result_key": "modelSummaries" + }, + "ListModelCustomizationJobs": { + "input_token": "nextToken", + "output_token": "nextToken", + "limit_key": "maxResults", + "result_key": "modelCustomizationJobSummaries" + } + } +} diff --git a/models/apis/budgets/2016-10-20/api-2.json b/models/apis/budgets/2016-10-20/api-2.json index 4873fe50763..f182cebf27e 100755 --- a/models/apis/budgets/2016-10-20/api-2.json +++ b/models/apis/budgets/2016-10-20/api-2.json @@ -598,7 +598,7 @@ "BudgetNotificationsForAccountList":{ "type":"list", "member":{"shape":"BudgetNotificationsForAccount"}, - "max":50 + "max":1000 }, "BudgetPerformanceHistory":{ "type":"structure", @@ -1012,7 +1012,7 @@ "required":["AccountId"], "members":{ "AccountId":{"shape":"AccountId"}, - "MaxResults":{"shape":"MaxResults"}, + "MaxResults":{"shape":"MaxResultsDescribeBudgets"}, "NextToken":{"shape":"GenericString"} } }, @@ -1217,7 +1217,13 @@ "MaxResultsBudgetNotifications":{ "type":"integer", "box":true, - "max":50, + "max":1000, + "min":1 + }, + "MaxResultsDescribeBudgets":{ + "type":"integer", + "box":true, + "max":1000, "min":1 }, "NotFoundException":{ diff --git a/models/apis/budgets/2016-10-20/docs-2.json b/models/apis/budgets/2016-10-20/docs-2.json index 298fb034fb7..9e1e6a0e9ef 100755 --- a/models/apis/budgets/2016-10-20/docs-2.json +++ b/models/apis/budgets/2016-10-20/docs-2.json @@ -53,7 +53,7 @@ "DescribeBudgetNotificationsForAccountRequest$AccountId": null, "DescribeBudgetPerformanceHistoryRequest$AccountId": null, "DescribeBudgetRequest$AccountId": "

The accountId that is associated with the budget that you want a description of.

", - "DescribeBudgetsRequest$AccountId": "

The accountId that is associated with the budgets that you want descriptions of.

", + "DescribeBudgetsRequest$AccountId": "

The accountId that is associated with the budgets that you want to describe.

", "DescribeNotificationsForBudgetRequest$AccountId": "

The accountId that is associated with the budget whose notifications you want descriptions of.

", "DescribeSubscribersForNotificationRequest$AccountId": "

The accountId that is associated with the budget whose subscribers you want descriptions of.

", "ExecuteBudgetActionRequest$AccountId": null, @@ -609,15 +609,20 @@ "DescribeBudgetActionsForAccountRequest$MaxResults": null, "DescribeBudgetActionsForBudgetRequest$MaxResults": null, "DescribeBudgetPerformanceHistoryRequest$MaxResults": null, - "DescribeBudgetsRequest$MaxResults": "

An optional integer that represents how many entries a paginated response contains. The maximum is 100.

", - "DescribeNotificationsForBudgetRequest$MaxResults": "

An optional integer that represents how many entries a paginated response contains. The maximum is 100.

", - "DescribeSubscribersForNotificationRequest$MaxResults": "

An optional integer that represents how many entries a paginated response contains. The maximum is 100.

" + "DescribeNotificationsForBudgetRequest$MaxResults": "

An optional integer that represents how many entries a paginated response contains.

", + "DescribeSubscribersForNotificationRequest$MaxResults": "

An optional integer that represents how many entries a paginated response contains.

" } }, "MaxResultsBudgetNotifications": { "base": null, "refs": { - "DescribeBudgetNotificationsForAccountRequest$MaxResults": "

An integer that shows how many budget name entries a paginated response contains.

" + "DescribeBudgetNotificationsForAccountRequest$MaxResults": "

An integer that represents how many budgets a paginated response contains. The default is 50.

" + } + }, + "MaxResultsDescribeBudgets": { + "base": null, + "refs": { + "DescribeBudgetsRequest$MaxResults": "

An integer that represents how many budgets a paginated response contains. The default is 100.

" } }, "NotFoundException": { @@ -759,7 +764,7 @@ } }, "Spend": { - "base": "

The amount of cost or usage that's measured for a budget.

For example, a Spend for 3 GB of S3 usage has the following parameters:

", + "base": "

The amount of cost or usage that's measured for a budget.

Cost example: A Spend for 3 USD of costs has the following parameters:

Usage example: A Spend for 3 GB of S3 usage has the following parameters:

", "refs": { "Budget$BudgetLimit": "

The total amount of cost, usage, RI utilization, RI coverage, Savings Plans utilization, or Savings Plans coverage that you want to track with your budget.

BudgetLimit is required for cost or usage budgets, but optional for RI or Savings Plans utilization or coverage budgets. RI and Savings Plans utilization or coverage budgets default to 100. This is the only valid value for RI or Savings Plans utilization or coverage budgets. You can't use BudgetLimit with PlannedBudgetLimits for CreateBudget and UpdateBudget actions.

", "BudgetedAndActualAmounts$BudgetedAmount": "

The amount of cost or usage that you created the budget for.

", @@ -851,7 +856,7 @@ "UnitValue": { "base": "

A string that represents the spend unit of a budget. It can't be null or empty.

", "refs": { - "Spend$Unit": "

The unit of measurement that's used for the budget forecast, actual spend, or budget threshold, such as USD or GBP.

" + "Spend$Unit": "

The unit of measurement that's used for the budget forecast, actual spend, or budget threshold.

" } }, "UpdateBudgetActionRequest": { diff --git a/models/apis/ec2/2016-11-15/api-2.json b/models/apis/ec2/2016-11-15/api-2.json index 46632aa6617..fb0385c8b69 100755 --- a/models/apis/ec2/2016-11-15/api-2.json +++ b/models/apis/ec2/2016-11-15/api-2.json @@ -11994,7 +11994,8 @@ "shape":"String", "idempotencyToken":true }, - "DryRun":{"shape":"Boolean"} + "DryRun":{"shape":"Boolean"}, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "CreateVerifiedAccessEndpointResult":{ @@ -12028,7 +12029,8 @@ "shape":"String", "idempotencyToken":true }, - "DryRun":{"shape":"Boolean"} + "DryRun":{"shape":"Boolean"}, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "CreateVerifiedAccessGroupResult":{ @@ -12105,7 +12107,8 @@ "shape":"String", "idempotencyToken":true }, - "DryRun":{"shape":"Boolean"} + "DryRun":{"shape":"Boolean"}, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "CreateVerifiedAccessTrustProviderResult":{ @@ -29095,6 +29098,7 @@ "ed25519" ] }, + "KmsKeyArn":{"type":"string"}, "KmsKeyId":{"type":"string"}, "LastError":{ "type":"structure", @@ -31998,10 +32002,7 @@ }, "ModifyVerifiedAccessEndpointPolicyRequest":{ "type":"structure", - "required":[ - "VerifiedAccessEndpointId", - "PolicyEnabled" - ], + "required":["VerifiedAccessEndpointId"], "members":{ "VerifiedAccessEndpointId":{"shape":"VerifiedAccessEndpointId"}, "PolicyEnabled":{"shape":"Boolean"}, @@ -32010,7 +32011,8 @@ "shape":"String", "idempotencyToken":true }, - "DryRun":{"shape":"Boolean"} + "DryRun":{"shape":"Boolean"}, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "ModifyVerifiedAccessEndpointPolicyResult":{ @@ -32023,6 +32025,10 @@ "PolicyDocument":{ "shape":"String", "locationName":"policyDocument" + }, + "SseSpecification":{ + "shape":"VerifiedAccessSseSpecificationResponse", + "locationName":"sseSpecification" } } }, @@ -32060,10 +32066,7 @@ }, "ModifyVerifiedAccessGroupPolicyRequest":{ "type":"structure", - "required":[ - "VerifiedAccessGroupId", - "PolicyEnabled" - ], + "required":["VerifiedAccessGroupId"], "members":{ "VerifiedAccessGroupId":{"shape":"VerifiedAccessGroupId"}, "PolicyEnabled":{"shape":"Boolean"}, @@ -32072,7 +32075,8 @@ "shape":"String", "idempotencyToken":true }, - "DryRun":{"shape":"Boolean"} + "DryRun":{"shape":"Boolean"}, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "ModifyVerifiedAccessGroupPolicyResult":{ @@ -32085,6 +32089,10 @@ "PolicyDocument":{ "shape":"String", "locationName":"policyDocument" + }, + "SseSpecification":{ + "shape":"VerifiedAccessSseSpecificationResponse", + "locationName":"sseSpecification" } } }, @@ -32181,7 +32189,8 @@ "ClientToken":{ "shape":"String", "idempotencyToken":true - } + }, + "SseSpecification":{"shape":"VerifiedAccessSseSpecificationRequest"} } }, "ModifyVerifiedAccessTrustProviderResult":{ @@ -43488,6 +43497,10 @@ "Tags":{ "shape":"TagList", "locationName":"tagSet" + }, + "SseSpecification":{ + "shape":"VerifiedAccessSseSpecificationResponse", + "locationName":"sseSpecification" } } }, @@ -43635,6 +43648,10 @@ "Tags":{ "shape":"TagList", "locationName":"tagSet" + }, + "SseSpecification":{ + "shape":"VerifiedAccessSseSpecificationResponse", + "locationName":"sseSpecification" } } }, @@ -43861,6 +43878,26 @@ } } }, + "VerifiedAccessSseSpecificationRequest":{ + "type":"structure", + "members":{ + "CustomerManagedKeyEnabled":{"shape":"Boolean"}, + "KmsKeyArn":{"shape":"KmsKeyArn"} + } + }, + "VerifiedAccessSseSpecificationResponse":{ + "type":"structure", + "members":{ + "CustomerManagedKeyEnabled":{ + "shape":"Boolean", + "locationName":"customerManagedKeyEnabled" + }, + "KmsKeyArn":{ + "shape":"KmsKeyArn", + "locationName":"kmsKeyArn" + } + } + }, "VerifiedAccessTrustProvider":{ "type":"structure", "members":{ @@ -43907,6 +43944,10 @@ "Tags":{ "shape":"TagList", "locationName":"tagSet" + }, + "SseSpecification":{ + "shape":"VerifiedAccessSseSpecificationResponse", + "locationName":"sseSpecification" } } }, diff --git a/models/apis/ec2/2016-11-15/docs-2.json b/models/apis/ec2/2016-11-15/docs-2.json index e324908ce55..0a3a38bfd41 100755 --- a/models/apis/ec2/2016-11-15/docs-2.json +++ b/models/apis/ec2/2016-11-15/docs-2.json @@ -2059,7 +2059,7 @@ "CreateVerifiedAccessEndpointRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", "CreateVerifiedAccessGroupRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", "CreateVerifiedAccessInstanceRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", - "CreateVerifiedAccessInstanceRequest$FIPSEnabled": "

Choose to enable or disable support for Federal Information Processing Standards (FIPS) on the instance.

", + "CreateVerifiedAccessInstanceRequest$FIPSEnabled": "

Enable or disable support for Federal Information Processing Standards (FIPS) on the instance.

", "CreateVerifiedAccessTrustProviderRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", "CreateVolumeRequest$Encrypted": "

Indicates whether the volume should be encrypted. The effect of setting the encryption state to true depends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide.

Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types.

", "CreateVolumeRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", @@ -2776,7 +2776,7 @@ "UpdateSecurityGroupRuleDescriptionsEgressResult$Return": "

Returns true if the request succeeds; otherwise, returns an error.

", "UpdateSecurityGroupRuleDescriptionsIngressRequest$DryRun": "

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

", "UpdateSecurityGroupRuleDescriptionsIngressResult$Return": "

Returns true if the request succeeds; otherwise, returns an error.

", - "VerifiedAccessInstance$FipsEnabled": "

Describes if support for Federal Information Processing Standards (FIPS) is enabled on the instance.

", + "VerifiedAccessInstance$FipsEnabled": "

Describes whether support for Federal Information Processing Standards (FIPS) is enabled on the instance.

", "VerifiedAccessLogCloudWatchLogsDestination$Enabled": "

Indicates whether logging is enabled.

", "VerifiedAccessLogCloudWatchLogsDestinationOptions$Enabled": "

Indicates whether logging is enabled.

", "VerifiedAccessLogKinesisDataFirehoseDestination$Enabled": "

Indicates whether logging is enabled.

", @@ -2785,6 +2785,8 @@ "VerifiedAccessLogS3Destination$Enabled": "

Indicates whether logging is enabled.

", "VerifiedAccessLogS3DestinationOptions$Enabled": "

Indicates whether logging is enabled.

", "VerifiedAccessLogs$IncludeTrustContext": "

Describes current setting for including trust data into the logs.

", + "VerifiedAccessSseSpecificationRequest$CustomerManagedKeyEnabled": "

Enable or disable the use of customer managed KMS keys for server side encryption.

Valid values: True | False

", + "VerifiedAccessSseSpecificationResponse$CustomerManagedKeyEnabled": "

Describes the use of customer managed KMS keys for server side encryption.

Valid values: True | False

", "Volume$Encrypted": "

Indicates whether the volume is encrypted.

", "Volume$FastRestored": "

Indicates whether the volume was created using fast snapshot restore.

", "Volume$MultiAttachEnabled": "

Indicates whether Amazon EBS Multi-Attach is enabled.

", @@ -12820,6 +12822,13 @@ "KeyPairInfo$KeyType": "

The type of key pair.

" } }, + "KmsKeyArn": { + "base": null, + "refs": { + "VerifiedAccessSseSpecificationRequest$KmsKeyArn": "

The ARN of the KMS key.

", + "VerifiedAccessSseSpecificationResponse$KmsKeyArn": "

Describes the ARN of the KMS key.

" + } + }, "KmsKeyId": { "base": null, "refs": { @@ -22667,6 +22676,27 @@ "VerifiedAccessInstanceLoggingConfiguration$AccessLogs": "

Details about the logging options.

" } }, + "VerifiedAccessSseSpecificationRequest": { + "base": "

Verified Access provides server side encryption by default to data at rest using Amazon Web Services-owned KMS keys. You also have the option of using customer managed KMS keys, which can be specified using the options below.

", + "refs": { + "CreateVerifiedAccessEndpointRequest$SseSpecification": "

Options for server side encryption.

", + "CreateVerifiedAccessGroupRequest$SseSpecification": "

Options for server side encryption.

", + "CreateVerifiedAccessTrustProviderRequest$SseSpecification": "

Options for server side encryption.

", + "ModifyVerifiedAccessEndpointPolicyRequest$SseSpecification": "

Options for server side encryption.

", + "ModifyVerifiedAccessGroupPolicyRequest$SseSpecification": "

Options for server side encryption.

", + "ModifyVerifiedAccessTrustProviderRequest$SseSpecification": "

Options for server side encryption.

" + } + }, + "VerifiedAccessSseSpecificationResponse": { + "base": "

Describes the options in use for server side encryption.

", + "refs": { + "ModifyVerifiedAccessEndpointPolicyResult$SseSpecification": "

Describes the options in use for server side encryption.

", + "ModifyVerifiedAccessGroupPolicyResult$SseSpecification": "

Describes the options in use for server side encryption.

", + "VerifiedAccessEndpoint$SseSpecification": "

Describes the options in use for server side encryption.

", + "VerifiedAccessGroup$SseSpecification": "

Describes the options in use for server side encryption.

", + "VerifiedAccessTrustProvider$SseSpecification": "

Describes the options in use for server side encryption.

" + } + }, "VerifiedAccessTrustProvider": { "base": "

Describes a Verified Access trust provider.

", "refs": { diff --git a/models/apis/iotfleetwise/2021-06-17/api-2.json b/models/apis/iotfleetwise/2021-06-17/api-2.json index 8d9eb84012e..790c4b6328c 100644 --- a/models/apis/iotfleetwise/2021-06-17/api-2.json +++ b/models/apis/iotfleetwise/2021-06-17/api-2.json @@ -325,6 +325,22 @@ {"shape":"AccessDeniedException"} ] }, + "GetEncryptionConfiguration":{ + "name":"GetEncryptionConfiguration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetEncryptionConfigurationRequest"}, + "output":{"shape":"GetEncryptionConfigurationResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalServerException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"} + ] + }, "GetFleet":{ "name":"GetFleet", "http":{ @@ -679,6 +695,23 @@ {"shape":"AccessDeniedException"} ] }, + "PutEncryptionConfiguration":{ + "name":"PutEncryptionConfiguration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutEncryptionConfigurationRequest"}, + "output":{"shape":"PutEncryptionConfigurationResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalServerException"}, + {"shape":"ConflictException"}, + {"shape":"ThrottlingException"}, + {"shape":"ValidationException"}, + {"shape":"AccessDeniedException"} + ] + }, "PutLoggingOptions":{ "name":"PutLoggingOptions", "http":{ @@ -1469,6 +1502,21 @@ "members":{ } }, + "EncryptionStatus":{ + "type":"string", + "enum":[ + "PENDING", + "SUCCESS", + "FAILURE" + ] + }, + "EncryptionType":{ + "type":"string", + "enum":[ + "KMS_BASED_ENCRYPTION", + "FLEETWISE_DEFAULT_ENCRYPTION" + ] + }, "FleetSummary":{ "type":"structure", "required":[ @@ -1560,6 +1608,26 @@ "lastModificationTime":{"shape":"timestamp"} } }, + "GetEncryptionConfigurationRequest":{ + "type":"structure", + "members":{ + } + }, + "GetEncryptionConfigurationResponse":{ + "type":"structure", + "required":[ + "encryptionStatus", + "encryptionType" + ], + "members":{ + "kmsKeyId":{"shape":"String"}, + "encryptionStatus":{"shape":"EncryptionStatus"}, + "encryptionType":{"shape":"EncryptionType"}, + "errorMessage":{"shape":"errorMessage"}, + "creationTime":{"shape":"timestamp"}, + "lastModificationTime":{"shape":"timestamp"} + } + }, "GetFleetRequest":{ "type":"structure", "required":["fleetId"], @@ -2291,6 +2359,26 @@ "max":50, "min":1 }, + "PutEncryptionConfigurationRequest":{ + "type":"structure", + "required":["encryptionType"], + "members":{ + "kmsKeyId":{"shape":"String"}, + "encryptionType":{"shape":"EncryptionType"} + } + }, + "PutEncryptionConfigurationResponse":{ + "type":"structure", + "required":[ + "encryptionStatus", + "encryptionType" + ], + "members":{ + "kmsKeyId":{"shape":"String"}, + "encryptionStatus":{"shape":"EncryptionStatus"}, + "encryptionType":{"shape":"EncryptionType"} + } + }, "PutLoggingOptionsRequest":{ "type":"structure", "required":["cloudWatchLogDelivery"], diff --git a/models/apis/iotfleetwise/2021-06-17/docs-2.json b/models/apis/iotfleetwise/2021-06-17/docs-2.json index 8b9a636b787..4bf230d2bdc 100644 --- a/models/apis/iotfleetwise/2021-06-17/docs-2.json +++ b/models/apis/iotfleetwise/2021-06-17/docs-2.json @@ -20,6 +20,7 @@ "DisassociateVehicleFleet": "

Removes, or disassociates, a vehicle from a fleet. Disassociating a vehicle from a fleet doesn't delete the vehicle.

If the vehicle is successfully dissociated from a fleet, Amazon Web Services IoT FleetWise sends back an HTTP 200 response with an empty body.

", "GetCampaign": "

Retrieves information about a campaign.

", "GetDecoderManifest": "

Retrieves information about a created decoder manifest.

", + "GetEncryptionConfiguration": "

Retrieves the encryption configuration for resources and data in Amazon Web Services IoT FleetWise.

", "GetFleet": "

Retrieves information about a fleet.

", "GetLoggingOptions": "

Retrieves the logging options.

", "GetModelManifest": "

Retrieves information about a vehicle model (model manifest).

", @@ -42,6 +43,7 @@ "ListTagsForResource": "

Lists the tags (metadata) you have assigned to the resource.

", "ListVehicles": "

Retrieves a list of summaries of created vehicles.

This API operation uses pagination. Specify the nextToken parameter in the request to return more results.

", "ListVehiclesInFleet": "

Retrieves a list of summaries of all vehicles associated with a fleet.

This API operation uses pagination. Specify the nextToken parameter in the request to return more results.

", + "PutEncryptionConfiguration": "

Creates or updates the encryption configuration. Amazon Web Services IoT FleetWise can encrypt your data and resources using an Amazon Web Services managed key. Or, you can use a KMS key that you own and manage. For more information, see Data encryption in the Amazon Web Services IoT FleetWise Developer Guide.

", "PutLoggingOptions": "

Creates or updates the logging option.

", "RegisterAccount": "

This API operation contains deprecated parameters. Register your account again without the Timestream resources parameter so that Amazon Web Services IoT FleetWise can remove the Timestream metadata stored. You should then pass the data destination into the CreateCampaign API operation.

You must delete any existing campaigns that include an empty data destination before you register your account again. For more information, see the DeleteCampaign API operation.

If you want to delete the Timestream inline policy from the service-linked role, such as to mitigate an overly permissive policy, you must first delete any existing campaigns. Then delete the service-linked role and register your account again to enable CloudWatch metrics. For more information, see DeleteServiceLinkedRole in the Identity and Access Management API Reference.

 <p>Registers your Amazon Web Services account, IAM, and Amazon Timestream resources so Amazon Web Services IoT FleetWise can transfer your vehicle data to the Amazon Web Services Cloud. For more information, including step-by-step procedures, see <a href="https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/setting-up.html">Setting up Amazon Web Services IoT FleetWise</a>. </p> <note> <p>An Amazon Web Services account is <b>not</b> the same thing as a "user." An <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/introduction_identity-management.html#intro-identity-users">Amazon Web Services user</a> is an identity that you create using Identity and Access Management (IAM) and takes the form of either an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html">IAM user</a> or an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html">IAM role, both with credentials</a>. A single Amazon Web Services account can, and typically does, contain many users and roles.</p> </note> 
", "TagResource": "

Adds to or modifies the tags of the given resource. Tags are metadata which can be used to manage a resource.

", @@ -284,7 +286,7 @@ "DataDestinationConfigs": { "base": null, "refs": { - "CreateCampaignRequest$dataDestinationConfigs": "

The destination where the campaign sends data. You can choose to send data to be stored in Amazon S3 or Amazon Timestream.

Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics.

You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.

", + "CreateCampaignRequest$dataDestinationConfigs": "

The destination where the campaign sends data. You can choose to send data to be stored in Amazon S3 or Amazon Timestream.

Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services IoT FleetWise servers for redundancy and high availability.

You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.

", "GetCampaignResponse$dataDestinationConfigs": "

The destination where the campaign sends data. You can choose to send data to be stored in Amazon S3 or Amazon Timestream.

Amazon S3 optimizes the cost of data storage and provides additional mechanisms to use vehicle data, such as data lakes, centralized data storage, data processing pipelines, and analytics.

You can use Amazon Timestream to access and analyze time series data, and Timestream to query vehicle data so that you can identify trends and patterns.

" } }, @@ -390,6 +392,21 @@ "refs": { } }, + "EncryptionStatus": { + "base": null, + "refs": { + "GetEncryptionConfigurationResponse$encryptionStatus": "

The encryption status.

", + "PutEncryptionConfigurationResponse$encryptionStatus": "

The encryption status.

" + } + }, + "EncryptionType": { + "base": null, + "refs": { + "GetEncryptionConfigurationResponse$encryptionType": "

The type of encryption. Set to KMS_BASED_ENCRYPTION to use an KMS key that you own and manage. Set to FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.

", + "PutEncryptionConfigurationRequest$encryptionType": "

The type of encryption. Choose KMS_BASED_ENCRYPTION to use a KMS key or FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon Web Services managed key.

", + "PutEncryptionConfigurationResponse$encryptionType": "

The type of encryption. Set to KMS_BASED_ENCRYPTION to use an KMS key that you own and manage. Set to FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon Web Services managed key that is owned by the Amazon Web Services IoT FleetWise service account.

" + } + }, "FleetSummary": { "base": "

Information about a fleet.

You can use the API operation to return this information about multiple fleets.

", "refs": { @@ -437,6 +454,16 @@ "refs": { } }, + "GetEncryptionConfigurationRequest": { + "base": null, + "refs": { + } + }, + "GetEncryptionConfigurationResponse": { + "base": null, + "refs": { + } + }, "GetFleetRequest": { "base": null, "refs": { @@ -929,6 +956,16 @@ "CanInterface$protocolVersion": "

The version of the communication protocol for the interface.

" } }, + "PutEncryptionConfigurationRequest": { + "base": null, + "refs": { + } + }, + "PutEncryptionConfigurationResponse": { + "base": null, + "refs": { + } + }, "PutLoggingOptionsRequest": { "base": null, "refs": { @@ -1051,6 +1088,9 @@ "base": null, "refs": { "FormattedVss$vssJson": "

Provides the VSS in JSON format.

", + "GetEncryptionConfigurationResponse$kmsKeyId": "

The ID of the KMS key that is used for encryption.

", + "PutEncryptionConfigurationRequest$kmsKeyId": "

The ID of the KMS key that is used for encryption.

", + "PutEncryptionConfigurationResponse$kmsKeyId": "

The ID of the KMS key that is used for encryption.

", "ValidationExceptionField$name": "

The name of the parameter field with the validation error.

", "ValidationExceptionField$message": "

A message about the validation error.

" } @@ -1524,6 +1564,7 @@ "errorMessage": { "base": null, "refs": { + "GetEncryptionConfigurationResponse$errorMessage": "

The error message that describes why encryption settings couldn't be configured, if applicable.

", "IamRegistrationResponse$errorMessage": "

A message associated with a registration error.

", "TimestreamRegistrationResponse$errorMessage": "

A message associated with a registration error.

" } @@ -1808,6 +1849,8 @@ "GetCampaignResponse$lastModificationTime": "

The last time the campaign was modified.

", "GetDecoderManifestResponse$creationTime": "

The time the decoder manifest was created in seconds since epoch (January 1, 1970 at midnight UTC time).

", "GetDecoderManifestResponse$lastModificationTime": "

The time the decoder manifest was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).

", + "GetEncryptionConfigurationResponse$creationTime": "

The time when encryption was configured in seconds since epoch (January 1, 1970 at midnight UTC time).

", + "GetEncryptionConfigurationResponse$lastModificationTime": "

The time when encryption was last updated in seconds since epoch (January 1, 1970 at midnight UTC time).

", "GetFleetResponse$creationTime": "

The time the fleet was created in seconds since epoch (January 1, 1970 at midnight UTC time).

", "GetFleetResponse$lastModificationTime": "

The time the fleet was last updated, in seconds since epoch (January 1, 1970 at midnight UTC time).

", "GetModelManifestResponse$creationTime": "

The time the vehicle model was created, in seconds since epoch (January 1, 1970 at midnight UTC time).

", diff --git a/models/apis/iotfleetwise/2021-06-17/endpoint-rule-set-1.json b/models/apis/iotfleetwise/2021-06-17/endpoint-rule-set-1.json index 430fc0498bd..0daee2ea366 100644 --- a/models/apis/iotfleetwise/2021-06-17/endpoint-rule-set-1.json +++ b/models/apis/iotfleetwise/2021-06-17/endpoint-rule-set-1.json @@ -58,52 +58,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -111,13 +115,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -127,224 +140,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://iotfleetwise-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, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://iotfleetwise-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, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://iotfleetwise.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://iotfleetwise.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://iotfleetwise.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://iotfleetwise.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] } \ No newline at end of file diff --git a/models/apis/sagemaker-featurestore-runtime/2020-07-01/api-2.json b/models/apis/sagemaker-featurestore-runtime/2020-07-01/api-2.json index 49001e52526..aa826dc2ad4 100644 --- a/models/apis/sagemaker-featurestore-runtime/2020-07-01/api-2.json +++ b/models/apis/sagemaker-featurestore-runtime/2020-07-01/api-2.json @@ -229,13 +229,11 @@ }, "FeatureValue":{ "type":"structure", - "required":[ - "FeatureName", - "ValueAsString" - ], + "required":["FeatureName"], "members":{ "FeatureName":{"shape":"FeatureName"}, - "ValueAsString":{"shape":"ValueAsString"} + "ValueAsString":{"shape":"ValueAsString"}, + "ValueAsStringList":{"shape":"ValueAsStringList"} } }, "GetRecordRequest":{ @@ -390,6 +388,12 @@ "type":"string", "max":358400, "pattern":".*" + }, + "ValueAsStringList":{ + "type":"list", + "member":{"shape":"ValueAsString"}, + "max":358400, + "min":0 } } } diff --git a/models/apis/sagemaker-featurestore-runtime/2020-07-01/docs-2.json b/models/apis/sagemaker-featurestore-runtime/2020-07-01/docs-2.json index c2c50ef6fb5..674a16c9e1f 100644 --- a/models/apis/sagemaker-featurestore-runtime/2020-07-01/docs-2.json +++ b/models/apis/sagemaker-featurestore-runtime/2020-07-01/docs-2.json @@ -221,9 +221,16 @@ "BatchGetRecordResultDetail$RecordIdentifierValueAsString": "

The value of the record identifier in string format.

", "DeleteRecordRequest$RecordIdentifierValueAsString": "

The value for the RecordIdentifier that uniquely identifies the record, in string format.

", "DeleteRecordRequest$EventTime": "

Timestamp indicating when the deletion event occurred. EventTime can be used to query data at a certain point in time.

", - "FeatureValue$ValueAsString": "

The value associated with a feature, in string format. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

", + "FeatureValue$ValueAsString": "

The value in string format associated with a feature. Used when your CollectionType is None. Note that features types can be String, Integral, or Fractional. This value represents all three types as a string.

", "GetRecordRequest$RecordIdentifierValueAsString": "

The value that corresponds to RecordIdentifier type and uniquely identifies the record in the FeatureGroup.

", - "RecordIdentifiers$member": null + "RecordIdentifiers$member": null, + "ValueAsStringList$member": null + } + }, + "ValueAsStringList": { + "base": null, + "refs": { + "FeatureValue$ValueAsStringList": "

The list of values in string format associated with a feature. Used when your CollectionType is a List, Set, or Vector. Note that features types can be String, Integral, or Fractional. These values represents all three types as a string.

" } } } diff --git a/models/apis/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json b/models/apis/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json index dce3ebae102..82741fc74cc 100644 --- a/models/apis/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json +++ b/models/apis/sagemaker-featurestore-runtime/2020-07-01/endpoint-rule-set-1.json @@ -58,52 +58,56 @@ "type": "error" }, { - "conditions": [], - "type": "tree", - "rules": [ + "conditions": [ { - "conditions": [ + "fn": "booleanEquals", + "argv": [ { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" + "ref": "UseDualStack" }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" + true + ] } - ] + ], + "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", + "type": "error" + }, + { + "conditions": [], + "endpoint": { + "url": { + "ref": "Endpoint" + }, + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] }, { - "conditions": [], + "conditions": [ + { + "fn": "isSet", + "argv": [ + { + "ref": "Region" + } + ] + } + ], "type": "tree", "rules": [ { "conditions": [ { - "fn": "isSet", + "fn": "aws.partition", "argv": [ { "ref": "Region" } - ] + ], + "assign": "PartitionResult" } ], "type": "tree", @@ -111,13 +115,22 @@ { "conditions": [ { - "fn": "aws.partition", + "fn": "booleanEquals", "argv": [ { - "ref": "Region" - } - ], - "assign": "PartitionResult" + "ref": "UseFIPS" + }, + true + ] + }, + { + "fn": "booleanEquals", + "argv": [ + { + "ref": "UseDualStack" + }, + true + ] } ], "type": "tree", @@ -127,224 +140,175 @@ { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseFIPS" - }, - true + "fn": "getAttr", + "argv": [ + { + "ref": "PartitionResult" + }, + "supportsFIPS" + ] + } ] }, { "fn": "booleanEquals", "argv": [ + true, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" + "endpoint": { + "url": "https://featurestore-runtime.sagemaker-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, { - "ref": "UseFIPS" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsFIPS" ] } ] - }, + } + ], + "type": "tree", + "rules": [ { "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" + "endpoint": { + "url": "https://featurestore-runtime.sagemaker-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, { - "ref": "UseDualStack" - }, - true - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", + "fn": "getAttr", "argv": [ - true, { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "type": "tree", - "rules": [ - { - "conditions": [], - "type": "tree", - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } + "ref": "PartitionResult" + }, + "supportsDualStack" ] } ] - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" } - ] - }, - { - "conditions": [], + ], "type": "tree", "rules": [ { "conditions": [], "endpoint": { - "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dualStackDnsSuffix}", "properties": {}, "headers": {} }, "type": "endpoint" } ] + }, + { + "conditions": [], + "error": "DualStack is enabled but this partition does not support DualStack", + "type": "error" } ] + }, + { + "conditions": [], + "endpoint": { + "url": "https://featurestore-runtime.sagemaker.{Region}.{PartitionResult#dnsSuffix}", + "properties": {}, + "headers": {} + }, + "type": "endpoint" } ] - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" } ] + }, + { + "conditions": [], + "error": "Invalid Configuration: Missing Region", + "type": "error" } ] } \ No newline at end of file diff --git a/models/apis/sagemaker/2017-07-24/api-2.json b/models/apis/sagemaker/2017-07-24/api-2.json index 32b63a2338d..7f0d1e9ba3e 100644 --- a/models/apis/sagemaker/2017-07-24/api-2.json +++ b/models/apis/sagemaker/2017-07-24/api-2.json @@ -5374,6 +5374,13 @@ "min":1, "pattern":"[\\w-]+_[0-9a-zA-Z]+" }, + "CollectionConfig":{ + "type":"structure", + "members":{ + "VectorConfig":{"shape":"VectorConfig"} + }, + "union":true + }, "CollectionConfiguration":{ "type":"structure", "members":{ @@ -5400,6 +5407,14 @@ "max":20, "min":0 }, + "CollectionType":{ + "type":"string", + "enum":[ + "List", + "Set", + "Vector" + ] + }, "CompilationJobArn":{ "type":"string", "max":256, @@ -9707,6 +9722,11 @@ "type":"list", "member":{"shape":"Device"} }, + "Dimension":{ + "type":"integer", + "max":8192, + "min":1 + }, "DirectInternetAccess":{ "type":"string", "enum":[ @@ -10541,7 +10561,9 @@ "type":"structure", "members":{ "FeatureName":{"shape":"FeatureName"}, - "FeatureType":{"shape":"FeatureType"} + "FeatureType":{"shape":"FeatureType"}, + "CollectionType":{"shape":"CollectionType"}, + "CollectionConfig":{"shape":"CollectionConfig"} } }, "FeatureDefinitions":{ @@ -16386,7 +16408,8 @@ "members":{ "SecurityConfig":{"shape":"OnlineStoreSecurityConfig"}, "EnableOnlineStore":{"shape":"Boolean"}, - "TtlDuration":{"shape":"TtlDuration"} + "TtlDuration":{"shape":"TtlDuration"}, + "StorageType":{"shape":"StorageType"} } }, "OnlineStoreConfigUpdate":{ @@ -19373,6 +19396,13 @@ "MaxWaitTimeInSeconds":{"shape":"MaxWaitTimeInSeconds"} } }, + "StorageType":{ + "type":"string", + "enum":[ + "Standard", + "InMemory" + ] + }, "String":{"type":"string"}, "String1024":{ "type":"string", @@ -21352,6 +21382,13 @@ "type":"float", "min":0 }, + "VectorConfig":{ + "type":"structure", + "required":["Dimension"], + "members":{ + "Dimension":{"shape":"Dimension"} + } + }, "VendorGuidance":{ "type":"string", "enum":[ diff --git a/models/apis/sagemaker/2017-07-24/docs-2.json b/models/apis/sagemaker/2017-07-24/docs-2.json index bc4df109a80..8e99ebb278d 100644 --- a/models/apis/sagemaker/2017-07-24/docs-2.json +++ b/models/apis/sagemaker/2017-07-24/docs-2.json @@ -11,8 +11,8 @@ "CreateApp": "

Creates a running app for the specified UserProfile. This operation is automatically invoked by Amazon SageMaker Studio upon access to the associated Domain, and when new kernel configurations are selected by the user. A user may have multiple Apps active simultaneously.

", "CreateAppImageConfig": "

Creates a configuration for running a SageMaker image as a KernelGateway app. The configuration specifies the Amazon Elastic File System (EFS) storage volume on the image, and a list of the kernels in the image.

", "CreateArtifact": "

Creates an artifact. An artifact is a lineage tracking entity that represents a URI addressable object or data. Some examples are the S3 URI of a dataset and the ECR registry path of an image. For more information, see Amazon SageMaker ML Lineage Tracking.

", - "CreateAutoMLJob": "

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.

We recommend using the new versions CreateAutoMLJobV2 and DescribeAutoMLJobV2, which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as non-tabular problem types such as image or text classification.

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

You can find the best-performing model after you run an AutoML job by calling DescribeAutoMLJobV2 (recommended) or DescribeAutoMLJob.

", - "CreateAutoMLJobV2": "

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job V2.

CreateAutoMLJobV2 and DescribeAutoMLJobV2 are new versions of CreateAutoMLJob and DescribeAutoMLJob which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as non-tabular problem types such as image or text classification.

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

For the list of available problem types supported by CreateAutoMLJobV2, see AutoMLProblemTypeConfig.

You can find the best-performing model after you run an AutoML job V2 by calling DescribeAutoMLJobV2.

", + "CreateAutoMLJob": "

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job.

We recommend using the new versions CreateAutoMLJobV2 and DescribeAutoMLJobV2, which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as time-series forecasting, and non-tabular problem types such as image or text classification.

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

You can find the best-performing model after you run an AutoML job by calling DescribeAutoMLJobV2 (recommended) or DescribeAutoMLJob.

", + "CreateAutoMLJobV2": "

Creates an Autopilot job also referred to as Autopilot experiment or AutoML job V2.

CreateAutoMLJobV2 and DescribeAutoMLJobV2 are new versions of CreateAutoMLJob and DescribeAutoMLJob which offer backward compatibility.

CreateAutoMLJobV2 can manage tabular problem types identical to those of its previous version CreateAutoMLJob, as well as time-series forecasting, and non-tabular problem types such as image or text classification.

Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 in Migrate a CreateAutoMLJob to CreateAutoMLJobV2.

For the list of available problem types supported by CreateAutoMLJobV2, see AutoMLProblemTypeConfig.

You can find the best-performing model after you run an AutoML job V2 by calling DescribeAutoMLJobV2.

", "CreateCodeRepository": "

Creates a Git repository as a resource in your SageMaker account. You can associate the repository with notebook instances so that you can use Git source control for the notebooks you create. The Git repository is a resource in your SageMaker account, so it can be associated with more than one notebook instance, and it persists independently from the lifecycle of any notebook instances it is associated with.

The repository can be hosted either in Amazon Web Services CodeCommit or in any other Git repository.

", "CreateCompilationJob": "

Starts a model compilation job. After the model has been compiled, Amazon SageMaker saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource.

In the request body, you provide the following:

You can also provide a Tag to track the model compilation job's resource use and costs. The response body contains the CompilationJobArn for the compiled job.

To stop a model compilation job, use StopCompilationJob. To get information about a particular model compilation job, use DescribeCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.

", "CreateContext": "

Creates a context. A context is a lineage tracking entity that represents a logical grouping of other tracking or experiment entities. Some examples are an endpoint and a model package. For more information, see Amazon SageMaker ML Lineage Tracking.

", @@ -1423,7 +1423,7 @@ "Model$EnableNetworkIsolation": "

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

", "ModelDashboardIndicatorAction$Enabled": "

Indicates whether the alert action is turned on.

", "MonitoringCsvDatasetFormat$Header": "

Indicates if the CSV data has a header.

", - "MonitoringJsonDatasetFormat$Line": "

Indicates if the file should be read as a json object per line.

", + "MonitoringJsonDatasetFormat$Line": "

Indicates if the file should be read as a JSON object per line.

", "MonitoringNetworkConfig$EnableInterContainerTrafficEncryption": "

Whether to encrypt all communications between the instances used for the monitoring jobs. Choose True to encrypt communications. Encryption provides greater security for distributed jobs, but the processing might take longer.

", "MonitoringNetworkConfig$EnableNetworkIsolation": "

Whether to allow inbound and outbound network calls to and from the containers used for the monitoring job.

", "NetworkConfig$EnableInterContainerTrafficEncryption": "

Whether to encrypt all communications between distributed processing jobs. Choose True to encrypt communications. Encryption provides greater security for distributed processing jobs, but the processing might take longer.

", @@ -1575,7 +1575,7 @@ } }, "CaptureContentTypeHeader": { - "base": "

Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.

", + "base": "

Configuration specifying how to treat different headers. If no headers are specified Amazon SageMaker will by default base64 encode when capturing the data.

", "refs": { "DataCaptureConfig$CaptureContentTypeHeader": "

Configuration specifying how to treat different headers. If no headers are specified SageMaker will by default base64 encode when capturing the data.

", "InferenceExperimentDataStorageConfig$ContentType": null @@ -1988,6 +1988,12 @@ "CognitoMemberDefinition$UserPool": "

An identifier for a user pool. The user pool must be in the same region as the service that you are calling.

" } }, + "CollectionConfig": { + "base": "

Configuration for your collection.

", + "refs": { + "FeatureDefinition$CollectionConfig": "

Configuration for your collection.

" + } + }, "CollectionConfiguration": { "base": "

Configuration information for the Amazon SageMaker Debugger output tensor collections.

", "refs": { @@ -2012,6 +2018,12 @@ "CollectionConfiguration$CollectionParameters": "

Parameter values for the tensor collection. The allowed parameters are \"name\", \"include_regex\", \"reduction_config\", \"save_config\", \"tensor_names\", and \"save_histogram\".

" } }, + "CollectionType": { + "base": null, + "refs": { + "FeatureDefinition$CollectionType": "

A grouping of elements where each element within the collection must have the same feature type (String, Integral, or Fractional).

" + } + }, "CompilationJobArn": { "base": null, "refs": { @@ -2274,7 +2286,7 @@ "CountryCode": { "base": null, "refs": { - "HolidayConfigAttributes$CountryCode": "

The country code for the holiday calendar.

For the list of public holiday calendars supported by AutoML job V2, see Country Codes. Use the country code corresponding to the country of your choice.

" + "HolidayConfigAttributes$CountryCode": "

The country code for the holiday calendar.

For the list of public holiday calendars supported by AutoML job V2, see Country Codes. Use the country code corresponding to the country of your choice.

" } }, "CreateActionRequest": { @@ -2871,7 +2883,7 @@ "CsvContentTypes": { "base": null, "refs": { - "CaptureContentTypeHeader$CsvContentTypes": "

The list of all content type headers that SageMaker will treat as CSV and capture accordingly.

" + "CaptureContentTypeHeader$CsvContentTypes": "

The list of all content type headers that Amazon SageMaker will treat as CSV and capture accordingly.

" } }, "CustomImage": { @@ -4204,6 +4216,12 @@ "UpdateDevicesRequest$Devices": "

List of devices to register with Edge Manager agent.

" } }, + "Dimension": { + "base": null, + "refs": { + "VectorConfig$Dimension": "

The number of elements in your vector.

" + } + }, "DirectInternetAccess": { "base": null, "refs": { @@ -5835,7 +5853,7 @@ "HolidayConfig": { "base": null, "refs": { - "TimeSeriesForecastingJobConfig$HolidayConfig": "

The collection of holidays featurization attributes used to incorporate national holiday information into your forecasting model.

" + "TimeSeriesForecastingJobConfig$HolidayConfig": "

The collection of holiday featurization attributes used to incorporate national holiday information into your forecasting model.

" } }, "HolidayConfigAttributes": { @@ -7162,7 +7180,7 @@ "CreateEndpointConfigInput$KmsKeyId": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint.

The KmsKeyId can be any of the following formats:

The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMS

Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. You can't request a KmsKeyId when using an instance type with local storage. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, do not specify a value for the KmsKeyId parameter. If you specify a value for KmsKeyId when using any nitro-based instances with local storage, the call to CreateEndpointConfig fails.

For a list of instance types that support local instance storage, see Instance Store Volumes.

For more information about local instance storage encryption, see SSD Instance Store Volumes.

", "CreateInferenceExperimentRequest$KmsKey": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKey can be any of the following formats:

If you use a KMS key ID or an alias of your KMS key, the Amazon SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. Amazon SageMaker uses server-side encryption with KMS managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to \"aws:kms\". For more information, see KMS managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint and UpdateEndpoint requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide.

", "CreateNotebookInstanceInput$KmsKeyId": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to your notebook instance. The KMS key you provide must be enabled. For information, see Enabling and Disabling Keys in the Amazon Web Services Key Management Service Developer Guide.

", - "DataCaptureConfig$KmsKeyId": "

The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt the captured data at rest using Amazon S3 server-side encryption.

The KmsKeyId can be any of the following formats:

", + "DataCaptureConfig$KmsKeyId": "

The Amazon Resource Name (ARN) of an Key Management Service key that SageMaker uses to encrypt the captured data at rest using Amazon S3 server-side encryption.

The KmsKeyId can be any of the following formats:

", "DataCaptureConfigSummary$KmsKeyId": "

The KMS key being used to encrypt the data in Amazon S3.

", "DescribeDomainResponse$HomeEfsFileSystemKmsKeyId": "

Use KmsKeyId.

", "DescribeDomainResponse$KmsKeyId": "

The Amazon Web Services KMS customer managed key used to encrypt the EFS volume attached to the domain.

", @@ -7177,8 +7195,8 @@ "LabelingJobOutputConfig$KmsKeyId": "

The Amazon Web Services Key Management Service ID of the key used to encrypt the output data, if any.

If you provide your own KMS key ID, you must add the required permissions to your KMS key described in Encrypt Output Data and Storage Volume with Amazon Web Services KMS.

If you don't provide a KMS key ID, Amazon SageMaker uses the default Amazon Web Services KMS key for Amazon S3 for your role's account to encrypt your output data.

If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to \"aws:kms\". For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

", "LabelingJobResourceConfig$VolumeKmsKeyId": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the training and inference jobs used for automated data labeling.

You can only specify a VolumeKmsKeyId when you create a labeling job with automated data labeling enabled using the API operation CreateLabelingJob. You cannot specify an Amazon Web Services KMS key to encrypt the storage volume used for automated data labeling model training and inference when you create a labeling job using the console. To learn more, see Output Data and Storage Volume Encryption.

The VolumeKmsKeyId can be any of the following formats:

", "ModelCardSecurityConfig$KmsKeyId": "

A Key Management Service key ID to use for encrypting a model card.

", - "MonitoringClusterConfig$VolumeKmsKeyId": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the model monitoring job.

", - "MonitoringOutputConfig$KmsKeyId": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

", + "MonitoringClusterConfig$VolumeKmsKeyId": "

The Key Management Service (KMS) key that Amazon SageMaker uses to encrypt data on the storage volume attached to the ML compute instance(s) that run the model monitoring job.

", + "MonitoringOutputConfig$KmsKeyId": "

The Key Management Service (KMS) key that Amazon SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption.

", "OnlineStoreSecurityConfig$KmsKeyId": "

The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.

The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId:

The caller (either user or IAM role) to all DataPlane operations (PutRecord, GetRecord, DeleteRecord) must have the following permissions to the KmsKeyId:

", "OutputConfig$KmsKeyId": "

The Amazon Web Services Key Management Service key (Amazon Web Services KMS) that Amazon SageMaker uses to encrypt your output models with Amazon S3 server-side encryption after compilation job. If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

The KmsKeyId can be any of the following formats:

", "OutputDataConfig$KmsKeyId": "

The Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker uses to encrypt the model artifacts at rest using Amazon S3 server-side encryption. The KmsKeyId can be any of the following formats:

If you use a KMS key ID or an alias of your KMS key, the SageMaker execution role must include permissions to call kms:Encrypt. If you don't provide a KMS key ID, SageMaker uses the default KMS key for Amazon S3 for your role's account. SageMaker uses server-side encryption with KMS-managed keys for OutputDataConfig. If you use a bucket policy with an s3:PutObject permission that only allows objects with server-side encryption, set the condition key of s3:x-amz-server-side-encryption to \"aws:kms\". For more information, see KMS-Managed Encryption Keys in the Amazon Simple Storage Service Developer Guide.

The KMS key policy must grant permission to the IAM role that you specify in your CreateTrainingJob, CreateTransformJob, or CreateHyperParameterTuningJob requests. For more information, see Using Key Policies in Amazon Web Services KMS in the Amazon Web Services Key Management Service Developer Guide.

", @@ -9279,7 +9297,7 @@ } }, "ModelQualityJobInput": { - "base": "

The input for the model quality monitoring job. Currently endponts are supported for input for model quality monitoring jobs.

", + "base": "

The input for the model quality monitoring job. Currently endpoints are supported for input for model quality monitoring jobs.

", "refs": { "CreateModelQualityJobDefinitionRequest$ModelQualityJobInput": "

A list of the inputs that are monitored. Currently endpoints are supported.

", "DescribeModelQualityJobDefinitionResponse$ModelQualityJobInput": "

Inputs for the model quality job.

" @@ -9505,7 +9523,7 @@ "MonitoringExecutionSortKey": { "base": null, "refs": { - "ListMonitoringExecutionsRequest$SortBy": "

Whether to sort results by Status, CreationTime, ScheduledTime field. The default is CreationTime.

" + "ListMonitoringExecutionsRequest$SortBy": "

Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime.

" } }, "MonitoringExecutionSummary": { @@ -9655,7 +9673,7 @@ "DescribeModelBiasJobDefinitionResponse$ModelBiasJobOutputConfig": null, "DescribeModelExplainabilityJobDefinitionResponse$ModelExplainabilityJobOutputConfig": null, "DescribeModelQualityJobDefinitionResponse$ModelQualityJobOutputConfig": null, - "MonitoringJobDefinition$MonitoringOutputConfig": "

The array of outputs from the monitoring job to be uploaded to Amazon Simple Storage Service (Amazon S3).

" + "MonitoringJobDefinition$MonitoringOutputConfig": "

The array of outputs from the monitoring job to be uploaded to Amazon S3.

" } }, "MonitoringOutputs": { @@ -9763,7 +9781,7 @@ "MonitoringScheduleSortKey": { "base": null, "refs": { - "ListMonitoringSchedulesRequest$SortBy": "

Whether to sort results by Status, CreationTime, ScheduledTime field. The default is CreationTime.

" + "ListMonitoringSchedulesRequest$SortBy": "

Whether to sort the results by the Status, CreationTime, or ScheduledTime field. The default is CreationTime.

" } }, "MonitoringScheduleSummary": { @@ -9996,7 +10014,7 @@ "ListLineageGroupsRequest$NextToken": "

If the response is truncated, SageMaker returns this token. To retrieve the next set of algorithms, use it in the subsequent request.

", "ListLineageGroupsResponse$NextToken": "

If the response is truncated, SageMaker returns this token. To retrieve the next set of algorithms, use it in the subsequent request.

", "ListModelBiasJobDefinitionsRequest$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", - "ListModelBiasJobDefinitionsResponse$NextToken": "

If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of jobs, use it in the subsequent request.

", + "ListModelBiasJobDefinitionsResponse$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", "ListModelCardExportJobsRequest$NextToken": "

If the response to a previous ListModelCardExportJobs request was truncated, the response includes a NextToken. To retrieve the next set of model card export jobs, use the token in the next request.

", "ListModelCardExportJobsResponse$NextToken": "

If the response is truncated, SageMaker returns this token. To retrieve the next set of model card export jobs, use it in the subsequent request.

", "ListModelCardVersionsRequest$NextToken": "

If the response to a previous ListModelCardVersions request was truncated, the response includes a NextToken. To retrieve the next set of model card versions, use the token in the next request.

", @@ -10004,7 +10022,7 @@ "ListModelCardsRequest$NextToken": "

If the response to a previous ListModelCards request was truncated, the response includes a NextToken. To retrieve the next set of model cards, use the token in the next request.

", "ListModelCardsResponse$NextToken": "

If the response is truncated, SageMaker returns this token. To retrieve the next set of model cards, use it in the subsequent request.

", "ListModelExplainabilityJobDefinitionsRequest$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", - "ListModelExplainabilityJobDefinitionsResponse$NextToken": "

If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of jobs, use it in the subsequent request.

", + "ListModelExplainabilityJobDefinitionsResponse$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", "ListModelMetadataRequest$NextToken": "

If the response to a previous ListModelMetadataResponse request was truncated, the response includes a NextToken. To retrieve the next set of model metadata, use the token in the next request.

", "ListModelMetadataResponse$NextToken": "

A token for getting the next set of recommendations, if there are any.

", "ListModelPackageGroupsInput$NextToken": "

If the result of the previous ListModelPackageGroups request was truncated, the response includes a NextToken. To retrieve the next set of model groups, use the token in the next request.

", @@ -10018,9 +10036,9 @@ "ListMonitoringAlertsRequest$NextToken": "

If the result of the previous ListMonitoringAlerts request was truncated, the response includes a NextToken. To retrieve the next set of alerts in the history, use the token in the next request.

", "ListMonitoringAlertsResponse$NextToken": "

If the response is truncated, SageMaker returns this token. To retrieve the next set of alerts, use it in the subsequent request.

", "ListMonitoringExecutionsRequest$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", - "ListMonitoringExecutionsResponse$NextToken": "

If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of jobs, use it in the subsequent reques

", + "ListMonitoringExecutionsResponse$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", "ListMonitoringSchedulesRequest$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", - "ListMonitoringSchedulesResponse$NextToken": "

If the response is truncated, Amazon SageMaker returns this token. To retrieve the next set of jobs, use it in the subsequent request.

", + "ListMonitoringSchedulesResponse$NextToken": "

The token returned if the response is truncated. To retrieve the next set of job executions, use it in the next request.

", "ListNotebookInstanceLifecycleConfigsInput$NextToken": "

If the result of a ListNotebookInstanceLifecycleConfigs request was truncated, the response includes a NextToken. To get the next set of lifecycle configurations, use the token in the next request.

", "ListNotebookInstanceLifecycleConfigsOutput$NextToken": "

If the response is truncated, SageMaker returns this token. To get the next set of lifecycle configurations, use it in the next request.

", "ListNotebookInstancesInput$NextToken": "

If the previous call to the ListNotebookInstances is truncated, the response includes a NextToken. You can use this token in your subsequent ListNotebookInstances request to fetch the next set of notebook instances.

You might specify a filter or a sort order in your request. When response is truncated, you must use the same values for the filer and sort order in the next request.

", @@ -11030,7 +11048,7 @@ "base": null, "refs": { "BatchTransformInput$S3DataDistributionType": "

Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defaults to FullyReplicated

", - "EndpointInput$S3DataDistributionType": "

Whether input data distributed in Amazon S3 is fully replicated or sharded by an S3 key. Defaults to FullyReplicated

", + "EndpointInput$S3DataDistributionType": "

Whether input data distributed in Amazon S3 is fully replicated or sharded by an Amazon S3 key. Defaults to FullyReplicated

", "ProcessingS3Input$S3DataDistributionType": "

Whether to distribute the data from Amazon S3 to all processing instances with FullyReplicated, or whether the data from Amazon S3 is shared by Amazon S3 key, downloading one shard of data to each processing instance.

" } }, @@ -12085,8 +12103,8 @@ "DescribeInferenceExperimentResponse$RoleArn": "

The ARN of the IAM role that Amazon SageMaker can assume to access model artifacts and container images, and manage Amazon SageMaker Inference endpoints for model deployment.

", "DescribeInferenceRecommendationsJobResponse$RoleArn": "

The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role you provided when you initiated the job.

", "DescribeLabelingJobResponse$RoleArn": "

The Amazon Resource Name (ARN) that SageMaker assumes to perform tasks on your behalf during data labeling.

", - "DescribeModelBiasJobDefinitionResponse$RoleArn": "

The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that has read permission to the input data location and write permission to the output data location in Amazon S3.

", - "DescribeModelExplainabilityJobDefinitionResponse$RoleArn": "

The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access Management (IAM) role that has read permission to the input data location and write permission to the output data location in Amazon S3.

", + "DescribeModelBiasJobDefinitionResponse$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3.

", + "DescribeModelExplainabilityJobDefinitionResponse$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role that has read permission to the input data location and write permission to the output data location in Amazon S3.

", "DescribeModelOutput$ExecutionRoleArn": "

The Amazon Resource Name (ARN) of the IAM role that you specified for the model.

", "DescribeModelQualityJobDefinitionResponse$RoleArn": "

The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker can assume to perform tasks on your behalf.

", "DescribeNotebookInstanceOutput$RoleArn": "

The Amazon Resource Name (ARN) of the IAM role associated with the instance.

", @@ -12214,7 +12232,7 @@ "CheckpointConfig$S3Uri": "

Identifies the S3 path where you want SageMaker to store checkpoints. For example, s3://bucket-name/key-name-prefix.

", "CreateLabelingJobRequest$LabelCategoryConfigS3Uri": "

The S3 URI of the file, referred to as a label category configuration file, that defines the categories used to label the data objects.

For 3D point cloud and video frame task types, you can add label category attributes and frame attributes to your label category configuration file. To learn how, see Create a Labeling Category Configuration File for 3D Point Cloud Labeling Jobs.

For named entity recognition jobs, in addition to \"labels\", you must provide worker instructions in the label category configuration file using the \"instructions\" parameter: \"instructions\": {\"shortInstruction\":\"<h1>Add header</h1><p>Add Instructions</p>\", \"fullInstruction\":\"<p>Add additional instructions.</p>\"}. For details and an example, see Create a Named Entity Recognition Labeling Job (API) .

For all other built-in task types and custom tasks, your label category configuration file must be a JSON file in the following format. Identify the labels you want to use by replacing label_1, label_2,...,label_n with your label categories.

{

\"document-version\": \"2018-11-28\",

\"labels\": [{\"label\": \"label_1\"},{\"label\": \"label_2\"},...{\"label\": \"label_n\"}]

}

Note the following about the label category configuration file:

", "CreateModelPackageInput$SamplePayloadUrl": "

The Amazon Simple Storage Service (Amazon S3) path where the sample payload is stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix). This archive can hold multiple files that are all equally used in the load test. Each file in the archive must satisfy the size constraints of the InvokeEndpoint call.

", - "DataQualityAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", + "DataQualityAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", "DataQualityAppSpecification$PostAnalyticsProcessorSourceUri": "

An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.

", "DebugHookConfig$S3OutputPath": "

Path to Amazon S3 storage location for metrics and tensors.

", "DebugRuleConfiguration$S3OutputPath": "

Path to Amazon S3 storage location for rules.

", @@ -12233,10 +12251,10 @@ "ModelBiasAppSpecification$ConfigUri": "

JSON formatted S3 file that defines bias parameters. For more information on this JSON configuration file, see Configure bias parameters.

", "ModelCardExportArtifacts$S3ExportArtifacts": "

The Amazon S3 URI of the exported model artifacts.

", "ModelCardExportOutputConfig$S3OutputPath": "

The Amazon S3 output path to export your model card PDF.

", - "ModelExplainabilityAppSpecification$ConfigUri": "

JSON formatted S3 file that defines explainability parameters. For more information on this JSON configuration file, see Configure model explainability parameters.

", - "ModelQualityAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", + "ModelExplainabilityAppSpecification$ConfigUri": "

JSON formatted Amazon S3 file that defines explainability parameters. For more information on this JSON configuration file, see Configure model explainability parameters.

", + "ModelQualityAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", "ModelQualityAppSpecification$PostAnalyticsProcessorSourceUri": "

An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.

", - "MonitoringAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flatted json so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", + "MonitoringAppSpecification$RecordPreprocessorSourceUri": "

An Amazon S3 URI to a script that is called per row prior to running analysis. It can base64 decode the payload and convert it into a flattened JSON so that the built-in container can use the converted data. Applicable only for the built-in (first party) containers.

", "MonitoringAppSpecification$PostAnalyticsProcessorSourceUri": "

An Amazon S3 URI to a script that is called after analysis has been performed. Applicable only for the built-in (first party) containers.

", "MonitoringConstraintsResource$S3Uri": "

The Amazon S3 URI for the constraints resource.

", "MonitoringStatisticsResource$S3Uri": "

The Amazon S3 URI for the statistics resource.

", @@ -12335,7 +12353,7 @@ "ScheduleExpression": { "base": null, "refs": { - "ScheduleConfig$ScheduleExpression": "

A cron expression that describes details about the monitoring schedule.

The supported cron expressions are:

For example, the following are valid cron expressions:

To support running every 6, 12 hours, the following are also supported:

cron(0 [00-23]/[01-24] ? * * *)

For example, the following are valid cron expressions:

You can also specify the keyword NOW to run the monitoring job immediately, one time, without recurring.

" + "ScheduleConfig$ScheduleExpression": "

A cron expression that describes details about the monitoring schedule.

The supported cron expressions are:

For example, the following are valid cron expressions:

To support running every 6, 12 hours, the following are also supported:

cron(0 [00-23]/[01-24] ? * * *)

For example, the following are valid cron expressions:

You can also specify the keyword NOW to run the monitoring job immediately, one time, without recurring.

" } }, "ScheduleStatus": { @@ -12664,7 +12682,7 @@ "ListAssociationsRequest$SortOrder": "

The sort order. The default value is Descending.

", "ListCompilationJobsRequest$SortOrder": "

The sort order for results. The default is Ascending.

", "ListContextsRequest$SortOrder": "

The sort order. The default value is Descending.

", - "ListDataQualityJobDefinitionsRequest$SortOrder": "

The sort order for results. The default is Descending.

", + "ListDataQualityJobDefinitionsRequest$SortOrder": "

Whether to sort the results in Ascending or Descending order. The default is Descending.

", "ListDeviceFleetsRequest$SortOrder": "

What direction to sort in.

", "ListEdgeDeploymentPlansRequest$SortOrder": "

The direction of the sorting (ascending or descending).

", "ListEdgePackagingJobsRequest$SortOrder": "

What direction to sort by.

", @@ -12684,7 +12702,7 @@ "ListModelExplainabilityJobDefinitionsRequest$SortOrder": "

Whether to sort the results in Ascending or Descending order. The default is Descending.

", "ListModelPackageGroupsInput$SortOrder": "

The sort order for results. The default is Ascending.

", "ListModelPackagesInput$SortOrder": "

The sort order for the results. The default is Ascending.

", - "ListModelQualityJobDefinitionsRequest$SortOrder": "

The sort order for results. The default is Descending.

", + "ListModelQualityJobDefinitionsRequest$SortOrder": "

Whether to sort the results in Ascending or Descending order. The default is Descending.

", "ListMonitoringAlertHistoryRequest$SortOrder": "

The sort order, whether Ascending or Descending, of the alert history. The default is Descending.

", "ListMonitoringExecutionsRequest$SortOrder": "

Whether to sort the results in Ascending or Descending order. The default is Descending.

", "ListMonitoringSchedulesRequest$SortOrder": "

Whether to sort the results in Ascending or Descending order. The default is Descending.

", @@ -13026,6 +13044,12 @@ "TrainingJobDefinition$StoppingCondition": "

Specifies a limit to how long a model training job can run. It also specifies how long a managed Spot training job has to complete. When the job reaches the time limit, SageMaker ends the training job. Use this API to cap model training costs.

To stop a job, SageMaker sends the algorithm the SIGTERM signal, which delays job termination for 120 seconds. Algorithms can use this 120-second window to save the model artifacts.

" } }, + "StorageType": { + "base": null, + "refs": { + "OnlineStoreConfig$StorageType": "

Option for different tiers of low latency storage for real-time data retrieval.

" + } + }, "String": { "base": null, "refs": { @@ -13393,7 +13417,7 @@ "CreateCodeRepositoryInput$Tags": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

", "CreateCompilationJobRequest$Tags": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

", "CreateContextRequest$Tags": "

A list of tags to apply to the context.

", - "CreateDataQualityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", + "CreateDataQualityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", "CreateDeviceFleetRequest$Tags": "

Creates tags for the specified fleet.

", "CreateDomainRequest$Tags": "

Tags to associated with the Domain. Each tag consists of a key and an optional value. Tag keys must be unique per resource. Tags are searchable using the Search API.

Tags that you specify for the Domain are also added to all Apps that the Domain launches.

", "CreateEdgeDeploymentPlanRequest$Tags": "

List of tags with which to tag the edge deployment plan.

", @@ -13410,13 +13434,13 @@ "CreateInferenceExperimentRequest$Tags": "

Array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging your Amazon Web Services Resources.

", "CreateInferenceRecommendationsJobRequest$Tags": "

The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define. For more information, see Tagging Amazon Web Services Resources in the Amazon Web Services General Reference.

", "CreateLabelingJobRequest$Tags": "

An array of key/value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", - "CreateModelBiasJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", + "CreateModelBiasJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", "CreateModelCardRequest$Tags": "

Key-value pairs used to manage metadata for model cards.

", - "CreateModelExplainabilityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", + "CreateModelExplainabilityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", "CreateModelInput$Tags": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

", "CreateModelPackageGroupInput$Tags": "

A list of key value pairs associated with the model group. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

", "CreateModelPackageInput$Tags": "

A list of key value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference Guide.

If you supply ModelPackageGroupName, your model package belongs to the model group you specify and uses the tags associated with the model group. In this case, you cannot supply a tag argument.

", - "CreateModelQualityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", + "CreateModelQualityJobDefinitionRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", "CreateMonitoringScheduleRequest$Tags": "

(Optional) An array of key-value pairs. For more information, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.

", "CreateNotebookInstanceInput$Tags": "

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

", "CreatePipelineRequest$Tags": "

A list of tags to apply to the created pipeline.

", @@ -15234,6 +15258,12 @@ "ProductionVariantSummary$DesiredWeight": "

The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request.

" } }, + "VectorConfig": { + "base": "

Configuration for your vector collection type.

", + "refs": { + "CollectionConfig$VectorConfig": "

Configuration for your vector collection type.

" + } + }, "VendorGuidance": { "base": null, "refs": { diff --git a/models/apis/wafv2/2019-07-29/docs-2.json b/models/apis/wafv2/2019-07-29/docs-2.json index 426e224a697..30b707c042f 100755 --- a/models/apis/wafv2/2019-07-29/docs-2.json +++ b/models/apis/wafv2/2019-07-29/docs-2.json @@ -1155,9 +1155,9 @@ } }, "JA3Fingerprint": { - "base": "

Match against the request's JA3 fingerprint header. The header contains a hash fingerprint of the TLS Client Hello packet for the request.

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

", + "base": "

Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration.

", "refs": { - "FieldToMatch$JA3Fingerprint": "

Match against the request's JA3 fingerprint header. The header contains a hash fingerprint of the TLS Client Hello packet for the request.

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

" + "FieldToMatch$JA3Fingerprint": "

Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. WAF calculates and logs this fingerprint for each request that has enough TLS Client Hello information for the calculation. Almost all web requests include this information.

You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY.

You can obtain the JA3 fingerprint for client requests from the web ACL logs. If WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the WAF Developer Guide.

Provide the JA3 fingerprint string from the logs in your string match statement specification, to match with any future requests that have the same TLS configuration.

" } }, "JsonBody": { @@ -2285,7 +2285,7 @@ "SearchString": { "base": null, "refs": { - "ByteMatchStatement$SearchString": "

A string value that you want WAF to search for. WAF searches only in the part of web requests that you designate for inspection in FieldToMatch. The maximum length of the value is 200 bytes.

Valid values depend on the component that you specify for inspection in FieldToMatch:

If SearchString includes alphabetic characters A-Z and a-z, note that the value is case sensitive.

If you're using the WAF API

Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 200 bytes.

For example, suppose the value of Type is HEADER and the value of Data is User-Agent. If you want to search the User-Agent header for the value BadBot, you base64-encode BadBot using MIME base64-encoding and include the resulting value, QmFkQm90, in the value of SearchString.

If you're using the CLI or one of the Amazon Web Services SDKs

The value that you want WAF to search for. The SDK automatically base64 encodes the value.

" + "ByteMatchStatement$SearchString": "

A string value that you want WAF to search for. WAF searches only in the part of web requests that you designate for inspection in FieldToMatch. The maximum length of the value is 200 bytes.

Valid values depend on the component that you specify for inspection in FieldToMatch:

If SearchString includes alphabetic characters A-Z and a-z, note that the value is case sensitive.

If you're using the WAF API

Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 200 bytes.

For example, suppose the value of Type is HEADER and the value of Data is User-Agent. If you want to search the User-Agent header for the value BadBot, you base64-encode BadBot using MIME base64-encoding and include the resulting value, QmFkQm90, in the value of SearchString.

If you're using the CLI or one of the Amazon Web Services SDKs

The value that you want WAF to search for. The SDK automatically base64 encodes the value.

" } }, "SensitivityLevel": { diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index cf157f6a2b7..8cdfd18c8f0 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -8258,14 +8258,18 @@ }, "inspector2" : { "endpoints" : { + "af-south-1" : { }, "ap-east-1" : { }, "ap-northeast-1" : { }, "ap-northeast-2" : { }, + "ap-northeast-3" : { }, "ap-south-1" : { }, "ap-southeast-1" : { }, "ap-southeast-2" : { }, + "ap-southeast-3" : { }, "ca-central-1" : { }, "eu-central-1" : { }, + "eu-central-2" : { }, "eu-north-1" : { }, "eu-south-1" : { }, "eu-west-1" : { }, @@ -11634,6 +11638,7 @@ "deprecated" : true, "hostname" : "network-firewall-fips.us-west-2.amazonaws.com" }, + "il-central-1" : { }, "me-central-1" : { }, "me-south-1" : { }, "sa-east-1" : { }, @@ -16803,9 +16808,14 @@ }, "tnb" : { "endpoints" : { + "ap-northeast-2" : { }, "ap-southeast-2" : { }, + "ca-central-1" : { }, "eu-central-1" : { }, + "eu-north-1" : { }, + "eu-south-2" : { }, "eu-west-3" : { }, + "sa-east-1" : { }, "us-east-1" : { }, "us-west-2" : { } } @@ -18590,6 +18600,16 @@ } } }, + "api.pricing" : { + "defaults" : { + "credentialScope" : { + "service" : "pricing" + } + }, + "endpoints" : { + "cn-northwest-1" : { } + } + }, "api.sagemaker" : { "endpoints" : { "cn-north-1" : { }, diff --git a/service/bedrock/api.go b/service/bedrock/api.go new file mode 100644 index 00000000000..04237369600 --- /dev/null +++ b/service/bedrock/api.go @@ -0,0 +1,5056 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrock + +import ( + "fmt" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opCreateModelCustomizationJob = "CreateModelCustomizationJob" + +// CreateModelCustomizationJobRequest generates a "aws/request.Request" representing the +// client's request for the CreateModelCustomizationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateModelCustomizationJob for more information on using the CreateModelCustomizationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the CreateModelCustomizationJobRequest method. +// req, resp := client.CreateModelCustomizationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateModelCustomizationJob +func (c *Bedrock) CreateModelCustomizationJobRequest(input *CreateModelCustomizationJobInput) (req *request.Request, output *CreateModelCustomizationJobOutput) { + op := &request.Operation{ + Name: opCreateModelCustomizationJob, + HTTPMethod: "POST", + HTTPPath: "/model-customization-jobs", + } + + if input == nil { + input = &CreateModelCustomizationJobInput{} + } + + output = &CreateModelCustomizationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateModelCustomizationJob API operation for Amazon Bedrock. +// +// Creates a fine-tuning job to customize a base model. +// +// You specify the base foundation model and the location of the training data. +// After the model-customization job completes successfully, your custom model +// resource will be ready to use. Training data contains input and output text +// for each record in a JSONL format. Optionally, you can specify validation +// data in the same format as the training data. Bedrock returns validation +// loss metrics and output generations after the job completes. +// +// Model-customization jobs are asynchronous and the completion time depends +// on the base model and the training/validation data size. To monitor a job, +// use the GetModelCustomizationJob operation to retrieve the job status. +// +// For more information, see Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation CreateModelCustomizationJob for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - ConflictException +// Error occurred because of a conflict while performing an operation. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - TooManyTagsException +// The request contains more tags than can be associated with a resource (50 +// tags per resource). The maximum number of tags includes both existing tags +// and those included in your current request. +// +// - ServiceQuotaExceededException +// The number of requests exceeds the service quota. Resubmit your request later. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CreateModelCustomizationJob +func (c *Bedrock) CreateModelCustomizationJob(input *CreateModelCustomizationJobInput) (*CreateModelCustomizationJobOutput, error) { + req, out := c.CreateModelCustomizationJobRequest(input) + return out, req.Send() +} + +// CreateModelCustomizationJobWithContext is the same as CreateModelCustomizationJob with the addition of +// the ability to pass a context and additional request options. +// +// See CreateModelCustomizationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) CreateModelCustomizationJobWithContext(ctx aws.Context, input *CreateModelCustomizationJobInput, opts ...request.Option) (*CreateModelCustomizationJobOutput, error) { + req, out := c.CreateModelCustomizationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteCustomModel = "DeleteCustomModel" + +// DeleteCustomModelRequest generates a "aws/request.Request" representing the +// client's request for the DeleteCustomModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteCustomModel for more information on using the DeleteCustomModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the DeleteCustomModelRequest method. +// req, resp := client.DeleteCustomModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteCustomModel +func (c *Bedrock) DeleteCustomModelRequest(input *DeleteCustomModelInput) (req *request.Request, output *DeleteCustomModelOutput) { + op := &request.Operation{ + Name: opDeleteCustomModel, + HTTPMethod: "DELETE", + HTTPPath: "/custom-models/{modelIdentifier}", + } + + if input == nil { + input = &DeleteCustomModelInput{} + } + + output = &DeleteCustomModelOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteCustomModel API operation for Amazon Bedrock. +// +// Deletes a custom model that you created earlier. For more information, see +// Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation DeleteCustomModel for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - ConflictException +// Error occurred because of a conflict while performing an operation. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteCustomModel +func (c *Bedrock) DeleteCustomModel(input *DeleteCustomModelInput) (*DeleteCustomModelOutput, error) { + req, out := c.DeleteCustomModelRequest(input) + return out, req.Send() +} + +// DeleteCustomModelWithContext is the same as DeleteCustomModel with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteCustomModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) DeleteCustomModelWithContext(ctx aws.Context, input *DeleteCustomModelInput, opts ...request.Option) (*DeleteCustomModelOutput, error) { + req, out := c.DeleteCustomModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteModelInvocationLoggingConfiguration = "DeleteModelInvocationLoggingConfiguration" + +// DeleteModelInvocationLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the DeleteModelInvocationLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeleteModelInvocationLoggingConfiguration for more information on using the DeleteModelInvocationLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the DeleteModelInvocationLoggingConfigurationRequest method. +// req, resp := client.DeleteModelInvocationLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteModelInvocationLoggingConfiguration +func (c *Bedrock) DeleteModelInvocationLoggingConfigurationRequest(input *DeleteModelInvocationLoggingConfigurationInput) (req *request.Request, output *DeleteModelInvocationLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opDeleteModelInvocationLoggingConfiguration, + HTTPMethod: "DELETE", + HTTPPath: "/logging/modelinvocations", + } + + if input == nil { + input = &DeleteModelInvocationLoggingConfigurationInput{} + } + + output = &DeleteModelInvocationLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteModelInvocationLoggingConfiguration API operation for Amazon Bedrock. +// +// Delete the invocation logging. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation DeleteModelInvocationLoggingConfiguration for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/DeleteModelInvocationLoggingConfiguration +func (c *Bedrock) DeleteModelInvocationLoggingConfiguration(input *DeleteModelInvocationLoggingConfigurationInput) (*DeleteModelInvocationLoggingConfigurationOutput, error) { + req, out := c.DeleteModelInvocationLoggingConfigurationRequest(input) + return out, req.Send() +} + +// DeleteModelInvocationLoggingConfigurationWithContext is the same as DeleteModelInvocationLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteModelInvocationLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) DeleteModelInvocationLoggingConfigurationWithContext(ctx aws.Context, input *DeleteModelInvocationLoggingConfigurationInput, opts ...request.Option) (*DeleteModelInvocationLoggingConfigurationOutput, error) { + req, out := c.DeleteModelInvocationLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetCustomModel = "GetCustomModel" + +// GetCustomModelRequest generates a "aws/request.Request" representing the +// client's request for the GetCustomModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetCustomModel for more information on using the GetCustomModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the GetCustomModelRequest method. +// req, resp := client.GetCustomModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetCustomModel +func (c *Bedrock) GetCustomModelRequest(input *GetCustomModelInput) (req *request.Request, output *GetCustomModelOutput) { + op := &request.Operation{ + Name: opGetCustomModel, + HTTPMethod: "GET", + HTTPPath: "/custom-models/{modelIdentifier}", + } + + if input == nil { + input = &GetCustomModelInput{} + } + + output = &GetCustomModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetCustomModel API operation for Amazon Bedrock. +// +// Get the properties associated with a Bedrock custom model that you have created.For +// more information, see Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation GetCustomModel for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetCustomModel +func (c *Bedrock) GetCustomModel(input *GetCustomModelInput) (*GetCustomModelOutput, error) { + req, out := c.GetCustomModelRequest(input) + return out, req.Send() +} + +// GetCustomModelWithContext is the same as GetCustomModel with the addition of +// the ability to pass a context and additional request options. +// +// See GetCustomModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) GetCustomModelWithContext(ctx aws.Context, input *GetCustomModelInput, opts ...request.Option) (*GetCustomModelOutput, error) { + req, out := c.GetCustomModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetFoundationModel = "GetFoundationModel" + +// GetFoundationModelRequest generates a "aws/request.Request" representing the +// client's request for the GetFoundationModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetFoundationModel for more information on using the GetFoundationModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the GetFoundationModelRequest method. +// req, resp := client.GetFoundationModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetFoundationModel +func (c *Bedrock) GetFoundationModelRequest(input *GetFoundationModelInput) (req *request.Request, output *GetFoundationModelOutput) { + op := &request.Operation{ + Name: opGetFoundationModel, + HTTPMethod: "GET", + HTTPPath: "/foundation-models/{modelIdentifier}", + } + + if input == nil { + input = &GetFoundationModelInput{} + } + + output = &GetFoundationModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFoundationModel API operation for Amazon Bedrock. +// +// Get details about a Bedrock foundation model. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation GetFoundationModel for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetFoundationModel +func (c *Bedrock) GetFoundationModel(input *GetFoundationModelInput) (*GetFoundationModelOutput, error) { + req, out := c.GetFoundationModelRequest(input) + return out, req.Send() +} + +// GetFoundationModelWithContext is the same as GetFoundationModel with the addition of +// the ability to pass a context and additional request options. +// +// See GetFoundationModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) GetFoundationModelWithContext(ctx aws.Context, input *GetFoundationModelInput, opts ...request.Option) (*GetFoundationModelOutput, error) { + req, out := c.GetFoundationModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetModelCustomizationJob = "GetModelCustomizationJob" + +// GetModelCustomizationJobRequest generates a "aws/request.Request" representing the +// client's request for the GetModelCustomizationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetModelCustomizationJob for more information on using the GetModelCustomizationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the GetModelCustomizationJobRequest method. +// req, resp := client.GetModelCustomizationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelCustomizationJob +func (c *Bedrock) GetModelCustomizationJobRequest(input *GetModelCustomizationJobInput) (req *request.Request, output *GetModelCustomizationJobOutput) { + op := &request.Operation{ + Name: opGetModelCustomizationJob, + HTTPMethod: "GET", + HTTPPath: "/model-customization-jobs/{jobIdentifier}", + } + + if input == nil { + input = &GetModelCustomizationJobInput{} + } + + output = &GetModelCustomizationJobOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetModelCustomizationJob API operation for Amazon Bedrock. +// +// Retrieves the properties associated with a model-customization job, including +// the status of the job. For more information, see Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation GetModelCustomizationJob for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelCustomizationJob +func (c *Bedrock) GetModelCustomizationJob(input *GetModelCustomizationJobInput) (*GetModelCustomizationJobOutput, error) { + req, out := c.GetModelCustomizationJobRequest(input) + return out, req.Send() +} + +// GetModelCustomizationJobWithContext is the same as GetModelCustomizationJob with the addition of +// the ability to pass a context and additional request options. +// +// See GetModelCustomizationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) GetModelCustomizationJobWithContext(ctx aws.Context, input *GetModelCustomizationJobInput, opts ...request.Option) (*GetModelCustomizationJobOutput, error) { + req, out := c.GetModelCustomizationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opGetModelInvocationLoggingConfiguration = "GetModelInvocationLoggingConfiguration" + +// GetModelInvocationLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetModelInvocationLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetModelInvocationLoggingConfiguration for more information on using the GetModelInvocationLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the GetModelInvocationLoggingConfigurationRequest method. +// req, resp := client.GetModelInvocationLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelInvocationLoggingConfiguration +func (c *Bedrock) GetModelInvocationLoggingConfigurationRequest(input *GetModelInvocationLoggingConfigurationInput) (req *request.Request, output *GetModelInvocationLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opGetModelInvocationLoggingConfiguration, + HTTPMethod: "GET", + HTTPPath: "/logging/modelinvocations", + } + + if input == nil { + input = &GetModelInvocationLoggingConfigurationInput{} + } + + output = &GetModelInvocationLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetModelInvocationLoggingConfiguration API operation for Amazon Bedrock. +// +// Get the current configuration values for model invocation logging. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation GetModelInvocationLoggingConfiguration for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GetModelInvocationLoggingConfiguration +func (c *Bedrock) GetModelInvocationLoggingConfiguration(input *GetModelInvocationLoggingConfigurationInput) (*GetModelInvocationLoggingConfigurationOutput, error) { + req, out := c.GetModelInvocationLoggingConfigurationRequest(input) + return out, req.Send() +} + +// GetModelInvocationLoggingConfigurationWithContext is the same as GetModelInvocationLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetModelInvocationLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) GetModelInvocationLoggingConfigurationWithContext(ctx aws.Context, input *GetModelInvocationLoggingConfigurationInput, opts ...request.Option) (*GetModelInvocationLoggingConfigurationOutput, error) { + req, out := c.GetModelInvocationLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListCustomModels = "ListCustomModels" + +// ListCustomModelsRequest generates a "aws/request.Request" representing the +// client's request for the ListCustomModels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListCustomModels for more information on using the ListCustomModels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the ListCustomModelsRequest method. +// req, resp := client.ListCustomModelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListCustomModels +func (c *Bedrock) ListCustomModelsRequest(input *ListCustomModelsInput) (req *request.Request, output *ListCustomModelsOutput) { + op := &request.Operation{ + Name: opListCustomModels, + HTTPMethod: "GET", + HTTPPath: "/custom-models", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListCustomModelsInput{} + } + + output = &ListCustomModelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListCustomModels API operation for Amazon Bedrock. +// +// Returns a list of the custom models that you have created with the CreateModelCustomizationJob +// operation. +// +// For more information, see Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation ListCustomModels for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListCustomModels +func (c *Bedrock) ListCustomModels(input *ListCustomModelsInput) (*ListCustomModelsOutput, error) { + req, out := c.ListCustomModelsRequest(input) + return out, req.Send() +} + +// ListCustomModelsWithContext is the same as ListCustomModels with the addition of +// the ability to pass a context and additional request options. +// +// See ListCustomModels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListCustomModelsWithContext(ctx aws.Context, input *ListCustomModelsInput, opts ...request.Option) (*ListCustomModelsOutput, error) { + req, out := c.ListCustomModelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListCustomModelsPages iterates over the pages of a ListCustomModels operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListCustomModels method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListCustomModels operation. +// pageNum := 0 +// err := client.ListCustomModelsPages(params, +// func(page *bedrock.ListCustomModelsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *Bedrock) ListCustomModelsPages(input *ListCustomModelsInput, fn func(*ListCustomModelsOutput, bool) bool) error { + return c.ListCustomModelsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListCustomModelsPagesWithContext same as ListCustomModelsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListCustomModelsPagesWithContext(ctx aws.Context, input *ListCustomModelsInput, fn func(*ListCustomModelsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListCustomModelsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListCustomModelsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListCustomModelsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListFoundationModels = "ListFoundationModels" + +// ListFoundationModelsRequest generates a "aws/request.Request" representing the +// client's request for the ListFoundationModels operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListFoundationModels for more information on using the ListFoundationModels +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the ListFoundationModelsRequest method. +// req, resp := client.ListFoundationModelsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListFoundationModels +func (c *Bedrock) ListFoundationModelsRequest(input *ListFoundationModelsInput) (req *request.Request, output *ListFoundationModelsOutput) { + op := &request.Operation{ + Name: opListFoundationModels, + HTTPMethod: "GET", + HTTPPath: "/foundation-models", + } + + if input == nil { + input = &ListFoundationModelsInput{} + } + + output = &ListFoundationModelsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListFoundationModels API operation for Amazon Bedrock. +// +// List of Bedrock foundation models that you can use. For more information, +// see Foundation models (https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation ListFoundationModels for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListFoundationModels +func (c *Bedrock) ListFoundationModels(input *ListFoundationModelsInput) (*ListFoundationModelsOutput, error) { + req, out := c.ListFoundationModelsRequest(input) + return out, req.Send() +} + +// ListFoundationModelsWithContext is the same as ListFoundationModels with the addition of +// the ability to pass a context and additional request options. +// +// See ListFoundationModels for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListFoundationModelsWithContext(ctx aws.Context, input *ListFoundationModelsInput, opts ...request.Option) (*ListFoundationModelsOutput, error) { + req, out := c.ListFoundationModelsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListModelCustomizationJobs = "ListModelCustomizationJobs" + +// ListModelCustomizationJobsRequest generates a "aws/request.Request" representing the +// client's request for the ListModelCustomizationJobs operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListModelCustomizationJobs for more information on using the ListModelCustomizationJobs +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the ListModelCustomizationJobsRequest method. +// req, resp := client.ListModelCustomizationJobsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListModelCustomizationJobs +func (c *Bedrock) ListModelCustomizationJobsRequest(input *ListModelCustomizationJobsInput) (req *request.Request, output *ListModelCustomizationJobsOutput) { + op := &request.Operation{ + Name: opListModelCustomizationJobs, + HTTPMethod: "GET", + HTTPPath: "/model-customization-jobs", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListModelCustomizationJobsInput{} + } + + output = &ListModelCustomizationJobsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListModelCustomizationJobs API operation for Amazon Bedrock. +// +// Returns a list of model customization jobs that you have submitted. You can +// filter the jobs to return based on one or more criteria. +// +// For more information, see Custom models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation ListModelCustomizationJobs for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListModelCustomizationJobs +func (c *Bedrock) ListModelCustomizationJobs(input *ListModelCustomizationJobsInput) (*ListModelCustomizationJobsOutput, error) { + req, out := c.ListModelCustomizationJobsRequest(input) + return out, req.Send() +} + +// ListModelCustomizationJobsWithContext is the same as ListModelCustomizationJobs with the addition of +// the ability to pass a context and additional request options. +// +// See ListModelCustomizationJobs for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListModelCustomizationJobsWithContext(ctx aws.Context, input *ListModelCustomizationJobsInput, opts ...request.Option) (*ListModelCustomizationJobsOutput, error) { + req, out := c.ListModelCustomizationJobsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListModelCustomizationJobsPages iterates over the pages of a ListModelCustomizationJobs operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListModelCustomizationJobs method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListModelCustomizationJobs operation. +// pageNum := 0 +// err := client.ListModelCustomizationJobsPages(params, +// func(page *bedrock.ListModelCustomizationJobsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +func (c *Bedrock) ListModelCustomizationJobsPages(input *ListModelCustomizationJobsInput, fn func(*ListModelCustomizationJobsOutput, bool) bool) error { + return c.ListModelCustomizationJobsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListModelCustomizationJobsPagesWithContext same as ListModelCustomizationJobsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListModelCustomizationJobsPagesWithContext(ctx aws.Context, input *ListModelCustomizationJobsInput, fn func(*ListModelCustomizationJobsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListModelCustomizationJobsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListModelCustomizationJobsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListModelCustomizationJobsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListTagsForResource = "ListTagsForResource" + +// ListTagsForResourceRequest generates a "aws/request.Request" representing the +// client's request for the ListTagsForResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListTagsForResource for more information on using the ListTagsForResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the ListTagsForResourceRequest method. +// req, resp := client.ListTagsForResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListTagsForResource +func (c *Bedrock) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "POST", + HTTPPath: "/listTagsForResource", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon Bedrock. +// +// List the tags associated with the specified resource. +// +// For more information, see Tagging resources (https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/ListTagsForResource +func (c *Bedrock) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + return out, req.Send() +} + +// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of +// the ability to pass a context and additional request options. +// +// See ListTagsForResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { + req, out := c.ListTagsForResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opPutModelInvocationLoggingConfiguration = "PutModelInvocationLoggingConfiguration" + +// PutModelInvocationLoggingConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutModelInvocationLoggingConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutModelInvocationLoggingConfiguration for more information on using the PutModelInvocationLoggingConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutModelInvocationLoggingConfigurationRequest method. +// req, resp := client.PutModelInvocationLoggingConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/PutModelInvocationLoggingConfiguration +func (c *Bedrock) PutModelInvocationLoggingConfigurationRequest(input *PutModelInvocationLoggingConfigurationInput) (req *request.Request, output *PutModelInvocationLoggingConfigurationOutput) { + op := &request.Operation{ + Name: opPutModelInvocationLoggingConfiguration, + HTTPMethod: "PUT", + HTTPPath: "/logging/modelinvocations", + } + + if input == nil { + input = &PutModelInvocationLoggingConfigurationInput{} + } + + output = &PutModelInvocationLoggingConfigurationOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutModelInvocationLoggingConfiguration API operation for Amazon Bedrock. +// +// Set the configuration values for model invocation logging. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation PutModelInvocationLoggingConfiguration for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/PutModelInvocationLoggingConfiguration +func (c *Bedrock) PutModelInvocationLoggingConfiguration(input *PutModelInvocationLoggingConfigurationInput) (*PutModelInvocationLoggingConfigurationOutput, error) { + req, out := c.PutModelInvocationLoggingConfigurationRequest(input) + return out, req.Send() +} + +// PutModelInvocationLoggingConfigurationWithContext is the same as PutModelInvocationLoggingConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutModelInvocationLoggingConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) PutModelInvocationLoggingConfigurationWithContext(ctx aws.Context, input *PutModelInvocationLoggingConfigurationInput, opts ...request.Option) (*PutModelInvocationLoggingConfigurationOutput, error) { + req, out := c.PutModelInvocationLoggingConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopModelCustomizationJob = "StopModelCustomizationJob" + +// StopModelCustomizationJobRequest generates a "aws/request.Request" representing the +// client's request for the StopModelCustomizationJob operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopModelCustomizationJob for more information on using the StopModelCustomizationJob +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the StopModelCustomizationJobRequest method. +// req, resp := client.StopModelCustomizationJobRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/StopModelCustomizationJob +func (c *Bedrock) StopModelCustomizationJobRequest(input *StopModelCustomizationJobInput) (req *request.Request, output *StopModelCustomizationJobOutput) { + op := &request.Operation{ + Name: opStopModelCustomizationJob, + HTTPMethod: "POST", + HTTPPath: "/model-customization-jobs/{jobIdentifier}/stop", + } + + if input == nil { + input = &StopModelCustomizationJobInput{} + } + + output = &StopModelCustomizationJobOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// StopModelCustomizationJob API operation for Amazon Bedrock. +// +// Stops an active model customization job. For more information, see Custom +// models (https://docs.aws.amazon.com/bedrock/latest/userguide/custom-models.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation StopModelCustomizationJob for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - ConflictException +// Error occurred because of a conflict while performing an operation. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/StopModelCustomizationJob +func (c *Bedrock) StopModelCustomizationJob(input *StopModelCustomizationJobInput) (*StopModelCustomizationJobOutput, error) { + req, out := c.StopModelCustomizationJobRequest(input) + return out, req.Send() +} + +// StopModelCustomizationJobWithContext is the same as StopModelCustomizationJob with the addition of +// the ability to pass a context and additional request options. +// +// See StopModelCustomizationJob for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) StopModelCustomizationJobWithContext(ctx aws.Context, input *StopModelCustomizationJobInput, opts ...request.Option) (*StopModelCustomizationJobOutput, error) { + req, out := c.StopModelCustomizationJobRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" + +// TagResourceRequest generates a "aws/request.Request" representing the +// client's request for the TagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See TagResource for more information on using the TagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the TagResourceRequest method. +// req, resp := client.TagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/TagResource +func (c *Bedrock) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tagResource", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon Bedrock. +// +// Associate tags with a resource. For more information, see Tagging resources +// (https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - TooManyTagsException +// The request contains more tags than can be associated with a resource (50 +// tags per resource). The maximum number of tags includes both existing tags +// and those included in your current request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/TagResource +func (c *Bedrock) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + return out, req.Send() +} + +// TagResourceWithContext is the same as TagResource with the addition of +// the ability to pass a context and additional request options. +// +// See TagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { + req, out := c.TagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opUntagResource = "UntagResource" + +// UntagResourceRequest generates a "aws/request.Request" representing the +// client's request for the UntagResource operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See UntagResource for more information on using the UntagResource +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the UntagResourceRequest method. +// req, resp := client.UntagResourceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/UntagResource +func (c *Bedrock) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "POST", + HTTPPath: "/untagResource", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon Bedrock. +// +// Remove one or more tags from a resource. For more information, see Tagging +// resources (https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-service.html) +// in the Bedrock User Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/UntagResource +func (c *Bedrock) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + return out, req.Send() +} + +// UntagResourceWithContext is the same as UntagResource with the addition of +// the ability to pass a context and additional request options. +// +// See UntagResource for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *Bedrock) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { + req, out := c.UntagResourceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// The request is denied because of missing access permissions. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// CloudWatch logging configuration. +type CloudWatchConfig struct { + _ struct{} `type:"structure"` + + // S3 configuration for delivering a large amount of data. + LargeDataDeliveryS3Config *S3Config `locationName:"largeDataDeliveryS3Config" type:"structure"` + + // The log group name. + // + // LogGroupName is a required field + LogGroupName *string `locationName:"logGroupName" min:"1" type:"string" required:"true"` + + // The role ARN. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CloudWatchConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CloudWatchConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CloudWatchConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CloudWatchConfig"} + if s.LogGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("LogGroupName")) + } + if s.LogGroupName != nil && len(*s.LogGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("LogGroupName", 1)) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.LargeDataDeliveryS3Config != nil { + if err := s.LargeDataDeliveryS3Config.Validate(); err != nil { + invalidParams.AddNested("LargeDataDeliveryS3Config", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLargeDataDeliveryS3Config sets the LargeDataDeliveryS3Config field's value. +func (s *CloudWatchConfig) SetLargeDataDeliveryS3Config(v *S3Config) *CloudWatchConfig { + s.LargeDataDeliveryS3Config = v + return s +} + +// SetLogGroupName sets the LogGroupName field's value. +func (s *CloudWatchConfig) SetLogGroupName(v string) *CloudWatchConfig { + s.LogGroupName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CloudWatchConfig) SetRoleArn(v string) *CloudWatchConfig { + s.RoleArn = &v + return s +} + +// Error occurred because of a conflict while performing an operation. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type CreateModelCustomizationJobInput struct { + _ struct{} `type:"structure"` + + // Name of the base model. + // + // BaseModelIdentifier is a required field + BaseModelIdentifier *string `locationName:"baseModelIdentifier" min:"1" type:"string" required:"true"` + + // Unique token value that you can provide. The GetModelCustomizationJob response + // includes the same token value. + ClientRequestToken *string `locationName:"clientRequestToken" min:"1" type:"string" idempotencyToken:"true"` + + // The custom model is encrypted at rest using this key. + CustomModelKmsKeyId *string `locationName:"customModelKmsKeyId" min:"1" type:"string"` + + // Enter a name for the custom model. + // + // CustomModelName is a required field + CustomModelName *string `locationName:"customModelName" min:"1" type:"string" required:"true"` + + // Assign tags to the custom model. + CustomModelTags []*Tag `locationName:"customModelTags" type:"list"` + + // Parameters related to tuning the model. + // + // HyperParameters is a required field + HyperParameters map[string]*string `locationName:"hyperParameters" type:"map" required:"true"` + + // Enter a unique name for the fine-tuning job. + // + // JobName is a required field + JobName *string `locationName:"jobName" min:"1" type:"string" required:"true"` + + // Assign tags to the job. + JobTags []*Tag `locationName:"jobTags" type:"list"` + + // S3 location for the output data. + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `locationName:"outputDataConfig" type:"structure" required:"true"` + + // The Amazon Resource Name (ARN) of an IAM role that Bedrock can assume to + // perform tasks on your behalf. For example, during model training, Bedrock + // needs your permission to read input data from an S3 bucket, write model artifacts + // to an S3 bucket. To pass this role to Bedrock, the caller of this API must + // have the iam:PassRole permission. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // Information about the training dataset. + // + // TrainingDataConfig is a required field + TrainingDataConfig *TrainingDataConfig `locationName:"trainingDataConfig" type:"structure" required:"true"` + + // Information about the validation dataset. + ValidationDataConfig *ValidationDataConfig `locationName:"validationDataConfig" type:"structure"` + + // VPC configuration (optional). Configuration parameters for the private Virtual + // Private Cloud (VPC) that contains the resources you are using for this job. + VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateModelCustomizationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateModelCustomizationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateModelCustomizationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateModelCustomizationJobInput"} + if s.BaseModelIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("BaseModelIdentifier")) + } + if s.BaseModelIdentifier != nil && len(*s.BaseModelIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BaseModelIdentifier", 1)) + } + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.CustomModelKmsKeyId != nil && len(*s.CustomModelKmsKeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomModelKmsKeyId", 1)) + } + if s.CustomModelName == nil { + invalidParams.Add(request.NewErrParamRequired("CustomModelName")) + } + if s.CustomModelName != nil && len(*s.CustomModelName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("CustomModelName", 1)) + } + if s.HyperParameters == nil { + invalidParams.Add(request.NewErrParamRequired("HyperParameters")) + } + if s.JobName == nil { + invalidParams.Add(request.NewErrParamRequired("JobName")) + } + if s.JobName != nil && len(*s.JobName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobName", 1)) + } + if s.OutputDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("OutputDataConfig")) + } + if s.RoleArn == nil { + invalidParams.Add(request.NewErrParamRequired("RoleArn")) + } + if s.TrainingDataConfig == nil { + invalidParams.Add(request.NewErrParamRequired("TrainingDataConfig")) + } + if s.CustomModelTags != nil { + for i, v := range s.CustomModelTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomModelTags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.JobTags != nil { + for i, v := range s.JobTags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "JobTags", i), err.(request.ErrInvalidParams)) + } + } + } + if s.OutputDataConfig != nil { + if err := s.OutputDataConfig.Validate(); err != nil { + invalidParams.AddNested("OutputDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.TrainingDataConfig != nil { + if err := s.TrainingDataConfig.Validate(); err != nil { + invalidParams.AddNested("TrainingDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.ValidationDataConfig != nil { + if err := s.ValidationDataConfig.Validate(); err != nil { + invalidParams.AddNested("ValidationDataConfig", err.(request.ErrInvalidParams)) + } + } + if s.VpcConfig != nil { + if err := s.VpcConfig.Validate(); err != nil { + invalidParams.AddNested("VpcConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBaseModelIdentifier sets the BaseModelIdentifier field's value. +func (s *CreateModelCustomizationJobInput) SetBaseModelIdentifier(v string) *CreateModelCustomizationJobInput { + s.BaseModelIdentifier = &v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateModelCustomizationJobInput) SetClientRequestToken(v string) *CreateModelCustomizationJobInput { + s.ClientRequestToken = &v + return s +} + +// SetCustomModelKmsKeyId sets the CustomModelKmsKeyId field's value. +func (s *CreateModelCustomizationJobInput) SetCustomModelKmsKeyId(v string) *CreateModelCustomizationJobInput { + s.CustomModelKmsKeyId = &v + return s +} + +// SetCustomModelName sets the CustomModelName field's value. +func (s *CreateModelCustomizationJobInput) SetCustomModelName(v string) *CreateModelCustomizationJobInput { + s.CustomModelName = &v + return s +} + +// SetCustomModelTags sets the CustomModelTags field's value. +func (s *CreateModelCustomizationJobInput) SetCustomModelTags(v []*Tag) *CreateModelCustomizationJobInput { + s.CustomModelTags = v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *CreateModelCustomizationJobInput) SetHyperParameters(v map[string]*string) *CreateModelCustomizationJobInput { + s.HyperParameters = v + return s +} + +// SetJobName sets the JobName field's value. +func (s *CreateModelCustomizationJobInput) SetJobName(v string) *CreateModelCustomizationJobInput { + s.JobName = &v + return s +} + +// SetJobTags sets the JobTags field's value. +func (s *CreateModelCustomizationJobInput) SetJobTags(v []*Tag) *CreateModelCustomizationJobInput { + s.JobTags = v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *CreateModelCustomizationJobInput) SetOutputDataConfig(v *OutputDataConfig) *CreateModelCustomizationJobInput { + s.OutputDataConfig = v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *CreateModelCustomizationJobInput) SetRoleArn(v string) *CreateModelCustomizationJobInput { + s.RoleArn = &v + return s +} + +// SetTrainingDataConfig sets the TrainingDataConfig field's value. +func (s *CreateModelCustomizationJobInput) SetTrainingDataConfig(v *TrainingDataConfig) *CreateModelCustomizationJobInput { + s.TrainingDataConfig = v + return s +} + +// SetValidationDataConfig sets the ValidationDataConfig field's value. +func (s *CreateModelCustomizationJobInput) SetValidationDataConfig(v *ValidationDataConfig) *CreateModelCustomizationJobInput { + s.ValidationDataConfig = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *CreateModelCustomizationJobInput) SetVpcConfig(v *VpcConfig) *CreateModelCustomizationJobInput { + s.VpcConfig = v + return s +} + +type CreateModelCustomizationJobOutput struct { + _ struct{} `type:"structure"` + + // ARN of the fine tuning job + // + // JobArn is a required field + JobArn *string `locationName:"jobArn" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateModelCustomizationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CreateModelCustomizationJobOutput) GoString() string { + return s.String() +} + +// SetJobArn sets the JobArn field's value. +func (s *CreateModelCustomizationJobOutput) SetJobArn(v string) *CreateModelCustomizationJobOutput { + s.JobArn = &v + return s +} + +// Summary information for a custom model. +type CustomModelSummary struct { + _ struct{} `type:"structure"` + + // The base model ARN. + // + // BaseModelArn is a required field + BaseModelArn *string `locationName:"baseModelArn" min:"20" type:"string" required:"true"` + + // The base model name. + // + // BaseModelName is a required field + BaseModelName *string `locationName:"baseModelName" min:"1" type:"string" required:"true"` + + // Creation time of the model. + // + // CreationTime is a required field + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // The ARN of the custom model. + // + // ModelArn is a required field + ModelArn *string `locationName:"modelArn" min:"20" type:"string" required:"true"` + + // The name of the custom model. + // + // ModelName is a required field + ModelName *string `locationName:"modelName" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CustomModelSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CustomModelSummary) GoString() string { + return s.String() +} + +// SetBaseModelArn sets the BaseModelArn field's value. +func (s *CustomModelSummary) SetBaseModelArn(v string) *CustomModelSummary { + s.BaseModelArn = &v + return s +} + +// SetBaseModelName sets the BaseModelName field's value. +func (s *CustomModelSummary) SetBaseModelName(v string) *CustomModelSummary { + s.BaseModelName = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *CustomModelSummary) SetCreationTime(v time.Time) *CustomModelSummary { + s.CreationTime = &v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *CustomModelSummary) SetModelArn(v string) *CustomModelSummary { + s.ModelArn = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *CustomModelSummary) SetModelName(v string) *CustomModelSummary { + s.ModelName = &v + return s +} + +type DeleteCustomModelInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Name of the model to delete. + // + // ModelIdentifier is a required field + ModelIdentifier *string `location:"uri" locationName:"modelIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCustomModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCustomModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteCustomModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteCustomModelInput"} + if s.ModelIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ModelIdentifier")) + } + if s.ModelIdentifier != nil && len(*s.ModelIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelIdentifier sets the ModelIdentifier field's value. +func (s *DeleteCustomModelInput) SetModelIdentifier(v string) *DeleteCustomModelInput { + s.ModelIdentifier = &v + return s +} + +type DeleteCustomModelOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCustomModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteCustomModelOutput) GoString() string { + return s.String() +} + +type DeleteModelInvocationLoggingConfigurationInput struct { + _ struct{} `type:"structure" nopayload:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteModelInvocationLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteModelInvocationLoggingConfigurationInput) GoString() string { + return s.String() +} + +type DeleteModelInvocationLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteModelInvocationLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeleteModelInvocationLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// Information about a foundation model. +type FoundationModelDetails struct { + _ struct{} `type:"structure"` + + // The customization that the model supports. + CustomizationsSupported []*string `locationName:"customizationsSupported" type:"list" enum:"ModelCustomization"` + + // The inference types that the model supports. + InferenceTypesSupported []*string `locationName:"inferenceTypesSupported" type:"list" enum:"InferenceType"` + + // The input modalities that the model supports. + InputModalities []*string `locationName:"inputModalities" type:"list" enum:"ModelModality"` + + // The model ARN. + // + // ModelArn is a required field + ModelArn *string `locationName:"modelArn" type:"string" required:"true"` + + // The model identifier. + // + // ModelId is a required field + ModelId *string `locationName:"modelId" type:"string" required:"true"` + + // The model name. + ModelName *string `locationName:"modelName" min:"1" type:"string"` + + // The output modalities that the model supports. + OutputModalities []*string `locationName:"outputModalities" type:"list" enum:"ModelModality"` + + // he model's provider name. + ProviderName *string `locationName:"providerName" min:"1" type:"string"` + + // Indicates whether the model supports streaming. + ResponseStreamingSupported *bool `locationName:"responseStreamingSupported" type:"boolean"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s FoundationModelDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s FoundationModelDetails) GoString() string { + return s.String() +} + +// SetCustomizationsSupported sets the CustomizationsSupported field's value. +func (s *FoundationModelDetails) SetCustomizationsSupported(v []*string) *FoundationModelDetails { + s.CustomizationsSupported = v + return s +} + +// SetInferenceTypesSupported sets the InferenceTypesSupported field's value. +func (s *FoundationModelDetails) SetInferenceTypesSupported(v []*string) *FoundationModelDetails { + s.InferenceTypesSupported = v + return s +} + +// SetInputModalities sets the InputModalities field's value. +func (s *FoundationModelDetails) SetInputModalities(v []*string) *FoundationModelDetails { + s.InputModalities = v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *FoundationModelDetails) SetModelArn(v string) *FoundationModelDetails { + s.ModelArn = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *FoundationModelDetails) SetModelId(v string) *FoundationModelDetails { + s.ModelId = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *FoundationModelDetails) SetModelName(v string) *FoundationModelDetails { + s.ModelName = &v + return s +} + +// SetOutputModalities sets the OutputModalities field's value. +func (s *FoundationModelDetails) SetOutputModalities(v []*string) *FoundationModelDetails { + s.OutputModalities = v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *FoundationModelDetails) SetProviderName(v string) *FoundationModelDetails { + s.ProviderName = &v + return s +} + +// SetResponseStreamingSupported sets the ResponseStreamingSupported field's value. +func (s *FoundationModelDetails) SetResponseStreamingSupported(v bool) *FoundationModelDetails { + s.ResponseStreamingSupported = &v + return s +} + +// Summary information for a foundation model. +type FoundationModelSummary struct { + _ struct{} `type:"structure"` + + // Whether the model supports fine-tuning or continual pre-training. + CustomizationsSupported []*string `locationName:"customizationsSupported" type:"list" enum:"ModelCustomization"` + + // The inference types that the model supports. + InferenceTypesSupported []*string `locationName:"inferenceTypesSupported" type:"list" enum:"InferenceType"` + + // The input modalities that the model supports. + InputModalities []*string `locationName:"inputModalities" type:"list" enum:"ModelModality"` + + // The ARN of the foundation model. + // + // ModelArn is a required field + ModelArn *string `locationName:"modelArn" type:"string" required:"true"` + + // The model Id of the foundation model. + // + // ModelId is a required field + ModelId *string `locationName:"modelId" type:"string" required:"true"` + + // The name of the model. + ModelName *string `locationName:"modelName" min:"1" type:"string"` + + // The output modalities that the model supports. + OutputModalities []*string `locationName:"outputModalities" type:"list" enum:"ModelModality"` + + // The model's provider name. + ProviderName *string `locationName:"providerName" min:"1" type:"string"` + + // Indicates whether the model supports streaming. + ResponseStreamingSupported *bool `locationName:"responseStreamingSupported" type:"boolean"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s FoundationModelSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s FoundationModelSummary) GoString() string { + return s.String() +} + +// SetCustomizationsSupported sets the CustomizationsSupported field's value. +func (s *FoundationModelSummary) SetCustomizationsSupported(v []*string) *FoundationModelSummary { + s.CustomizationsSupported = v + return s +} + +// SetInferenceTypesSupported sets the InferenceTypesSupported field's value. +func (s *FoundationModelSummary) SetInferenceTypesSupported(v []*string) *FoundationModelSummary { + s.InferenceTypesSupported = v + return s +} + +// SetInputModalities sets the InputModalities field's value. +func (s *FoundationModelSummary) SetInputModalities(v []*string) *FoundationModelSummary { + s.InputModalities = v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *FoundationModelSummary) SetModelArn(v string) *FoundationModelSummary { + s.ModelArn = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *FoundationModelSummary) SetModelId(v string) *FoundationModelSummary { + s.ModelId = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *FoundationModelSummary) SetModelName(v string) *FoundationModelSummary { + s.ModelName = &v + return s +} + +// SetOutputModalities sets the OutputModalities field's value. +func (s *FoundationModelSummary) SetOutputModalities(v []*string) *FoundationModelSummary { + s.OutputModalities = v + return s +} + +// SetProviderName sets the ProviderName field's value. +func (s *FoundationModelSummary) SetProviderName(v string) *FoundationModelSummary { + s.ProviderName = &v + return s +} + +// SetResponseStreamingSupported sets the ResponseStreamingSupported field's value. +func (s *FoundationModelSummary) SetResponseStreamingSupported(v bool) *FoundationModelSummary { + s.ResponseStreamingSupported = &v + return s +} + +type GetCustomModelInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Name or ARN of the custom model. + // + // ModelIdentifier is a required field + ModelIdentifier *string `location:"uri" locationName:"modelIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetCustomModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetCustomModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetCustomModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetCustomModelInput"} + if s.ModelIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ModelIdentifier")) + } + if s.ModelIdentifier != nil && len(*s.ModelIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelIdentifier sets the ModelIdentifier field's value. +func (s *GetCustomModelInput) SetModelIdentifier(v string) *GetCustomModelInput { + s.ModelIdentifier = &v + return s +} + +type GetCustomModelOutput struct { + _ struct{} `type:"structure"` + + // ARN of the base model. + // + // BaseModelArn is a required field + BaseModelArn *string `locationName:"baseModelArn" min:"20" type:"string" required:"true"` + + // Creation time of the model. + // + // CreationTime is a required field + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // Hyperparameter values associated with this model. + HyperParameters map[string]*string `locationName:"hyperParameters" type:"map"` + + // Job ARN associated with this model. + // + // JobArn is a required field + JobArn *string `locationName:"jobArn" type:"string" required:"true"` + + // Job name associated with this model. + JobName *string `locationName:"jobName" min:"1" type:"string"` + + // ARN associated with this model. + // + // ModelArn is a required field + ModelArn *string `locationName:"modelArn" min:"20" type:"string" required:"true"` + + // The custom model is encrypted at rest using this key. + ModelKmsKeyArn *string `locationName:"modelKmsKeyArn" min:"1" type:"string"` + + // Model name associated with this model. + // + // ModelName is a required field + ModelName *string `locationName:"modelName" min:"1" type:"string" required:"true"` + + // Output data configuration associated with this custom model. + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `locationName:"outputDataConfig" type:"structure" required:"true"` + + // Information about the training dataset. + // + // TrainingDataConfig is a required field + TrainingDataConfig *TrainingDataConfig `locationName:"trainingDataConfig" type:"structure" required:"true"` + + // The training metrics from the job creation. + TrainingMetrics *TrainingMetrics `locationName:"trainingMetrics" type:"structure"` + + // Array of up to 10 validators. + ValidationDataConfig *ValidationDataConfig `locationName:"validationDataConfig" type:"structure"` + + // The validation metrics from the job creation. + ValidationMetrics []*ValidatorMetric `locationName:"validationMetrics" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetCustomModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetCustomModelOutput) GoString() string { + return s.String() +} + +// SetBaseModelArn sets the BaseModelArn field's value. +func (s *GetCustomModelOutput) SetBaseModelArn(v string) *GetCustomModelOutput { + s.BaseModelArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetCustomModelOutput) SetCreationTime(v time.Time) *GetCustomModelOutput { + s.CreationTime = &v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *GetCustomModelOutput) SetHyperParameters(v map[string]*string) *GetCustomModelOutput { + s.HyperParameters = v + return s +} + +// SetJobArn sets the JobArn field's value. +func (s *GetCustomModelOutput) SetJobArn(v string) *GetCustomModelOutput { + s.JobArn = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *GetCustomModelOutput) SetJobName(v string) *GetCustomModelOutput { + s.JobName = &v + return s +} + +// SetModelArn sets the ModelArn field's value. +func (s *GetCustomModelOutput) SetModelArn(v string) *GetCustomModelOutput { + s.ModelArn = &v + return s +} + +// SetModelKmsKeyArn sets the ModelKmsKeyArn field's value. +func (s *GetCustomModelOutput) SetModelKmsKeyArn(v string) *GetCustomModelOutput { + s.ModelKmsKeyArn = &v + return s +} + +// SetModelName sets the ModelName field's value. +func (s *GetCustomModelOutput) SetModelName(v string) *GetCustomModelOutput { + s.ModelName = &v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *GetCustomModelOutput) SetOutputDataConfig(v *OutputDataConfig) *GetCustomModelOutput { + s.OutputDataConfig = v + return s +} + +// SetTrainingDataConfig sets the TrainingDataConfig field's value. +func (s *GetCustomModelOutput) SetTrainingDataConfig(v *TrainingDataConfig) *GetCustomModelOutput { + s.TrainingDataConfig = v + return s +} + +// SetTrainingMetrics sets the TrainingMetrics field's value. +func (s *GetCustomModelOutput) SetTrainingMetrics(v *TrainingMetrics) *GetCustomModelOutput { + s.TrainingMetrics = v + return s +} + +// SetValidationDataConfig sets the ValidationDataConfig field's value. +func (s *GetCustomModelOutput) SetValidationDataConfig(v *ValidationDataConfig) *GetCustomModelOutput { + s.ValidationDataConfig = v + return s +} + +// SetValidationMetrics sets the ValidationMetrics field's value. +func (s *GetCustomModelOutput) SetValidationMetrics(v []*ValidatorMetric) *GetCustomModelOutput { + s.ValidationMetrics = v + return s +} + +type GetFoundationModelInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // The model identifier. + // + // ModelIdentifier is a required field + ModelIdentifier *string `location:"uri" locationName:"modelIdentifier" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetFoundationModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetFoundationModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFoundationModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFoundationModelInput"} + if s.ModelIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("ModelIdentifier")) + } + if s.ModelIdentifier != nil && len(*s.ModelIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetModelIdentifier sets the ModelIdentifier field's value. +func (s *GetFoundationModelInput) SetModelIdentifier(v string) *GetFoundationModelInput { + s.ModelIdentifier = &v + return s +} + +type GetFoundationModelOutput struct { + _ struct{} `type:"structure"` + + // Information about the foundation model. + ModelDetails *FoundationModelDetails `locationName:"modelDetails" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetFoundationModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetFoundationModelOutput) GoString() string { + return s.String() +} + +// SetModelDetails sets the ModelDetails field's value. +func (s *GetFoundationModelOutput) SetModelDetails(v *FoundationModelDetails) *GetFoundationModelOutput { + s.ModelDetails = v + return s +} + +type GetModelCustomizationJobInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Identifier for the customization job. + // + // JobIdentifier is a required field + JobIdentifier *string `location:"uri" locationName:"jobIdentifier" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelCustomizationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelCustomizationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetModelCustomizationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetModelCustomizationJobInput"} + if s.JobIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("JobIdentifier")) + } + if s.JobIdentifier != nil && len(*s.JobIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobIdentifier sets the JobIdentifier field's value. +func (s *GetModelCustomizationJobInput) SetJobIdentifier(v string) *GetModelCustomizationJobInput { + s.JobIdentifier = &v + return s +} + +type GetModelCustomizationJobOutput struct { + _ struct{} `type:"structure"` + + // ARN of the base model. + // + // BaseModelArn is a required field + BaseModelArn *string `locationName:"baseModelArn" type:"string" required:"true"` + + // The token that you specified in the CreateCustomizationJob request. + ClientRequestToken *string `locationName:"clientRequestToken" min:"1" type:"string"` + + // Time that the resource was created. + // + // CreationTime is a required field + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // Time that the resource transitioned to terminal state. + EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + + // Information about why the job failed. + FailureMessage *string `locationName:"failureMessage" type:"string"` + + // The hyperparameter values for the job. + // + // HyperParameters is a required field + HyperParameters map[string]*string `locationName:"hyperParameters" type:"map" required:"true"` + + // The ARN of the customization job. + // + // JobArn is a required field + JobArn *string `locationName:"jobArn" type:"string" required:"true"` + + // The name of the customization job. + // + // JobName is a required field + JobName *string `locationName:"jobName" min:"1" type:"string" required:"true"` + + // Time that the resource was last modified. + LastModifiedTime *time.Time `locationName:"lastModifiedTime" type:"timestamp" timestampFormat:"iso8601"` + + // Output data configuration + // + // OutputDataConfig is a required field + OutputDataConfig *OutputDataConfig `locationName:"outputDataConfig" type:"structure" required:"true"` + + // The ARN of the output model. + OutputModelArn *string `locationName:"outputModelArn" min:"20" type:"string"` + + // The custom model is encrypted at rest using this key. + OutputModelKmsKeyArn *string `locationName:"outputModelKmsKeyArn" min:"1" type:"string"` + + // The name of the output model. + // + // OutputModelName is a required field + OutputModelName *string `locationName:"outputModelName" min:"1" type:"string" required:"true"` + + // The ARN of the IAM role. + // + // RoleArn is a required field + RoleArn *string `locationName:"roleArn" type:"string" required:"true"` + + // The status of the job. A successful job transitions from in-progress to completed + // when the output model is ready to use. If the job failed, the failure message + // contains information about why the job failed. + Status *string `locationName:"status" type:"string" enum:"ModelCustomizationJobStatus"` + + // S3 Location of the training data. + // + // TrainingDataConfig is a required field + TrainingDataConfig *TrainingDataConfig `locationName:"trainingDataConfig" type:"structure" required:"true"` + + // Metrics associated with the custom job. + TrainingMetrics *TrainingMetrics `locationName:"trainingMetrics" type:"structure"` + + // Array of up to 10 validators. + // + // ValidationDataConfig is a required field + ValidationDataConfig *ValidationDataConfig `locationName:"validationDataConfig" type:"structure" required:"true"` + + // The loss metric for each validator that you provided in the createjob request. + ValidationMetrics []*ValidatorMetric `locationName:"validationMetrics" type:"list"` + + // VPC configuration for the custom model job. + VpcConfig *VpcConfig `locationName:"vpcConfig" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelCustomizationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelCustomizationJobOutput) GoString() string { + return s.String() +} + +// SetBaseModelArn sets the BaseModelArn field's value. +func (s *GetModelCustomizationJobOutput) SetBaseModelArn(v string) *GetModelCustomizationJobOutput { + s.BaseModelArn = &v + return s +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *GetModelCustomizationJobOutput) SetClientRequestToken(v string) *GetModelCustomizationJobOutput { + s.ClientRequestToken = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetModelCustomizationJobOutput) SetCreationTime(v time.Time) *GetModelCustomizationJobOutput { + s.CreationTime = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *GetModelCustomizationJobOutput) SetEndTime(v time.Time) *GetModelCustomizationJobOutput { + s.EndTime = &v + return s +} + +// SetFailureMessage sets the FailureMessage field's value. +func (s *GetModelCustomizationJobOutput) SetFailureMessage(v string) *GetModelCustomizationJobOutput { + s.FailureMessage = &v + return s +} + +// SetHyperParameters sets the HyperParameters field's value. +func (s *GetModelCustomizationJobOutput) SetHyperParameters(v map[string]*string) *GetModelCustomizationJobOutput { + s.HyperParameters = v + return s +} + +// SetJobArn sets the JobArn field's value. +func (s *GetModelCustomizationJobOutput) SetJobArn(v string) *GetModelCustomizationJobOutput { + s.JobArn = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *GetModelCustomizationJobOutput) SetJobName(v string) *GetModelCustomizationJobOutput { + s.JobName = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *GetModelCustomizationJobOutput) SetLastModifiedTime(v time.Time) *GetModelCustomizationJobOutput { + s.LastModifiedTime = &v + return s +} + +// SetOutputDataConfig sets the OutputDataConfig field's value. +func (s *GetModelCustomizationJobOutput) SetOutputDataConfig(v *OutputDataConfig) *GetModelCustomizationJobOutput { + s.OutputDataConfig = v + return s +} + +// SetOutputModelArn sets the OutputModelArn field's value. +func (s *GetModelCustomizationJobOutput) SetOutputModelArn(v string) *GetModelCustomizationJobOutput { + s.OutputModelArn = &v + return s +} + +// SetOutputModelKmsKeyArn sets the OutputModelKmsKeyArn field's value. +func (s *GetModelCustomizationJobOutput) SetOutputModelKmsKeyArn(v string) *GetModelCustomizationJobOutput { + s.OutputModelKmsKeyArn = &v + return s +} + +// SetOutputModelName sets the OutputModelName field's value. +func (s *GetModelCustomizationJobOutput) SetOutputModelName(v string) *GetModelCustomizationJobOutput { + s.OutputModelName = &v + return s +} + +// SetRoleArn sets the RoleArn field's value. +func (s *GetModelCustomizationJobOutput) SetRoleArn(v string) *GetModelCustomizationJobOutput { + s.RoleArn = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *GetModelCustomizationJobOutput) SetStatus(v string) *GetModelCustomizationJobOutput { + s.Status = &v + return s +} + +// SetTrainingDataConfig sets the TrainingDataConfig field's value. +func (s *GetModelCustomizationJobOutput) SetTrainingDataConfig(v *TrainingDataConfig) *GetModelCustomizationJobOutput { + s.TrainingDataConfig = v + return s +} + +// SetTrainingMetrics sets the TrainingMetrics field's value. +func (s *GetModelCustomizationJobOutput) SetTrainingMetrics(v *TrainingMetrics) *GetModelCustomizationJobOutput { + s.TrainingMetrics = v + return s +} + +// SetValidationDataConfig sets the ValidationDataConfig field's value. +func (s *GetModelCustomizationJobOutput) SetValidationDataConfig(v *ValidationDataConfig) *GetModelCustomizationJobOutput { + s.ValidationDataConfig = v + return s +} + +// SetValidationMetrics sets the ValidationMetrics field's value. +func (s *GetModelCustomizationJobOutput) SetValidationMetrics(v []*ValidatorMetric) *GetModelCustomizationJobOutput { + s.ValidationMetrics = v + return s +} + +// SetVpcConfig sets the VpcConfig field's value. +func (s *GetModelCustomizationJobOutput) SetVpcConfig(v *VpcConfig) *GetModelCustomizationJobOutput { + s.VpcConfig = v + return s +} + +type GetModelInvocationLoggingConfigurationInput struct { + _ struct{} `type:"structure" nopayload:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelInvocationLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelInvocationLoggingConfigurationInput) GoString() string { + return s.String() +} + +type GetModelInvocationLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The current configuration values. + LoggingConfig *LoggingConfig `locationName:"loggingConfig" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelInvocationLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetModelInvocationLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// SetLoggingConfig sets the LoggingConfig field's value. +func (s *GetModelInvocationLoggingConfigurationOutput) SetLoggingConfig(v *LoggingConfig) *GetModelInvocationLoggingConfigurationOutput { + s.LoggingConfig = v + return s +} + +// An internal server error occurred. Retry your request. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListCustomModelsInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Return custom models only if the base model ARN matches this parameter. + BaseModelArnEquals *string `location:"querystring" locationName:"baseModelArnEquals" min:"20" type:"string"` + + // Return custom models created after the specified time. + CreationTimeAfter *time.Time `location:"querystring" locationName:"creationTimeAfter" type:"timestamp" timestampFormat:"iso8601"` + + // Return custom models created before the specified time. + CreationTimeBefore *time.Time `location:"querystring" locationName:"creationTimeBefore" type:"timestamp" timestampFormat:"iso8601"` + + // Return custom models only if the foundation model ARN matches this parameter. + FoundationModelArnEquals *string `location:"querystring" locationName:"foundationModelArnEquals" type:"string"` + + // Maximum number of results to return in the response. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Return custom models only if the job name contains these characters. + NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` + + // Continuation token from the previous response, for Bedrock to list the next + // set of results. + NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` + + // The field to sort by in the returned list of models. + SortBy *string `location:"querystring" locationName:"sortBy" type:"string" enum:"SortModelsBy"` + + // The sort order of the results. + SortOrder *string `location:"querystring" locationName:"sortOrder" type:"string" enum:"SortOrder"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListCustomModelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListCustomModelsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListCustomModelsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListCustomModelsInput"} + if s.BaseModelArnEquals != nil && len(*s.BaseModelArnEquals) < 20 { + invalidParams.Add(request.NewErrParamMinLen("BaseModelArnEquals", 20)) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NameContains != nil && len(*s.NameContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBaseModelArnEquals sets the BaseModelArnEquals field's value. +func (s *ListCustomModelsInput) SetBaseModelArnEquals(v string) *ListCustomModelsInput { + s.BaseModelArnEquals = &v + return s +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListCustomModelsInput) SetCreationTimeAfter(v time.Time) *ListCustomModelsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListCustomModelsInput) SetCreationTimeBefore(v time.Time) *ListCustomModelsInput { + s.CreationTimeBefore = &v + return s +} + +// SetFoundationModelArnEquals sets the FoundationModelArnEquals field's value. +func (s *ListCustomModelsInput) SetFoundationModelArnEquals(v string) *ListCustomModelsInput { + s.FoundationModelArnEquals = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListCustomModelsInput) SetMaxResults(v int64) *ListCustomModelsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListCustomModelsInput) SetNameContains(v string) *ListCustomModelsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCustomModelsInput) SetNextToken(v string) *ListCustomModelsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListCustomModelsInput) SetSortBy(v string) *ListCustomModelsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListCustomModelsInput) SetSortOrder(v string) *ListCustomModelsInput { + s.SortOrder = &v + return s +} + +type ListCustomModelsOutput struct { + _ struct{} `type:"structure"` + + // Model summaries. + ModelSummaries []*CustomModelSummary `locationName:"modelSummaries" type:"list"` + + // Continuation token for the next request to list the next set of results. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListCustomModelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListCustomModelsOutput) GoString() string { + return s.String() +} + +// SetModelSummaries sets the ModelSummaries field's value. +func (s *ListCustomModelsOutput) SetModelSummaries(v []*CustomModelSummary) *ListCustomModelsOutput { + s.ModelSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListCustomModelsOutput) SetNextToken(v string) *ListCustomModelsOutput { + s.NextToken = &v + return s +} + +type ListFoundationModelsInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // List by customization type. + ByCustomizationType *string `location:"querystring" locationName:"byCustomizationType" type:"string" enum:"ModelCustomization"` + + // List by inference type. + ByInferenceType *string `location:"querystring" locationName:"byInferenceType" type:"string" enum:"InferenceType"` + + // List by output modality type. + ByOutputModality *string `location:"querystring" locationName:"byOutputModality" type:"string" enum:"ModelModality"` + + // A Bedrock model provider. + ByProvider *string `location:"querystring" locationName:"byProvider" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListFoundationModelsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListFoundationModelsInput) GoString() string { + return s.String() +} + +// SetByCustomizationType sets the ByCustomizationType field's value. +func (s *ListFoundationModelsInput) SetByCustomizationType(v string) *ListFoundationModelsInput { + s.ByCustomizationType = &v + return s +} + +// SetByInferenceType sets the ByInferenceType field's value. +func (s *ListFoundationModelsInput) SetByInferenceType(v string) *ListFoundationModelsInput { + s.ByInferenceType = &v + return s +} + +// SetByOutputModality sets the ByOutputModality field's value. +func (s *ListFoundationModelsInput) SetByOutputModality(v string) *ListFoundationModelsInput { + s.ByOutputModality = &v + return s +} + +// SetByProvider sets the ByProvider field's value. +func (s *ListFoundationModelsInput) SetByProvider(v string) *ListFoundationModelsInput { + s.ByProvider = &v + return s +} + +type ListFoundationModelsOutput struct { + _ struct{} `type:"structure"` + + // A list of bedrock foundation models. + ModelSummaries []*FoundationModelSummary `locationName:"modelSummaries" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListFoundationModelsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListFoundationModelsOutput) GoString() string { + return s.String() +} + +// SetModelSummaries sets the ModelSummaries field's value. +func (s *ListFoundationModelsOutput) SetModelSummaries(v []*FoundationModelSummary) *ListFoundationModelsOutput { + s.ModelSummaries = v + return s +} + +type ListModelCustomizationJobsInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Return customization jobs created after the specified time. + CreationTimeAfter *time.Time `location:"querystring" locationName:"creationTimeAfter" type:"timestamp" timestampFormat:"iso8601"` + + // Return customization jobs created before the specified time. + CreationTimeBefore *time.Time `location:"querystring" locationName:"creationTimeBefore" type:"timestamp" timestampFormat:"iso8601"` + + // Maximum number of results to return in the response. + MaxResults *int64 `location:"querystring" locationName:"maxResults" min:"1" type:"integer"` + + // Return customization jobs only if the job name contains these characters. + NameContains *string `location:"querystring" locationName:"nameContains" min:"1" type:"string"` + + // Continuation token from the previous response, for Bedrock to list the next + // set of results. + NextToken *string `location:"querystring" locationName:"nextToken" min:"1" type:"string"` + + // The field to sort by in the returned list of jobs. + SortBy *string `location:"querystring" locationName:"sortBy" type:"string" enum:"SortJobsBy"` + + // The sort order of the results. + SortOrder *string `location:"querystring" locationName:"sortOrder" type:"string" enum:"SortOrder"` + + // Return customization jobs with the specified status. + StatusEquals *string `location:"querystring" locationName:"statusEquals" type:"string" enum:"FineTuningJobStatus"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListModelCustomizationJobsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListModelCustomizationJobsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListModelCustomizationJobsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListModelCustomizationJobsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.NameContains != nil && len(*s.NameContains) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NameContains", 1)) + } + if s.NextToken != nil && len(*s.NextToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCreationTimeAfter sets the CreationTimeAfter field's value. +func (s *ListModelCustomizationJobsInput) SetCreationTimeAfter(v time.Time) *ListModelCustomizationJobsInput { + s.CreationTimeAfter = &v + return s +} + +// SetCreationTimeBefore sets the CreationTimeBefore field's value. +func (s *ListModelCustomizationJobsInput) SetCreationTimeBefore(v time.Time) *ListModelCustomizationJobsInput { + s.CreationTimeBefore = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListModelCustomizationJobsInput) SetMaxResults(v int64) *ListModelCustomizationJobsInput { + s.MaxResults = &v + return s +} + +// SetNameContains sets the NameContains field's value. +func (s *ListModelCustomizationJobsInput) SetNameContains(v string) *ListModelCustomizationJobsInput { + s.NameContains = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelCustomizationJobsInput) SetNextToken(v string) *ListModelCustomizationJobsInput { + s.NextToken = &v + return s +} + +// SetSortBy sets the SortBy field's value. +func (s *ListModelCustomizationJobsInput) SetSortBy(v string) *ListModelCustomizationJobsInput { + s.SortBy = &v + return s +} + +// SetSortOrder sets the SortOrder field's value. +func (s *ListModelCustomizationJobsInput) SetSortOrder(v string) *ListModelCustomizationJobsInput { + s.SortOrder = &v + return s +} + +// SetStatusEquals sets the StatusEquals field's value. +func (s *ListModelCustomizationJobsInput) SetStatusEquals(v string) *ListModelCustomizationJobsInput { + s.StatusEquals = &v + return s +} + +type ListModelCustomizationJobsOutput struct { + _ struct{} `type:"structure"` + + // Job summaries. + ModelCustomizationJobSummaries []*ModelCustomizationJobSummary `locationName:"modelCustomizationJobSummaries" type:"list"` + + // Page continuation token to use in the next request. + NextToken *string `locationName:"nextToken" min:"1" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListModelCustomizationJobsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListModelCustomizationJobsOutput) GoString() string { + return s.String() +} + +// SetModelCustomizationJobSummaries sets the ModelCustomizationJobSummaries field's value. +func (s *ListModelCustomizationJobsOutput) SetModelCustomizationJobSummaries(v []*ModelCustomizationJobSummary) *ListModelCustomizationJobsOutput { + s.ModelCustomizationJobSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListModelCustomizationJobsOutput) SetNextToken(v string) *ListModelCustomizationJobsOutput { + s.NextToken = &v + return s +} + +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource. + // + // ResourceARN is a required field + ResourceARN *string `locationName:"resourceARN" min:"20" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListTagsForResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListTagsForResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListTagsForResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *ListTagsForResourceInput) SetResourceARN(v string) *ListTagsForResourceInput { + s.ResourceARN = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // An array of the tags associated with this resource. + Tags []*Tag `locationName:"tags" type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListTagsForResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListTagsForResourceOutput) GoString() string { + return s.String() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { + s.Tags = v + return s +} + +// Configuration fields for invokation logging. +type LoggingConfig struct { + _ struct{} `type:"structure"` + + // CloudWatch logging configuration. + CloudWatchConfig *CloudWatchConfig `locationName:"cloudWatchConfig" type:"structure"` + + // Set to include embeddings data in the log delivery. + EmbeddingDataDeliveryEnabled *bool `locationName:"embeddingDataDeliveryEnabled" type:"boolean"` + + // Set to include image data in the log delivery. + ImageDataDeliveryEnabled *bool `locationName:"imageDataDeliveryEnabled" type:"boolean"` + + // S3 configuration for storing log data. + S3Config *S3Config `locationName:"s3Config" type:"structure"` + + // Set to include text data in the log delivery. + TextDataDeliveryEnabled *bool `locationName:"textDataDeliveryEnabled" type:"boolean"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LoggingConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s LoggingConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LoggingConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LoggingConfig"} + if s.CloudWatchConfig != nil { + if err := s.CloudWatchConfig.Validate(); err != nil { + invalidParams.AddNested("CloudWatchConfig", err.(request.ErrInvalidParams)) + } + } + if s.S3Config != nil { + if err := s.S3Config.Validate(); err != nil { + invalidParams.AddNested("S3Config", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCloudWatchConfig sets the CloudWatchConfig field's value. +func (s *LoggingConfig) SetCloudWatchConfig(v *CloudWatchConfig) *LoggingConfig { + s.CloudWatchConfig = v + return s +} + +// SetEmbeddingDataDeliveryEnabled sets the EmbeddingDataDeliveryEnabled field's value. +func (s *LoggingConfig) SetEmbeddingDataDeliveryEnabled(v bool) *LoggingConfig { + s.EmbeddingDataDeliveryEnabled = &v + return s +} + +// SetImageDataDeliveryEnabled sets the ImageDataDeliveryEnabled field's value. +func (s *LoggingConfig) SetImageDataDeliveryEnabled(v bool) *LoggingConfig { + s.ImageDataDeliveryEnabled = &v + return s +} + +// SetS3Config sets the S3Config field's value. +func (s *LoggingConfig) SetS3Config(v *S3Config) *LoggingConfig { + s.S3Config = v + return s +} + +// SetTextDataDeliveryEnabled sets the TextDataDeliveryEnabled field's value. +func (s *LoggingConfig) SetTextDataDeliveryEnabled(v bool) *LoggingConfig { + s.TextDataDeliveryEnabled = &v + return s +} + +// Information about one customization job +type ModelCustomizationJobSummary struct { + _ struct{} `type:"structure"` + + // ARN of the base model. + // + // BaseModelArn is a required field + BaseModelArn *string `locationName:"baseModelArn" min:"20" type:"string" required:"true"` + + // Creation time of the custom model. + // + // CreationTime is a required field + CreationTime *time.Time `locationName:"creationTime" type:"timestamp" timestampFormat:"iso8601" required:"true"` + + // ARN of the custom model. + CustomModelArn *string `locationName:"customModelArn" min:"20" type:"string"` + + // Name of the custom model. + CustomModelName *string `locationName:"customModelName" min:"1" type:"string"` + + // Time that the customization job ended. + EndTime *time.Time `locationName:"endTime" type:"timestamp" timestampFormat:"iso8601"` + + // ARN of the customization job. + // + // JobArn is a required field + JobArn *string `locationName:"jobArn" type:"string" required:"true"` + + // Name of the customization job. + // + // JobName is a required field + JobName *string `locationName:"jobName" min:"1" type:"string" required:"true"` + + // Time that the customization job was last modified. + LastModifiedTime *time.Time `locationName:"lastModifiedTime" type:"timestamp" timestampFormat:"iso8601"` + + // Status of the customization job. + // + // Status is a required field + Status *string `locationName:"status" type:"string" required:"true" enum:"ModelCustomizationJobStatus"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelCustomizationJobSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelCustomizationJobSummary) GoString() string { + return s.String() +} + +// SetBaseModelArn sets the BaseModelArn field's value. +func (s *ModelCustomizationJobSummary) SetBaseModelArn(v string) *ModelCustomizationJobSummary { + s.BaseModelArn = &v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *ModelCustomizationJobSummary) SetCreationTime(v time.Time) *ModelCustomizationJobSummary { + s.CreationTime = &v + return s +} + +// SetCustomModelArn sets the CustomModelArn field's value. +func (s *ModelCustomizationJobSummary) SetCustomModelArn(v string) *ModelCustomizationJobSummary { + s.CustomModelArn = &v + return s +} + +// SetCustomModelName sets the CustomModelName field's value. +func (s *ModelCustomizationJobSummary) SetCustomModelName(v string) *ModelCustomizationJobSummary { + s.CustomModelName = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *ModelCustomizationJobSummary) SetEndTime(v time.Time) *ModelCustomizationJobSummary { + s.EndTime = &v + return s +} + +// SetJobArn sets the JobArn field's value. +func (s *ModelCustomizationJobSummary) SetJobArn(v string) *ModelCustomizationJobSummary { + s.JobArn = &v + return s +} + +// SetJobName sets the JobName field's value. +func (s *ModelCustomizationJobSummary) SetJobName(v string) *ModelCustomizationJobSummary { + s.JobName = &v + return s +} + +// SetLastModifiedTime sets the LastModifiedTime field's value. +func (s *ModelCustomizationJobSummary) SetLastModifiedTime(v time.Time) *ModelCustomizationJobSummary { + s.LastModifiedTime = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ModelCustomizationJobSummary) SetStatus(v string) *ModelCustomizationJobSummary { + s.Status = &v + return s +} + +// S3 Location of the output data. +type OutputDataConfig struct { + _ struct{} `type:"structure"` + + // The S3 URI where the output data is stored. + // + // S3Uri is a required field + S3Uri *string `locationName:"s3Uri" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OutputDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s OutputDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *OutputDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "OutputDataConfig"} + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + if s.S3Uri != nil && len(*s.S3Uri) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Uri", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Uri sets the S3Uri field's value. +func (s *OutputDataConfig) SetS3Uri(v string) *OutputDataConfig { + s.S3Uri = &v + return s +} + +type PutModelInvocationLoggingConfigurationInput struct { + _ struct{} `type:"structure"` + + // The logging configuration values to set. + // + // LoggingConfig is a required field + LoggingConfig *LoggingConfig `locationName:"loggingConfig" type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutModelInvocationLoggingConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutModelInvocationLoggingConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutModelInvocationLoggingConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutModelInvocationLoggingConfigurationInput"} + if s.LoggingConfig == nil { + invalidParams.Add(request.NewErrParamRequired("LoggingConfig")) + } + if s.LoggingConfig != nil { + if err := s.LoggingConfig.Validate(); err != nil { + invalidParams.AddNested("LoggingConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetLoggingConfig sets the LoggingConfig field's value. +func (s *PutModelInvocationLoggingConfigurationInput) SetLoggingConfig(v *LoggingConfig) *PutModelInvocationLoggingConfigurationInput { + s.LoggingConfig = v + return s +} + +type PutModelInvocationLoggingConfigurationOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutModelInvocationLoggingConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutModelInvocationLoggingConfigurationOutput) GoString() string { + return s.String() +} + +// The specified resource ARN was not found. Check the ARN and try your request +// again. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// S3 configuration for storing log data. +type S3Config struct { + _ struct{} `type:"structure"` + + // S3 bucket name. + // + // BucketName is a required field + BucketName *string `locationName:"bucketName" min:"3" type:"string" required:"true"` + + // S3 prefix. + KeyPrefix *string `locationName:"keyPrefix" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s S3Config) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s S3Config) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *S3Config) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "S3Config"} + if s.BucketName == nil { + invalidParams.Add(request.NewErrParamRequired("BucketName")) + } + if s.BucketName != nil && len(*s.BucketName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("BucketName", 3)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucketName sets the BucketName field's value. +func (s *S3Config) SetBucketName(v string) *S3Config { + s.BucketName = &v + return s +} + +// SetKeyPrefix sets the KeyPrefix field's value. +func (s *S3Config) SetKeyPrefix(v string) *S3Config { + s.KeyPrefix = &v + return s +} + +// The number of requests exceeds the service quota. Resubmit your request later. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) GoString() string { + return s.String() +} + +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" +} + +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil +} + +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +type StopModelCustomizationJobInput struct { + _ struct{} `type:"structure" nopayload:"true"` + + // Job identifier of the job to stop. + // + // JobIdentifier is a required field + JobIdentifier *string `location:"uri" locationName:"jobIdentifier" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopModelCustomizationJobInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopModelCustomizationJobInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopModelCustomizationJobInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopModelCustomizationJobInput"} + if s.JobIdentifier == nil { + invalidParams.Add(request.NewErrParamRequired("JobIdentifier")) + } + if s.JobIdentifier != nil && len(*s.JobIdentifier) < 1 { + invalidParams.Add(request.NewErrParamMinLen("JobIdentifier", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetJobIdentifier sets the JobIdentifier field's value. +func (s *StopModelCustomizationJobInput) SetJobIdentifier(v string) *StopModelCustomizationJobInput { + s.JobIdentifier = &v + return s +} + +type StopModelCustomizationJobOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopModelCustomizationJobOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopModelCustomizationJobOutput) GoString() string { + return s.String() +} + +// Definition of the key/value pair for a tag. +type Tag struct { + _ struct{} `type:"structure"` + + // Key for the tag. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // Value for the tag. + // + // Value is a required field + Value *string `locationName:"value" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Tag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Tag) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Tag) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Tag"} + if s.Key == nil { + invalidParams.Add(request.NewErrParamRequired("Key")) + } + if s.Key != nil && len(*s.Key) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Key", 1)) + } + if s.Value == nil { + invalidParams.Add(request.NewErrParamRequired("Value")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKey sets the Key field's value. +func (s *Tag) SetKey(v string) *Tag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Tag) SetValue(v string) *Tag { + s.Value = &v + return s +} + +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource to tag. + // + // ResourceARN is a required field + ResourceARN *string `locationName:"resourceARN" min:"20" type:"string" required:"true"` + + // Tags to associate with the resource. + // + // Tags is a required field + Tags []*Tag `locationName:"tags" type:"list" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *TagResourceInput) SetResourceARN(v string) *TagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { + s.Tags = v + return s +} + +type TagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TagResourceOutput) GoString() string { + return s.String() +} + +// The number of requests exceeds the limit. Resubmit your request later. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The request contains more tags than can be associated with a resource (50 +// tags per resource). The maximum number of tags includes both existing tags +// and those included in your current request. +type TooManyTagsException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` + + // The name of the resource with too many tags. + ResourceName *string `locationName:"resourceName" min:"20" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TooManyTagsException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TooManyTagsException) GoString() string { + return s.String() +} + +func newErrorTooManyTagsException(v protocol.ResponseMetadata) error { + return &TooManyTagsException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *TooManyTagsException) Code() string { + return "TooManyTagsException" +} + +// Message returns the exception's message. +func (s *TooManyTagsException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *TooManyTagsException) OrigErr() error { + return nil +} + +func (s *TooManyTagsException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *TooManyTagsException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *TooManyTagsException) RequestID() string { + return s.RespMetadata.RequestID +} + +// S3 Location of the training data. +type TrainingDataConfig struct { + _ struct{} `type:"structure"` + + // The S3 URI where the training data is stored. + // + // S3Uri is a required field + S3Uri *string `locationName:"s3Uri" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TrainingDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TrainingDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *TrainingDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "TrainingDataConfig"} + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + if s.S3Uri != nil && len(*s.S3Uri) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Uri", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Uri sets the S3Uri field's value. +func (s *TrainingDataConfig) SetS3Uri(v string) *TrainingDataConfig { + s.S3Uri = &v + return s +} + +// Metrics associated with the custom job. +type TrainingMetrics struct { + _ struct{} `type:"structure"` + + // Loss metric associated with the custom job. + TrainingLoss *float64 `locationName:"trainingLoss" type:"float"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TrainingMetrics) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TrainingMetrics) GoString() string { + return s.String() +} + +// SetTrainingLoss sets the TrainingLoss field's value. +func (s *TrainingMetrics) SetTrainingLoss(v float64) *TrainingMetrics { + s.TrainingLoss = &v + return s +} + +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The ARN of the resource to untag. + // + // ResourceARN is a required field + ResourceARN *string `locationName:"resourceARN" min:"20" type:"string" required:"true"` + + // Tag keys of the tags to remove from the resource. + // + // TagKeys is a required field + TagKeys []*string `locationName:"tagKeys" type:"list" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UntagResourceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UntagResourceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UntagResourceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} + if s.ResourceARN == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceARN")) + } + if s.ResourceARN != nil && len(*s.ResourceARN) < 20 { + invalidParams.Add(request.NewErrParamMinLen("ResourceARN", 20)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceARN sets the ResourceARN field's value. +func (s *UntagResourceInput) SetResourceARN(v string) *UntagResourceInput { + s.ResourceARN = &v + return s +} + +// SetTagKeys sets the TagKeys field's value. +func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { + s.TagKeys = v + return s +} + +type UntagResourceOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UntagResourceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s UntagResourceOutput) GoString() string { + return s.String() +} + +// Array of up to 10 validators. +type ValidationDataConfig struct { + _ struct{} `type:"structure"` + + // Information about the validators. + // + // Validators is a required field + Validators []*Validator `locationName:"validators" type:"list" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationDataConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationDataConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ValidationDataConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ValidationDataConfig"} + if s.Validators == nil { + invalidParams.Add(request.NewErrParamRequired("Validators")) + } + if s.Validators != nil { + for i, v := range s.Validators { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Validators", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetValidators sets the Validators field's value. +func (s *ValidationDataConfig) SetValidators(v []*Validator) *ValidationDataConfig { + s.Validators = v + return s +} + +// Input validation failed. Check your request parameters and retry the request. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Information about a validator. +type Validator struct { + _ struct{} `type:"structure"` + + // The S3 URI where the validation data is stored. + // + // S3Uri is a required field + S3Uri *string `locationName:"s3Uri" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Validator) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Validator) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *Validator) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "Validator"} + if s.S3Uri == nil { + invalidParams.Add(request.NewErrParamRequired("S3Uri")) + } + if s.S3Uri != nil && len(*s.S3Uri) < 1 { + invalidParams.Add(request.NewErrParamMinLen("S3Uri", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetS3Uri sets the S3Uri field's value. +func (s *Validator) SetS3Uri(v string) *Validator { + s.S3Uri = &v + return s +} + +// The metric for the validator. +type ValidatorMetric struct { + _ struct{} `type:"structure"` + + // The validation loss associated with this validator. + ValidationLoss *float64 `locationName:"validationLoss" type:"float"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidatorMetric) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidatorMetric) GoString() string { + return s.String() +} + +// SetValidationLoss sets the ValidationLoss field's value. +func (s *ValidatorMetric) SetValidationLoss(v float64) *ValidatorMetric { + s.ValidationLoss = &v + return s +} + +// VPC configuration. +type VpcConfig struct { + _ struct{} `type:"structure"` + + // VPC configuration security group Ids. + // + // SecurityGroupIds is a required field + SecurityGroupIds []*string `locationName:"securityGroupIds" min:"1" type:"list" required:"true"` + + // VPC configuration subnets. + // + // SubnetIds is a required field + SubnetIds []*string `locationName:"subnetIds" min:"1" type:"list" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VpcConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VpcConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VpcConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VpcConfig"} + if s.SecurityGroupIds == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupIds")) + } + if s.SecurityGroupIds != nil && len(s.SecurityGroupIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SecurityGroupIds", 1)) + } + if s.SubnetIds == nil { + invalidParams.Add(request.NewErrParamRequired("SubnetIds")) + } + if s.SubnetIds != nil && len(s.SubnetIds) < 1 { + invalidParams.Add(request.NewErrParamMinLen("SubnetIds", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetSecurityGroupIds sets the SecurityGroupIds field's value. +func (s *VpcConfig) SetSecurityGroupIds(v []*string) *VpcConfig { + s.SecurityGroupIds = v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *VpcConfig) SetSubnetIds(v []*string) *VpcConfig { + s.SubnetIds = v + return s +} + +const ( + // FineTuningJobStatusInProgress is a FineTuningJobStatus enum value + FineTuningJobStatusInProgress = "InProgress" + + // FineTuningJobStatusCompleted is a FineTuningJobStatus enum value + FineTuningJobStatusCompleted = "Completed" + + // FineTuningJobStatusFailed is a FineTuningJobStatus enum value + FineTuningJobStatusFailed = "Failed" + + // FineTuningJobStatusStopping is a FineTuningJobStatus enum value + FineTuningJobStatusStopping = "Stopping" + + // FineTuningJobStatusStopped is a FineTuningJobStatus enum value + FineTuningJobStatusStopped = "Stopped" +) + +// FineTuningJobStatus_Values returns all elements of the FineTuningJobStatus enum +func FineTuningJobStatus_Values() []string { + return []string{ + FineTuningJobStatusInProgress, + FineTuningJobStatusCompleted, + FineTuningJobStatusFailed, + FineTuningJobStatusStopping, + FineTuningJobStatusStopped, + } +} + +const ( + // InferenceTypeOnDemand is a InferenceType enum value + InferenceTypeOnDemand = "ON_DEMAND" + + // InferenceTypeProvisioned is a InferenceType enum value + InferenceTypeProvisioned = "PROVISIONED" +) + +// InferenceType_Values returns all elements of the InferenceType enum +func InferenceType_Values() []string { + return []string{ + InferenceTypeOnDemand, + InferenceTypeProvisioned, + } +} + +const ( + // ModelCustomizationFineTuning is a ModelCustomization enum value + ModelCustomizationFineTuning = "FINE_TUNING" +) + +// ModelCustomization_Values returns all elements of the ModelCustomization enum +func ModelCustomization_Values() []string { + return []string{ + ModelCustomizationFineTuning, + } +} + +const ( + // ModelCustomizationJobStatusInProgress is a ModelCustomizationJobStatus enum value + ModelCustomizationJobStatusInProgress = "InProgress" + + // ModelCustomizationJobStatusCompleted is a ModelCustomizationJobStatus enum value + ModelCustomizationJobStatusCompleted = "Completed" + + // ModelCustomizationJobStatusFailed is a ModelCustomizationJobStatus enum value + ModelCustomizationJobStatusFailed = "Failed" + + // ModelCustomizationJobStatusStopping is a ModelCustomizationJobStatus enum value + ModelCustomizationJobStatusStopping = "Stopping" + + // ModelCustomizationJobStatusStopped is a ModelCustomizationJobStatus enum value + ModelCustomizationJobStatusStopped = "Stopped" +) + +// ModelCustomizationJobStatus_Values returns all elements of the ModelCustomizationJobStatus enum +func ModelCustomizationJobStatus_Values() []string { + return []string{ + ModelCustomizationJobStatusInProgress, + ModelCustomizationJobStatusCompleted, + ModelCustomizationJobStatusFailed, + ModelCustomizationJobStatusStopping, + ModelCustomizationJobStatusStopped, + } +} + +const ( + // ModelModalityText is a ModelModality enum value + ModelModalityText = "TEXT" + + // ModelModalityImage is a ModelModality enum value + ModelModalityImage = "IMAGE" + + // ModelModalityEmbedding is a ModelModality enum value + ModelModalityEmbedding = "EMBEDDING" +) + +// ModelModality_Values returns all elements of the ModelModality enum +func ModelModality_Values() []string { + return []string{ + ModelModalityText, + ModelModalityImage, + ModelModalityEmbedding, + } +} + +const ( + // SortJobsByCreationTime is a SortJobsBy enum value + SortJobsByCreationTime = "CreationTime" +) + +// SortJobsBy_Values returns all elements of the SortJobsBy enum +func SortJobsBy_Values() []string { + return []string{ + SortJobsByCreationTime, + } +} + +const ( + // SortModelsByCreationTime is a SortModelsBy enum value + SortModelsByCreationTime = "CreationTime" +) + +// SortModelsBy_Values returns all elements of the SortModelsBy enum +func SortModelsBy_Values() []string { + return []string{ + SortModelsByCreationTime, + } +} + +const ( + // SortOrderAscending is a SortOrder enum value + SortOrderAscending = "Ascending" + + // SortOrderDescending is a SortOrder enum value + SortOrderDescending = "Descending" +) + +// SortOrder_Values returns all elements of the SortOrder enum +func SortOrder_Values() []string { + return []string{ + SortOrderAscending, + SortOrderDescending, + } +} diff --git a/service/bedrock/bedrockiface/interface.go b/service/bedrock/bedrockiface/interface.go new file mode 100644 index 00000000000..d9566b13e21 --- /dev/null +++ b/service/bedrock/bedrockiface/interface.go @@ -0,0 +1,130 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package bedrockiface provides an interface to enable mocking the Amazon Bedrock service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package bedrockiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/bedrock" +) + +// BedrockAPI provides an interface to enable mocking the +// bedrock.Bedrock service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon Bedrock. +// func myFunc(svc bedrockiface.BedrockAPI) bool { +// // Make svc.CreateModelCustomizationJob request +// } +// +// func main() { +// sess := session.New() +// svc := bedrock.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockBedrockClient struct { +// bedrockiface.BedrockAPI +// } +// func (m *mockBedrockClient) CreateModelCustomizationJob(input *bedrock.CreateModelCustomizationJobInput) (*bedrock.CreateModelCustomizationJobOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockBedrockClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type BedrockAPI interface { + CreateModelCustomizationJob(*bedrock.CreateModelCustomizationJobInput) (*bedrock.CreateModelCustomizationJobOutput, error) + CreateModelCustomizationJobWithContext(aws.Context, *bedrock.CreateModelCustomizationJobInput, ...request.Option) (*bedrock.CreateModelCustomizationJobOutput, error) + CreateModelCustomizationJobRequest(*bedrock.CreateModelCustomizationJobInput) (*request.Request, *bedrock.CreateModelCustomizationJobOutput) + + DeleteCustomModel(*bedrock.DeleteCustomModelInput) (*bedrock.DeleteCustomModelOutput, error) + DeleteCustomModelWithContext(aws.Context, *bedrock.DeleteCustomModelInput, ...request.Option) (*bedrock.DeleteCustomModelOutput, error) + DeleteCustomModelRequest(*bedrock.DeleteCustomModelInput) (*request.Request, *bedrock.DeleteCustomModelOutput) + + DeleteModelInvocationLoggingConfiguration(*bedrock.DeleteModelInvocationLoggingConfigurationInput) (*bedrock.DeleteModelInvocationLoggingConfigurationOutput, error) + DeleteModelInvocationLoggingConfigurationWithContext(aws.Context, *bedrock.DeleteModelInvocationLoggingConfigurationInput, ...request.Option) (*bedrock.DeleteModelInvocationLoggingConfigurationOutput, error) + DeleteModelInvocationLoggingConfigurationRequest(*bedrock.DeleteModelInvocationLoggingConfigurationInput) (*request.Request, *bedrock.DeleteModelInvocationLoggingConfigurationOutput) + + GetCustomModel(*bedrock.GetCustomModelInput) (*bedrock.GetCustomModelOutput, error) + GetCustomModelWithContext(aws.Context, *bedrock.GetCustomModelInput, ...request.Option) (*bedrock.GetCustomModelOutput, error) + GetCustomModelRequest(*bedrock.GetCustomModelInput) (*request.Request, *bedrock.GetCustomModelOutput) + + GetFoundationModel(*bedrock.GetFoundationModelInput) (*bedrock.GetFoundationModelOutput, error) + GetFoundationModelWithContext(aws.Context, *bedrock.GetFoundationModelInput, ...request.Option) (*bedrock.GetFoundationModelOutput, error) + GetFoundationModelRequest(*bedrock.GetFoundationModelInput) (*request.Request, *bedrock.GetFoundationModelOutput) + + GetModelCustomizationJob(*bedrock.GetModelCustomizationJobInput) (*bedrock.GetModelCustomizationJobOutput, error) + GetModelCustomizationJobWithContext(aws.Context, *bedrock.GetModelCustomizationJobInput, ...request.Option) (*bedrock.GetModelCustomizationJobOutput, error) + GetModelCustomizationJobRequest(*bedrock.GetModelCustomizationJobInput) (*request.Request, *bedrock.GetModelCustomizationJobOutput) + + GetModelInvocationLoggingConfiguration(*bedrock.GetModelInvocationLoggingConfigurationInput) (*bedrock.GetModelInvocationLoggingConfigurationOutput, error) + GetModelInvocationLoggingConfigurationWithContext(aws.Context, *bedrock.GetModelInvocationLoggingConfigurationInput, ...request.Option) (*bedrock.GetModelInvocationLoggingConfigurationOutput, error) + GetModelInvocationLoggingConfigurationRequest(*bedrock.GetModelInvocationLoggingConfigurationInput) (*request.Request, *bedrock.GetModelInvocationLoggingConfigurationOutput) + + ListCustomModels(*bedrock.ListCustomModelsInput) (*bedrock.ListCustomModelsOutput, error) + ListCustomModelsWithContext(aws.Context, *bedrock.ListCustomModelsInput, ...request.Option) (*bedrock.ListCustomModelsOutput, error) + ListCustomModelsRequest(*bedrock.ListCustomModelsInput) (*request.Request, *bedrock.ListCustomModelsOutput) + + ListCustomModelsPages(*bedrock.ListCustomModelsInput, func(*bedrock.ListCustomModelsOutput, bool) bool) error + ListCustomModelsPagesWithContext(aws.Context, *bedrock.ListCustomModelsInput, func(*bedrock.ListCustomModelsOutput, bool) bool, ...request.Option) error + + ListFoundationModels(*bedrock.ListFoundationModelsInput) (*bedrock.ListFoundationModelsOutput, error) + ListFoundationModelsWithContext(aws.Context, *bedrock.ListFoundationModelsInput, ...request.Option) (*bedrock.ListFoundationModelsOutput, error) + ListFoundationModelsRequest(*bedrock.ListFoundationModelsInput) (*request.Request, *bedrock.ListFoundationModelsOutput) + + ListModelCustomizationJobs(*bedrock.ListModelCustomizationJobsInput) (*bedrock.ListModelCustomizationJobsOutput, error) + ListModelCustomizationJobsWithContext(aws.Context, *bedrock.ListModelCustomizationJobsInput, ...request.Option) (*bedrock.ListModelCustomizationJobsOutput, error) + ListModelCustomizationJobsRequest(*bedrock.ListModelCustomizationJobsInput) (*request.Request, *bedrock.ListModelCustomizationJobsOutput) + + ListModelCustomizationJobsPages(*bedrock.ListModelCustomizationJobsInput, func(*bedrock.ListModelCustomizationJobsOutput, bool) bool) error + ListModelCustomizationJobsPagesWithContext(aws.Context, *bedrock.ListModelCustomizationJobsInput, func(*bedrock.ListModelCustomizationJobsOutput, bool) bool, ...request.Option) error + + ListTagsForResource(*bedrock.ListTagsForResourceInput) (*bedrock.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *bedrock.ListTagsForResourceInput, ...request.Option) (*bedrock.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*bedrock.ListTagsForResourceInput) (*request.Request, *bedrock.ListTagsForResourceOutput) + + PutModelInvocationLoggingConfiguration(*bedrock.PutModelInvocationLoggingConfigurationInput) (*bedrock.PutModelInvocationLoggingConfigurationOutput, error) + PutModelInvocationLoggingConfigurationWithContext(aws.Context, *bedrock.PutModelInvocationLoggingConfigurationInput, ...request.Option) (*bedrock.PutModelInvocationLoggingConfigurationOutput, error) + PutModelInvocationLoggingConfigurationRequest(*bedrock.PutModelInvocationLoggingConfigurationInput) (*request.Request, *bedrock.PutModelInvocationLoggingConfigurationOutput) + + StopModelCustomizationJob(*bedrock.StopModelCustomizationJobInput) (*bedrock.StopModelCustomizationJobOutput, error) + StopModelCustomizationJobWithContext(aws.Context, *bedrock.StopModelCustomizationJobInput, ...request.Option) (*bedrock.StopModelCustomizationJobOutput, error) + StopModelCustomizationJobRequest(*bedrock.StopModelCustomizationJobInput) (*request.Request, *bedrock.StopModelCustomizationJobOutput) + + TagResource(*bedrock.TagResourceInput) (*bedrock.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *bedrock.TagResourceInput, ...request.Option) (*bedrock.TagResourceOutput, error) + TagResourceRequest(*bedrock.TagResourceInput) (*request.Request, *bedrock.TagResourceOutput) + + UntagResource(*bedrock.UntagResourceInput) (*bedrock.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *bedrock.UntagResourceInput, ...request.Option) (*bedrock.UntagResourceOutput, error) + UntagResourceRequest(*bedrock.UntagResourceInput) (*request.Request, *bedrock.UntagResourceOutput) +} + +var _ BedrockAPI = (*bedrock.Bedrock)(nil) diff --git a/service/bedrock/doc.go b/service/bedrock/doc.go new file mode 100644 index 00000000000..42fba55c4d7 --- /dev/null +++ b/service/bedrock/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package bedrock provides the client and types for making API +// requests to Amazon Bedrock. +// +// Describes the API operations for creating and managing Bedrock models. +// +// See https://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20 for more information on this service. +// +// See bedrock package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/bedrock/ +// +// # Using the Client +// +// To contact Amazon Bedrock with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Bedrock client Bedrock for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/bedrock/#New +package bedrock diff --git a/service/bedrock/errors.go b/service/bedrock/errors.go new file mode 100644 index 00000000000..2becf4e8e1c --- /dev/null +++ b/service/bedrock/errors.go @@ -0,0 +1,72 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrock + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // The request is denied because of missing access permissions. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // Error occurred because of a conflict while performing an operation. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // An internal server error occurred. Retry your request. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource ARN was not found. Check the ARN and try your request + // again. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // The number of requests exceeds the service quota. Resubmit your request later. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The number of requests exceeds the limit. Resubmit your request later. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeTooManyTagsException for service response error code + // "TooManyTagsException". + // + // The request contains more tags than can be associated with a resource (50 + // tags per resource). The maximum number of tags includes both existing tags + // and those included in your current request. + ErrCodeTooManyTagsException = "TooManyTagsException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // Input validation failed. Check your request parameters and retry the request. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "ThrottlingException": newErrorThrottlingException, + "TooManyTagsException": newErrorTooManyTagsException, + "ValidationException": newErrorValidationException, +} diff --git a/service/bedrock/service.go b/service/bedrock/service.go new file mode 100644 index 00000000000..5bca7850595 --- /dev/null +++ b/service/bedrock/service.go @@ -0,0 +1,106 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrock + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// Bedrock provides the API operation methods for making requests to +// Amazon Bedrock. See this package's package overview docs +// for details on the service. +// +// Bedrock methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type Bedrock struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Bedrock" // Name of service. + EndpointsID = "bedrock" // ID to lookup a service endpoint with. + ServiceID = "Bedrock" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the Bedrock client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// +// mySession := session.Must(session.NewSession()) +// +// // Create a Bedrock client from just a session. +// svc := bedrock.New(mySession) +// +// // Create a Bedrock client with additional configuration +// svc := bedrock.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *Bedrock { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "bedrock" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *Bedrock { + svc := &Bedrock{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2023-04-20", + ResolvedRegion: resolvedRegion, + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a Bedrock operation and runs any +// custom request initialization. +func (c *Bedrock) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/bedrockruntime/api.go b/service/bedrockruntime/api.go new file mode 100644 index 00000000000..0c9138374d7 --- /dev/null +++ b/service/bedrockruntime/api.go @@ -0,0 +1,1667 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrockruntime + +import ( + "bytes" + "fmt" + "io" + "sync" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go/private/protocol/rest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opInvokeModel = "InvokeModel" + +// InvokeModelRequest generates a "aws/request.Request" representing the +// client's request for the InvokeModel operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InvokeModel for more information on using the InvokeModel +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the InvokeModelRequest method. +// req, resp := client.InvokeModelRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel +func (c *BedrockRuntime) InvokeModelRequest(input *InvokeModelInput) (req *request.Request, output *InvokeModelOutput) { + op := &request.Operation{ + Name: opInvokeModel, + HTTPMethod: "POST", + HTTPPath: "/model/{modelId}/invoke", + } + + if input == nil { + input = &InvokeModelInput{} + } + + output = &InvokeModelOutput{} + req = c.newRequest(op, input, output) + return +} + +// InvokeModel API operation for Amazon Bedrock Runtime. +// +// Invokes the specified Bedrock model to run inference using the input provided +// in the request body. You use InvokeModel to run inference for text models, +// image models, and embedding models. +// +// For more information about invoking models, see Using the API in the Bedrock +// User Guide (https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf). +// +// For example requests, see Examples (after the Errors section). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock Runtime's +// API operation InvokeModel for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// - ModelTimeoutException +// The request took too long to process. Processing time exceeded the model +// timeout length. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - ModelNotReadyException +// The model specified in the request is not ready to serve inference requests. +// +// - ServiceQuotaExceededException +// The number of requests exceeds the service quota. Resubmit your request later. +// +// - ModelErrorException +// The request failed due to an error while processing the model. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModel +func (c *BedrockRuntime) InvokeModel(input *InvokeModelInput) (*InvokeModelOutput, error) { + req, out := c.InvokeModelRequest(input) + return out, req.Send() +} + +// InvokeModelWithContext is the same as InvokeModel with the addition of +// the ability to pass a context and additional request options. +// +// See InvokeModel for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *BedrockRuntime) InvokeModelWithContext(ctx aws.Context, input *InvokeModelInput, opts ...request.Option) (*InvokeModelOutput, error) { + req, out := c.InvokeModelRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opInvokeModelWithResponseStream = "InvokeModelWithResponseStream" + +// InvokeModelWithResponseStreamRequest generates a "aws/request.Request" representing the +// client's request for the InvokeModelWithResponseStream operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See InvokeModelWithResponseStream for more information on using the InvokeModelWithResponseStream +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the InvokeModelWithResponseStreamRequest method. +// req, resp := client.InvokeModelWithResponseStreamRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream +func (c *BedrockRuntime) InvokeModelWithResponseStreamRequest(input *InvokeModelWithResponseStreamInput) (req *request.Request, output *InvokeModelWithResponseStreamOutput) { + op := &request.Operation{ + Name: opInvokeModelWithResponseStream, + HTTPMethod: "POST", + HTTPPath: "/model/{modelId}/invoke-with-response-stream", + } + + if input == nil { + input = &InvokeModelWithResponseStreamInput{} + } + + output = &InvokeModelWithResponseStreamOutput{} + req = c.newRequest(op, input, output) + + es := NewInvokeModelWithResponseStreamEventStream() + output.eventStream = es + + req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, rest.UnmarshalHandler) + req.Handlers.Unmarshal.PushBack(es.runOutputStream) + req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose) + return +} + +// InvokeModelWithResponseStream API operation for Amazon Bedrock Runtime. +// +// Invoke the specified Bedrock model to run inference using the input provided. +// Return the response in a stream. +// +// For more information about invoking models, see Using the API in the Bedrock +// User Guide (https://d2eo22ngex1n9g.cloudfront.net/Documentation/BedrockUserGuide.pdf). +// +// For an example request and response, see Examples (after the Errors section). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Bedrock Runtime's +// API operation InvokeModelWithResponseStream for usage and error information. +// +// Returned Error Types: +// +// - AccessDeniedException +// The request is denied because of missing access permissions. +// +// - ResourceNotFoundException +// The specified resource ARN was not found. Check the ARN and try your request +// again. +// +// - ThrottlingException +// The number of requests exceeds the limit. Resubmit your request later. +// +// - ModelTimeoutException +// The request took too long to process. Processing time exceeded the model +// timeout length. +// +// - InternalServerException +// An internal server error occurred. Retry your request. +// +// - ModelStreamErrorException +// An error occurred while streaming the response. +// +// - ValidationException +// Input validation failed. Check your request parameters and retry the request. +// +// - ModelNotReadyException +// The model specified in the request is not ready to serve inference requests. +// +// - ServiceQuotaExceededException +// The number of requests exceeds the service quota. Resubmit your request later. +// +// - ModelErrorException +// The request failed due to an error while processing the model. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30/InvokeModelWithResponseStream +func (c *BedrockRuntime) InvokeModelWithResponseStream(input *InvokeModelWithResponseStreamInput) (*InvokeModelWithResponseStreamOutput, error) { + req, out := c.InvokeModelWithResponseStreamRequest(input) + return out, req.Send() +} + +// InvokeModelWithResponseStreamWithContext is the same as InvokeModelWithResponseStream with the addition of +// the ability to pass a context and additional request options. +// +// See InvokeModelWithResponseStream for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *BedrockRuntime) InvokeModelWithResponseStreamWithContext(ctx aws.Context, input *InvokeModelWithResponseStreamInput, opts ...request.Option) (*InvokeModelWithResponseStreamOutput, error) { + req, out := c.InvokeModelWithResponseStreamRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +var _ awserr.Error +var _ time.Time + +// InvokeModelWithResponseStreamEventStream provides the event stream handling for the InvokeModelWithResponseStream. +// +// For testing and mocking the event stream this type should be initialized via +// the NewInvokeModelWithResponseStreamEventStream constructor function. Using the functional options +// to pass in nested mock behavior. +type InvokeModelWithResponseStreamEventStream struct { + + // Reader is the EventStream reader for the ResponseStream + // events. This value is automatically set by the SDK when the API call is made + // Use this member when unit testing your code with the SDK to mock out the + // EventStream Reader. + // + // Must not be nil. + Reader ResponseStreamReader + + outputReader io.ReadCloser + + done chan struct{} + closeOnce sync.Once + err *eventstreamapi.OnceError +} + +// NewInvokeModelWithResponseStreamEventStream initializes an InvokeModelWithResponseStreamEventStream. +// This function should only be used for testing and mocking the InvokeModelWithResponseStreamEventStream +// stream within your application. +// +// The Reader member must be set before reading events from the stream. +// +// es := NewInvokeModelWithResponseStreamEventStream(func(o *InvokeModelWithResponseStreamEventStream){ +// es.Reader = myMockStreamReader +// }) +func NewInvokeModelWithResponseStreamEventStream(opts ...func(*InvokeModelWithResponseStreamEventStream)) *InvokeModelWithResponseStreamEventStream { + es := &InvokeModelWithResponseStreamEventStream{ + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + + for _, fn := range opts { + fn(es) + } + + return es +} + +func (es *InvokeModelWithResponseStreamEventStream) runOnStreamPartClose(r *request.Request) { + if es.done == nil { + return + } + go es.waitStreamPartClose() + +} + +func (es *InvokeModelWithResponseStreamEventStream) waitStreamPartClose() { + var outputErrCh <-chan struct{} + if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok { + outputErrCh = v.ErrorSet() + } + var outputClosedCh <-chan struct{} + if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok { + outputClosedCh = v.Closed() + } + + select { + case <-es.done: + case <-outputErrCh: + es.err.SetError(es.Reader.Err()) + es.Close() + case <-outputClosedCh: + if err := es.Reader.Err(); err != nil { + es.err.SetError(es.Reader.Err()) + } + es.Close() + } +} + +// Events returns a channel to read events from. +// +// These events are: +// +// - PayloadPart +// - ResponseStreamUnknownEvent +func (es *InvokeModelWithResponseStreamEventStream) Events() <-chan ResponseStreamEvent { + return es.Reader.Events() +} + +func (es *InvokeModelWithResponseStreamEventStream) runOutputStream(r *request.Request) { + var opts []func(*eventstream.Decoder) + if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) { + opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger)) + } + + unmarshalerForEvent := unmarshalerForResponseStreamEvent{ + metadata: protocol.ResponseMetadata{ + StatusCode: r.HTTPResponse.StatusCode, + RequestID: r.RequestID, + }, + }.UnmarshalerForEventName + + decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...) + eventReader := eventstreamapi.NewEventReader(decoder, + protocol.HandlerPayloadUnmarshal{ + Unmarshalers: r.Handlers.UnmarshalStream, + }, + unmarshalerForEvent, + ) + + es.outputReader = r.HTTPResponse.Body + es.Reader = newReadResponseStream(eventReader) +} + +// Close closes the stream. This will also cause the stream to be closed. +// Close must be called when done using the stream API. Not calling Close +// may result in resource leaks. +// +// You can use the closing of the Reader's Events channel to terminate your +// application's read from the API's stream. +func (es *InvokeModelWithResponseStreamEventStream) Close() (err error) { + es.closeOnce.Do(es.safeClose) + return es.Err() +} + +func (es *InvokeModelWithResponseStreamEventStream) safeClose() { + if es.done != nil { + close(es.done) + } + + es.Reader.Close() + if es.outputReader != nil { + es.outputReader.Close() + } +} + +// Err returns any error that occurred while reading or writing EventStream +// Events from the service API's response. Returns nil if there were no errors. +func (es *InvokeModelWithResponseStreamEventStream) Err() error { + if err := es.err.Err(); err != nil { + return err + } + if err := es.Reader.Err(); err != nil { + return err + } + + return nil +} + +// The request is denied because of missing access permissions. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// An internal server error occurred. Retry your request. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) GoString() string { + return s.String() +} + +// The InternalServerException is and event in the ResponseStream group of events. +func (s *InternalServerException) eventResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the InternalServerException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *InternalServerException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *InternalServerException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +type InvokeModelInput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The desired MIME type of the inference body in the response. The default + // value is application/json. + Accept *string `location:"header" locationName:"Accept" type:"string"` + + // 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 (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). + // + // Body is a sensitive parameter and its value will be + // replaced with "sensitive" in string returned by InvokeModelInput's + // String and GoString methods. + // + // Body is a required field + Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` + + // The MIME type of the input data in the request. The default value is application/json. + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` + + // Identifier of the model. + // + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InvokeModelInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvokeModelInput"} + if s.Body == nil { + invalidParams.Add(request.NewErrParamRequired("Body")) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccept sets the Accept field's value. +func (s *InvokeModelInput) SetAccept(v string) *InvokeModelInput { + s.Accept = &v + return s +} + +// SetBody sets the Body field's value. +func (s *InvokeModelInput) SetBody(v []byte) *InvokeModelInput { + s.Body = v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *InvokeModelInput) SetContentType(v string) *InvokeModelInput { + s.ContentType = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *InvokeModelInput) SetModelId(v string) *InvokeModelInput { + s.ModelId = &v + return s +} + +type InvokeModelOutput struct { + _ struct{} `type:"structure" payload:"Body"` + + // 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 (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). + // + // Body is a sensitive parameter and its value will be + // replaced with "sensitive" in string returned by InvokeModelOutput's + // String and GoString methods. + // + // Body is a required field + Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` + + // The MIME type of the inference result. + // + // ContentType is a required field + ContentType *string `location:"header" locationName:"Content-Type" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelOutput) GoString() string { + return s.String() +} + +// SetBody sets the Body field's value. +func (s *InvokeModelOutput) SetBody(v []byte) *InvokeModelOutput { + s.Body = v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *InvokeModelOutput) SetContentType(v string) *InvokeModelOutput { + s.ContentType = &v + return s +} + +type InvokeModelWithResponseStreamInput struct { + _ struct{} `type:"structure" payload:"Body"` + + // The desired MIME type of the inference body in the response. The default + // value is application/json. + Accept *string `location:"header" locationName:"X-Amzn-Bedrock-Accept" type:"string"` + + // Inference input in the format specified by the content-type. To see the format + // and content of this field for different models, refer to Inference parameters + // (https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html). + // + // Body is a sensitive parameter and its value will be + // replaced with "sensitive" in string returned by InvokeModelWithResponseStreamInput's + // String and GoString methods. + // + // Body is a required field + Body []byte `locationName:"body" type:"blob" required:"true" sensitive:"true"` + + // The MIME type of the input data in the request. The default value is application/json. + ContentType *string `location:"header" locationName:"Content-Type" type:"string"` + + // Id of the model to invoke using the streaming request. + // + // ModelId is a required field + ModelId *string `location:"uri" locationName:"modelId" min:"1" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelWithResponseStreamInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelWithResponseStreamInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *InvokeModelWithResponseStreamInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "InvokeModelWithResponseStreamInput"} + if s.Body == nil { + invalidParams.Add(request.NewErrParamRequired("Body")) + } + if s.ModelId == nil { + invalidParams.Add(request.NewErrParamRequired("ModelId")) + } + if s.ModelId != nil && len(*s.ModelId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ModelId", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccept sets the Accept field's value. +func (s *InvokeModelWithResponseStreamInput) SetAccept(v string) *InvokeModelWithResponseStreamInput { + s.Accept = &v + return s +} + +// SetBody sets the Body field's value. +func (s *InvokeModelWithResponseStreamInput) SetBody(v []byte) *InvokeModelWithResponseStreamInput { + s.Body = v + return s +} + +// SetContentType sets the ContentType field's value. +func (s *InvokeModelWithResponseStreamInput) SetContentType(v string) *InvokeModelWithResponseStreamInput { + s.ContentType = &v + return s +} + +// SetModelId sets the ModelId field's value. +func (s *InvokeModelWithResponseStreamInput) SetModelId(v string) *InvokeModelWithResponseStreamInput { + s.ModelId = &v + return s +} + +type InvokeModelWithResponseStreamOutput struct { + _ struct{} `type:"structure" payload:"Body"` + + eventStream *InvokeModelWithResponseStreamEventStream + + // The MIME type of the inference result. + // + // ContentType is a required field + ContentType *string `location:"header" locationName:"X-Amzn-Bedrock-Content-Type" type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelWithResponseStreamOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InvokeModelWithResponseStreamOutput) GoString() string { + return s.String() +} + +// SetContentType sets the ContentType field's value. +func (s *InvokeModelWithResponseStreamOutput) SetContentType(v string) *InvokeModelWithResponseStreamOutput { + s.ContentType = &v + return s +} + +// GetStream returns the type to interact with the event stream. +func (s *InvokeModelWithResponseStreamOutput) GetStream() *InvokeModelWithResponseStreamEventStream { + return s.eventStream +} + +// The request failed due to an error while processing the model. +type ModelErrorException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` + + // The original status code. + OriginalStatusCode *int64 `locationName:"originalStatusCode" min:"100" type:"integer"` + + // The resource name. + ResourceName *string `locationName:"resourceName" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelErrorException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelErrorException) GoString() string { + return s.String() +} + +func newErrorModelErrorException(v protocol.ResponseMetadata) error { + return &ModelErrorException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ModelErrorException) Code() string { + return "ModelErrorException" +} + +// Message returns the exception's message. +func (s *ModelErrorException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ModelErrorException) OrigErr() error { + return nil +} + +func (s *ModelErrorException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ModelErrorException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ModelErrorException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The model specified in the request is not ready to serve inference requests. +type ModelNotReadyException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelNotReadyException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelNotReadyException) GoString() string { + return s.String() +} + +func newErrorModelNotReadyException(v protocol.ResponseMetadata) error { + return &ModelNotReadyException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ModelNotReadyException) Code() string { + return "ModelNotReadyException" +} + +// Message returns the exception's message. +func (s *ModelNotReadyException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ModelNotReadyException) OrigErr() error { + return nil +} + +func (s *ModelNotReadyException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ModelNotReadyException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ModelNotReadyException) RequestID() string { + return s.RespMetadata.RequestID +} + +// An error occurred while streaming the response. +type ModelStreamErrorException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` + + // The original message. + OriginalMessage *string `locationName:"originalMessage" type:"string"` + + // The original status code. + OriginalStatusCode *int64 `locationName:"originalStatusCode" min:"100" type:"integer"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelStreamErrorException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelStreamErrorException) GoString() string { + return s.String() +} + +// The ModelStreamErrorException is and event in the ResponseStream group of events. +func (s *ModelStreamErrorException) eventResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ModelStreamErrorException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ModelStreamErrorException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *ModelStreamErrorException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorModelStreamErrorException(v protocol.ResponseMetadata) error { + return &ModelStreamErrorException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ModelStreamErrorException) Code() string { + return "ModelStreamErrorException" +} + +// Message returns the exception's message. +func (s *ModelStreamErrorException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ModelStreamErrorException) OrigErr() error { + return nil +} + +func (s *ModelStreamErrorException) Error() string { + return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ModelStreamErrorException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ModelStreamErrorException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The request took too long to process. Processing time exceeded the model +// timeout length. +type ModelTimeoutException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelTimeoutException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ModelTimeoutException) GoString() string { + return s.String() +} + +func newErrorModelTimeoutException(v protocol.ResponseMetadata) error { + return &ModelTimeoutException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ModelTimeoutException) Code() string { + return "ModelTimeoutException" +} + +// Message returns the exception's message. +func (s *ModelTimeoutException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ModelTimeoutException) OrigErr() error { + return nil +} + +func (s *ModelTimeoutException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ModelTimeoutException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ModelTimeoutException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Payload content included in the response. +type PayloadPart struct { + _ struct{} `type:"structure" sensitive:"true"` + + // Base64-encoded bytes of payload data. + // + // Bytes is a sensitive parameter and its value will be + // replaced with "sensitive" in string returned by PayloadPart's + // String and GoString methods. + // + // Bytes is automatically base64 encoded/decoded by the SDK. + Bytes []byte `locationName:"bytes" type:"blob" sensitive:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PayloadPart) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PayloadPart) GoString() string { + return s.String() +} + +// SetBytes sets the Bytes field's value. +func (s *PayloadPart) SetBytes(v []byte) *PayloadPart { + s.Bytes = v + return s +} + +// The PayloadPart is and event in the ResponseStream group of events. +func (s *PayloadPart) eventResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the PayloadPart value. +// This method is only used internally within the SDK's EventStream handling. +func (s *PayloadPart) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *PayloadPart) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +// The specified resource ARN was not found. Check the ARN and try your request +// again. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// ResponseStreamEvent groups together all EventStream +// events writes for ResponseStream. +// +// These events are: +// +// - PayloadPart +type ResponseStreamEvent interface { + eventResponseStream() + eventstreamapi.Marshaler + eventstreamapi.Unmarshaler +} + +// ResponseStreamReader provides the interface for reading to the stream. The +// default implementation for this interface will be ResponseStream. +// +// The reader's Close method must allow multiple concurrent calls. +// +// These events are: +// +// - PayloadPart +// - ResponseStreamUnknownEvent +type ResponseStreamReader interface { + // Returns a channel of events as they are read from the event stream. + Events() <-chan ResponseStreamEvent + + // Close will stop the reader reading events from the stream. + Close() error + + // Returns any error that has occurred while reading from the event stream. + Err() error +} + +type readResponseStream struct { + eventReader *eventstreamapi.EventReader + stream chan ResponseStreamEvent + err *eventstreamapi.OnceError + + done chan struct{} + closeOnce sync.Once +} + +func newReadResponseStream(eventReader *eventstreamapi.EventReader) *readResponseStream { + r := &readResponseStream{ + eventReader: eventReader, + stream: make(chan ResponseStreamEvent), + done: make(chan struct{}), + err: eventstreamapi.NewOnceError(), + } + go r.readEventStream() + + return r +} + +// Close will close the underlying event stream reader. +func (r *readResponseStream) Close() error { + r.closeOnce.Do(r.safeClose) + return r.Err() +} + +func (r *readResponseStream) ErrorSet() <-chan struct{} { + return r.err.ErrorSet() +} + +func (r *readResponseStream) Closed() <-chan struct{} { + return r.done +} + +func (r *readResponseStream) safeClose() { + close(r.done) +} + +func (r *readResponseStream) Err() error { + return r.err.Err() +} + +func (r *readResponseStream) Events() <-chan ResponseStreamEvent { + return r.stream +} + +func (r *readResponseStream) readEventStream() { + defer r.Close() + defer close(r.stream) + + for { + event, err := r.eventReader.ReadEvent() + if err != nil { + if err == io.EOF { + return + } + select { + case <-r.done: + // If closed already ignore the error + return + default: + } + if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok { + continue + } + r.err.SetError(err) + return + } + + select { + case r.stream <- event.(ResponseStreamEvent): + case <-r.done: + return + } + } +} + +type unmarshalerForResponseStreamEvent struct { + metadata protocol.ResponseMetadata +} + +func (u unmarshalerForResponseStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) { + switch eventType { + case "chunk": + return &PayloadPart{}, nil + case "internalServerException": + return newErrorInternalServerException(u.metadata).(eventstreamapi.Unmarshaler), nil + case "modelStreamErrorException": + return newErrorModelStreamErrorException(u.metadata).(eventstreamapi.Unmarshaler), nil + case "throttlingException": + return newErrorThrottlingException(u.metadata).(eventstreamapi.Unmarshaler), nil + case "validationException": + return newErrorValidationException(u.metadata).(eventstreamapi.Unmarshaler), nil + default: + return &ResponseStreamUnknownEvent{Type: eventType}, nil + } +} + +// ResponseStreamUnknownEvent provides a failsafe event for the +// ResponseStream group of events when an unknown event is received. +type ResponseStreamUnknownEvent struct { + Type string + Message eventstream.Message +} + +// The ResponseStreamUnknownEvent is and event in the ResponseStream +// group of events. +func (s *ResponseStreamUnknownEvent) eventResponseStream() {} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (e *ResponseStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) ( + msg eventstream.Message, err error, +) { + return e.Message.Clone(), nil +} + +// UnmarshalEvent unmarshals the EventStream Message into the ResponseStream value. +// This method is only used internally within the SDK's EventStream handling. +func (e *ResponseStreamUnknownEvent) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + e.Message = msg.Clone() + return nil +} + +// The number of requests exceeds the service quota. Resubmit your request later. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) GoString() string { + return s.String() +} + +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" +} + +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil +} + +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The number of requests exceeds the limit. Resubmit your request later. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) GoString() string { + return s.String() +} + +// The ThrottlingException is and event in the ResponseStream group of events. +func (s *ThrottlingException) eventResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ThrottlingException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ThrottlingException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *ThrottlingException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Input validation failed. Check your request parameters and retry the request. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) GoString() string { + return s.String() +} + +// The ValidationException is and event in the ResponseStream group of events. +func (s *ValidationException) eventResponseStream() {} + +// UnmarshalEvent unmarshals the EventStream Message into the ValidationException value. +// This method is only used internally within the SDK's EventStream handling. +func (s *ValidationException) UnmarshalEvent( + payloadUnmarshaler protocol.PayloadUnmarshaler, + msg eventstream.Message, +) error { + if err := payloadUnmarshaler.UnmarshalPayload( + bytes.NewReader(msg.Payload), s, + ); err != nil { + return err + } + return nil +} + +// MarshalEvent marshals the type into an stream event value. This method +// should only used internally within the SDK's EventStream handling. +func (s *ValidationException) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) { + msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.ExceptionMessageType)) + var buf bytes.Buffer + if err = pm.MarshalPayload(&buf, s); err != nil { + return eventstream.Message{}, err + } + msg.Payload = buf.Bytes() + return msg, err +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} diff --git a/service/bedrockruntime/bedrockruntimeiface/interface.go b/service/bedrockruntime/bedrockruntimeiface/interface.go new file mode 100644 index 00000000000..281d1a0a094 --- /dev/null +++ b/service/bedrockruntime/bedrockruntimeiface/interface.go @@ -0,0 +1,72 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package bedrockruntimeiface provides an interface to enable mocking the Amazon Bedrock Runtime service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package bedrockruntimeiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/bedrockruntime" +) + +// BedrockRuntimeAPI provides an interface to enable mocking the +// bedrockruntime.BedrockRuntime service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // Amazon Bedrock Runtime. +// func myFunc(svc bedrockruntimeiface.BedrockRuntimeAPI) bool { +// // Make svc.InvokeModel request +// } +// +// func main() { +// sess := session.New() +// svc := bedrockruntime.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockBedrockRuntimeClient struct { +// bedrockruntimeiface.BedrockRuntimeAPI +// } +// func (m *mockBedrockRuntimeClient) InvokeModel(input *bedrockruntime.InvokeModelInput) (*bedrockruntime.InvokeModelOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockBedrockRuntimeClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type BedrockRuntimeAPI interface { + InvokeModel(*bedrockruntime.InvokeModelInput) (*bedrockruntime.InvokeModelOutput, error) + InvokeModelWithContext(aws.Context, *bedrockruntime.InvokeModelInput, ...request.Option) (*bedrockruntime.InvokeModelOutput, error) + InvokeModelRequest(*bedrockruntime.InvokeModelInput) (*request.Request, *bedrockruntime.InvokeModelOutput) + + InvokeModelWithResponseStream(*bedrockruntime.InvokeModelWithResponseStreamInput) (*bedrockruntime.InvokeModelWithResponseStreamOutput, error) + InvokeModelWithResponseStreamWithContext(aws.Context, *bedrockruntime.InvokeModelWithResponseStreamInput, ...request.Option) (*bedrockruntime.InvokeModelWithResponseStreamOutput, error) + InvokeModelWithResponseStreamRequest(*bedrockruntime.InvokeModelWithResponseStreamInput) (*request.Request, *bedrockruntime.InvokeModelWithResponseStreamOutput) +} + +var _ BedrockRuntimeAPI = (*bedrockruntime.BedrockRuntime)(nil) diff --git a/service/bedrockruntime/doc.go b/service/bedrockruntime/doc.go new file mode 100644 index 00000000000..a812ff6ad2e --- /dev/null +++ b/service/bedrockruntime/doc.go @@ -0,0 +1,28 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package bedrockruntime provides the client and types for making API +// requests to Amazon Bedrock Runtime. +// +// Describes the API operations for running inference using Bedrock models. +// +// See https://docs.aws.amazon.com/goto/WebAPI/bedrock-runtime-2023-09-30 for more information on this service. +// +// See bedrockruntime package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/bedrockruntime/ +// +// # Using the Client +// +// To contact Amazon Bedrock Runtime with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the Amazon Bedrock Runtime client BedrockRuntime for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/bedrockruntime/#New +package bedrockruntime diff --git a/service/bedrockruntime/errors.go b/service/bedrockruntime/errors.go new file mode 100644 index 00000000000..64323ad3a83 --- /dev/null +++ b/service/bedrockruntime/errors.go @@ -0,0 +1,85 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrockruntime + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // The request is denied because of missing access permissions. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // An internal server error occurred. Retry your request. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeModelErrorException for service response error code + // "ModelErrorException". + // + // The request failed due to an error while processing the model. + ErrCodeModelErrorException = "ModelErrorException" + + // ErrCodeModelNotReadyException for service response error code + // "ModelNotReadyException". + // + // The model specified in the request is not ready to serve inference requests. + ErrCodeModelNotReadyException = "ModelNotReadyException" + + // ErrCodeModelStreamErrorException for service response error code + // "ModelStreamErrorException". + // + // An error occurred while streaming the response. + ErrCodeModelStreamErrorException = "ModelStreamErrorException" + + // ErrCodeModelTimeoutException for service response error code + // "ModelTimeoutException". + // + // The request took too long to process. Processing time exceeded the model + // timeout length. + ErrCodeModelTimeoutException = "ModelTimeoutException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource ARN was not found. Check the ARN and try your request + // again. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // The number of requests exceeds the service quota. Resubmit your request later. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The number of requests exceeds the limit. Resubmit your request later. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // Input validation failed. Check your request parameters and retry the request. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "InternalServerException": newErrorInternalServerException, + "ModelErrorException": newErrorModelErrorException, + "ModelNotReadyException": newErrorModelNotReadyException, + "ModelStreamErrorException": newErrorModelStreamErrorException, + "ModelTimeoutException": newErrorModelTimeoutException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "ThrottlingException": newErrorThrottlingException, + "ValidationException": newErrorValidationException, +} diff --git a/service/bedrockruntime/eventstream_test.go b/service/bedrockruntime/eventstream_test.go new file mode 100644 index 00000000000..51e5a8d2310 --- /dev/null +++ b/service/bedrockruntime/eventstream_test.go @@ -0,0 +1,346 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +//go:build go1.16 +// +build go1.16 + +package bedrockruntime + +import ( + "bytes" + "context" + "io/ioutil" + "net/http" + "reflect" + "strings" + "sync" + "testing" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/corehandlers" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/awstesting/unit" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/eventstream" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi" + "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamtest" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +var _ time.Time +var _ awserr.Error +var _ context.Context +var _ sync.WaitGroup +var _ strings.Reader + +func TestInvokeModelWithResponseStream_Read(t *testing.T) { + expectEvents, eventMsgs := mockInvokeModelWithResponseStreamReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.InvokeModelWithResponseStream(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + defer resp.GetStream().Close() + + var i int + for event := range resp.GetStream().Events() { + if event == nil { + t.Errorf("%d, expect event, got nil", i) + } + if e, a := expectEvents[i], event; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) + } + i++ + } + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func TestInvokeModelWithResponseStream_ReadClose(t *testing.T) { + _, eventMsgs := mockInvokeModelWithResponseStreamReadEvents() + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.InvokeModelWithResponseStream(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + // Assert calling Err before close does not close the stream. + resp.GetStream().Err() + select { + case _, ok := <-resp.GetStream().Events(): + if !ok { + t.Fatalf("expect stream not to be closed, but was") + } + default: + } + + resp.GetStream().Close() + <-resp.GetStream().Events() + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func TestInvokeModelWithResponseStream_ReadUnknownEvent(t *testing.T) { + expectEvents, eventMsgs := mockInvokeModelWithResponseStreamReadEvents() + var eventOffset int + + unknownEvent := eventstream.Message{ + Headers: eventstream.Headers{ + eventstreamtest.EventMessageTypeHeader, + { + Name: eventstreamapi.EventTypeHeader, + Value: eventstream.StringValue("UnknownEventName"), + }, + }, + Payload: []byte("some unknown event"), + } + + eventMsgs = append(eventMsgs[:eventOffset], + append([]eventstream.Message{unknownEvent}, eventMsgs[eventOffset:]...)...) + + expectEvents = append(expectEvents[:eventOffset], + append([]ResponseStreamEvent{ + &ResponseStreamUnknownEvent{ + Type: "UnknownEventName", + Message: unknownEvent, + }, + }, + expectEvents[eventOffset:]...)...) + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.InvokeModelWithResponseStream(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + defer resp.GetStream().Close() + + var i int + for event := range resp.GetStream().Events() { + if event == nil { + t.Errorf("%d, expect event, got nil", i) + } + if e, a := expectEvents[i], event; !reflect.DeepEqual(e, a) { + t.Errorf("%d, expect %T %v, got %T %v", i, e, e, a, a) + } + i++ + } + + if err := resp.GetStream().Err(); err != nil { + t.Errorf("expect no error, %v", err) + } +} + +func BenchmarkInvokeModelWithResponseStream_Read(b *testing.B) { + _, eventMsgs := mockInvokeModelWithResponseStreamReadEvents() + var buf bytes.Buffer + encoder := eventstream.NewEncoder(&buf) + for _, msg := range eventMsgs { + if err := encoder.Encode(msg); err != nil { + b.Fatalf("failed to encode message, %v", err) + } + } + stream := &loopReader{source: bytes.NewReader(buf.Bytes())} + + sess := unit.Session + svc := New(sess, &aws.Config{ + Endpoint: aws.String("https://example.com"), + DisableParamValidation: aws.Bool(true), + }) + svc.Handlers.Send.Swap(corehandlers.SendHandler.Name, + request.NamedHandler{Name: "mockSend", + Fn: func(r *request.Request) { + r.HTTPResponse = &http.Response{ + Status: "200 OK", + StatusCode: 200, + Header: http.Header{}, + Body: ioutil.NopCloser(stream), + } + }, + }, + ) + + resp, err := svc.InvokeModelWithResponseStream(nil) + if err != nil { + b.Fatalf("failed to create request, %v", err) + } + defer resp.GetStream().Close() + b.ResetTimer() + + for i := 0; i < b.N; i++ { + if err = resp.GetStream().Err(); err != nil { + b.Fatalf("expect no error, got %v", err) + } + event := <-resp.GetStream().Events() + if event == nil { + b.Fatalf("expect event, got nil, %v, %d", resp.GetStream().Err(), i) + } + } +} + +func mockInvokeModelWithResponseStreamReadEvents() ( + []ResponseStreamEvent, + []eventstream.Message, +) { + expectEvents := []ResponseStreamEvent{ + &PayloadPart{ + Bytes: []byte("blob value goes here"), + }, + } + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + _ = payloadMarshaler + + eventMsgs := []eventstream.Message{ + { + Headers: eventstream.Headers{ + eventstreamtest.EventMessageTypeHeader, + { + Name: eventstreamapi.EventTypeHeader, + Value: eventstream.StringValue("chunk"), + }, + }, + Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[0]), + }, + } + + return expectEvents, eventMsgs +} +func TestInvokeModelWithResponseStream_ReadException(t *testing.T) { + expectEvents := []ResponseStreamEvent{ + &InternalServerException{ + RespMetadata: protocol.ResponseMetadata{ + StatusCode: 200, + }, + Message_: aws.String("string value goes here"), + }, + } + + var marshalers request.HandlerList + marshalers.PushBackNamed(restjson.BuildHandler) + payloadMarshaler := protocol.HandlerPayloadMarshal{ + Marshalers: marshalers, + } + + eventMsgs := []eventstream.Message{ + { + Headers: eventstream.Headers{ + eventstreamtest.EventExceptionTypeHeader, + { + Name: eventstreamapi.ExceptionTypeHeader, + Value: eventstream.StringValue("internalServerException"), + }, + }, + Payload: eventstreamtest.MarshalEventPayload(payloadMarshaler, expectEvents[0]), + }, + } + + sess, cleanupFn, err := eventstreamtest.SetupEventStreamSession(t, + eventstreamtest.ServeEventStream{ + T: t, + Events: eventMsgs, + }, + true, + ) + if err != nil { + t.Fatalf("expect no error, %v", err) + } + defer cleanupFn() + + svc := New(sess) + resp, err := svc.InvokeModelWithResponseStream(nil) + if err != nil { + t.Fatalf("expect no error got, %v", err) + } + + defer resp.GetStream().Close() + + <-resp.GetStream().Events() + + err = resp.GetStream().Err() + if err == nil { + t.Fatalf("expect err, got none") + } + + expectErr := &InternalServerException{ + RespMetadata: protocol.ResponseMetadata{ + StatusCode: 200, + }, + Message_: aws.String("string value goes here"), + } + aerr, ok := err.(awserr.Error) + if !ok { + t.Errorf("expect exception, got %T, %#v", err, err) + } + if e, a := expectErr.Code(), aerr.Code(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + if e, a := expectErr.Message(), aerr.Message(); e != a { + t.Errorf("expect %v, got %v", e, a) + } + + if e, a := expectErr, aerr; !reflect.DeepEqual(e, a) { + t.Errorf("expect error %+#v, got %+#v", e, a) + } +} + +var _ awserr.Error = (*InternalServerException)(nil) +var _ awserr.Error = (*ModelStreamErrorException)(nil) +var _ awserr.Error = (*ThrottlingException)(nil) +var _ awserr.Error = (*ValidationException)(nil) + +type loopReader struct { + source *bytes.Reader +} + +func (c *loopReader) Read(p []byte) (int, error) { + if c.source.Len() == 0 { + c.source.Seek(0, 0) + } + + return c.source.Read(p) +} diff --git a/service/bedrockruntime/service.go b/service/bedrockruntime/service.go new file mode 100644 index 00000000000..35a331eff6d --- /dev/null +++ b/service/bedrockruntime/service.go @@ -0,0 +1,109 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package bedrockruntime + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// BedrockRuntime provides the API operation methods for making requests to +// Amazon Bedrock Runtime. See this package's package overview docs +// for details on the service. +// +// BedrockRuntime methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type BedrockRuntime struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "Bedrock Runtime" // Name of service. + EndpointsID = "bedrock-runtime" // ID to lookup a service endpoint with. + ServiceID = "Bedrock Runtime" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the BedrockRuntime client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// +// mySession := session.Must(session.NewSession()) +// +// // Create a BedrockRuntime client from just a session. +// svc := bedrockruntime.New(mySession) +// +// // Create a BedrockRuntime client with additional configuration +// svc := bedrockruntime.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *BedrockRuntime { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "bedrock" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *BedrockRuntime { + svc := &BedrockRuntime{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2023-09-30", + ResolvedRegion: resolvedRegion, + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + svc.Handlers.BuildStream.PushBackNamed(restjson.BuildHandler) + svc.Handlers.UnmarshalStream.PushBackNamed(restjson.UnmarshalHandler) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a BedrockRuntime operation and runs any +// custom request initialization. +func (c *BedrockRuntime) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/budgets/api.go b/service/budgets/api.go index 75422d70589..316dea2000d 100644 --- a/service/budgets/api.go +++ b/service/budgets/api.go @@ -5610,7 +5610,8 @@ type DescribeBudgetNotificationsForAccountInput struct { // AccountId is a required field AccountId *string `min:"12" type:"string" required:"true"` - // An integer that shows how many budget name entries a paginated response contains. + // An integer that represents how many budgets a paginated response contains. + // The default is 50. MaxResults *int64 `min:"1" type:"integer"` // A generic string. @@ -5892,14 +5893,13 @@ func (s *DescribeBudgetPerformanceHistoryOutput) SetNextToken(v string) *Describ type DescribeBudgetsInput struct { _ struct{} `type:"structure"` - // The accountId that is associated with the budgets that you want descriptions - // of. + // The accountId that is associated with the budgets that you want to describe. // // AccountId is a required field AccountId *string `min:"12" type:"string" required:"true"` - // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. + // An integer that represents how many budgets a paginated response contains. + // The default is 100. MaxResults *int64 `min:"1" type:"integer"` // The pagination token that you include in your request to indicate the next @@ -6020,7 +6020,7 @@ type DescribeNotificationsForBudgetInput struct { BudgetName *string `min:"1" type:"string" required:"true"` // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. + // contains. MaxResults *int64 `min:"1" type:"integer"` // The pagination token that you include in your request to indicate the next @@ -6153,7 +6153,7 @@ type DescribeSubscribersForNotificationInput struct { BudgetName *string `min:"1" type:"string" required:"true"` // An optional integer that represents how many entries a paginated response - // contains. The maximum is 100. + // contains. MaxResults *int64 `min:"1" type:"integer"` // The pagination token that you include in your request to indicate the next @@ -7351,11 +7351,17 @@ func (s *ScpActionDefinition) SetTargetIds(v []*string) *ScpActionDefinition { // The amount of cost or usage that's measured for a budget. // -// For example, a Spend for 3 GB of S3 usage has the following parameters: +// Cost example: A Spend for 3 USD of costs has the following parameters: +// +// - An Amount of 3 +// +// - A Unit of USD +// +// Usage example: A Spend for 3 GB of S3 usage has the following parameters: // // - An Amount of 3 // -// - A unit of GB +// - A Unit of GB type Spend struct { _ struct{} `type:"structure"` @@ -7366,7 +7372,7 @@ type Spend struct { Amount *string `min:"1" type:"string" required:"true"` // The unit of measurement that's used for the budget forecast, actual spend, - // or budget threshold, such as USD or GBP. + // or budget threshold. // // Unit is a required field Unit *string `min:"1" type:"string" required:"true"` diff --git a/service/ec2/api.go b/service/ec2/api.go index 5132ac3fcd4..b9580698f26 100644 --- a/service/ec2/api.go +++ b/service/ec2/api.go @@ -77791,6 +77791,9 @@ type CreateVerifiedAccessEndpointInput struct { // The IDs of the security groups to associate with the Verified Access endpoint. SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"item" type:"list"` + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` + // The tags to assign to the Verified Access endpoint. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` @@ -77928,6 +77931,12 @@ func (s *CreateVerifiedAccessEndpointInput) SetSecurityGroupIds(v []*string) *Cr return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *CreateVerifiedAccessEndpointInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessEndpointInput { + s.SseSpecification = v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateVerifiedAccessEndpointInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessEndpointInput { s.TagSpecifications = v @@ -78064,6 +78073,9 @@ type CreateVerifiedAccessGroupInput struct { // The Verified Access policy document. PolicyDocument *string `type:"string"` + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` + // The tags to assign to the Verified Access group. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` @@ -78128,6 +78140,12 @@ func (s *CreateVerifiedAccessGroupInput) SetPolicyDocument(v string) *CreateVeri return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *CreateVerifiedAccessGroupInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessGroupInput { + s.SseSpecification = v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateVerifiedAccessGroupInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessGroupInput { s.TagSpecifications = v @@ -78188,8 +78206,8 @@ type CreateVerifiedAccessInstanceInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // Choose to enable or disable support for Federal Information Processing Standards - // (FIPS) on the instance. + // Enable or disable support for Federal Information Processing Standards (FIPS) + // on the instance. FIPSEnabled *bool `type:"boolean"` // The tags to assign to the Verified Access instance. @@ -78342,6 +78360,9 @@ type CreateVerifiedAccessTrustProviderInput struct { // PolicyReferenceName is a required field PolicyReferenceName *string `type:"string" required:"true"` + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` + // The tags to assign to the Verified Access trust provider. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` @@ -78431,6 +78452,12 @@ func (s *CreateVerifiedAccessTrustProviderInput) SetPolicyReferenceName(v string return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *CreateVerifiedAccessTrustProviderInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *CreateVerifiedAccessTrustProviderInput { + s.SseSpecification = v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateVerifiedAccessTrustProviderInput) SetTagSpecifications(v []*TagSpecification) *CreateVerifiedAccessTrustProviderInput { s.TagSpecifications = v @@ -147395,9 +147422,10 @@ type ModifyVerifiedAccessEndpointPolicyInput struct { PolicyDocument *string `type:"string"` // The status of the Verified Access policy. - // - // PolicyEnabled is a required field - PolicyEnabled *bool `type:"boolean" required:"true"` + PolicyEnabled *bool `type:"boolean"` + + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` // The ID of the Verified Access endpoint. // @@ -147426,9 +147454,6 @@ func (s ModifyVerifiedAccessEndpointPolicyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ModifyVerifiedAccessEndpointPolicyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ModifyVerifiedAccessEndpointPolicyInput"} - if s.PolicyEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyEnabled")) - } if s.VerifiedAccessEndpointId == nil { invalidParams.Add(request.NewErrParamRequired("VerifiedAccessEndpointId")) } @@ -147463,6 +147488,12 @@ func (s *ModifyVerifiedAccessEndpointPolicyInput) SetPolicyEnabled(v bool) *Modi return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *ModifyVerifiedAccessEndpointPolicyInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessEndpointPolicyInput { + s.SseSpecification = v + return s +} + // SetVerifiedAccessEndpointId sets the VerifiedAccessEndpointId field's value. func (s *ModifyVerifiedAccessEndpointPolicyInput) SetVerifiedAccessEndpointId(v string) *ModifyVerifiedAccessEndpointPolicyInput { s.VerifiedAccessEndpointId = &v @@ -147477,6 +147508,9 @@ type ModifyVerifiedAccessEndpointPolicyOutput struct { // The status of the Verified Access policy. PolicyEnabled *bool `locationName:"policyEnabled" type:"boolean"` + + // Describes the options in use for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"` } // String returns the string representation. @@ -147509,6 +147543,12 @@ func (s *ModifyVerifiedAccessEndpointPolicyOutput) SetPolicyEnabled(v bool) *Mod return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *ModifyVerifiedAccessEndpointPolicyOutput) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *ModifyVerifiedAccessEndpointPolicyOutput { + s.SseSpecification = v + return s +} + type ModifyVerifiedAccessGroupInput struct { _ struct{} `type:"structure"` @@ -147645,9 +147685,10 @@ type ModifyVerifiedAccessGroupPolicyInput struct { PolicyDocument *string `type:"string"` // The status of the Verified Access policy. - // - // PolicyEnabled is a required field - PolicyEnabled *bool `type:"boolean" required:"true"` + PolicyEnabled *bool `type:"boolean"` + + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` // The ID of the Verified Access group. // @@ -147676,9 +147717,6 @@ func (s ModifyVerifiedAccessGroupPolicyInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ModifyVerifiedAccessGroupPolicyInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ModifyVerifiedAccessGroupPolicyInput"} - if s.PolicyEnabled == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyEnabled")) - } if s.VerifiedAccessGroupId == nil { invalidParams.Add(request.NewErrParamRequired("VerifiedAccessGroupId")) } @@ -147713,6 +147751,12 @@ func (s *ModifyVerifiedAccessGroupPolicyInput) SetPolicyEnabled(v bool) *ModifyV return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *ModifyVerifiedAccessGroupPolicyInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessGroupPolicyInput { + s.SseSpecification = v + return s +} + // SetVerifiedAccessGroupId sets the VerifiedAccessGroupId field's value. func (s *ModifyVerifiedAccessGroupPolicyInput) SetVerifiedAccessGroupId(v string) *ModifyVerifiedAccessGroupPolicyInput { s.VerifiedAccessGroupId = &v @@ -147727,6 +147771,9 @@ type ModifyVerifiedAccessGroupPolicyOutput struct { // The status of the Verified Access policy. PolicyEnabled *bool `locationName:"policyEnabled" type:"boolean"` + + // Describes the options in use for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"` } // String returns the string representation. @@ -147759,6 +147806,12 @@ func (s *ModifyVerifiedAccessGroupPolicyOutput) SetPolicyEnabled(v bool) *Modify return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *ModifyVerifiedAccessGroupPolicyOutput) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *ModifyVerifiedAccessGroupPolicyOutput { + s.SseSpecification = v + return s +} + type ModifyVerifiedAccessInstanceInput struct { _ struct{} `type:"structure"` @@ -148007,6 +148060,9 @@ type ModifyVerifiedAccessTrustProviderInput struct { // The options for an OpenID Connect-compatible user-identity trust provider. OidcOptions *ModifyVerifiedAccessTrustProviderOidcOptions `type:"structure"` + // Options for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationRequest `type:"structure"` + // The ID of the Verified Access trust provider. // // VerifiedAccessTrustProviderId is a required field @@ -148068,6 +148124,12 @@ func (s *ModifyVerifiedAccessTrustProviderInput) SetOidcOptions(v *ModifyVerifie return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *ModifyVerifiedAccessTrustProviderInput) SetSseSpecification(v *VerifiedAccessSseSpecificationRequest) *ModifyVerifiedAccessTrustProviderInput { + s.SseSpecification = v + return s +} + // SetVerifiedAccessTrustProviderId sets the VerifiedAccessTrustProviderId field's value. func (s *ModifyVerifiedAccessTrustProviderInput) SetVerifiedAccessTrustProviderId(v string) *ModifyVerifiedAccessTrustProviderInput { s.VerifiedAccessTrustProviderId = &v @@ -178690,6 +178752,9 @@ type VerifiedAccessEndpoint struct { // The IDs of the security groups for the endpoint. SecurityGroupIds []*string `locationName:"securityGroupIdSet" locationNameList:"item" type:"list"` + // Describes the options in use for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"` + // The endpoint status. Status *VerifiedAccessEndpointStatus `locationName:"status" type:"structure"` @@ -178802,6 +178867,12 @@ func (s *VerifiedAccessEndpoint) SetSecurityGroupIds(v []*string) *VerifiedAcces return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *VerifiedAccessEndpoint) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessEndpoint { + s.SseSpecification = v + return s +} + // SetStatus sets the Status field's value. func (s *VerifiedAccessEndpoint) SetStatus(v *VerifiedAccessEndpointStatus) *VerifiedAccessEndpoint { s.Status = v @@ -179002,6 +179073,9 @@ type VerifiedAccessGroup struct { // The Amazon Web Services account number that owns the group. Owner *string `locationName:"owner" type:"string"` + // Describes the options in use for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"` + // The tags. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` @@ -179063,6 +179137,12 @@ func (s *VerifiedAccessGroup) SetOwner(v string) *VerifiedAccessGroup { return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *VerifiedAccessGroup) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessGroup { + s.SseSpecification = v + return s +} + // SetTags sets the Tags field's value. func (s *VerifiedAccessGroup) SetTags(v []*Tag) *VerifiedAccessGroup { s.Tags = v @@ -179097,7 +179177,7 @@ type VerifiedAccessInstance struct { // A description for the Amazon Web Services Verified Access instance. Description *string `locationName:"description" type:"string"` - // Describes if support for Federal Information Processing Standards (FIPS) + // Describes whether support for Federal Information Processing Standards (FIPS) // is enabled on the instance. FipsEnabled *bool `locationName:"fipsEnabled" type:"boolean"` @@ -179773,6 +179853,94 @@ func (s *VerifiedAccessLogs) SetS3(v *VerifiedAccessLogS3Destination) *VerifiedA return s } +// Verified Access provides server side encryption by default to data at rest +// using Amazon Web Services-owned KMS keys. You also have the option of using +// customer managed KMS keys, which can be specified using the options below. +type VerifiedAccessSseSpecificationRequest struct { + _ struct{} `type:"structure"` + + // Enable or disable the use of customer managed KMS keys for server side encryption. + // + // Valid values: True | False + CustomerManagedKeyEnabled *bool `type:"boolean"` + + // The ARN of the KMS key. + KmsKeyArn *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VerifiedAccessSseSpecificationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VerifiedAccessSseSpecificationRequest) GoString() string { + return s.String() +} + +// SetCustomerManagedKeyEnabled sets the CustomerManagedKeyEnabled field's value. +func (s *VerifiedAccessSseSpecificationRequest) SetCustomerManagedKeyEnabled(v bool) *VerifiedAccessSseSpecificationRequest { + s.CustomerManagedKeyEnabled = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *VerifiedAccessSseSpecificationRequest) SetKmsKeyArn(v string) *VerifiedAccessSseSpecificationRequest { + s.KmsKeyArn = &v + return s +} + +// Describes the options in use for server side encryption. +type VerifiedAccessSseSpecificationResponse struct { + _ struct{} `type:"structure"` + + // Describes the use of customer managed KMS keys for server side encryption. + // + // Valid values: True | False + CustomerManagedKeyEnabled *bool `locationName:"customerManagedKeyEnabled" type:"boolean"` + + // Describes the ARN of the KMS key. + KmsKeyArn *string `locationName:"kmsKeyArn" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VerifiedAccessSseSpecificationResponse) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VerifiedAccessSseSpecificationResponse) GoString() string { + return s.String() +} + +// SetCustomerManagedKeyEnabled sets the CustomerManagedKeyEnabled field's value. +func (s *VerifiedAccessSseSpecificationResponse) SetCustomerManagedKeyEnabled(v bool) *VerifiedAccessSseSpecificationResponse { + s.CustomerManagedKeyEnabled = &v + return s +} + +// SetKmsKeyArn sets the KmsKeyArn field's value. +func (s *VerifiedAccessSseSpecificationResponse) SetKmsKeyArn(v string) *VerifiedAccessSseSpecificationResponse { + s.KmsKeyArn = &v + return s +} + // Describes a Verified Access trust provider. type VerifiedAccessTrustProvider struct { _ struct{} `type:"structure"` @@ -179798,6 +179966,9 @@ type VerifiedAccessTrustProvider struct { // The identifier to be used when working with policy rules. PolicyReferenceName *string `locationName:"policyReferenceName" type:"string"` + // Describes the options in use for server side encryption. + SseSpecification *VerifiedAccessSseSpecificationResponse `locationName:"sseSpecification" type:"structure"` + // The tags. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` @@ -179871,6 +180042,12 @@ func (s *VerifiedAccessTrustProvider) SetPolicyReferenceName(v string) *Verified return s } +// SetSseSpecification sets the SseSpecification field's value. +func (s *VerifiedAccessTrustProvider) SetSseSpecification(v *VerifiedAccessSseSpecificationResponse) *VerifiedAccessTrustProvider { + s.SseSpecification = v + return s +} + // SetTags sets the Tags field's value. func (s *VerifiedAccessTrustProvider) SetTags(v []*Tag) *VerifiedAccessTrustProvider { s.Tags = v diff --git a/service/iotfleetwise/api.go b/service/iotfleetwise/api.go index b659de24b5f..ebb4eda37a4 100644 --- a/service/iotfleetwise/api.go +++ b/service/iotfleetwise/api.go @@ -1791,6 +1791,99 @@ func (c *IoTFleetWise) GetDecoderManifestWithContext(ctx aws.Context, input *Get return out, req.Send() } +const opGetEncryptionConfiguration = "GetEncryptionConfiguration" + +// GetEncryptionConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the GetEncryptionConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetEncryptionConfiguration for more information on using the GetEncryptionConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the GetEncryptionConfigurationRequest method. +// req, resp := client.GetEncryptionConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/GetEncryptionConfiguration +func (c *IoTFleetWise) GetEncryptionConfigurationRequest(input *GetEncryptionConfigurationInput) (req *request.Request, output *GetEncryptionConfigurationOutput) { + op := &request.Operation{ + Name: opGetEncryptionConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetEncryptionConfigurationInput{} + } + + output = &GetEncryptionConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetEncryptionConfiguration API operation for AWS IoT FleetWise. +// +// Retrieves the encryption configuration for resources and data in Amazon Web +// Services IoT FleetWise. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT FleetWise's +// API operation GetEncryptionConfiguration for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The resource wasn't found. +// +// - InternalServerException +// The request couldn't be completed because the server temporarily failed. +// +// - ThrottlingException +// The request couldn't be completed due to throttling. +// +// - ValidationException +// The input fails to satisfy the constraints specified by an Amazon Web Services +// service. +// +// - AccessDeniedException +// You don't have sufficient permission to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/GetEncryptionConfiguration +func (c *IoTFleetWise) GetEncryptionConfiguration(input *GetEncryptionConfigurationInput) (*GetEncryptionConfigurationOutput, error) { + req, out := c.GetEncryptionConfigurationRequest(input) + return out, req.Send() +} + +// GetEncryptionConfigurationWithContext is the same as GetEncryptionConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See GetEncryptionConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoTFleetWise) GetEncryptionConfigurationWithContext(ctx aws.Context, input *GetEncryptionConfigurationInput, opts ...request.Option) (*GetEncryptionConfigurationOutput, error) { + req, out := c.GetEncryptionConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetFleet = "GetFleet" // GetFleetRequest generates a "aws/request.Request" representing the @@ -4611,6 +4704,106 @@ func (c *IoTFleetWise) ListVehiclesInFleetPagesWithContext(ctx aws.Context, inpu return p.Err() } +const opPutEncryptionConfiguration = "PutEncryptionConfiguration" + +// PutEncryptionConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutEncryptionConfiguration operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutEncryptionConfiguration for more information on using the PutEncryptionConfiguration +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// // Example sending a request using the PutEncryptionConfigurationRequest method. +// req, resp := client.PutEncryptionConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/PutEncryptionConfiguration +func (c *IoTFleetWise) PutEncryptionConfigurationRequest(input *PutEncryptionConfigurationInput) (req *request.Request, output *PutEncryptionConfigurationOutput) { + op := &request.Operation{ + Name: opPutEncryptionConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutEncryptionConfigurationInput{} + } + + output = &PutEncryptionConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutEncryptionConfiguration API operation for AWS IoT FleetWise. +// +// Creates or updates the encryption configuration. Amazon Web Services IoT +// FleetWise can encrypt your data and resources using an Amazon Web Services +// managed key. Or, you can use a KMS key that you own and manage. For more +// information, see Data encryption (https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/data-encryption.html) +// in the Amazon Web Services IoT FleetWise Developer Guide. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS IoT FleetWise's +// API operation PutEncryptionConfiguration for usage and error information. +// +// Returned Error Types: +// +// - ResourceNotFoundException +// The resource wasn't found. +// +// - InternalServerException +// The request couldn't be completed because the server temporarily failed. +// +// - ConflictException +// The request has conflicting operations. This can occur if you're trying to +// perform more than one operation on the same resource at the same time. +// +// - ThrottlingException +// The request couldn't be completed due to throttling. +// +// - ValidationException +// The input fails to satisfy the constraints specified by an Amazon Web Services +// service. +// +// - AccessDeniedException +// You don't have sufficient permission to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/iotfleetwise-2021-06-17/PutEncryptionConfiguration +func (c *IoTFleetWise) PutEncryptionConfiguration(input *PutEncryptionConfigurationInput) (*PutEncryptionConfigurationOutput, error) { + req, out := c.PutEncryptionConfigurationRequest(input) + return out, req.Send() +} + +// PutEncryptionConfigurationWithContext is the same as PutEncryptionConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutEncryptionConfiguration for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *IoTFleetWise) PutEncryptionConfigurationWithContext(ctx aws.Context, input *PutEncryptionConfigurationInput, opts ...request.Option) (*PutEncryptionConfigurationOutput, error) { + req, out := c.PutEncryptionConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutLoggingOptions = "PutLoggingOptions" // PutLoggingOptionsRequest generates a "aws/request.Request" representing the @@ -7093,7 +7286,9 @@ type CreateCampaignInput struct { // // Amazon S3 optimizes the cost of data storage and provides additional mechanisms // to use vehicle data, such as data lakes, centralized data storage, data processing - // pipelines, and analytics. + // pipelines, and analytics. Amazon Web Services IoT FleetWise supports at-least-once + // file delivery to S3. Your vehicle data is stored on multiple Amazon Web Services + // IoT FleetWise servers for redundancy and high availability. // // You can use Amazon Timestream to access and analyze time series data, and // Timestream to query vehicle data so that you can identify trends and patterns. @@ -9802,6 +9997,114 @@ func (s *GetDecoderManifestOutput) SetStatus(v string) *GetDecoderManifestOutput return s } +type GetEncryptionConfigurationInput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetEncryptionConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetEncryptionConfigurationInput) GoString() string { + return s.String() +} + +type GetEncryptionConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The time when encryption was configured in seconds since epoch (January 1, + // 1970 at midnight UTC time). + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The encryption status. + // + // EncryptionStatus is a required field + EncryptionStatus *string `locationName:"encryptionStatus" type:"string" required:"true" enum:"EncryptionStatus"` + + // The type of encryption. Set to KMS_BASED_ENCRYPTION to use an KMS key that + // you own and manage. Set to FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon + // Web Services managed key that is owned by the Amazon Web Services IoT FleetWise + // service account. + // + // EncryptionType is a required field + EncryptionType *string `locationName:"encryptionType" type:"string" required:"true" enum:"EncryptionType"` + + // The error message that describes why encryption settings couldn't be configured, + // if applicable. + ErrorMessage *string `locationName:"errorMessage" type:"string"` + + // The ID of the KMS key that is used for encryption. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` + + // The time when encryption was last updated in seconds since epoch (January + // 1, 1970 at midnight UTC time). + LastModificationTime *time.Time `locationName:"lastModificationTime" type:"timestamp"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetEncryptionConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s GetEncryptionConfigurationOutput) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *GetEncryptionConfigurationOutput) SetCreationTime(v time.Time) *GetEncryptionConfigurationOutput { + s.CreationTime = &v + return s +} + +// SetEncryptionStatus sets the EncryptionStatus field's value. +func (s *GetEncryptionConfigurationOutput) SetEncryptionStatus(v string) *GetEncryptionConfigurationOutput { + s.EncryptionStatus = &v + return s +} + +// SetEncryptionType sets the EncryptionType field's value. +func (s *GetEncryptionConfigurationOutput) SetEncryptionType(v string) *GetEncryptionConfigurationOutput { + s.EncryptionType = &v + return s +} + +// SetErrorMessage sets the ErrorMessage field's value. +func (s *GetEncryptionConfigurationOutput) SetErrorMessage(v string) *GetEncryptionConfigurationOutput { + s.ErrorMessage = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *GetEncryptionConfigurationOutput) SetKmsKeyId(v string) *GetEncryptionConfigurationOutput { + s.KmsKeyId = &v + return s +} + +// SetLastModificationTime sets the LastModificationTime field's value. +func (s *GetEncryptionConfigurationOutput) SetLastModificationTime(v time.Time) *GetEncryptionConfigurationOutput { + s.LastModificationTime = &v + return s +} + type GetFleetInput struct { _ struct{} `type:"structure"` @@ -13561,6 +13864,118 @@ func (s *ObdSignal) SetStartByte(v int64) *ObdSignal { return s } +type PutEncryptionConfigurationInput struct { + _ struct{} `type:"structure"` + + // The type of encryption. Choose KMS_BASED_ENCRYPTION to use a KMS key or FLEETWISE_DEFAULT_ENCRYPTION + // to use an Amazon Web Services managed key. + // + // EncryptionType is a required field + EncryptionType *string `locationName:"encryptionType" type:"string" required:"true" enum:"EncryptionType"` + + // The ID of the KMS key that is used for encryption. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutEncryptionConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutEncryptionConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutEncryptionConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutEncryptionConfigurationInput"} + if s.EncryptionType == nil { + invalidParams.Add(request.NewErrParamRequired("EncryptionType")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEncryptionType sets the EncryptionType field's value. +func (s *PutEncryptionConfigurationInput) SetEncryptionType(v string) *PutEncryptionConfigurationInput { + s.EncryptionType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *PutEncryptionConfigurationInput) SetKmsKeyId(v string) *PutEncryptionConfigurationInput { + s.KmsKeyId = &v + return s +} + +type PutEncryptionConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The encryption status. + // + // EncryptionStatus is a required field + EncryptionStatus *string `locationName:"encryptionStatus" type:"string" required:"true" enum:"EncryptionStatus"` + + // The type of encryption. Set to KMS_BASED_ENCRYPTION to use an KMS key that + // you own and manage. Set to FLEETWISE_DEFAULT_ENCRYPTION to use an Amazon + // Web Services managed key that is owned by the Amazon Web Services IoT FleetWise + // service account. + // + // EncryptionType is a required field + EncryptionType *string `locationName:"encryptionType" type:"string" required:"true" enum:"EncryptionType"` + + // The ID of the KMS key that is used for encryption. + KmsKeyId *string `locationName:"kmsKeyId" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutEncryptionConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PutEncryptionConfigurationOutput) GoString() string { + return s.String() +} + +// SetEncryptionStatus sets the EncryptionStatus field's value. +func (s *PutEncryptionConfigurationOutput) SetEncryptionStatus(v string) *PutEncryptionConfigurationOutput { + s.EncryptionStatus = &v + return s +} + +// SetEncryptionType sets the EncryptionType field's value. +func (s *PutEncryptionConfigurationOutput) SetEncryptionType(v string) *PutEncryptionConfigurationOutput { + s.EncryptionType = &v + return s +} + +// SetKmsKeyId sets the KmsKeyId field's value. +func (s *PutEncryptionConfigurationOutput) SetKmsKeyId(v string) *PutEncryptionConfigurationOutput { + s.KmsKeyId = &v + return s +} + type PutLoggingOptionsInput struct { _ struct{} `type:"structure"` @@ -16388,6 +16803,42 @@ func DiagnosticsMode_Values() []string { } } +const ( + // EncryptionStatusPending is a EncryptionStatus enum value + EncryptionStatusPending = "PENDING" + + // EncryptionStatusSuccess is a EncryptionStatus enum value + EncryptionStatusSuccess = "SUCCESS" + + // EncryptionStatusFailure is a EncryptionStatus enum value + EncryptionStatusFailure = "FAILURE" +) + +// EncryptionStatus_Values returns all elements of the EncryptionStatus enum +func EncryptionStatus_Values() []string { + return []string{ + EncryptionStatusPending, + EncryptionStatusSuccess, + EncryptionStatusFailure, + } +} + +const ( + // EncryptionTypeKmsBasedEncryption is a EncryptionType enum value + EncryptionTypeKmsBasedEncryption = "KMS_BASED_ENCRYPTION" + + // EncryptionTypeFleetwiseDefaultEncryption is a EncryptionType enum value + EncryptionTypeFleetwiseDefaultEncryption = "FLEETWISE_DEFAULT_ENCRYPTION" +) + +// EncryptionType_Values returns all elements of the EncryptionType enum +func EncryptionType_Values() []string { + return []string{ + EncryptionTypeKmsBasedEncryption, + EncryptionTypeFleetwiseDefaultEncryption, + } +} + const ( // LogTypeOff is a LogType enum value LogTypeOff = "OFF" diff --git a/service/iotfleetwise/iotfleetwiseiface/interface.go b/service/iotfleetwise/iotfleetwiseiface/interface.go index a2252d5e940..e48e06a362a 100644 --- a/service/iotfleetwise/iotfleetwiseiface/interface.go +++ b/service/iotfleetwise/iotfleetwiseiface/interface.go @@ -132,6 +132,10 @@ type IoTFleetWiseAPI interface { GetDecoderManifestWithContext(aws.Context, *iotfleetwise.GetDecoderManifestInput, ...request.Option) (*iotfleetwise.GetDecoderManifestOutput, error) GetDecoderManifestRequest(*iotfleetwise.GetDecoderManifestInput) (*request.Request, *iotfleetwise.GetDecoderManifestOutput) + GetEncryptionConfiguration(*iotfleetwise.GetEncryptionConfigurationInput) (*iotfleetwise.GetEncryptionConfigurationOutput, error) + GetEncryptionConfigurationWithContext(aws.Context, *iotfleetwise.GetEncryptionConfigurationInput, ...request.Option) (*iotfleetwise.GetEncryptionConfigurationOutput, error) + GetEncryptionConfigurationRequest(*iotfleetwise.GetEncryptionConfigurationInput) (*request.Request, *iotfleetwise.GetEncryptionConfigurationOutput) + GetFleet(*iotfleetwise.GetFleetInput) (*iotfleetwise.GetFleetOutput, error) GetFleetWithContext(aws.Context, *iotfleetwise.GetFleetInput, ...request.Option) (*iotfleetwise.GetFleetOutput, error) GetFleetRequest(*iotfleetwise.GetFleetInput) (*request.Request, *iotfleetwise.GetFleetOutput) @@ -259,6 +263,10 @@ type IoTFleetWiseAPI interface { ListVehiclesInFleetPages(*iotfleetwise.ListVehiclesInFleetInput, func(*iotfleetwise.ListVehiclesInFleetOutput, bool) bool) error ListVehiclesInFleetPagesWithContext(aws.Context, *iotfleetwise.ListVehiclesInFleetInput, func(*iotfleetwise.ListVehiclesInFleetOutput, bool) bool, ...request.Option) error + PutEncryptionConfiguration(*iotfleetwise.PutEncryptionConfigurationInput) (*iotfleetwise.PutEncryptionConfigurationOutput, error) + PutEncryptionConfigurationWithContext(aws.Context, *iotfleetwise.PutEncryptionConfigurationInput, ...request.Option) (*iotfleetwise.PutEncryptionConfigurationOutput, error) + PutEncryptionConfigurationRequest(*iotfleetwise.PutEncryptionConfigurationInput) (*request.Request, *iotfleetwise.PutEncryptionConfigurationOutput) + PutLoggingOptions(*iotfleetwise.PutLoggingOptionsInput) (*iotfleetwise.PutLoggingOptionsOutput, error) PutLoggingOptionsWithContext(aws.Context, *iotfleetwise.PutLoggingOptionsInput, ...request.Option) (*iotfleetwise.PutLoggingOptionsOutput, error) PutLoggingOptionsRequest(*iotfleetwise.PutLoggingOptionsInput) (*request.Request, *iotfleetwise.PutLoggingOptionsOutput) diff --git a/service/sagemaker/api.go b/service/sagemaker/api.go index b340c5cd045..03ed11648f4 100644 --- a/service/sagemaker/api.go +++ b/service/sagemaker/api.go @@ -811,8 +811,8 @@ func (c *SageMaker) CreateAutoMLJobRequest(input *CreateAutoMLJobInput) (req *re // which offer backward compatibility. // // CreateAutoMLJobV2 can manage tabular problem types identical to those of -// its previous version CreateAutoMLJob, as well as non-tabular problem types -// such as image or text classification. +// its previous version CreateAutoMLJob, as well as time-series forecasting, +// and non-tabular problem types such as image or text classification. // // Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 // in Migrate a CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2). @@ -912,8 +912,8 @@ func (c *SageMaker) CreateAutoMLJobV2Request(input *CreateAutoMLJobV2Input) (req // which offer backward compatibility. // // CreateAutoMLJobV2 can manage tabular problem types identical to those of -// its previous version CreateAutoMLJob, as well as non-tabular problem types -// such as image or text classification. +// its previous version CreateAutoMLJob, as well as time-series forecasting, +// and non-tabular problem types such as image or text classification. // // Find guidelines about how to migrate a CreateAutoMLJob to CreateAutoMLJobV2 // in Migrate a CreateAutoMLJob to CreateAutoMLJobV2 (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2). @@ -34559,12 +34559,13 @@ func (s *CapacitySize) SetValue(v int64) *CapacitySize { } // Configuration specifying how to treat different headers. If no headers are -// specified SageMaker will by default base64 encode when capturing the data. +// specified Amazon SageMaker will by default base64 encode when capturing the +// data. type CaptureContentTypeHeader struct { _ struct{} `type:"structure"` - // The list of all content type headers that SageMaker will treat as CSV and - // capture accordingly. + // The list of all content type headers that Amazon SageMaker will treat as + // CSV and capture accordingly. CsvContentTypes []*string `min:"1" type:"list"` // The list of all content type headers that SageMaker will treat as JSON and @@ -36115,6 +36116,55 @@ func (s *CognitoMemberDefinition) SetUserPool(v string) *CognitoMemberDefinition return s } +// Configuration for your collection. +type CollectionConfig struct { + _ struct{} `type:"structure"` + + // Configuration for your vector collection type. + // + // * Dimension: The number of elements in your vector. + VectorConfig *VectorConfig `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CollectionConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s CollectionConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CollectionConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CollectionConfig"} + if s.VectorConfig != nil { + if err := s.VectorConfig.Validate(); err != nil { + invalidParams.AddNested("VectorConfig", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetVectorConfig sets the VectorConfig field's value. +func (s *CollectionConfig) SetVectorConfig(v *VectorConfig) *CollectionConfig { + s.VectorConfig = v + return s +} + // Configuration information for the Amazon SageMaker Debugger output tensor // collections. type CollectionConfiguration struct { @@ -47540,9 +47590,8 @@ type DataCaptureConfig struct { // InitialSamplingPercentage is a required field InitialSamplingPercentage *int64 `type:"integer" required:"true"` - // The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service - // key that SageMaker uses to encrypt the captured data at rest using Amazon - // S3 server-side encryption. + // The Amazon Resource Name (ARN) of an Key Management Service key that SageMaker + // uses to encrypt the captured data at rest using Amazon S3 server-side encryption. // // The KmsKeyId can be any of the following formats: // @@ -47921,9 +47970,9 @@ type DataQualityAppSpecification struct { PostAnalyticsProcessorSourceUri *string `type:"string"` // An Amazon S3 URI to a script that is called per row prior to running analysis. - // It can base64 decode the payload and convert it into a flatted json so that - // the built-in container can use the converted data. Applicable only for the - // built-in (first party) containers. + // It can base64 decode the payload and convert it into a flattened JSON so + // that the built-in container can use the converted data. Applicable only for + // the built-in (first party) containers. RecordPreprocessorSourceUri *string `type:"string"` } @@ -59310,9 +59359,9 @@ type DescribeModelBiasJobDefinitionOutput struct { // Networking options for a model bias job. NetworkConfig *MonitoringNetworkConfig `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access - // Management (IAM) role that has read permission to the input data location - // and write permission to the output data location in Amazon S3. + // The Amazon Resource Name (ARN) of the IAM role that has read permission to + // the input data location and write permission to the output data location + // in Amazon S3. // // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` @@ -59908,9 +59957,9 @@ type DescribeModelExplainabilityJobDefinitionOutput struct { // Networking options for a model explainability job. NetworkConfig *MonitoringNetworkConfig `type:"structure"` - // The Amazon Resource Name (ARN) of the Amazon Web Services Identity and Access - // Management (IAM) role that has read permission to the input data location - // and write permission to the output data location in Amazon S3. + // The Amazon Resource Name (ARN) of the IAM role that has read permission to + // the input data location and write permission to the output data location + // in Amazon S3. // // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` @@ -66978,7 +67027,7 @@ type EndpointInput struct { ProbabilityThresholdAttribute *float64 `type:"double"` // Whether input data distributed in Amazon S3 is fully replicated or sharded - // by an S3 key. Defaults to FullyReplicated + // by an Amazon S3 key. Defaults to FullyReplicated S3DataDistributionType *string `type:"string" enum:"ProcessingS3DataDistributionType"` // Whether the Pipe or File is used as the input mode for transferring data @@ -68053,6 +68102,21 @@ func (s *FailStepMetadata) SetErrorMessage(v string) *FailStepMetadata { type FeatureDefinition struct { _ struct{} `type:"structure"` + // Configuration for your collection. + CollectionConfig *CollectionConfig `type:"structure"` + + // A grouping of elements where each element within the collection must have + // the same feature type (String, Integral, or Fractional). + // + // * List: An ordered collection of elements. + // + // * Set: An unordered collection of unique elements. + // + // * Vector: A specialized list that represents a fixed-size array of elements. + // The vector dimension is determined by you. Must have elements with fractional + // feature types. + CollectionType *string `type:"string" enum:"CollectionType"` + // The name of a feature. The type must be a string. FeatureName cannot be any // of the following: is_deleted, write_time, api_invocation_time. FeatureName *string `min:"1" type:"string"` @@ -68085,6 +68149,11 @@ func (s *FeatureDefinition) Validate() error { if s.FeatureName != nil && len(*s.FeatureName) < 1 { invalidParams.Add(request.NewErrParamMinLen("FeatureName", 1)) } + if s.CollectionConfig != nil { + if err := s.CollectionConfig.Validate(); err != nil { + invalidParams.AddNested("CollectionConfig", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -68092,6 +68161,18 @@ func (s *FeatureDefinition) Validate() error { return nil } +// SetCollectionConfig sets the CollectionConfig field's value. +func (s *FeatureDefinition) SetCollectionConfig(v *CollectionConfig) *FeatureDefinition { + s.CollectionConfig = v + return s +} + +// SetCollectionType sets the CollectionType field's value. +func (s *FeatureDefinition) SetCollectionType(v string) *FeatureDefinition { + s.CollectionType = &v + return s +} + // SetFeatureName sets the FeatureName field's value. func (s *FeatureDefinition) SetFeatureName(v string) *FeatureDefinition { s.FeatureName = &v @@ -69983,7 +70064,7 @@ type HolidayConfigAttributes struct { // The country code for the holiday calendar. // // For the list of public holiday calendars supported by AutoML job V2, see - // Country Codes (https://docs.aws.amazon.com/forecast/latest/dg/holidays.html#holidays-country-codes). + // Country Codes (https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-timeseries-forecasting-holiday-calendars.html#holiday-country-codes). // Use the country code corresponding to the country of your choice. CountryCode *string `min:"2" type:"string"` } @@ -74418,7 +74499,8 @@ type InferenceExperimentDataStorageConfig struct { _ struct{} `type:"structure"` // Configuration specifying how to treat different headers. If no headers are - // specified SageMaker will by default base64 encode when capturing the data. + // specified Amazon SageMaker will by default base64 encode when capturing the + // data. ContentType *CaptureContentTypeHeader `type:"structure"` // The Amazon S3 bucket where the inference request and response data is stored. @@ -78977,7 +79059,8 @@ type ListDataQualityJobDefinitionsInput struct { // The field to sort results by. The default is CreationTime. SortBy *string `type:"string" enum:"MonitoringJobDefinitionSortKey"` - // The sort order for results. The default is Descending. + // Whether to sort the results in Ascending or Descending order. The default + // is Descending. SortOrder *string `type:"string" enum:"SortOrder"` } @@ -82811,8 +82894,8 @@ type ListModelBiasJobDefinitionsOutput struct { // JobDefinitionSummaries is a required field JobDefinitionSummaries []*MonitoringJobDefinitionSummary `type:"list" required:"true"` - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of jobs, use it in the subsequent request. + // The token returned if the response is truncated. To retrieve the next set + // of job executions, use it in the next request. NextToken *string `type:"string"` } @@ -83467,8 +83550,8 @@ type ListModelExplainabilityJobDefinitionsOutput struct { // JobDefinitionSummaries is a required field JobDefinitionSummaries []*MonitoringJobDefinitionSummary `type:"list" required:"true"` - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of jobs, use it in the subsequent request. + // The token returned if the response is truncated. To retrieve the next set + // of job executions, use it in the next request. NextToken *string `type:"string"` } @@ -83976,7 +84059,8 @@ type ListModelQualityJobDefinitionsInput struct { // The field to sort results by. The default is CreationTime. SortBy *string `type:"string" enum:"MonitoringJobDefinitionSortKey"` - // The sort order for results. The default is Descending. + // Whether to sort the results in Ascending or Descending order. The default + // is Descending. SortOrder *string `type:"string" enum:"SortOrder"` } @@ -84569,8 +84653,8 @@ type ListMonitoringExecutionsInput struct { // Filter for jobs scheduled before a specified time. ScheduledTimeBefore *time.Time `type:"timestamp"` - // Whether to sort results by Status, CreationTime, ScheduledTime field. The - // default is CreationTime. + // Whether to sort the results by the Status, CreationTime, or ScheduledTime + // field. The default is CreationTime. SortBy *string `type:"string" enum:"MonitoringExecutionSortKey"` // Whether to sort the results in Ascending or Descending order. The default @@ -84716,8 +84800,8 @@ type ListMonitoringExecutionsOutput struct { // MonitoringExecutionSummaries is a required field MonitoringExecutionSummaries []*MonitoringExecutionSummary `type:"list" required:"true"` - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of jobs, use it in the subsequent reques + // The token returned if the response is truncated. To retrieve the next set + // of job executions, use it in the next request. NextToken *string `type:"string"` } @@ -84792,8 +84876,8 @@ type ListMonitoringSchedulesInput struct { // of job executions, use it in the next request. NextToken *string `type:"string"` - // Whether to sort results by Status, CreationTime, ScheduledTime field. The - // default is CreationTime. + // Whether to sort the results by the Status, CreationTime, or ScheduledTime + // field. The default is CreationTime. SortBy *string `type:"string" enum:"MonitoringScheduleSortKey"` // Whether to sort the results in Ascending or Descending order. The default @@ -84925,8 +85009,8 @@ type ListMonitoringSchedulesOutput struct { // MonitoringScheduleSummaries is a required field MonitoringScheduleSummaries []*MonitoringScheduleSummary `type:"list" required:"true"` - // If the response is truncated, Amazon SageMaker returns this token. To retrieve - // the next set of jobs, use it in the subsequent request. + // The token returned if the response is truncated. To retrieve the next set + // of job executions, use it in the next request. NextToken *string `type:"string"` } @@ -90362,9 +90446,9 @@ func (s *ModelDigests) SetArtifactDigest(v string) *ModelDigests { type ModelExplainabilityAppSpecification struct { _ struct{} `type:"structure"` - // JSON formatted S3 file that defines explainability parameters. For more information - // on this JSON configuration file, see Configure model explainability parameters - // (https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-config-json-monitor-model-explainability-parameters.html). + // JSON formatted Amazon S3 file that defines explainability parameters. For + // more information on this JSON configuration file, see Configure model explainability + // parameters (https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-config-json-monitor-model-explainability-parameters.html). // // ConfigUri is a required field ConfigUri *string `type:"string" required:"true"` @@ -92064,9 +92148,9 @@ type ModelQualityAppSpecification struct { ProblemType *string `type:"string" enum:"MonitoringProblemType"` // An Amazon S3 URI to a script that is called per row prior to running analysis. - // It can base64 decode the payload and convert it into a flatted json so that - // the built-in container can use the converted data. Applicable only for the - // built-in (first party) containers. + // It can base64 decode the payload and convert it into a flattened JSON so + // that the built-in container can use the converted data. Applicable only for + // the built-in (first party) containers. RecordPreprocessorSourceUri *string `type:"string"` } @@ -92205,7 +92289,7 @@ func (s *ModelQualityBaselineConfig) SetConstraintsResource(v *MonitoringConstra return s } -// The input for the model quality monitoring job. Currently endponts are supported +// The input for the model quality monitoring job. Currently endpoints are supported // for input for model quality monitoring jobs. type ModelQualityJobInput struct { _ struct{} `type:"structure"` @@ -92815,9 +92899,9 @@ type MonitoringAppSpecification struct { PostAnalyticsProcessorSourceUri *string `type:"string"` // An Amazon S3 URI to a script that is called per row prior to running analysis. - // It can base64 decode the payload and convert it into a flatted json so that - // the built-in container can use the converted data. Applicable only for the - // built-in (first party) containers. + // It can base64 decode the payload and convert it into a flattened JSON so + // that the built-in container can use the converted data. Applicable only for + // the built-in (first party) containers. RecordPreprocessorSourceUri *string `type:"string"` } @@ -92971,9 +93055,9 @@ type MonitoringClusterConfig struct { // InstanceType is a required field InstanceType *string `type:"string" required:"true" enum:"ProcessingInstanceType"` - // The Amazon Web Services Key Management Service (Amazon Web Services KMS) - // key that Amazon SageMaker uses to encrypt data on the storage volume attached - // to the ML compute instance(s) that run the model monitoring job. + // The Key Management Service (KMS) key that Amazon SageMaker uses to encrypt + // data on the storage volume attached to the ML compute instance(s) that run + // the model monitoring job. VolumeKmsKeyId *string `type:"string"` // The size of the ML storage volume, in gigabytes, that you want to provision. @@ -93402,8 +93486,7 @@ type MonitoringJobDefinition struct { // MonitoringInputs is a required field MonitoringInputs []*MonitoringInput `min:"1" type:"list" required:"true"` - // The array of outputs from the monitoring job to be uploaded to Amazon Simple - // Storage Service (Amazon S3). + // The array of outputs from the monitoring job to be uploaded to Amazon S3. // // MonitoringOutputConfig is a required field MonitoringOutputConfig *MonitoringOutputConfig `type:"structure" required:"true"` @@ -93642,7 +93725,7 @@ func (s *MonitoringJobDefinitionSummary) SetMonitoringJobDefinitionName(v string type MonitoringJsonDatasetFormat struct { _ struct{} `type:"structure"` - // Indicates if the file should be read as a json object per line. + // Indicates if the file should be read as a JSON object per line. Line *bool `type:"boolean"` } @@ -93799,9 +93882,8 @@ func (s *MonitoringOutput) SetS3Output(v *MonitoringS3Output) *MonitoringOutput type MonitoringOutputConfig struct { _ struct{} `type:"structure"` - // The Amazon Web Services Key Management Service (Amazon Web Services KMS) - // key that Amazon SageMaker uses to encrypt the model artifacts at rest using - // Amazon S3 server-side encryption. + // The Key Management Service (KMS) key that Amazon SageMaker uses to encrypt + // the model artifacts at rest using Amazon S3 server-side encryption. KmsKeyId *string `type:"string"` // Monitoring outputs for monitoring jobs. This is where the output of the periodic @@ -95502,6 +95584,14 @@ type OnlineStoreConfig struct { // Use to specify KMS Key ID (KMSKeyId) for at-rest encryption of your OnlineStore. SecurityConfig *OnlineStoreSecurityConfig `type:"structure"` + // Option for different tiers of low latency storage for real-time data retrieval. + // + // * Standard: A managed low latency data store for feature groups. + // + // * InMemory: A managed data store for feature groups that supports very + // low latency retrieval. + StorageType *string `type:"string" enum:"StorageType"` + // Time to live duration, where the record is hard deleted after the expiration // time is reached; ExpiresAt = EventTime + TtlDuration. For information on // HardDelete, see the DeleteRecord (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_feature_store_DeleteRecord.html) @@ -95554,6 +95644,12 @@ func (s *OnlineStoreConfig) SetSecurityConfig(v *OnlineStoreSecurityConfig) *Onl return s } +// SetStorageType sets the StorageType field's value. +func (s *OnlineStoreConfig) SetStorageType(v string) *OnlineStoreConfig { + s.StorageType = &v + return s +} + // SetTtlDuration sets the TtlDuration field's value. func (s *OnlineStoreConfig) SetTtlDuration(v *TtlDuration) *OnlineStoreConfig { s.TtlDuration = v @@ -104059,6 +104155,9 @@ type ScheduleConfig struct { // // * If you want to start the job daily: cron(0 [00-23] ? * * *) // + // * If you want to run the job one time, immediately, use the following + // keyword: NOW + // // For example, the following are valid cron expressions: // // * Daily at noon UTC: cron(0 12 ? * * *) @@ -108642,7 +108741,7 @@ type TimeSeriesForecastingJobConfig struct { // is not provided, the AutoML job uses the quantiles p10, p50, and p90 as default. ForecastQuantiles []*string `min:"1" type:"list"` - // The collection of holidays featurization attributes used to incorporate national + // The collection of holiday featurization attributes used to incorporate national // holiday information into your forecasting model. HolidayConfig []*HolidayConfigAttributes `min:"1" type:"list"` @@ -117308,6 +117407,56 @@ func (s *VariantProperty) SetVariantPropertyType(v string) *VariantProperty { return s } +// Configuration for your vector collection type. +type VectorConfig struct { + _ struct{} `type:"structure"` + + // The number of elements in your vector. + // + // Dimension is a required field + Dimension *int64 `min:"1" type:"integer" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VectorConfig) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s VectorConfig) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *VectorConfig) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "VectorConfig"} + if s.Dimension == nil { + invalidParams.Add(request.NewErrParamRequired("Dimension")) + } + if s.Dimension != nil && *s.Dimension < 1 { + invalidParams.Add(request.NewErrParamMinValue("Dimension", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDimension sets the Dimension field's value. +func (s *VectorConfig) SetDimension(v int64) *VectorConfig { + s.Dimension = &v + return s +} + // A lineage entity connected to the starting entity(ies). type Vertex struct { _ struct{} `type:"structure"` @@ -119528,6 +119677,26 @@ func CodeRepositorySortOrder_Values() []string { } } +const ( + // CollectionTypeList is a CollectionType enum value + CollectionTypeList = "List" + + // CollectionTypeSet is a CollectionType enum value + CollectionTypeSet = "Set" + + // CollectionTypeVector is a CollectionType enum value + CollectionTypeVector = "Vector" +) + +// CollectionType_Values returns all elements of the CollectionType enum +func CollectionType_Values() []string { + return []string{ + CollectionTypeList, + CollectionTypeSet, + CollectionTypeVector, + } +} + const ( // CompilationJobStatusInprogress is a CompilationJobStatus enum value CompilationJobStatusInprogress = "INPROGRESS" @@ -124353,6 +124522,22 @@ func StepStatus_Values() []string { } } +const ( + // StorageTypeStandard is a StorageType enum value + StorageTypeStandard = "Standard" + + // StorageTypeInMemory is a StorageType enum value + StorageTypeInMemory = "InMemory" +) + +// StorageType_Values returns all elements of the StorageType enum +func StorageType_Values() []string { + return []string{ + StorageTypeStandard, + StorageTypeInMemory, + } +} + const ( // StudioLifecycleConfigAppTypeJupyterServer is a StudioLifecycleConfigAppType enum value StudioLifecycleConfigAppTypeJupyterServer = "JupyterServer" diff --git a/service/sagemakerfeaturestoreruntime/api.go b/service/sagemakerfeaturestoreruntime/api.go index 4e1c78dff8e..9b218aa9980 100644 --- a/service/sagemakerfeaturestoreruntime/api.go +++ b/service/sagemakerfeaturestoreruntime/api.go @@ -951,12 +951,16 @@ type FeatureValue struct { // FeatureName is a required field FeatureName *string `min:"1" type:"string" required:"true"` - // The value associated with a feature, in string format. Note that features - // types can be String, Integral, or Fractional. This value represents all three - // types as a string. - // - // ValueAsString is a required field - ValueAsString *string `type:"string" required:"true"` + // The value in string format associated with a feature. Used when your CollectionType + // is None. Note that features types can be String, Integral, or Fractional. + // This value represents all three types as a string. + ValueAsString *string `type:"string"` + + // The list of values in string format associated with a feature. Used when + // your CollectionType is a List, Set, or Vector. Note that features types can + // be String, Integral, or Fractional. These values represents all three types + // as a string. + ValueAsStringList []*string `type:"list"` } // String returns the string representation. @@ -986,9 +990,6 @@ func (s *FeatureValue) Validate() error { if s.FeatureName != nil && len(*s.FeatureName) < 1 { invalidParams.Add(request.NewErrParamMinLen("FeatureName", 1)) } - if s.ValueAsString == nil { - invalidParams.Add(request.NewErrParamRequired("ValueAsString")) - } if invalidParams.Len() > 0 { return invalidParams @@ -1008,6 +1009,12 @@ func (s *FeatureValue) SetValueAsString(v string) *FeatureValue { return s } +// SetValueAsStringList sets the ValueAsStringList field's value. +func (s *FeatureValue) SetValueAsStringList(v []*string) *FeatureValue { + s.ValueAsStringList = v + return s +} + type GetRecordInput struct { _ struct{} `type:"structure" nopayload:"true"` diff --git a/service/wafv2/api.go b/service/wafv2/api.go index d0361aa70a5..72f1139b6b1 100644 --- a/service/wafv2/api.go +++ b/service/wafv2/api.go @@ -7326,9 +7326,15 @@ type ByteMatchStatement struct { // * UriPath: The value that you want WAF to search for in the URI path, // for example, /images/daily-ad.jpg. // - // * JA3Fingerprint: The string to match against the web request's JA3 fingerprint - // header. The header contains a hash fingerprint of the TLS Client Hello - // packet for the request. + // * JA3Fingerprint: Match against the request's JA3 fingerprint. The JA3 + // fingerprint is a 32-character hash derived from the TLS Client Hello of + // an incoming request. This fingerprint serves as a unique identifier for + // the client's TLS configuration. You can use this choice only with a string + // match ByteMatchStatement with the PositionalConstraint set to EXACTLY. + // You can obtain the JA3 fingerprint for client requests from the web ACL + // logs. If WAF is able to calculate the fingerprint, it includes it in the + // logs. For information about the logging fields, see Log fields (https://docs.aws.amazon.com/waf/latest/developerguide/logging-fields.html) + // in the WAF Developer Guide. // // * HeaderOrder: The comma-separated list of header names to match for. // WAF creates a string that contains the ordered list of header names, from @@ -11148,11 +11154,22 @@ type FieldToMatch struct { // from the underlying host service. Headers *Headers `type:"structure"` - // Match against the request's JA3 fingerprint header. The header contains a - // hash fingerprint of the TLS Client Hello packet for the request. + // Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character + // hash derived from the TLS Client Hello of an incoming request. This fingerprint + // serves as a unique identifier for the client's TLS configuration. WAF calculates + // and logs this fingerprint for each request that has enough TLS Client Hello + // information for the calculation. Almost all web requests include this information. // // You can use this choice only with a string match ByteMatchStatement with // the PositionalConstraint set to EXACTLY. + // + // You can obtain the JA3 fingerprint for client requests from the web ACL logs. + // If WAF is able to calculate the fingerprint, it includes it in the logs. + // For information about the logging fields, see Log fields (https://docs.aws.amazon.com/waf/latest/developerguide/logging-fields.html) + // in the WAF Developer Guide. + // + // Provide the JA3 fingerprint string from the logs in your string match statement + // specification, to match with any future requests that have the same TLS configuration. JA3Fingerprint *JA3Fingerprint `type:"structure"` // Inspect the request body as JSON. The request body immediately follows the @@ -14252,11 +14269,22 @@ func (s *ImmunityTimeProperty) SetImmunityTime(v int64) *ImmunityTimeProperty { return s } -// Match against the request's JA3 fingerprint header. The header contains a -// hash fingerprint of the TLS Client Hello packet for the request. +// Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32-character +// hash derived from the TLS Client Hello of an incoming request. This fingerprint +// serves as a unique identifier for the client's TLS configuration. WAF calculates +// and logs this fingerprint for each request that has enough TLS Client Hello +// information for the calculation. Almost all web requests include this information. // // You can use this choice only with a string match ByteMatchStatement with // the PositionalConstraint set to EXACTLY. +// +// You can obtain the JA3 fingerprint for client requests from the web ACL logs. +// If WAF is able to calculate the fingerprint, it includes it in the logs. +// For information about the logging fields, see Log fields (https://docs.aws.amazon.com/waf/latest/developerguide/logging-fields.html) +// in the WAF Developer Guide. +// +// Provide the JA3 fingerprint string from the logs in your string match statement +// specification, to match with any future requests that have the same TLS configuration. type JA3Fingerprint struct { _ struct{} `type:"structure"`