/** * 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 AWS_SAGEMAKERRUNTIME_API InvokeEndpointRequest : public StreamingSageMakerRuntimeRequest { public: 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::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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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). This feature * is currently supported in the AWS 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ 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.

*/ inline InvokeEndpointRequest& WithTargetVariant(const char* value) { SetTargetVariant(value); return *this;} private: Aws::String m_endpointName; bool m_endpointNameHasBeenSet; Aws::String m_accept; bool m_acceptHasBeenSet; Aws::String m_customAttributes; bool m_customAttributesHasBeenSet; Aws::String m_targetModel; bool m_targetModelHasBeenSet; Aws::String m_targetVariant; bool m_targetVariantHasBeenSet; }; } // namespace Model } // namespace SageMakerRuntime } // namespace Aws