Class Ec2InstanceAttributes
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Ec2InstanceAttributes.Builder,
Ec2InstanceAttributes>
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 Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionA list of additional Amazon EC2 security group IDs for the master node.A list of additional Amazon EC2 security group IDs for the core and task nodes.builder()
final String
The Availability Zone in which the cluster will run.final String
The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".final String
Set this parameter to the identifier of the Amazon VPC subnet where you want the cluster to launch.final String
The identifier of the Amazon EC2 security group for the master node.final String
The identifier of the Amazon EC2 security group for the core and task nodes.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the AdditionalMasterSecurityGroups property.final boolean
For responses, this returns true if the service returned a value for the AdditionalSlaveSecurityGroups property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the RequestedEc2AvailabilityZones property.final boolean
For responses, this returns true if the service returned a value for the RequestedEc2SubnetIds property.final String
The IAM role that was specified when the cluster was launched.Applies to clusters configured with the instance fleets option.Applies to clusters configured with the instance fleets option.static Class
<? extends Ec2InstanceAttributes.Builder> final String
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
ec2KeyName
The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".
- Returns:
- The name of the Amazon EC2 key pair to use when connecting with SSH into the master node as a user named "hadoop".
-
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.
- Returns:
- 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.
-
hasRequestedEc2SubnetIds
public final boolean hasRequestedEc2SubnetIds()For responses, this returns true if the service returned a value for the RequestedEc2SubnetIds property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
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 usesRequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.RequestedEc2SubnetIDs
andRequestedEc2AvailabilityZones
cannot be specified together.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRequestedEc2SubnetIds()
method.- Returns:
- 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 usesRequestedEc2AvailabilityZones
instead of this setting. If EC2-Classic is not supported, and no Subnet is specified, Amazon EMR chooses the subnet for you.RequestedEc2SubnetIDs
andRequestedEc2AvailabilityZones
cannot be specified together.
-
ec2AvailabilityZone
The Availability Zone in which the cluster will run.
- Returns:
- The Availability Zone in which the cluster will run.
-
hasRequestedEc2AvailabilityZones
public final boolean hasRequestedEc2AvailabilityZones()For responses, this returns true if the service returned a value for the RequestedEc2AvailabilityZones property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
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
andRequestedEc2AvailabilityZones
cannot be specified together.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasRequestedEc2AvailabilityZones()
method.- Returns:
- 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
andRequestedEc2AvailabilityZones
cannot be specified together.
-
iamInstanceProfile
The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume this role.
- Returns:
- The IAM role that was specified when the cluster was launched. The Amazon EC2 instances of the cluster assume this role.
-
emrManagedMasterSecurityGroup
The identifier of the Amazon EC2 security group for the master node.
- Returns:
- The identifier of the Amazon EC2 security group for the master node.
-
emrManagedSlaveSecurityGroup
The identifier of the Amazon EC2 security group for the core and task nodes.
- Returns:
- The identifier of the Amazon EC2 security group for the core and task nodes.
-
serviceAccessSecurityGroup
The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
- Returns:
- The identifier of the Amazon EC2 security group for the Amazon EMR service to access clusters in VPC private subnets.
-
hasAdditionalMasterSecurityGroups
public final boolean hasAdditionalMasterSecurityGroups()For responses, this returns true if the service returned a value for the AdditionalMasterSecurityGroups property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
additionalMasterSecurityGroups
A list of additional Amazon EC2 security group IDs for the master node.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAdditionalMasterSecurityGroups()
method.- Returns:
- A list of additional Amazon EC2 security group IDs for the master node.
-
hasAdditionalSlaveSecurityGroups
public final boolean hasAdditionalSlaveSecurityGroups()For responses, this returns true if the service returned a value for the AdditionalSlaveSecurityGroups property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
additionalSlaveSecurityGroups
A list of additional Amazon EC2 security group IDs for the core and task nodes.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAdditionalSlaveSecurityGroups()
method.- Returns:
- A list of additional Amazon EC2 security group IDs for the core and task nodes.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<Ec2InstanceAttributes.Builder,
Ec2InstanceAttributes> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
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. -
getValueForField
-
sdkFields
-