Interface Ec2Instance.Builder
- All Superinterfaces:
Buildable
,CopyableBuilder<Ec2Instance.Builder,
,Ec2Instance> SdkBuilder<Ec2Instance.Builder,
,Ec2Instance> SdkPojo
- Enclosing class:
Ec2Instance
-
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone
(String availabilityZone) The availability zone of the Amazon EC2 instance.ec2NetworkInterfaceUids
(String... ec2NetworkInterfaceUids) The ID of the network interface.ec2NetworkInterfaceUids
(Collection<String> ec2NetworkInterfaceUids) The ID of the network interface.default Ec2Instance.Builder
iamInstanceProfile
(Consumer<IamInstanceProfile.Builder> iamInstanceProfile) Sets the value of the IamInstanceProfile property for this object.iamInstanceProfile
(IamInstanceProfile iamInstanceProfile) Sets the value of the IamInstanceProfile property for this object.imageDescription
(String imageDescription) The image description of the Amazon EC2 instance.instanceState
(String instanceState) The state of the Amazon EC2 instance.instanceType
(String instanceType) Type of the Amazon EC2 instance.outpostArn
(String outpostArn) The Amazon Resource Name (ARN) of the Amazon Web Services Outpost.The platform of the Amazon EC2 instance.productCodes
(Collection<ProductCode> productCodes) The product code of the Amazon EC2 instance.productCodes
(Consumer<ProductCode.Builder>... productCodes) The product code of the Amazon EC2 instance.productCodes
(ProductCode... productCodes) The product code of the Amazon EC2 instance.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
availabilityZone
The availability zone of the Amazon EC2 instance. For more information, see Availability zones in the Amazon EC2 User Guide.
- Parameters:
availabilityZone
- The availability zone of the Amazon EC2 instance. For more information, see Availability zones in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
imageDescription
The image description of the Amazon EC2 instance.
- Parameters:
imageDescription
- The image description of the Amazon EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
instanceState
The state of the Amazon EC2 instance. For more information, see Amazon EC2 instance state changes in the Amazon EC2 User Guide.
- Parameters:
instanceState
- The state of the Amazon EC2 instance. For more information, see Amazon EC2 instance state changes in the Amazon EC2 User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
iamInstanceProfile
Sets the value of the IamInstanceProfile property for this object.- Parameters:
iamInstanceProfile
- The new value for the IamInstanceProfile property for this object.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
iamInstanceProfile
default Ec2Instance.Builder iamInstanceProfile(Consumer<IamInstanceProfile.Builder> iamInstanceProfile) Sets the value of the IamInstanceProfile property for this object. This is a convenience method that creates an instance of theIamInstanceProfile.Builder
avoiding the need to create one manually viaIamInstanceProfile.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toiamInstanceProfile(IamInstanceProfile)
.- Parameters:
iamInstanceProfile
- a consumer that will call methods onIamInstanceProfile.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
instanceType
Type of the Amazon EC2 instance.
- Parameters:
instanceType
- Type of the Amazon EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
outpostArn
The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. This shows applicable Amazon Web Services Outposts instances.
- Parameters:
outpostArn
- The Amazon Resource Name (ARN) of the Amazon Web Services Outpost. This shows applicable Amazon Web Services Outposts instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
platform
The platform of the Amazon EC2 instance.
- Parameters:
platform
- The platform of the Amazon EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
The product code of the Amazon EC2 instance.
- Parameters:
productCodes
- The product code of the Amazon EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
The product code of the Amazon EC2 instance.
- Parameters:
productCodes
- The product code of the Amazon EC2 instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
productCodes
The product code of the Amazon EC2 instance.
This is a convenience method that creates an instance of theProductCode.Builder
avoiding the need to create one manually viaProductCode.builder()
.When the
Consumer
completes,SdkBuilder.build()
is called immediately and its result is passed toproductCodes(List<ProductCode>)
.- Parameters:
productCodes
- a consumer that will call methods onProductCode.Builder
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
ec2NetworkInterfaceUids
The ID of the network interface.
- Parameters:
ec2NetworkInterfaceUids
- The ID of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
ec2NetworkInterfaceUids
The ID of the network interface.
- Parameters:
ec2NetworkInterfaceUids
- The ID of the network interface.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-