/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace SageMakerRuntime { namespace Model { /** */ class InvokeEndpointRequest : public StreamingSageMakerRuntimeRequest { public: AWS_SAGEMAKERRUNTIME_API InvokeEndpointRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "InvokeEndpoint"; } AWS_SAGEMAKERRUNTIME_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

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

*/ inline const Aws::String& GetEndpointName() const{ return m_endpointName; } /** *

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

*/ inline bool EndpointNameHasBeenSet() const { return m_endpointNameHasBeenSet; } /** *

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

*/ inline void SetEndpointName(const Aws::String& value) { m_endpointNameHasBeenSet = true; m_endpointName = value; } /** *

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

*/ inline void SetEndpointName(Aws::String&& value) { m_endpointNameHasBeenSet = true; m_endpointName = std::move(value); } /** *

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

*/ inline void SetEndpointName(const char* value) { m_endpointNameHasBeenSet = true; m_endpointName.assign(value); } /** *

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

*/ inline InvokeEndpointRequest& WithEndpointName(const Aws::String& value) { SetEndpointName(value); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithEndpointName(Aws::String&& value) { SetEndpointName(std::move(value)); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithEndpointName(const char* value) { SetEndpointName(value); return *this;} /** *

The desired MIME type of the inference in the response.

*/ inline const Aws::String& GetAccept() const{ return m_accept; } /** *

The desired MIME type of the inference in the response.

*/ inline bool AcceptHasBeenSet() const { return m_acceptHasBeenSet; } /** *

The desired MIME type of the inference in the response.

*/ inline void SetAccept(const Aws::String& value) { m_acceptHasBeenSet = true; m_accept = value; } /** *

The desired MIME type of the inference in the response.

*/ inline void SetAccept(Aws::String&& value) { m_acceptHasBeenSet = true; m_accept = std::move(value); } /** *

The desired MIME type of the inference in the response.

*/ inline void SetAccept(const char* value) { m_acceptHasBeenSet = true; m_accept.assign(value); } /** *

The desired MIME type of the inference in the response.

*/ inline InvokeEndpointRequest& WithAccept(const Aws::String& value) { SetAccept(value); return *this;} /** *

The desired MIME type of the inference in the response.

*/ inline InvokeEndpointRequest& WithAccept(Aws::String&& value) { SetAccept(std::move(value)); return *this;} /** *

The desired MIME type of the inference in the response.

*/ inline InvokeEndpointRequest& WithAccept(const char* value) { SetAccept(value); return *this;} /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline const Aws::String& GetCustomAttributes() const{ return m_customAttributes; } /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline bool CustomAttributesHasBeenSet() const { return m_customAttributesHasBeenSet; } /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(const Aws::String& value) { m_customAttributesHasBeenSet = true; m_customAttributes = value; } /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(Aws::String&& value) { m_customAttributesHasBeenSet = true; m_customAttributes = std::move(value); } /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline void SetCustomAttributes(const char* value) { m_customAttributesHasBeenSet = true; m_customAttributes.assign(value); } /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointRequest& WithCustomAttributes(const Aws::String& value) { SetCustomAttributes(value); return *this;} /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointRequest& WithCustomAttributes(Aws::String&& value) { SetCustomAttributes(std::move(value)); return *this;} /** *

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

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

This feature is currently supported in the * Amazon Web Services SDKs but not in the Amazon SageMaker Python SDK.

*/ inline InvokeEndpointRequest& WithCustomAttributes(const char* value) { SetCustomAttributes(value); return *this;} /** *

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

*/ inline const Aws::String& GetTargetModel() const{ return m_targetModel; } /** *

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

*/ inline bool TargetModelHasBeenSet() const { return m_targetModelHasBeenSet; } /** *

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

*/ inline void SetTargetModel(const Aws::String& value) { m_targetModelHasBeenSet = true; m_targetModel = value; } /** *

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

*/ inline void SetTargetModel(Aws::String&& value) { m_targetModelHasBeenSet = true; m_targetModel = std::move(value); } /** *

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

*/ inline void SetTargetModel(const char* value) { m_targetModelHasBeenSet = true; m_targetModel.assign(value); } /** *

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

*/ inline InvokeEndpointRequest& WithTargetModel(const Aws::String& value) { SetTargetModel(value); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithTargetModel(Aws::String&& value) { SetTargetModel(std::move(value)); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithTargetModel(const char* value) { SetTargetModel(value); return *this;} /** *

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

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

*/ inline const Aws::String& GetTargetVariant() const{ return m_targetVariant; } /** *

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

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

*/ inline bool TargetVariantHasBeenSet() const { return m_targetVariantHasBeenSet; } /** *

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

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

*/ inline void SetTargetVariant(const Aws::String& value) { m_targetVariantHasBeenSet = true; m_targetVariant = value; } /** *

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

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

*/ inline void SetTargetVariant(Aws::String&& value) { m_targetVariantHasBeenSet = true; m_targetVariant = std::move(value); } /** *

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

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

*/ inline void SetTargetVariant(const char* value) { m_targetVariantHasBeenSet = true; m_targetVariant.assign(value); } /** *

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

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

*/ inline InvokeEndpointRequest& WithTargetVariant(const Aws::String& value) { SetTargetVariant(value); return *this;} /** *

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

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

*/ inline InvokeEndpointRequest& WithTargetVariant(Aws::String&& value) { SetTargetVariant(std::move(value)); return *this;} /** *

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

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

*/ inline InvokeEndpointRequest& WithTargetVariant(const char* value) { SetTargetVariant(value); return *this;} /** *

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

*/ inline const Aws::String& GetTargetContainerHostname() const{ return m_targetContainerHostname; } /** *

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

*/ inline bool TargetContainerHostnameHasBeenSet() const { return m_targetContainerHostnameHasBeenSet; } /** *

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

*/ inline void SetTargetContainerHostname(const Aws::String& value) { m_targetContainerHostnameHasBeenSet = true; m_targetContainerHostname = value; } /** *

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

*/ inline void SetTargetContainerHostname(Aws::String&& value) { m_targetContainerHostnameHasBeenSet = true; m_targetContainerHostname = std::move(value); } /** *

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

*/ inline void SetTargetContainerHostname(const char* value) { m_targetContainerHostnameHasBeenSet = true; m_targetContainerHostname.assign(value); } /** *

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

*/ inline InvokeEndpointRequest& WithTargetContainerHostname(const Aws::String& value) { SetTargetContainerHostname(value); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithTargetContainerHostname(Aws::String&& value) { SetTargetContainerHostname(std::move(value)); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithTargetContainerHostname(const char* value) { SetTargetContainerHostname(value); return *this;} /** *

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

*/ inline const Aws::String& GetInferenceId() const{ return m_inferenceId; } /** *

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

*/ inline bool InferenceIdHasBeenSet() const { return m_inferenceIdHasBeenSet; } /** *

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

*/ inline void SetInferenceId(const Aws::String& value) { m_inferenceIdHasBeenSet = true; m_inferenceId = value; } /** *

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

*/ inline void SetInferenceId(Aws::String&& value) { m_inferenceIdHasBeenSet = true; m_inferenceId = std::move(value); } /** *

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

*/ inline void SetInferenceId(const char* value) { m_inferenceIdHasBeenSet = true; m_inferenceId.assign(value); } /** *

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

*/ inline InvokeEndpointRequest& WithInferenceId(const Aws::String& value) { SetInferenceId(value); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithInferenceId(Aws::String&& value) { SetInferenceId(std::move(value)); return *this;} /** *

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

*/ inline InvokeEndpointRequest& WithInferenceId(const char* value) { SetInferenceId(value); return *this;} /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline const Aws::String& GetEnableExplanations() const{ return m_enableExplanations; } /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline bool EnableExplanationsHasBeenSet() const { return m_enableExplanationsHasBeenSet; } /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline void SetEnableExplanations(const Aws::String& value) { m_enableExplanationsHasBeenSet = true; m_enableExplanations = value; } /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline void SetEnableExplanations(Aws::String&& value) { m_enableExplanationsHasBeenSet = true; m_enableExplanations = std::move(value); } /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline void SetEnableExplanations(const char* value) { m_enableExplanationsHasBeenSet = true; m_enableExplanations.assign(value); } /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline InvokeEndpointRequest& WithEnableExplanations(const Aws::String& value) { SetEnableExplanations(value); return *this;} /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline InvokeEndpointRequest& WithEnableExplanations(Aws::String&& value) { SetEnableExplanations(std::move(value)); return *this;} /** *

An optional JMESPath expression used to override the * EnableExplanations parameter of the * ClarifyExplainerConfig API. See the EnableExplanations * section in the developer guide for more information.

*/ inline InvokeEndpointRequest& WithEnableExplanations(const char* value) { SetEnableExplanations(value); return *this;} private: Aws::String m_endpointName; bool m_endpointNameHasBeenSet = false; Aws::String m_accept; bool m_acceptHasBeenSet = false; Aws::String m_customAttributes; bool m_customAttributesHasBeenSet = false; Aws::String m_targetModel; bool m_targetModelHasBeenSet = false; Aws::String m_targetVariant; bool m_targetVariantHasBeenSet = false; Aws::String m_targetContainerHostname; bool m_targetContainerHostnameHasBeenSet = false; Aws::String m_inferenceId; bool m_inferenceIdHasBeenSet = false; Aws::String m_enableExplanations; bool m_enableExplanationsHasBeenSet = false; }; } // namespace Model } // namespace SageMakerRuntime } // namespace Aws