com.amazonaws.services.batch.model.CreateComputeEnvironmentRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-batch Show documentation
/*
* Copyright 2019-2024 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.batch.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Contains the parameters for CreateComputeEnvironment
.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateComputeEnvironmentRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*
*/
private String computeEnvironmentName;
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*/
private String type;
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*/
private String state;
/**
*
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair share
* scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share
* job queue, no vCPU capacity is reserved.
*
*
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*
*/
private Integer unmanagedvCpus;
/**
*
* Details about the compute resources managed by the compute environment. This parameter is required for managed
* compute environments. For more information, see Compute Environments in
* the Batch User Guide.
*
*/
private ComputeResource computeResources;
/**
*
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services
* services on your behalf. For more information, see Batch service IAM role in the
* Batch User Guide.
*
*
*
* If your account already created the Batch service-linked role, that role is used by default for your compute
* environment unless you specify a different role here. If the Batch service-linked role doesn't exist in your
* account, and no role is specified here, the service attempts to create the Batch service-linked role in your
* account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role ARN
* (recommended) or prefix the role name with the path. For example, if a role with the name bar
has a
* path of /foo/
, specify /foo/bar
as the role name. For more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
path
* prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the
* service-role
path prefix. Because of this, we recommend that you specify the full ARN of your
* service role when you create compute environments.
*
*
*/
private String serviceRole;
/**
*
* The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*
*/
private java.util.Map tags;
/**
*
* The details for the Amazon EKS cluster that supports the compute environment.
*
*/
private EksConfiguration eksConfiguration;
/**
*
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @param computeEnvironmentName
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public void setComputeEnvironmentName(String computeEnvironmentName) {
this.computeEnvironmentName = computeEnvironmentName;
}
/**
*
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @return The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*/
public String getComputeEnvironmentName() {
return this.computeEnvironmentName;
}
/**
*
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
*
*
* @param computeEnvironmentName
* The name for your compute environment. It can be up to 128 characters long. It can contain uppercase and
* lowercase letters, numbers, hyphens (-), and underscores (_).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withComputeEnvironmentName(String computeEnvironmentName) {
setComputeEnvironmentName(computeEnvironmentName);
return this;
}
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param type
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information,
* see Compute
* Environments in the Batch User Guide.
* @see CEType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @return The type of the compute environment: MANAGED
or UNMANAGED
. For more
* information, see Compute
* Environments in the Batch User Guide.
* @see CEType
*/
public String getType() {
return this.type;
}
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param type
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information,
* see Compute
* Environments in the Batch User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CEType
*/
public CreateComputeEnvironmentRequest withType(String type) {
setType(type);
return this;
}
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param type
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information,
* see Compute
* Environments in the Batch User Guide.
* @see CEType
*/
public void setType(CEType type) {
withType(type);
}
/**
*
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param type
* The type of the compute environment: MANAGED
or UNMANAGED
. For more information,
* see Compute
* Environments in the Batch User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CEType
*/
public CreateComputeEnvironmentRequest withType(CEType type) {
this.type = type.toString();
return this;
}
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*
* @param state
* The state of the compute environment. If the state is ENABLED
, then the compute environment
* accepts jobs from a queue and can scale out automatically based on queues.
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an
* associated job queue on the compute resources within the environment. If the compute environment is
* managed, then it can scale its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally.
* Managed compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the
* instance size doesn't change. For example, consider a c5.8xlarge
instance with a
* minvCpus
value of 4
and a desiredvCpus
value of 36
.
* This instance doesn't scale down to a c5.large
instance.
* @see CEState
*/
public void setState(String state) {
this.state = state;
}
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*
* @return The state of the compute environment. If the state is ENABLED
, then the compute environment
* accepts jobs from a queue and can scale out automatically based on queues.
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an
* associated job queue on the compute resources within the environment. If the compute environment is
* managed, then it can scale its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally.
* Managed compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the
* instance size doesn't change. For example, consider a c5.8xlarge
instance with a
* minvCpus
value of 4
and a desiredvCpus
value of 36
.
* This instance doesn't scale down to a c5.large
instance.
* @see CEState
*/
public String getState() {
return this.state;
}
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*
* @param state
* The state of the compute environment. If the state is ENABLED
, then the compute environment
* accepts jobs from a queue and can scale out automatically based on queues.
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an
* associated job queue on the compute resources within the environment. If the compute environment is
* managed, then it can scale its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally.
* Managed compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the
* instance size doesn't change. For example, consider a c5.8xlarge
instance with a
* minvCpus
value of 4
and a desiredvCpus
value of 36
.
* This instance doesn't scale down to a c5.large
instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CEState
*/
public CreateComputeEnvironmentRequest withState(String state) {
setState(state);
return this;
}
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*
* @param state
* The state of the compute environment. If the state is ENABLED
, then the compute environment
* accepts jobs from a queue and can scale out automatically based on queues.
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an
* associated job queue on the compute resources within the environment. If the compute environment is
* managed, then it can scale its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally.
* Managed compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the
* instance size doesn't change. For example, consider a c5.8xlarge
instance with a
* minvCpus
value of 4
and a desiredvCpus
value of 36
.
* This instance doesn't scale down to a c5.large
instance.
* @see CEState
*/
public void setState(CEState state) {
withState(state);
}
/**
*
* The state of the compute environment. If the state is ENABLED
, then the compute environment accepts
* jobs from a queue and can scale out automatically based on queues.
*
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an associated job
* queue on the compute resources within the environment. If the compute environment is managed, then it can scale
* its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally. Managed
* compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the instance size
* doesn't change. For example, consider a c5.8xlarge
instance with a minvCpus
value of
* 4
and a desiredvCpus
value of 36
. This instance doesn't scale down to a
* c5.large
instance.
*
*
* @param state
* The state of the compute environment. If the state is ENABLED
, then the compute environment
* accepts jobs from a queue and can scale out automatically based on queues.
*
* If the state is ENABLED
, then the Batch scheduler can attempt to place jobs from an
* associated job queue on the compute resources within the environment. If the compute environment is
* managed, then it can scale its instances out or in automatically, based on the job queue demand.
*
*
* If the state is DISABLED
, then the Batch scheduler doesn't attempt to place jobs within the
* environment. Jobs in a STARTING
or RUNNING
state continue to progress normally.
* Managed compute environments in the DISABLED
state don't scale out.
*
*
*
* Compute environments in a DISABLED
state may continue to incur billing charges. To prevent
* additional charges, turn off and then delete the compute environment. For more information, see State in the Batch User Guide.
*
*
*
* When an instance is idle, the instance scales down to the minvCpus
value. However, the
* instance size doesn't change. For example, consider a c5.8xlarge
instance with a
* minvCpus
value of 4
and a desiredvCpus
value of 36
.
* This instance doesn't scale down to a c5.large
instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CEState
*/
public CreateComputeEnvironmentRequest withState(CEState state) {
this.state = state.toString();
return this;
}
/**
*
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair share
* scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share
* job queue, no vCPU capacity is reserved.
*
*
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*
*
* @param unmanagedvCpus
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair
* share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for
* a fair share job queue, no vCPU capacity is reserved.
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*/
public void setUnmanagedvCpus(Integer unmanagedvCpus) {
this.unmanagedvCpus = unmanagedvCpus;
}
/**
*
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair share
* scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share
* job queue, no vCPU capacity is reserved.
*
*
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*
*
* @return The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair
* share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for
* a fair share job queue, no vCPU capacity is reserved.
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*/
public Integer getUnmanagedvCpus() {
return this.unmanagedvCpus;
}
/**
*
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair share
* scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for a fair share
* job queue, no vCPU capacity is reserved.
*
*
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
*
*
* @param unmanagedvCpus
* The maximum number of vCPUs for an unmanaged compute environment. This parameter is only used for fair
* share scheduling to reserve vCPU capacity for new share identifiers. If this parameter isn't provided for
* a fair share job queue, no vCPU capacity is reserved.
*
* This parameter is only supported when the type
parameter is set to UNMANAGED
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withUnmanagedvCpus(Integer unmanagedvCpus) {
setUnmanagedvCpus(unmanagedvCpus);
return this;
}
/**
*
* Details about the compute resources managed by the compute environment. This parameter is required for managed
* compute environments. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param computeResources
* Details about the compute resources managed by the compute environment. This parameter is required for
* managed compute environments. For more information, see Compute
* Environments in the Batch User Guide.
*/
public void setComputeResources(ComputeResource computeResources) {
this.computeResources = computeResources;
}
/**
*
* Details about the compute resources managed by the compute environment. This parameter is required for managed
* compute environments. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @return Details about the compute resources managed by the compute environment. This parameter is required for
* managed compute environments. For more information, see Compute
* Environments in the Batch User Guide.
*/
public ComputeResource getComputeResources() {
return this.computeResources;
}
/**
*
* Details about the compute resources managed by the compute environment. This parameter is required for managed
* compute environments. For more information, see Compute Environments in
* the Batch User Guide.
*
*
* @param computeResources
* Details about the compute resources managed by the compute environment. This parameter is required for
* managed compute environments. For more information, see Compute
* Environments in the Batch User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withComputeResources(ComputeResource computeResources) {
setComputeResources(computeResources);
return this;
}
/**
*
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services
* services on your behalf. For more information, see Batch service IAM role in the
* Batch User Guide.
*
*
*
* If your account already created the Batch service-linked role, that role is used by default for your compute
* environment unless you specify a different role here. If the Batch service-linked role doesn't exist in your
* account, and no role is specified here, the service attempts to create the Batch service-linked role in your
* account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role ARN
* (recommended) or prefix the role name with the path. For example, if a role with the name bar
has a
* path of /foo/
, specify /foo/bar
as the role name. For more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
path
* prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the
* service-role
path prefix. Because of this, we recommend that you specify the full ARN of your
* service role when you create compute environments.
*
*
*
* @param serviceRole
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web
* Services services on your behalf. For more information, see Batch service IAM role
* in the Batch User Guide.
*
* If your account already created the Batch service-linked role, that role is used by default for your
* compute environment unless you specify a different role here. If the Batch service-linked role doesn't
* exist in your account, and no role is specified here, the service attempts to create the Batch
* service-linked role in your account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role
* ARN (recommended) or prefix the role name with the path. For example, if a role with the name
* bar
has a path of /foo/
, specify /foo/bar
as the role name. For
* more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
* path prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use
* the service-role
path prefix. Because of this, we recommend that you specify the full ARN of
* your service role when you create compute environments.
*
*/
public void setServiceRole(String serviceRole) {
this.serviceRole = serviceRole;
}
/**
*
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services
* services on your behalf. For more information, see Batch service IAM role in the
* Batch User Guide.
*
*
*
* If your account already created the Batch service-linked role, that role is used by default for your compute
* environment unless you specify a different role here. If the Batch service-linked role doesn't exist in your
* account, and no role is specified here, the service attempts to create the Batch service-linked role in your
* account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role ARN
* (recommended) or prefix the role name with the path. For example, if a role with the name bar
has a
* path of /foo/
, specify /foo/bar
as the role name. For more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
path
* prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the
* service-role
path prefix. Because of this, we recommend that you specify the full ARN of your
* service role when you create compute environments.
*
*
*
* @return The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web
* Services services on your behalf. For more information, see Batch service IAM
* role in the Batch User Guide.
*
* If your account already created the Batch service-linked role, that role is used by default for your
* compute environment unless you specify a different role here. If the Batch service-linked role doesn't
* exist in your account, and no role is specified here, the service attempts to create the Batch
* service-linked role in your account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role
* ARN (recommended) or prefix the role name with the path. For example, if a role with the name
* bar
has a path of /foo/
, specify /foo/bar
as the role name. For
* more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
* path prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use
* the service-role
path prefix. Because of this, we recommend that you specify the full ARN of
* your service role when you create compute environments.
*
*/
public String getServiceRole() {
return this.serviceRole;
}
/**
*
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web Services
* services on your behalf. For more information, see Batch service IAM role in the
* Batch User Guide.
*
*
*
* If your account already created the Batch service-linked role, that role is used by default for your compute
* environment unless you specify a different role here. If the Batch service-linked role doesn't exist in your
* account, and no role is specified here, the service attempts to create the Batch service-linked role in your
* account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role ARN
* (recommended) or prefix the role name with the path. For example, if a role with the name bar
has a
* path of /foo/
, specify /foo/bar
as the role name. For more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
path
* prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use the
* service-role
path prefix. Because of this, we recommend that you specify the full ARN of your
* service role when you create compute environments.
*
*
*
* @param serviceRole
* The full Amazon Resource Name (ARN) of the IAM role that allows Batch to make calls to other Amazon Web
* Services services on your behalf. For more information, see Batch service IAM role
* in the Batch User Guide.
*
* If your account already created the Batch service-linked role, that role is used by default for your
* compute environment unless you specify a different role here. If the Batch service-linked role doesn't
* exist in your account, and no role is specified here, the service attempts to create the Batch
* service-linked role in your account.
*
*
*
* If your specified role has a path other than /
, then you must specify either the full role
* ARN (recommended) or prefix the role name with the path. For example, if a role with the name
* bar
has a path of /foo/
, specify /foo/bar
as the role name. For
* more information, see Friendly names and paths in the IAM User Guide.
*
*
*
* Depending on how you created your Batch service role, its ARN might contain the service-role
* path prefix. When you only specify the name of the service role, Batch assumes that your ARN doesn't use
* the service-role
path prefix. Because of this, we recommend that you specify the full ARN of
* your service role when you create compute environments.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withServiceRole(String serviceRole) {
setServiceRole(serviceRole);
return this;
}
/**
*
* The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*
*
* @return The tags that you apply to the compute environment to help you categorize and organize your resources.
* Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*
*
* @param tags
* The tags that you apply to the compute environment to help you categorize and organize your resources.
* Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The tags that you apply to the compute environment to help you categorize and organize your resources. Each tag
* consists of a key and an optional value. For more information, see Tagging Amazon Web Services Resources
* in Amazon Web Services General Reference.
*
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
*
*
* @param tags
* The tags that you apply to the compute environment to help you categorize and organize your resources.
* Each tag consists of a key and an optional value. For more information, see Tagging Amazon Web Services
* Resources in Amazon Web Services General Reference.
*
* These tags can be updated or removed using the TagResource and UntagResource API
* operations. These tags don't propagate to the underlying compute resources.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateComputeEnvironmentRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest clearTagsEntries() {
this.tags = null;
return this;
}
/**
*
* The details for the Amazon EKS cluster that supports the compute environment.
*
*
* @param eksConfiguration
* The details for the Amazon EKS cluster that supports the compute environment.
*/
public void setEksConfiguration(EksConfiguration eksConfiguration) {
this.eksConfiguration = eksConfiguration;
}
/**
*
* The details for the Amazon EKS cluster that supports the compute environment.
*
*
* @return The details for the Amazon EKS cluster that supports the compute environment.
*/
public EksConfiguration getEksConfiguration() {
return this.eksConfiguration;
}
/**
*
* The details for the Amazon EKS cluster that supports the compute environment.
*
*
* @param eksConfiguration
* The details for the Amazon EKS cluster that supports the compute environment.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateComputeEnvironmentRequest withEksConfiguration(EksConfiguration eksConfiguration) {
setEksConfiguration(eksConfiguration);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getComputeEnvironmentName() != null)
sb.append("ComputeEnvironmentName: ").append(getComputeEnvironmentName()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getState() != null)
sb.append("State: ").append(getState()).append(",");
if (getUnmanagedvCpus() != null)
sb.append("UnmanagedvCpus: ").append(getUnmanagedvCpus()).append(",");
if (getComputeResources() != null)
sb.append("ComputeResources: ").append(getComputeResources()).append(",");
if (getServiceRole() != null)
sb.append("ServiceRole: ").append(getServiceRole()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getEksConfiguration() != null)
sb.append("EksConfiguration: ").append(getEksConfiguration());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateComputeEnvironmentRequest == false)
return false;
CreateComputeEnvironmentRequest other = (CreateComputeEnvironmentRequest) obj;
if (other.getComputeEnvironmentName() == null ^ this.getComputeEnvironmentName() == null)
return false;
if (other.getComputeEnvironmentName() != null && other.getComputeEnvironmentName().equals(this.getComputeEnvironmentName()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getState() == null ^ this.getState() == null)
return false;
if (other.getState() != null && other.getState().equals(this.getState()) == false)
return false;
if (other.getUnmanagedvCpus() == null ^ this.getUnmanagedvCpus() == null)
return false;
if (other.getUnmanagedvCpus() != null && other.getUnmanagedvCpus().equals(this.getUnmanagedvCpus()) == false)
return false;
if (other.getComputeResources() == null ^ this.getComputeResources() == null)
return false;
if (other.getComputeResources() != null && other.getComputeResources().equals(this.getComputeResources()) == false)
return false;
if (other.getServiceRole() == null ^ this.getServiceRole() == null)
return false;
if (other.getServiceRole() != null && other.getServiceRole().equals(this.getServiceRole()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getEksConfiguration() == null ^ this.getEksConfiguration() == null)
return false;
if (other.getEksConfiguration() != null && other.getEksConfiguration().equals(this.getEksConfiguration()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getComputeEnvironmentName() == null) ? 0 : getComputeEnvironmentName().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode());
hashCode = prime * hashCode + ((getUnmanagedvCpus() == null) ? 0 : getUnmanagedvCpus().hashCode());
hashCode = prime * hashCode + ((getComputeResources() == null) ? 0 : getComputeResources().hashCode());
hashCode = prime * hashCode + ((getServiceRole() == null) ? 0 : getServiceRole().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getEksConfiguration() == null) ? 0 : getEksConfiguration().hashCode());
return hashCode;
}
@Override
public CreateComputeEnvironmentRequest clone() {
return (CreateComputeEnvironmentRequest) super.clone();
}
}