Class LaunchConfiguration
- All Implemented Interfaces:
Serializable
,Cloneable
Describes a launch configuration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
[EC2-VPC] Indicates whether to assign a public IP address to each instance.A block device mapping, which specifies the block devices for the instance.The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
.The creation date and time for the launch configuration.Controls whether the instance is optimized for EBS I/O (true
) or not (false
).The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.The ID of the Amazon Machine Image (AMI).Controls whether instances in this group are launched with detailed monitoring.The instance type for the instances.The ID of the kernel associated with the AMI.The name of the key pair.The Amazon Resource Name (ARN) of the launch configuration.The name of the launch configuration.The tenancy of the instance, eitherdefault
ordedicated
.The ID of the RAM disk associated with the AMI.The security groups to associate with the instances.The price to bid when launching Spot Instances.The user data available to the instances.int
hashCode()
[EC2-VPC] Indicates whether to assign a public IP address to each instance.Controls whether the instance is optimized for EBS I/O (true
) or not (false
).void
setAssociatePublicIpAddress
(Boolean associatePublicIpAddress) [EC2-VPC] Indicates whether to assign a public IP address to each instance.void
setBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) A block device mapping, which specifies the block devices for the instance.void
setClassicLinkVPCId
(String classicLinkVPCId) The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.void
setClassicLinkVPCSecurityGroups
(Collection<String> classicLinkVPCSecurityGroups) The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
.void
setCreatedTime
(Date createdTime) The creation date and time for the launch configuration.void
setEbsOptimized
(Boolean ebsOptimized) Controls whether the instance is optimized for EBS I/O (true
) or not (false
).void
setIamInstanceProfile
(String iamInstanceProfile) The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.void
setImageId
(String imageId) The ID of the Amazon Machine Image (AMI).void
setInstanceMonitoring
(InstanceMonitoring instanceMonitoring) Controls whether instances in this group are launched with detailed monitoring.void
setInstanceType
(String instanceType) The instance type for the instances.void
setKernelId
(String kernelId) The ID of the kernel associated with the AMI.void
setKeyName
(String keyName) The name of the key pair.void
setLaunchConfigurationARN
(String launchConfigurationARN) The Amazon Resource Name (ARN) of the launch configuration.void
setLaunchConfigurationName
(String launchConfigurationName) The name of the launch configuration.void
setPlacementTenancy
(String placementTenancy) The tenancy of the instance, eitherdefault
ordedicated
.void
setRamdiskId
(String ramdiskId) The ID of the RAM disk associated with the AMI.void
setSecurityGroups
(Collection<String> securityGroups) The security groups to associate with the instances.void
setSpotPrice
(String spotPrice) The price to bid when launching Spot Instances.void
setUserData
(String userData) The user data available to the instances.toString()
Returns a string representation of this object; useful for testing and debugging.withAssociatePublicIpAddress
(Boolean associatePublicIpAddress) [EC2-VPC] Indicates whether to assign a public IP address to each instance.withBlockDeviceMappings
(BlockDeviceMapping... blockDeviceMappings) A block device mapping, which specifies the block devices for the instance.withBlockDeviceMappings
(Collection<BlockDeviceMapping> blockDeviceMappings) A block device mapping, which specifies the block devices for the instance.withClassicLinkVPCId
(String classicLinkVPCId) The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.withClassicLinkVPCSecurityGroups
(String... classicLinkVPCSecurityGroups) The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
.withClassicLinkVPCSecurityGroups
(Collection<String> classicLinkVPCSecurityGroups) The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
.withCreatedTime
(Date createdTime) The creation date and time for the launch configuration.withEbsOptimized
(Boolean ebsOptimized) Controls whether the instance is optimized for EBS I/O (true
) or not (false
).withIamInstanceProfile
(String iamInstanceProfile) The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.withImageId
(String imageId) The ID of the Amazon Machine Image (AMI).withInstanceMonitoring
(InstanceMonitoring instanceMonitoring) Controls whether instances in this group are launched with detailed monitoring.withInstanceType
(String instanceType) The instance type for the instances.withKernelId
(String kernelId) The ID of the kernel associated with the AMI.withKeyName
(String keyName) The name of the key pair.withLaunchConfigurationARN
(String launchConfigurationARN) The Amazon Resource Name (ARN) of the launch configuration.withLaunchConfigurationName
(String launchConfigurationName) The name of the launch configuration.withPlacementTenancy
(String placementTenancy) The tenancy of the instance, eitherdefault
ordedicated
.withRamdiskId
(String ramdiskId) The ID of the RAM disk associated with the AMI.withSecurityGroups
(String... securityGroups) The security groups to associate with the instances.withSecurityGroups
(Collection<String> securityGroups) The security groups to associate with the instances.withSpotPrice
(String spotPrice) The price to bid when launching Spot Instances.withUserData
(String userData) The user data available to the instances.
-
Constructor Details
-
LaunchConfiguration
public LaunchConfiguration()
-
-
Method Details
-
setLaunchConfigurationName
The name of the launch configuration.
- Parameters:
launchConfigurationName
- The name of the launch configuration.
-
getLaunchConfigurationName
The name of the launch configuration.
- Returns:
- The name of the launch configuration.
-
withLaunchConfigurationName
The name of the launch configuration.
- Parameters:
launchConfigurationName
- The name of the launch configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setLaunchConfigurationARN
The Amazon Resource Name (ARN) of the launch configuration.
- Parameters:
launchConfigurationARN
- The Amazon Resource Name (ARN) of the launch configuration.
-
getLaunchConfigurationARN
The Amazon Resource Name (ARN) of the launch configuration.
- Returns:
- The Amazon Resource Name (ARN) of the launch configuration.
-
withLaunchConfigurationARN
The Amazon Resource Name (ARN) of the launch configuration.
- Parameters:
launchConfigurationARN
- The Amazon Resource Name (ARN) of the launch configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setImageId
The ID of the Amazon Machine Image (AMI).
- Parameters:
imageId
- The ID of the Amazon Machine Image (AMI).
-
getImageId
The ID of the Amazon Machine Image (AMI).
- Returns:
- The ID of the Amazon Machine Image (AMI).
-
withImageId
The ID of the Amazon Machine Image (AMI).
- Parameters:
imageId
- The ID of the Amazon Machine Image (AMI).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKeyName
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.
-
getKeyName
The name of the key pair.
- Returns:
- The name of the key pair.
-
withKeyName
The name of the key pair.
- Parameters:
keyName
- The name of the key pair.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getSecurityGroups
The security groups to associate with the instances.
- Returns:
- The security groups to associate with the instances.
-
setSecurityGroups
The security groups to associate with the instances.
- Parameters:
securityGroups
- The security groups to associate with the instances.
-
withSecurityGroups
The security groups to associate with the instances.
NOTE: This method appends the values to the existing list (if any). Use
setSecurityGroups(java.util.Collection)
orwithSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
securityGroups
- The security groups to associate with the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withSecurityGroups
The security groups to associate with the instances.
- Parameters:
securityGroups
- The security groups to associate with the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setClassicLinkVPCId
The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
classicLinkVPCId
- The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
-
getClassicLinkVPCId
The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
- Returns:
- The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
-
withClassicLinkVPCId
The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
- Parameters:
classicLinkVPCId
- The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter can only be used if you are launching EC2-Classic instances. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getClassicLinkVPCSecurityGroups
The IDs of one or more security groups for the VPC specified in
ClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Returns:
- The IDs of one or more security groups for the VPC specified in
ClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
-
setClassicLinkVPCSecurityGroups
The IDs of one or more security groups for the VPC specified in
ClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Parameters:
classicLinkVPCSecurityGroups
- The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.
-
withClassicLinkVPCSecurityGroups
The IDs of one or more security groups for the VPC specified in
ClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.NOTE: This method appends the values to the existing list (if any). Use
setClassicLinkVPCSecurityGroups(java.util.Collection)
orwithClassicLinkVPCSecurityGroups(java.util.Collection)
if you want to override the existing values.- Parameters:
classicLinkVPCSecurityGroups
- The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withClassicLinkVPCSecurityGroups
public LaunchConfiguration withClassicLinkVPCSecurityGroups(Collection<String> classicLinkVPCSecurityGroups) The IDs of one or more security groups for the VPC specified in
ClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Parameters:
classicLinkVPCSecurityGroups
- The IDs of one or more security groups for the VPC specified inClassicLinkVPCId
. This parameter is required if you specify a ClassicLink-enabled VPC, and cannot be used otherwise. For more information, see ClassicLink in the Amazon Elastic Compute Cloud User Guide.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setUserData
The user data available to the instances.
- Parameters:
userData
- The user data available to the instances.
-
getUserData
The user data available to the instances.
- Returns:
- The user data available to the instances.
-
withUserData
The user data available to the instances.
- Parameters:
userData
- The user data available to the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceType
The instance type for the instances.
- Parameters:
instanceType
- The instance type for the instances.
-
getInstanceType
The instance type for the instances.
- Returns:
- The instance type for the instances.
-
withInstanceType
The instance type for the instances.
- Parameters:
instanceType
- The instance type for the instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setKernelId
The ID of the kernel associated with the AMI.
- Parameters:
kernelId
- The ID of the kernel associated with the AMI.
-
getKernelId
The ID of the kernel associated with the AMI.
- Returns:
- The ID of the kernel associated with the AMI.
-
withKernelId
The ID of the kernel associated with the AMI.
- Parameters:
kernelId
- The ID of the kernel associated with the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setRamdiskId
The ID of the RAM disk associated with the AMI.
- Parameters:
ramdiskId
- The ID of the RAM disk associated with the AMI.
-
getRamdiskId
The ID of the RAM disk associated with the AMI.
- Returns:
- The ID of the RAM disk associated with the AMI.
-
withRamdiskId
The ID of the RAM disk associated with the AMI.
- Parameters:
ramdiskId
- The ID of the RAM disk associated with the AMI.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBlockDeviceMappings
A block device mapping, which specifies the block devices for the instance.
- Returns:
- A block device mapping, which specifies the block devices for the instance.
-
setBlockDeviceMappings
A block device mapping, which specifies the block devices for the instance.
- Parameters:
blockDeviceMappings
- A block device mapping, which specifies the block devices for the instance.
-
withBlockDeviceMappings
A block device mapping, which specifies the block devices for the instance.
NOTE: This method appends the values to the existing list (if any). Use
setBlockDeviceMappings(java.util.Collection)
orwithBlockDeviceMappings(java.util.Collection)
if you want to override the existing values.- Parameters:
blockDeviceMappings
- A block device mapping, which specifies the block devices for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBlockDeviceMappings
public LaunchConfiguration withBlockDeviceMappings(Collection<BlockDeviceMapping> blockDeviceMappings) A block device mapping, which specifies the block devices for the instance.
- Parameters:
blockDeviceMappings
- A block device mapping, which specifies the block devices for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInstanceMonitoring
Controls whether instances in this group are launched with detailed monitoring.
- Parameters:
instanceMonitoring
- Controls whether instances in this group are launched with detailed monitoring.
-
getInstanceMonitoring
Controls whether instances in this group are launched with detailed monitoring.
- Returns:
- Controls whether instances in this group are launched with detailed monitoring.
-
withInstanceMonitoring
Controls whether instances in this group are launched with detailed monitoring.
- Parameters:
instanceMonitoring
- Controls whether instances in this group are launched with detailed monitoring.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setSpotPrice
The price to bid when launching Spot Instances.
- Parameters:
spotPrice
- The price to bid when launching Spot Instances.
-
getSpotPrice
The price to bid when launching Spot Instances.
- Returns:
- The price to bid when launching Spot Instances.
-
withSpotPrice
The price to bid when launching Spot Instances.
- Parameters:
spotPrice
- The price to bid when launching Spot Instances.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setIamInstanceProfile
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
- Parameters:
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
-
getIamInstanceProfile
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
- Returns:
- The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
-
withIamInstanceProfile
The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.
- Parameters:
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreatedTime
The creation date and time for the launch configuration.
- Parameters:
createdTime
- The creation date and time for the launch configuration.
-
getCreatedTime
The creation date and time for the launch configuration.
- Returns:
- The creation date and time for the launch configuration.
-
withCreatedTime
The creation date and time for the launch configuration.
- Parameters:
createdTime
- The creation date and time for the launch configuration.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setEbsOptimized
Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).- Parameters:
ebsOptimized
- Controls whether the instance is optimized for EBS I/O (true
) or not (false
).
-
getEbsOptimized
Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).- Returns:
- Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).
-
withEbsOptimized
Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).- Parameters:
ebsOptimized
- Controls whether the instance is optimized for EBS I/O (true
) or not (false
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isEbsOptimized
Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).- Returns:
- Controls whether the instance is optimized for EBS I/O (
true
) or not (false
).
-
setAssociatePublicIpAddress
[EC2-VPC] Indicates whether to assign a public IP address to each instance.
- Parameters:
associatePublicIpAddress
- [EC2-VPC] Indicates whether to assign a public IP address to each instance.
-
getAssociatePublicIpAddress
[EC2-VPC] Indicates whether to assign a public IP address to each instance.
- Returns:
- [EC2-VPC] Indicates whether to assign a public IP address to each instance.
-
withAssociatePublicIpAddress
[EC2-VPC] Indicates whether to assign a public IP address to each instance.
- Parameters:
associatePublicIpAddress
- [EC2-VPC] Indicates whether to assign a public IP address to each instance.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isAssociatePublicIpAddress
[EC2-VPC] Indicates whether to assign a public IP address to each instance.
- Returns:
- [EC2-VPC] Indicates whether to assign a public IP address to each instance.
-
setPlacementTenancy
The tenancy of the instance, either
default
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.- Parameters:
placementTenancy
- The tenancy of the instance, eitherdefault
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.
-
getPlacementTenancy
The tenancy of the instance, either
default
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.- Returns:
- The tenancy of the instance, either
default
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.
-
withPlacementTenancy
The tenancy of the instance, either
default
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.- Parameters:
placementTenancy
- The tenancy of the instance, eitherdefault
ordedicated
. An instance withdedicated
tenancy runs in an isolated, single-tenant hardware and can only be launched into a VPC.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-