/** * 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 #include #include namespace Aws { namespace SageMaker { namespace Model { /** */ class CreateModelRequest : public SageMakerRequest { public: AWS_SAGEMAKER_API CreateModelRequest(); // 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 "CreateModel"; } AWS_SAGEMAKER_API Aws::String SerializePayload() const override; AWS_SAGEMAKER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The name of the new model.

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

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline const ContainerDefinition& GetPrimaryContainer() const{ return m_primaryContainer; } /** *

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline bool PrimaryContainerHasBeenSet() const { return m_primaryContainerHasBeenSet; } /** *

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline void SetPrimaryContainer(const ContainerDefinition& value) { m_primaryContainerHasBeenSet = true; m_primaryContainer = value; } /** *

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline void SetPrimaryContainer(ContainerDefinition&& value) { m_primaryContainerHasBeenSet = true; m_primaryContainer = std::move(value); } /** *

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline CreateModelRequest& WithPrimaryContainer(const ContainerDefinition& value) { SetPrimaryContainer(value); return *this;} /** *

The location of the primary docker image containing inference code, * associated artifacts, and custom environment map that the inference code uses * when the model is deployed for predictions.

*/ inline CreateModelRequest& WithPrimaryContainer(ContainerDefinition&& value) { SetPrimaryContainer(std::move(value)); return *this;} /** *

Specifies the containers in the inference pipeline.

*/ inline const Aws::Vector& GetContainers() const{ return m_containers; } /** *

Specifies the containers in the inference pipeline.

*/ inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; } /** *

Specifies the containers in the inference pipeline.

*/ inline void SetContainers(const Aws::Vector& value) { m_containersHasBeenSet = true; m_containers = value; } /** *

Specifies the containers in the inference pipeline.

*/ inline void SetContainers(Aws::Vector&& value) { m_containersHasBeenSet = true; m_containers = std::move(value); } /** *

Specifies the containers in the inference pipeline.

*/ inline CreateModelRequest& WithContainers(const Aws::Vector& value) { SetContainers(value); return *this;} /** *

Specifies the containers in the inference pipeline.

*/ inline CreateModelRequest& WithContainers(Aws::Vector&& value) { SetContainers(std::move(value)); return *this;} /** *

Specifies the containers in the inference pipeline.

*/ inline CreateModelRequest& AddContainers(const ContainerDefinition& value) { m_containersHasBeenSet = true; m_containers.push_back(value); return *this; } /** *

Specifies the containers in the inference pipeline.

*/ inline CreateModelRequest& AddContainers(ContainerDefinition&& value) { m_containersHasBeenSet = true; m_containers.push_back(std::move(value)); return *this; } /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline const InferenceExecutionConfig& GetInferenceExecutionConfig() const{ return m_inferenceExecutionConfig; } /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline bool InferenceExecutionConfigHasBeenSet() const { return m_inferenceExecutionConfigHasBeenSet; } /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline void SetInferenceExecutionConfig(const InferenceExecutionConfig& value) { m_inferenceExecutionConfigHasBeenSet = true; m_inferenceExecutionConfig = value; } /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline void SetInferenceExecutionConfig(InferenceExecutionConfig&& value) { m_inferenceExecutionConfigHasBeenSet = true; m_inferenceExecutionConfig = std::move(value); } /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline CreateModelRequest& WithInferenceExecutionConfig(const InferenceExecutionConfig& value) { SetInferenceExecutionConfig(value); return *this;} /** *

Specifies details of how containers in a multi-container endpoint are * called.

*/ inline CreateModelRequest& WithInferenceExecutionConfig(InferenceExecutionConfig&& value) { SetInferenceExecutionConfig(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline const Aws::String& GetExecutionRoleArn() const{ return m_executionRoleArn; } /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline void SetExecutionRoleArn(const Aws::String& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = value; } /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline void SetExecutionRoleArn(Aws::String&& value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline void SetExecutionRoleArn(const char* value) { m_executionRoleArnHasBeenSet = true; m_executionRoleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline CreateModelRequest& WithExecutionRoleArn(const Aws::String& value) { SetExecutionRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline CreateModelRequest& WithExecutionRoleArn(Aws::String&& value) { SetExecutionRoleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM role that SageMaker can assume to * access model artifacts and docker image for deployment on ML compute instances * or for batch transform jobs. Deploying on ML compute instances is part of model * hosting. For more information, see SageMaker * Roles.

To be able to pass this role to SageMaker, the caller * of this API must have the iam:PassRole permission.

*/ inline CreateModelRequest& WithExecutionRoleArn(const char* value) { SetExecutionRoleArn(value); return *this;} /** *

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.

*/ inline const Aws::Vector& GetTags() const{ return m_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.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

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.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

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.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

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.

*/ inline CreateModelRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

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.

*/ inline CreateModelRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

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.

*/ inline CreateModelRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

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.

*/ inline CreateModelRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline const VpcConfig& GetVpcConfig() const{ return m_vpcConfig; } /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; } /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline void SetVpcConfig(const VpcConfig& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = value; } /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline void SetVpcConfig(VpcConfig&& value) { m_vpcConfigHasBeenSet = true; m_vpcConfig = std::move(value); } /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline CreateModelRequest& WithVpcConfig(const VpcConfig& value) { SetVpcConfig(value); return *this;} /** *

A VpcConfig * object that specifies the VPC that you want your model to connect to. Control * access to and from your model container by configuring the VPC. * VpcConfig is used in hosting services and in batch transform. For * more information, see Protect * Endpoints by Using an Amazon Virtual Private Cloud and Protect * Data in Batch Transform Jobs by Using an Amazon Virtual Private Cloud.

*/ inline CreateModelRequest& WithVpcConfig(VpcConfig&& value) { SetVpcConfig(std::move(value)); return *this;} /** *

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

*/ inline bool GetEnableNetworkIsolation() const{ return m_enableNetworkIsolation; } /** *

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

*/ inline bool EnableNetworkIsolationHasBeenSet() const { return m_enableNetworkIsolationHasBeenSet; } /** *

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

*/ inline void SetEnableNetworkIsolation(bool value) { m_enableNetworkIsolationHasBeenSet = true; m_enableNetworkIsolation = value; } /** *

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

*/ inline CreateModelRequest& WithEnableNetworkIsolation(bool value) { SetEnableNetworkIsolation(value); return *this;} private: Aws::String m_modelName; bool m_modelNameHasBeenSet = false; ContainerDefinition m_primaryContainer; bool m_primaryContainerHasBeenSet = false; Aws::Vector m_containers; bool m_containersHasBeenSet = false; InferenceExecutionConfig m_inferenceExecutionConfig; bool m_inferenceExecutionConfigHasBeenSet = false; Aws::String m_executionRoleArn; bool m_executionRoleArnHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; VpcConfig m_vpcConfig; bool m_vpcConfigHasBeenSet = false; bool m_enableNetworkIsolation; bool m_enableNetworkIsolationHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws