/* * 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.elasticmapreduce.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet * ID, IAM instance profile, and so on. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Ec2InstanceAttributes implements Serializable, Cloneable, StructuredPojo { /** ** The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". *
*/ private String ec2KeyName; /** ** Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not * specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. *
*/ private String ec2SubnetId; /** *
* Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more
* Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC.
* Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of
* RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this value is
* not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the
* EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic
* is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified together.
*
* The Availability Zone in which the cluster will run. *
*/ private String ec2AvailabilityZone; /** *
* Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which
* to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR
* chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones
* , and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon
* EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs
and
* RequestedEc2AvailabilityZones
cannot be specified together.
*
* The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume * this role. *
*/ private String iamInstanceProfile; /** ** The identifier of the Amazon EC2 security group for the master node. *
*/ private String emrManagedMasterSecurityGroup; /** ** The identifier of the Amazon EC2 security group for the core and task nodes. *
*/ private String emrManagedSlaveSecurityGroup; /** ** The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *
*/ private String serviceAccessSecurityGroup; /** ** A list of additional Amazon EC2 security group IDs for the master node. *
*/ private com.amazonaws.internal.SdkInternalList* A list of additional Amazon EC2 security group IDs for the core and task nodes. *
*/ private com.amazonaws.internal.SdkInternalList* The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". *
* * @param ec2KeyName * The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". */ public void setEc2KeyName(String ec2KeyName) { this.ec2KeyName = ec2KeyName; } /** ** The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". *
* * @return The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". */ public String getEc2KeyName() { return this.ec2KeyName; } /** ** The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". *
* * @param ec2KeyName * The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named * "hadoop". * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withEc2KeyName(String ec2KeyName) { setEc2KeyName(ec2KeyName); return this; } /** ** Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not * specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. *
* * @param ec2SubnetId * Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you * do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. */ public void setEc2SubnetId(String ec2SubnetId) { this.ec2SubnetId = ec2SubnetId; } /** ** Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not * specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. *
* * @return Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If * you do not specify this value, and your account supports EC2-Classic, the cluster launches in * EC2-Classic. */ public String getEc2SubnetId() { return this.ec2SubnetId; } /** ** Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you do not * specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. *
* * @param ec2SubnetId * Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch. If you * do not specify this value, and your account supports EC2-Classic, the cluster launches in EC2-Classic. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withEc2SubnetId(String ec2SubnetId) { setEc2SubnetId(ec2SubnetId); return this; } /** *
* Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more
* Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC.
* Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of
* RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this value is
* not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the
* EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic
* is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this
* value is not specified, and the account and Region support EC2-Classic networks, the cluster launches
* instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this
* setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for
* you. RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be
* specified together.
*/
public java.util.List
* Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more
* Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC.
* Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of
* RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this value is
* not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the
* EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic
* is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this
* value is not specified, and the account and Region support EC2-Classic networks, the cluster launches
* instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this
* setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for
* you. RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
*/
public void setRequestedEc2SubnetIds(java.util.Collection
* Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more
* Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC.
* Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of
* RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this value is
* not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the
* EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic
* is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified together.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRequestedEc2SubnetIds(java.util.Collection)} or * {@link #withRequestedEc2SubnetIds(java.util.Collection)} if you want to override the existing values. *
* * @param requestedEc2SubnetIds * Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or * more Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the * same VPC. Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of *RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this
* value is not specified, and the account and Region support EC2-Classic networks, the cluster launches
* instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this
* setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for
* you. RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Ec2InstanceAttributes withRequestedEc2SubnetIds(String... requestedEc2SubnetIds) {
if (this.requestedEc2SubnetIds == null) {
setRequestedEc2SubnetIds(new com.amazonaws.internal.SdkInternalList
* Applies to clusters configured with the instance fleets option. Specifies the unique identifier of one or more
* Amazon EC2 subnets in which to launch Amazon EC2 cluster instances. Subnets must exist within the same VPC.
* Amazon EMR chooses the Amazon EC2 subnet with the best fit from among the list of
* RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this value is
* not specified, and the account and Region support EC2-Classic networks, the cluster launches instances in the
* EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic
* is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2SubnetIds
, and then launches all cluster instances within that Subnet. If this
* value is not specified, and the account and Region support EC2-Classic networks, the cluster launches
* instances in the EC2-Classic network and uses RequestedEc2AvailabilityZones
instead of this
* setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for
* you. RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Ec2InstanceAttributes withRequestedEc2SubnetIds(java.util.Collection* The Availability Zone in which the cluster will run. *
* * @param ec2AvailabilityZone * The Availability Zone in which the cluster will run. */ public void setEc2AvailabilityZone(String ec2AvailabilityZone) { this.ec2AvailabilityZone = ec2AvailabilityZone; } /** ** The Availability Zone in which the cluster will run. *
* * @return The Availability Zone in which the cluster will run. */ public String getEc2AvailabilityZone() { return this.ec2AvailabilityZone; } /** ** The Availability Zone in which the cluster will run. *
* * @param ec2AvailabilityZone * The Availability Zone in which the cluster will run. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withEc2AvailabilityZone(String ec2AvailabilityZone) { setEc2AvailabilityZone(ec2AvailabilityZone); return this; } /** *
* Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which
* to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR
* chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones
* , and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon
* EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs
and
* RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2AvailabilityZones
, and then launches all cluster instances within that
* Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
*/
public java.util.List
* Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which
* to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR
* chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones
* , and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon
* EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs
and
* RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2AvailabilityZones
, and then launches all cluster instances within that
* Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
*/
public void setRequestedEc2AvailabilityZones(java.util.Collection
* Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which
* to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR
* chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones
* , and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon
* EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs
and
* RequestedEc2AvailabilityZones
cannot be specified together.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRequestedEc2AvailabilityZones(java.util.Collection)} or * {@link #withRequestedEc2AvailabilityZones(java.util.Collection)} if you want to override the existing values. *
* * @param requestedEc2AvailabilityZones * Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones * in which to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. * Amazon EMR chooses the Availability Zone with the best fit from among the list of *RequestedEc2AvailabilityZones
, and then launches all cluster instances within that
* Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Ec2InstanceAttributes withRequestedEc2AvailabilityZones(String... requestedEc2AvailabilityZones) {
if (this.requestedEc2AvailabilityZones == null) {
setRequestedEc2AvailabilityZones(new com.amazonaws.internal.SdkInternalList
* Applies to clusters configured with the instance fleets option. Specifies one or more Availability Zones in which
* to launch Amazon EC2 cluster instances when the EC2-Classic network configuration is supported. Amazon EMR
* chooses the Availability Zone with the best fit from among the list of RequestedEc2AvailabilityZones
* , and then launches all cluster instances within that Availability Zone. If you do not specify this value, Amazon
* EMR chooses the Availability Zone for you. RequestedEc2SubnetIDs
and
* RequestedEc2AvailabilityZones
cannot be specified together.
*
RequestedEc2AvailabilityZones
, and then launches all cluster instances within that
* Availability Zone. If you do not specify this value, Amazon EMR chooses the Availability Zone for you.
* RequestedEc2SubnetIDs
and RequestedEc2AvailabilityZones
cannot be specified
* together.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Ec2InstanceAttributes withRequestedEc2AvailabilityZones(java.util.Collection* The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume * this role. *
* * @param iamInstanceProfile * The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster * assume this role. */ public void setIamInstanceProfile(String iamInstanceProfile) { this.iamInstanceProfile = iamInstanceProfile; } /** ** The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume * this role. *
* * @return The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster * assume this role. */ public String getIamInstanceProfile() { return this.iamInstanceProfile; } /** ** The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume * this role. *
* * @param iamInstanceProfile * The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster * assume this role. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withIamInstanceProfile(String iamInstanceProfile) { setIamInstanceProfile(iamInstanceProfile); return this; } /** ** The identifier of the Amazon EC2 security group for the master node. *
* * @param emrManagedMasterSecurityGroup * The identifier of the Amazon EC2 security group for the master node. */ public void setEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) { this.emrManagedMasterSecurityGroup = emrManagedMasterSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the master node. *
* * @return The identifier of the Amazon EC2 security group for the master node. */ public String getEmrManagedMasterSecurityGroup() { return this.emrManagedMasterSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the master node. *
* * @param emrManagedMasterSecurityGroup * The identifier of the Amazon EC2 security group for the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withEmrManagedMasterSecurityGroup(String emrManagedMasterSecurityGroup) { setEmrManagedMasterSecurityGroup(emrManagedMasterSecurityGroup); return this; } /** ** The identifier of the Amazon EC2 security group for the core and task nodes. *
* * @param emrManagedSlaveSecurityGroup * The identifier of the Amazon EC2 security group for the core and task nodes. */ public void setEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) { this.emrManagedSlaveSecurityGroup = emrManagedSlaveSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the core and task nodes. *
* * @return The identifier of the Amazon EC2 security group for the core and task nodes. */ public String getEmrManagedSlaveSecurityGroup() { return this.emrManagedSlaveSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the core and task nodes. *
* * @param emrManagedSlaveSecurityGroup * The identifier of the Amazon EC2 security group for the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withEmrManagedSlaveSecurityGroup(String emrManagedSlaveSecurityGroup) { setEmrManagedSlaveSecurityGroup(emrManagedSlaveSecurityGroup); return this; } /** ** The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *
* * @param serviceAccessSecurityGroup * The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. */ public void setServiceAccessSecurityGroup(String serviceAccessSecurityGroup) { this.serviceAccessSecurityGroup = serviceAccessSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *
* * @return The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. */ public String getServiceAccessSecurityGroup() { return this.serviceAccessSecurityGroup; } /** ** The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private * subnets. *
* * @param serviceAccessSecurityGroup * The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC * private subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withServiceAccessSecurityGroup(String serviceAccessSecurityGroup) { setServiceAccessSecurityGroup(serviceAccessSecurityGroup); return this; } /** ** A list of additional Amazon EC2 security group IDs for the master node. *
* * @return A list of additional Amazon EC2 security group IDs for the master node. */ public java.util.List* A list of additional Amazon EC2 security group IDs for the master node. *
* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. */ public void setAdditionalMasterSecurityGroups(java.util.Collection* A list of additional Amazon EC2 security group IDs for the master node. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAdditionalMasterSecurityGroups(java.util.Collection)} or * {@link #withAdditionalMasterSecurityGroups(java.util.Collection)} if you want to override the existing values. *
* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withAdditionalMasterSecurityGroups(String... additionalMasterSecurityGroups) { if (this.additionalMasterSecurityGroups == null) { setAdditionalMasterSecurityGroups(new com.amazonaws.internal.SdkInternalList* A list of additional Amazon EC2 security group IDs for the master node. *
* * @param additionalMasterSecurityGroups * A list of additional Amazon EC2 security group IDs for the master node. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withAdditionalMasterSecurityGroups(java.util.Collection* A list of additional Amazon EC2 security group IDs for the core and task nodes. *
* * @return A list of additional Amazon EC2 security group IDs for the core and task nodes. */ public java.util.List* A list of additional Amazon EC2 security group IDs for the core and task nodes. *
* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. */ public void setAdditionalSlaveSecurityGroups(java.util.Collection* A list of additional Amazon EC2 security group IDs for the core and task nodes. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAdditionalSlaveSecurityGroups(java.util.Collection)} or * {@link #withAdditionalSlaveSecurityGroups(java.util.Collection)} if you want to override the existing values. *
* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withAdditionalSlaveSecurityGroups(String... additionalSlaveSecurityGroups) { if (this.additionalSlaveSecurityGroups == null) { setAdditionalSlaveSecurityGroups(new com.amazonaws.internal.SdkInternalList* A list of additional Amazon EC2 security group IDs for the core and task nodes. *
* * @param additionalSlaveSecurityGroups * A list of additional Amazon EC2 security group IDs for the core and task nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public Ec2InstanceAttributes withAdditionalSlaveSecurityGroups(java.util.Collection