/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateCompilationJobRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* 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. *
*/ private String compilationJobName; /** ** 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.
*
* 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.
*
* 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. *
*/ private InputConfig inputConfig; /** ** Provides information about the output location for the compiled model and the target device the model runs on. *
*/ private OutputConfig outputConfig; /** ** 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. *
*/ private NeoVpcConfig vpcConfig; /** ** 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. *
*/ private StoppingCondition stoppingCondition; /** ** 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. *
*/ private java.util.List* 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. *
* * @param 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. */ public void setCompilationJobName(String compilationJobName) { this.compilationJobName = 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. *
* * @return 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. */ public String getCompilationJobName() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withCompilationJobName(String compilationJobName) { setCompilationJobName(compilationJobName); 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.
*
* 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.
*/
public void setRoleArn(String roleArn) {
this.roleArn = 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.
*
* 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.
*/
public String getRoleArn() {
return this.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.
*
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCompilationJobRequest withRoleArn(String roleArn) {
setRoleArn(roleArn);
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.
*
ModelPackageVersionArn
or an InputConfig
object in the request syntax. The
* presence of both objects in the CreateCompilationJob
request will return an exception.
*/
public void setModelPackageVersionArn(String modelPackageVersionArn) {
this.modelPackageVersionArn = 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.
*
ModelPackageVersionArn
or an InputConfig
object in the request syntax. The
* presence of both objects in the CreateCompilationJob
request will return an exception.
*/
public String getModelPackageVersionArn() {
return this.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.
*
ModelPackageVersionArn
or an InputConfig
object in the request syntax. The
* presence of both objects in the CreateCompilationJob
request will return an exception.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateCompilationJobRequest withModelPackageVersionArn(String modelPackageVersionArn) {
setModelPackageVersionArn(modelPackageVersionArn);
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. *
* * @param 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. */ public void setInputConfig(InputConfig inputConfig) { this.inputConfig = 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. *
* * @return 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. */ public InputConfig getInputConfig() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withInputConfig(InputConfig inputConfig) { setInputConfig(inputConfig); return this; } /** ** Provides information about the output location for the compiled model and the target device the model runs on. *
* * @param outputConfig * Provides information about the output location for the compiled model and the target device the model runs * on. */ public void setOutputConfig(OutputConfig outputConfig) { this.outputConfig = outputConfig; } /** ** Provides information about the output location for the compiled model and the target device the model runs on. *
* * @return Provides information about the output location for the compiled model and the target device the model * runs on. */ public OutputConfig getOutputConfig() { return this.outputConfig; } /** ** Provides information about the output location for the compiled model and the target device the model runs on. *
* * @param outputConfig * Provides information about the output location for the compiled model and the target device the model runs * on. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withOutputConfig(OutputConfig outputConfig) { setOutputConfig(outputConfig); 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. *
* * @param 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. */ public void setVpcConfig(NeoVpcConfig vpcConfig) { this.vpcConfig = 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. *
* * @return 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. */ public NeoVpcConfig getVpcConfig() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withVpcConfig(NeoVpcConfig vpcConfig) { setVpcConfig(vpcConfig); 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. *
* * @param 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. */ public void setStoppingCondition(StoppingCondition stoppingCondition) { this.stoppingCondition = 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. *
* * @return 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. */ public StoppingCondition getStoppingCondition() { return this.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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withStoppingCondition(StoppingCondition stoppingCondition) { setStoppingCondition(stoppingCondition); 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. *
* * @return 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. */ public java.util.List* 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. *
* * @param 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. */ public void setTags(java.util.Collection* 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. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* 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. *
* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateCompilationJobRequest withTags(java.util.Collection