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

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline const Aws::String& GetCompilationJobName() const{ return m_compilationJobName; } /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline bool CompilationJobNameHasBeenSet() const { return m_compilationJobNameHasBeenSet; } /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline void SetCompilationJobName(const Aws::String& value) { m_compilationJobNameHasBeenSet = true; m_compilationJobName = value; } /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline void SetCompilationJobName(Aws::String&& value) { m_compilationJobNameHasBeenSet = true; m_compilationJobName = std::move(value); } /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline void SetCompilationJobName(const char* value) { m_compilationJobNameHasBeenSet = true; m_compilationJobName.assign(value); } /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline CreateCompilationJobRequest& WithCompilationJobName(const Aws::String& value) { SetCompilationJobName(value); return *this;} /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline CreateCompilationJobRequest& WithCompilationJobName(Aws::String&& value) { SetCompilationJobName(std::move(value)); return *this;} /** *

A name for the model compilation job. The name must be unique within the * Amazon Web Services Region and within your Amazon Web Services account.

*/ inline CreateCompilationJobRequest& WithCompilationJobName(const char* value) { SetCompilationJobName(value); return *this;} /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline CreateCompilationJobRequest& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline CreateCompilationJobRequest& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker * to perform tasks on your behalf.

During model compilation, Amazon * SageMaker needs your permission to:

  • Read input data from an S3 * bucket

  • Write model artifacts to an S3 bucket

  • *

    Write logs to Amazon CloudWatch Logs

  • Publish metrics to * Amazon CloudWatch

You grant permissions for all of these * tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this * API must have the iam:PassRole permission. For more information, * see Amazon * SageMaker Roles.

*/ inline CreateCompilationJobRequest& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline const Aws::String& GetModelPackageVersionArn() const{ return m_modelPackageVersionArn; } /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline bool ModelPackageVersionArnHasBeenSet() const { return m_modelPackageVersionArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline void SetModelPackageVersionArn(const Aws::String& value) { m_modelPackageVersionArnHasBeenSet = true; m_modelPackageVersionArn = value; } /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline void SetModelPackageVersionArn(Aws::String&& value) { m_modelPackageVersionArnHasBeenSet = true; m_modelPackageVersionArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline void SetModelPackageVersionArn(const char* value) { m_modelPackageVersionArnHasBeenSet = true; m_modelPackageVersionArn.assign(value); } /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline CreateCompilationJobRequest& WithModelPackageVersionArn(const Aws::String& value) { SetModelPackageVersionArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline CreateCompilationJobRequest& WithModelPackageVersionArn(Aws::String&& value) { SetModelPackageVersionArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of a versioned model package. Provide either a * ModelPackageVersionArn or an InputConfig object in the * request syntax. The presence of both objects in the * CreateCompilationJob request will return an exception.

*/ inline CreateCompilationJobRequest& WithModelPackageVersionArn(const char* value) { SetModelPackageVersionArn(value); return *this;} /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline const InputConfig& GetInputConfig() const{ return m_inputConfig; } /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline bool InputConfigHasBeenSet() const { return m_inputConfigHasBeenSet; } /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline void SetInputConfig(const InputConfig& value) { m_inputConfigHasBeenSet = true; m_inputConfig = value; } /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline void SetInputConfig(InputConfig&& value) { m_inputConfigHasBeenSet = true; m_inputConfig = std::move(value); } /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline CreateCompilationJobRequest& WithInputConfig(const InputConfig& value) { SetInputConfig(value); return *this;} /** *

Provides information about the location of input model artifacts, the name * and shape of the expected data inputs, and the framework in which the model was * trained.

*/ inline CreateCompilationJobRequest& WithInputConfig(InputConfig&& value) { SetInputConfig(std::move(value)); return *this;} /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline const OutputConfig& GetOutputConfig() const{ return m_outputConfig; } /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline bool OutputConfigHasBeenSet() const { return m_outputConfigHasBeenSet; } /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline void SetOutputConfig(const OutputConfig& value) { m_outputConfigHasBeenSet = true; m_outputConfig = value; } /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline void SetOutputConfig(OutputConfig&& value) { m_outputConfigHasBeenSet = true; m_outputConfig = std::move(value); } /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline CreateCompilationJobRequest& WithOutputConfig(const OutputConfig& value) { SetOutputConfig(value); return *this;} /** *

Provides information about the output location for the compiled model and the * target device the model runs on.

*/ inline CreateCompilationJobRequest& WithOutputConfig(OutputConfig&& value) { SetOutputConfig(std::move(value)); return *this;} /** *

A VpcConfig * object that specifies the VPC that you want your compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation Jobs by Using an Amazon Virtual Private Cloud.

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

A VpcConfig * object that specifies the VPC that you want your compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation 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 compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation Jobs by Using an Amazon Virtual Private Cloud.

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

A VpcConfig * object that specifies the VPC that you want your compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation Jobs by Using an Amazon Virtual Private Cloud.

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

A VpcConfig * object that specifies the VPC that you want your compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation Jobs by Using an Amazon Virtual Private Cloud.

*/ inline CreateCompilationJobRequest& WithVpcConfig(const NeoVpcConfig& value) { SetVpcConfig(value); return *this;} /** *

A VpcConfig * object that specifies the VPC that you want your compilation job to connect to. * Control access to your models by configuring the VPC. For more information, see * Protect * Compilation Jobs by Using an Amazon Virtual Private Cloud.

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

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline const StoppingCondition& GetStoppingCondition() const{ return m_stoppingCondition; } /** *

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline bool StoppingConditionHasBeenSet() const { return m_stoppingConditionHasBeenSet; } /** *

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline void SetStoppingCondition(const StoppingCondition& value) { m_stoppingConditionHasBeenSet = true; m_stoppingCondition = value; } /** *

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline void SetStoppingCondition(StoppingCondition&& value) { m_stoppingConditionHasBeenSet = true; m_stoppingCondition = std::move(value); } /** *

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline CreateCompilationJobRequest& WithStoppingCondition(const StoppingCondition& value) { SetStoppingCondition(value); return *this;} /** *

Specifies a limit to how long a model compilation job can run. When the job * reaches the time limit, Amazon SageMaker ends the compilation job. Use this API * to cap model training costs.

*/ inline CreateCompilationJobRequest& WithStoppingCondition(StoppingCondition&& value) { SetStoppingCondition(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 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 CreateCompilationJobRequest& 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 CreateCompilationJobRequest& 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 CreateCompilationJobRequest& 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 CreateCompilationJobRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_compilationJobName; bool m_compilationJobNameHasBeenSet = false; Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_modelPackageVersionArn; bool m_modelPackageVersionArnHasBeenSet = false; InputConfig m_inputConfig; bool m_inputConfigHasBeenSet = false; OutputConfig m_outputConfig; bool m_outputConfigHasBeenSet = false; NeoVpcConfig m_vpcConfig; bool m_vpcConfigHasBeenSet = false; StoppingCondition m_stoppingCondition; bool m_stoppingConditionHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws