{ "smithy": "1.0", "metadata": { "suppressions": [ { "id": "HttpMethodSemantics", "namespace": "*" }, { "id": "HttpResponseCodeSemantics", "namespace": "*" }, { "id": "PaginatedTrait", "namespace": "*" }, { "id": "HttpHeaderTrait", "namespace": "*" }, { "id": "HttpUriConflict", "namespace": "*" }, { "id": "Service", "namespace": "*" } ] }, "shapes": { "com.amazonaws.sagemakerruntime#AmazonSageMakerRuntime": { "type": "service", "version": "2017-05-13", "operations": [ { "target": "com.amazonaws.sagemakerruntime#InvokeEndpoint" } ], "traits": { "aws.api#service": { "sdkId": "SageMaker Runtime", "arnNamespace": "sagemaker", "cloudFormationName": "SageMakerRuntime", "cloudTrailEventSource": "sagemakerruntime.amazonaws.com", "endpointPrefix": "runtime.sagemaker" }, "aws.auth#sigv4": { "name": "sagemaker" }, "aws.protocols#restJson1": {}, "smithy.api#documentation": "

The Amazon SageMaker runtime API.

", "smithy.api#title": "Amazon SageMaker Runtime" } }, "com.amazonaws.sagemakerruntime#BodyBlob": { "type": "blob", "traits": { "smithy.api#length": { "min": 0, "max": 6291456 }, "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakerruntime#CustomAttributesHeader": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 1024 }, "smithy.api#pattern": "\\p{ASCII}*", "smithy.api#sensitive": {} } }, "com.amazonaws.sagemakerruntime#EndpointName": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 63 }, "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*" } }, "com.amazonaws.sagemakerruntime#Header": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 1024 }, "smithy.api#pattern": "\\p{ASCII}*" } }, "com.amazonaws.sagemakerruntime#InferenceId": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 64 }, "smithy.api#pattern": "\\A\\S[\\p{Print}]*\\z" } }, "com.amazonaws.sagemakerruntime#InternalFailure": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.sagemakerruntime#Message" } }, "traits": { "smithy.api#documentation": "

An internal failure occurred.

", "smithy.api#error": "server", "smithy.api#httpError": 500 } }, "com.amazonaws.sagemakerruntime#InvokeEndpoint": { "type": "operation", "input": { "target": "com.amazonaws.sagemakerruntime#InvokeEndpointInput" }, "output": { "target": "com.amazonaws.sagemakerruntime#InvokeEndpointOutput" }, "errors": [ { "target": "com.amazonaws.sagemakerruntime#InternalFailure" }, { "target": "com.amazonaws.sagemakerruntime#ModelError" }, { "target": "com.amazonaws.sagemakerruntime#ServiceUnavailable" }, { "target": "com.amazonaws.sagemakerruntime#ValidationError" } ], "traits": { "smithy.api#documentation": "

After you deploy a model into production using Amazon SageMaker hosting services, your\n client applications use this API to get inferences from the model hosted at the\n specified endpoint.

\n

For an overview of Amazon SageMaker, see How It Works.

\n

Amazon SageMaker strips all POST headers except those supported by the API. Amazon SageMaker might add\n additional headers. You should not rely on the behavior of headers outside those\n enumerated in the request syntax.

\n

Calls to InvokeEndpoint are authenticated by using AWS Signature Version\n 4. For information, see Authenticating\n Requests (AWS Signature Version 4) in the Amazon S3 API\n Reference.

\n

A customer's model containers must respond to requests within 60 seconds. The model\n itself can have a maximum processing time of 60 seconds before responding to\n invocations. If your model is going to take 50-60 seconds of processing time, the SDK\n socket timeout should be set to be 70 seconds.

\n \n

Endpoints are scoped to an individual account, and are not public. The URL does\n not contain the account ID, but Amazon SageMaker determines the account ID from the\n authentication token that is supplied by the caller.

\n
", "smithy.api#http": { "method": "POST", "uri": "/endpoints/{EndpointName}/invocations", "code": 200 } } }, "com.amazonaws.sagemakerruntime#InvokeEndpointInput": { "type": "structure", "members": { "EndpointName": { "target": "com.amazonaws.sagemakerruntime#EndpointName", "traits": { "smithy.api#documentation": "

The name of the endpoint that you specified when you created the endpoint using the\n CreateEndpoint API.

", "smithy.api#httpLabel": {}, "smithy.api#required": {} } }, "Body": { "target": "com.amazonaws.sagemakerruntime#BodyBlob", "traits": { "smithy.api#documentation": "

Provides input data, in the format specified in the ContentType\n request header. Amazon SageMaker passes all of the data in the body to the model.

\n

For information about the format of the request body, see Common Data\n Formats-Inference.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } }, "ContentType": { "target": "com.amazonaws.sagemakerruntime#Header", "traits": { "smithy.api#documentation": "

The MIME type of the input data in the request body.

", "smithy.api#httpHeader": "Content-Type" } }, "Accept": { "target": "com.amazonaws.sagemakerruntime#Header", "traits": { "smithy.api#documentation": "

The desired MIME type of the inference in the response.

", "smithy.api#httpHeader": "Accept" } }, "CustomAttributes": { "target": "com.amazonaws.sagemakerruntime#CustomAttributesHeader", "traits": { "smithy.api#documentation": "

Provides additional information about a request for an inference submitted to a model\n hosted at an Amazon SageMaker endpoint. The information is an opaque value that is\n forwarded verbatim. You could use this value, for example, to provide an ID that you can\n use to track a request or to provide other metadata that a service endpoint was\n programmed to process. The value must consist of no more than 1024 visible US-ASCII\n characters as specified in Section 3.3.6. Field Value\n Components of the Hypertext Transfer Protocol (HTTP/1.1).

\n

The code in your model is responsible for setting or updating any custom attributes in\n the response. If your code does not set this value in the response, an empty value is\n returned. For example, if a custom attribute represents the trace ID, your model can\n prepend the custom attribute with Trace ID: in your post-processing\n function.

\n\n

This feature is currently supported in the AWS SDKs but not in the Amazon SageMaker Python\n SDK.

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Custom-Attributes" } }, "TargetModel": { "target": "com.amazonaws.sagemakerruntime#TargetModelHeader", "traits": { "smithy.api#documentation": "

The model to request for inference when invoking a multi-model endpoint.

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Target-Model" } }, "TargetVariant": { "target": "com.amazonaws.sagemakerruntime#TargetVariantHeader", "traits": { "smithy.api#documentation": "

Specify the production variant to send the inference request to when invoking an\n endpoint that is running two or more variants. Note that this parameter overrides the\n default behavior for the endpoint, which is to distribute the invocation traffic based\n on the variant weights.

\n

For information about how to use variant targeting to perform a/b testing, see Test models in\n production\n

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Target-Variant" } }, "TargetContainerHostname": { "target": "com.amazonaws.sagemakerruntime#TargetContainerHostnameHeader", "traits": { "smithy.api#documentation": "

If the endpoint hosts multiple containers and is configured to use direct invocation,\n this parameter specifies the host name of the container to invoke.

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Target-Container-Hostname" } }, "InferenceId": { "target": "com.amazonaws.sagemakerruntime#InferenceId", "traits": { "smithy.api#documentation": "

If you provide a value, it is added to the captured data when you enable data capture\n on the endpoint. For information about data capture, see Capture\n Data.

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Inference-Id" } } } }, "com.amazonaws.sagemakerruntime#InvokeEndpointOutput": { "type": "structure", "members": { "Body": { "target": "com.amazonaws.sagemakerruntime#BodyBlob", "traits": { "smithy.api#documentation": "

Includes the inference provided by the model.

\n

For information about the format of the response body, see Common Data\n Formats-Inference.

", "smithy.api#httpPayload": {}, "smithy.api#required": {} } }, "ContentType": { "target": "com.amazonaws.sagemakerruntime#Header", "traits": { "smithy.api#documentation": "

The MIME type of the inference returned in the response body.

", "smithy.api#httpHeader": "Content-Type" } }, "InvokedProductionVariant": { "target": "com.amazonaws.sagemakerruntime#Header", "traits": { "smithy.api#documentation": "

Identifies the production variant that was invoked.

", "smithy.api#httpHeader": "x-Amzn-Invoked-Production-Variant" } }, "CustomAttributes": { "target": "com.amazonaws.sagemakerruntime#CustomAttributesHeader", "traits": { "smithy.api#documentation": "

Provides additional information in the response about the inference returned by a\n model hosted at an Amazon SageMaker endpoint. The information is an opaque value that is\n forwarded verbatim. You could use this value, for example, to return an ID received in\n the CustomAttributes header of a request or other metadata that a service\n endpoint was programmed to produce. The value must consist of no more than 1024 visible\n US-ASCII characters as specified in Section 3.3.6. Field Value\n Components of the Hypertext Transfer Protocol (HTTP/1.1). If the customer\n wants the custom attribute returned, the model must set the custom attribute to be\n included on the way back.

\n

The code in your model is responsible for setting or updating any custom attributes in\n the response. If your code does not set this value in the response, an empty value is\n returned. For example, if a custom attribute represents the trace ID, your model can\n prepend the custom attribute with Trace ID: in your post-processing\n function.

\n

This feature is currently supported in the AWS SDKs but not in the Amazon SageMaker Python\n SDK.

", "smithy.api#httpHeader": "X-Amzn-SageMaker-Custom-Attributes" } } } }, "com.amazonaws.sagemakerruntime#LogStreamArn": { "type": "string" }, "com.amazonaws.sagemakerruntime#Message": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 2048 } } }, "com.amazonaws.sagemakerruntime#ModelError": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.sagemakerruntime#Message" }, "OriginalStatusCode": { "target": "com.amazonaws.sagemakerruntime#StatusCode", "traits": { "smithy.api#documentation": "

Original status code.

" } }, "OriginalMessage": { "target": "com.amazonaws.sagemakerruntime#Message", "traits": { "smithy.api#documentation": "

Original message.

" } }, "LogStreamArn": { "target": "com.amazonaws.sagemakerruntime#LogStreamArn", "traits": { "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the log stream.

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

Model (owned by the customer in the container) returned 4xx or 5xx error code.\n

", "smithy.api#error": "client", "smithy.api#httpError": 424 } }, "com.amazonaws.sagemakerruntime#ServiceUnavailable": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.sagemakerruntime#Message" } }, "traits": { "smithy.api#documentation": "

The service is unavailable. Try your call again.

", "smithy.api#error": "server", "smithy.api#httpError": 503 } }, "com.amazonaws.sagemakerruntime#StatusCode": { "type": "integer", "traits": { "smithy.api#box": {} } }, "com.amazonaws.sagemakerruntime#TargetContainerHostnameHeader": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 63 }, "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*" } }, "com.amazonaws.sagemakerruntime#TargetModelHeader": { "type": "string", "traits": { "smithy.api#length": { "min": 1, "max": 1024 }, "smithy.api#pattern": "\\A\\S[\\p{Print}]*\\z" } }, "com.amazonaws.sagemakerruntime#TargetVariantHeader": { "type": "string", "traits": { "smithy.api#length": { "min": 0, "max": 63 }, "smithy.api#pattern": "^[a-zA-Z0-9](-*[a-zA-Z0-9])*" } }, "com.amazonaws.sagemakerruntime#ValidationError": { "type": "structure", "members": { "Message": { "target": "com.amazonaws.sagemakerruntime#Message" } }, "traits": { "smithy.api#documentation": "

Inspect your request and try again.

", "smithy.api#error": "client", "smithy.api#httpError": 400 } } } }