/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

Identifies a model that you want to host and the resources chosen to deploy * for hosting it. If you are deploying multiple models, tell SageMaker how to * distribute traffic among the models by specifying variant weights. For more * information on production variants, check * Production variants.

See Also:

AWS * API Reference

*/ class ProductionVariant { public: AWS_SAGEMAKER_API ProductionVariant(); AWS_SAGEMAKER_API ProductionVariant(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API ProductionVariant& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The name of the production variant.

*/ inline const Aws::String& GetVariantName() const{ return m_variantName; } /** *

The name of the production variant.

*/ inline bool VariantNameHasBeenSet() const { return m_variantNameHasBeenSet; } /** *

The name of the production variant.

*/ inline void SetVariantName(const Aws::String& value) { m_variantNameHasBeenSet = true; m_variantName = value; } /** *

The name of the production variant.

*/ inline void SetVariantName(Aws::String&& value) { m_variantNameHasBeenSet = true; m_variantName = std::move(value); } /** *

The name of the production variant.

*/ inline void SetVariantName(const char* value) { m_variantNameHasBeenSet = true; m_variantName.assign(value); } /** *

The name of the production variant.

*/ inline ProductionVariant& WithVariantName(const Aws::String& value) { SetVariantName(value); return *this;} /** *

The name of the production variant.

*/ inline ProductionVariant& WithVariantName(Aws::String&& value) { SetVariantName(std::move(value)); return *this;} /** *

The name of the production variant.

*/ inline ProductionVariant& WithVariantName(const char* value) { SetVariantName(value); return *this;} /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline const Aws::String& GetModelName() const{ return m_modelName; } /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline bool ModelNameHasBeenSet() const { return m_modelNameHasBeenSet; } /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline void SetModelName(const Aws::String& value) { m_modelNameHasBeenSet = true; m_modelName = value; } /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline void SetModelName(Aws::String&& value) { m_modelNameHasBeenSet = true; m_modelName = std::move(value); } /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline void SetModelName(const char* value) { m_modelNameHasBeenSet = true; m_modelName.assign(value); } /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline ProductionVariant& WithModelName(const Aws::String& value) { SetModelName(value); return *this;} /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline ProductionVariant& WithModelName(Aws::String&& value) { SetModelName(std::move(value)); return *this;} /** *

The name of the model that you want to host. This is the name that you * specified when creating the model.

*/ inline ProductionVariant& WithModelName(const char* value) { SetModelName(value); return *this;} /** *

Number of instances to launch initially.

*/ inline int GetInitialInstanceCount() const{ return m_initialInstanceCount; } /** *

Number of instances to launch initially.

*/ inline bool InitialInstanceCountHasBeenSet() const { return m_initialInstanceCountHasBeenSet; } /** *

Number of instances to launch initially.

*/ inline void SetInitialInstanceCount(int value) { m_initialInstanceCountHasBeenSet = true; m_initialInstanceCount = value; } /** *

Number of instances to launch initially.

*/ inline ProductionVariant& WithInitialInstanceCount(int value) { SetInitialInstanceCount(value); return *this;} /** *

The ML compute instance type.

*/ inline const ProductionVariantInstanceType& GetInstanceType() const{ return m_instanceType; } /** *

The ML compute instance type.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The ML compute instance type.

*/ inline void SetInstanceType(const ProductionVariantInstanceType& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The ML compute instance type.

*/ inline void SetInstanceType(ProductionVariantInstanceType&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The ML compute instance type.

*/ inline ProductionVariant& WithInstanceType(const ProductionVariantInstanceType& value) { SetInstanceType(value); return *this;} /** *

The ML compute instance type.

*/ inline ProductionVariant& WithInstanceType(ProductionVariantInstanceType&& value) { SetInstanceType(std::move(value)); return *this;} /** *

Determines initial traffic distribution among all of the models that you * specify in the endpoint configuration. The traffic to a production variant is * determined by the ratio of the VariantWeight to the sum of all * VariantWeight values across all ProductionVariants. If unspecified, * it defaults to 1.0.

*/ inline double GetInitialVariantWeight() const{ return m_initialVariantWeight; } /** *

Determines initial traffic distribution among all of the models that you * specify in the endpoint configuration. The traffic to a production variant is * determined by the ratio of the VariantWeight to the sum of all * VariantWeight values across all ProductionVariants. If unspecified, * it defaults to 1.0.

*/ inline bool InitialVariantWeightHasBeenSet() const { return m_initialVariantWeightHasBeenSet; } /** *

Determines initial traffic distribution among all of the models that you * specify in the endpoint configuration. The traffic to a production variant is * determined by the ratio of the VariantWeight to the sum of all * VariantWeight values across all ProductionVariants. If unspecified, * it defaults to 1.0.

*/ inline void SetInitialVariantWeight(double value) { m_initialVariantWeightHasBeenSet = true; m_initialVariantWeight = value; } /** *

Determines initial traffic distribution among all of the models that you * specify in the endpoint configuration. The traffic to a production variant is * determined by the ratio of the VariantWeight to the sum of all * VariantWeight values across all ProductionVariants. If unspecified, * it defaults to 1.0.

*/ inline ProductionVariant& WithInitialVariantWeight(double value) { SetInitialVariantWeight(value); return *this;} /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline const ProductionVariantAcceleratorType& GetAcceleratorType() const{ return m_acceleratorType; } /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline bool AcceleratorTypeHasBeenSet() const { return m_acceleratorTypeHasBeenSet; } /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline void SetAcceleratorType(const ProductionVariantAcceleratorType& value) { m_acceleratorTypeHasBeenSet = true; m_acceleratorType = value; } /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline void SetAcceleratorType(ProductionVariantAcceleratorType&& value) { m_acceleratorTypeHasBeenSet = true; m_acceleratorType = std::move(value); } /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline ProductionVariant& WithAcceleratorType(const ProductionVariantAcceleratorType& value) { SetAcceleratorType(value); return *this;} /** *

The size of the Elastic Inference (EI) instance to use for the production * variant. EI instances provide on-demand GPU computing for inference. For more * information, see Using Elastic * Inference in Amazon SageMaker.

*/ inline ProductionVariant& WithAcceleratorType(ProductionVariantAcceleratorType&& value) { SetAcceleratorType(std::move(value)); return *this;} /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline const ProductionVariantCoreDumpConfig& GetCoreDumpConfig() const{ return m_coreDumpConfig; } /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline bool CoreDumpConfigHasBeenSet() const { return m_coreDumpConfigHasBeenSet; } /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline void SetCoreDumpConfig(const ProductionVariantCoreDumpConfig& value) { m_coreDumpConfigHasBeenSet = true; m_coreDumpConfig = value; } /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline void SetCoreDumpConfig(ProductionVariantCoreDumpConfig&& value) { m_coreDumpConfigHasBeenSet = true; m_coreDumpConfig = std::move(value); } /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline ProductionVariant& WithCoreDumpConfig(const ProductionVariantCoreDumpConfig& value) { SetCoreDumpConfig(value); return *this;} /** *

Specifies configuration for a core dump from the model container when the * process crashes.

*/ inline ProductionVariant& WithCoreDumpConfig(ProductionVariantCoreDumpConfig&& value) { SetCoreDumpConfig(std::move(value)); return *this;} /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline const ProductionVariantServerlessConfig& GetServerlessConfig() const{ return m_serverlessConfig; } /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline bool ServerlessConfigHasBeenSet() const { return m_serverlessConfigHasBeenSet; } /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline void SetServerlessConfig(const ProductionVariantServerlessConfig& value) { m_serverlessConfigHasBeenSet = true; m_serverlessConfig = value; } /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline void SetServerlessConfig(ProductionVariantServerlessConfig&& value) { m_serverlessConfigHasBeenSet = true; m_serverlessConfig = std::move(value); } /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline ProductionVariant& WithServerlessConfig(const ProductionVariantServerlessConfig& value) { SetServerlessConfig(value); return *this;} /** *

The serverless configuration for an endpoint. Specifies a serverless endpoint * configuration instead of an instance-based endpoint configuration.

*/ inline ProductionVariant& WithServerlessConfig(ProductionVariantServerlessConfig&& value) { SetServerlessConfig(std::move(value)); return *this;} /** *

The size, in GB, of the ML storage volume attached to individual inference * instance associated with the production variant. Currently only Amazon EBS gp2 * storage volumes are supported.

*/ inline int GetVolumeSizeInGB() const{ return m_volumeSizeInGB; } /** *

The size, in GB, of the ML storage volume attached to individual inference * instance associated with the production variant. Currently only Amazon EBS gp2 * storage volumes are supported.

*/ inline bool VolumeSizeInGBHasBeenSet() const { return m_volumeSizeInGBHasBeenSet; } /** *

The size, in GB, of the ML storage volume attached to individual inference * instance associated with the production variant. Currently only Amazon EBS gp2 * storage volumes are supported.

*/ inline void SetVolumeSizeInGB(int value) { m_volumeSizeInGBHasBeenSet = true; m_volumeSizeInGB = value; } /** *

The size, in GB, of the ML storage volume attached to individual inference * instance associated with the production variant. Currently only Amazon EBS gp2 * storage volumes are supported.

*/ inline ProductionVariant& WithVolumeSizeInGB(int value) { SetVolumeSizeInGB(value); return *this;} /** *

The timeout value, in seconds, to download and extract the model that you * want to host from Amazon S3 to the individual inference instance associated with * this production variant.

*/ inline int GetModelDataDownloadTimeoutInSeconds() const{ return m_modelDataDownloadTimeoutInSeconds; } /** *

The timeout value, in seconds, to download and extract the model that you * want to host from Amazon S3 to the individual inference instance associated with * this production variant.

*/ inline bool ModelDataDownloadTimeoutInSecondsHasBeenSet() const { return m_modelDataDownloadTimeoutInSecondsHasBeenSet; } /** *

The timeout value, in seconds, to download and extract the model that you * want to host from Amazon S3 to the individual inference instance associated with * this production variant.

*/ inline void SetModelDataDownloadTimeoutInSeconds(int value) { m_modelDataDownloadTimeoutInSecondsHasBeenSet = true; m_modelDataDownloadTimeoutInSeconds = value; } /** *

The timeout value, in seconds, to download and extract the model that you * want to host from Amazon S3 to the individual inference instance associated with * this production variant.

*/ inline ProductionVariant& WithModelDataDownloadTimeoutInSeconds(int value) { SetModelDataDownloadTimeoutInSeconds(value); return *this;} /** *

The timeout value, in seconds, for your inference container to pass health * check by SageMaker Hosting. For more information about health check, see How * Your Container Should Respond to Health Check (Ping) Requests.

*/ inline int GetContainerStartupHealthCheckTimeoutInSeconds() const{ return m_containerStartupHealthCheckTimeoutInSeconds; } /** *

The timeout value, in seconds, for your inference container to pass health * check by SageMaker Hosting. For more information about health check, see How * Your Container Should Respond to Health Check (Ping) Requests.

*/ inline bool ContainerStartupHealthCheckTimeoutInSecondsHasBeenSet() const { return m_containerStartupHealthCheckTimeoutInSecondsHasBeenSet; } /** *

The timeout value, in seconds, for your inference container to pass health * check by SageMaker Hosting. For more information about health check, see How * Your Container Should Respond to Health Check (Ping) Requests.

*/ inline void SetContainerStartupHealthCheckTimeoutInSeconds(int value) { m_containerStartupHealthCheckTimeoutInSecondsHasBeenSet = true; m_containerStartupHealthCheckTimeoutInSeconds = value; } /** *

The timeout value, in seconds, for your inference container to pass health * check by SageMaker Hosting. For more information about health check, see How * Your Container Should Respond to Health Check (Ping) Requests.

*/ inline ProductionVariant& WithContainerStartupHealthCheckTimeoutInSeconds(int value) { SetContainerStartupHealthCheckTimeoutInSeconds(value); return *this;} /** *

You can use this parameter to turn on native Amazon Web Services Systems * Manager (SSM) access for a production variant behind an endpoint. By default, * SSM access is disabled for all production variants behind an endpoint. You can * turn on or turn off SSM access for a production variant behind an existing * endpoint by creating a new endpoint configuration and calling * UpdateEndpoint.

*/ inline bool GetEnableSSMAccess() const{ return m_enableSSMAccess; } /** *

You can use this parameter to turn on native Amazon Web Services Systems * Manager (SSM) access for a production variant behind an endpoint. By default, * SSM access is disabled for all production variants behind an endpoint. You can * turn on or turn off SSM access for a production variant behind an existing * endpoint by creating a new endpoint configuration and calling * UpdateEndpoint.

*/ inline bool EnableSSMAccessHasBeenSet() const { return m_enableSSMAccessHasBeenSet; } /** *

You can use this parameter to turn on native Amazon Web Services Systems * Manager (SSM) access for a production variant behind an endpoint. By default, * SSM access is disabled for all production variants behind an endpoint. You can * turn on or turn off SSM access for a production variant behind an existing * endpoint by creating a new endpoint configuration and calling * UpdateEndpoint.

*/ inline void SetEnableSSMAccess(bool value) { m_enableSSMAccessHasBeenSet = true; m_enableSSMAccess = value; } /** *

You can use this parameter to turn on native Amazon Web Services Systems * Manager (SSM) access for a production variant behind an endpoint. By default, * SSM access is disabled for all production variants behind an endpoint. You can * turn on or turn off SSM access for a production variant behind an existing * endpoint by creating a new endpoint configuration and calling * UpdateEndpoint.

*/ inline ProductionVariant& WithEnableSSMAccess(bool value) { SetEnableSSMAccess(value); return *this;} private: Aws::String m_variantName; bool m_variantNameHasBeenSet = false; Aws::String m_modelName; bool m_modelNameHasBeenSet = false; int m_initialInstanceCount; bool m_initialInstanceCountHasBeenSet = false; ProductionVariantInstanceType m_instanceType; bool m_instanceTypeHasBeenSet = false; double m_initialVariantWeight; bool m_initialVariantWeightHasBeenSet = false; ProductionVariantAcceleratorType m_acceleratorType; bool m_acceleratorTypeHasBeenSet = false; ProductionVariantCoreDumpConfig m_coreDumpConfig; bool m_coreDumpConfigHasBeenSet = false; ProductionVariantServerlessConfig m_serverlessConfig; bool m_serverlessConfigHasBeenSet = false; int m_volumeSizeInGB; bool m_volumeSizeInGBHasBeenSet = false; int m_modelDataDownloadTimeoutInSeconds; bool m_modelDataDownloadTimeoutInSecondsHasBeenSet = false; int m_containerStartupHealthCheckTimeoutInSeconds; bool m_containerStartupHealthCheckTimeoutInSecondsHasBeenSet = false; bool m_enableSSMAccess; bool m_enableSSMAccessHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws