public static final class CfnLaunchTemplate.LaunchTemplateDataProperty.Builder
extends java.lang.Object
CfnLaunchTemplate.LaunchTemplateDataProperty
Constructor and Description |
---|
Builder() |
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder blockDeviceMappings(IResolvable blockDeviceMappings)
CfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
blockDeviceMappings
- The block device mapping.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder blockDeviceMappings(java.util.List<? extends java.lang.Object> blockDeviceMappings)
CfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
blockDeviceMappings
- The block device mapping.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder capacityReservationSpecification(IResolvable capacityReservationSpecification)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCapacityReservationSpecification()
capacityReservationSpecification
- The Capacity Reservation targeting option.
If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder capacityReservationSpecification(CfnLaunchTemplate.CapacityReservationSpecificationProperty capacityReservationSpecification)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCapacityReservationSpecification()
capacityReservationSpecification
- The Capacity Reservation targeting option.
If you do not specify this parameter, the instance's Capacity Reservation preference defaults to open
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder cpuOptions(IResolvable cpuOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
cpuOptions
- The CPU options for the instance.
For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder cpuOptions(CfnLaunchTemplate.CpuOptionsProperty cpuOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
cpuOptions
- The CPU options for the instance.
For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder creditSpecification(IResolvable creditSpecification)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
creditSpecification
- The credit option for CPU usage of the instance.
Valid for T2, T3, or T3a instances only.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder creditSpecification(CfnLaunchTemplate.CreditSpecificationProperty creditSpecification)
CfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
creditSpecification
- The credit option for CPU usage of the instance.
Valid for T2, T3, or T3a instances only.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiTermination(java.lang.Boolean disableApiTermination)
CfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
disableApiTermination
- If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;.
otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior
to terminate
, you can terminate the instance by running the shutdown command from the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiTermination(IResolvable disableApiTermination)
CfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
disableApiTermination
- If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;.
otherwise, you can. To change this attribute after launch, use ModifyInstanceAttribute . Alternatively, if you set InstanceInitiatedShutdownBehavior
to terminate
, you can terminate the instance by running the shutdown command from the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ebsOptimized(java.lang.Boolean ebsOptimized)
CfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
ebsOptimized
- Indicates whether the instance is optimized for Amazon EBS I/O.
This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ebsOptimized(IResolvable ebsOptimized)
CfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
ebsOptimized
- Indicates whether the instance is optimized for Amazon EBS I/O.
This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticGpuSpecifications(IResolvable elasticGpuSpecifications)
elasticGpuSpecifications
- An elastic GPU to associate with the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticGpuSpecifications(java.util.List<? extends java.lang.Object> elasticGpuSpecifications)
elasticGpuSpecifications
- An elastic GPU to associate with the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticInferenceAccelerators(IResolvable elasticInferenceAccelerators)
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticInferenceAccelerators(java.util.List<? extends java.lang.Object> elasticInferenceAccelerators)
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder enclaveOptions(IResolvable enclaveOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
enclaveOptions
- Indicates whether the instance is enabled for AWS Nitro Enclaves.
For more information, see What is AWS Nitro Enclaves? in the AWS Nitro Enclaves User Guide .
You can't enable AWS Nitro Enclaves and hibernation on the same instance.
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder enclaveOptions(CfnLaunchTemplate.EnclaveOptionsProperty enclaveOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
enclaveOptions
- Indicates whether the instance is enabled for AWS Nitro Enclaves.
For more information, see What is AWS Nitro Enclaves? in the AWS Nitro Enclaves User Guide .
You can't enable AWS Nitro Enclaves and hibernation on the same instance.
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder hibernationOptions(IResolvable hibernationOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
hibernationOptions
- Indicates whether an instance is enabled for hibernation.
This parameter is valid only if the instance meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder hibernationOptions(CfnLaunchTemplate.HibernationOptionsProperty hibernationOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
hibernationOptions
- Indicates whether an instance is enabled for hibernation.
This parameter is valid only if the instance meets the hibernation prerequisites . For more information, see Hibernate your instance in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder iamInstanceProfile(IResolvable iamInstanceProfile)
CfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder iamInstanceProfile(CfnLaunchTemplate.IamInstanceProfileProperty iamInstanceProfile)
CfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder imageId(java.lang.String imageId)
CfnLaunchTemplate.LaunchTemplateDataProperty.getImageId()
imageId
- The ID of the AMI.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceInitiatedShutdownBehavior(java.lang.String instanceInitiatedShutdownBehavior)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceInitiatedShutdownBehavior()
instanceInitiatedShutdownBehavior
- Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
Default: stop
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceMarketOptions(IResolvable instanceMarketOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
instanceMarketOptions
- The market (purchasing) option for the instances.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceMarketOptions(CfnLaunchTemplate.InstanceMarketOptionsProperty instanceMarketOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
instanceMarketOptions
- The market (purchasing) option for the instances.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceRequirements(IResolvable instanceRequirements)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
instanceRequirements
- The attributes for the instance types.
When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
If you specify InstanceRequirements
, you can't specify InstanceTypes
.
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceRequirements(CfnLaunchTemplate.InstanceRequirementsProperty instanceRequirements)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
instanceRequirements
- The attributes for the instance types.
When you specify instance attributes, Amazon EC2 will identify instance types with these attributes.
If you specify InstanceRequirements
, you can't specify InstanceTypes
.
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceType(java.lang.String instanceType)
CfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceType()
instanceType
- The instance type. For more information, see [Instance Types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the *Amazon Elastic Compute Cloud User Guide* .
If you specify InstanceTypes
, you can't specify InstanceRequirements
.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder kernelId(java.lang.String kernelId)
CfnLaunchTemplate.LaunchTemplateDataProperty.getKernelId()
kernelId
- The ID of the kernel.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon EC2 User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder keyName(java.lang.String keyName)
CfnLaunchTemplate.LaunchTemplateDataProperty.getKeyName()
keyName
- The name of the key pair. You can create a key pair using [CreateKeyPair](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html) or [ImportKeyPair](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html) .
If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder licenseSpecifications(IResolvable licenseSpecifications)
CfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
licenseSpecifications
- The license configurations.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder licenseSpecifications(java.util.List<? extends java.lang.Object> licenseSpecifications)
CfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
licenseSpecifications
- The license configurations.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder maintenanceOptions(IResolvable maintenanceOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
maintenanceOptions
- `CfnLaunchTemplate.LaunchTemplateDataProperty.MaintenanceOptions`.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder maintenanceOptions(CfnLaunchTemplate.MaintenanceOptionsProperty maintenanceOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
maintenanceOptions
- `CfnLaunchTemplate.LaunchTemplateDataProperty.MaintenanceOptions`.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder metadataOptions(IResolvable metadataOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
metadataOptions
- The metadata options for the instance.
For more information, see Instance Metadata and User Data in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder metadataOptions(CfnLaunchTemplate.MetadataOptionsProperty metadataOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
metadataOptions
- The metadata options for the instance.
For more information, see Instance Metadata and User Data in the Amazon Elastic Compute Cloud User Guide .this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder monitoring(IResolvable monitoring)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
monitoring
- The monitoring for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder monitoring(CfnLaunchTemplate.MonitoringProperty monitoring)
CfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
monitoring
- The monitoring for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder networkInterfaces(IResolvable networkInterfaces)
CfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
networkInterfaces
- One or more network interfaces.
If you specify a network interface, you must specify any security groups and subnets as part of the network interface.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder networkInterfaces(java.util.List<? extends java.lang.Object> networkInterfaces)
CfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
networkInterfaces
- One or more network interfaces.
If you specify a network interface, you must specify any security groups and subnets as part of the network interface.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder placement(IResolvable placement)
CfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
placement
- The placement for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder placement(CfnLaunchTemplate.PlacementProperty placement)
CfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
placement
- The placement for the instance.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder privateDnsNameOptions(IResolvable privateDnsNameOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
privateDnsNameOptions
- The options for the instance hostname.
The default values are inherited from the subnet.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder privateDnsNameOptions(CfnLaunchTemplate.PrivateDnsNameOptionsProperty privateDnsNameOptions)
CfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
privateDnsNameOptions
- The options for the instance hostname.
The default values are inherited from the subnet.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ramDiskId(java.lang.String ramDiskId)
CfnLaunchTemplate.LaunchTemplateDataProperty.getRamDiskId()
ramDiskId
- The ID of the RAM disk.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels in the Amazon Elastic Compute Cloud User Guide .
this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder securityGroupIds(java.util.List<java.lang.String> securityGroupIds)
CfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroupIds()
securityGroupIds
- One or more security group IDs.
You can create a security group using CreateSecurityGroup . You cannot specify both a security group ID and security name in the same request.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder securityGroups(java.util.List<java.lang.String> securityGroups)
CfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroups()
securityGroups
- [EC2-Classic, default VPC] One or more security group names.
For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder tagSpecifications(IResolvable tagSpecifications)
CfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
tagSpecifications
- The tags to apply to the resources during launch.
You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder tagSpecifications(java.util.List<? extends java.lang.Object> tagSpecifications)
CfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
tagSpecifications
- The tags to apply to the resources during launch.
You can only tag instances and volumes on launch. The specified tags are applied to all instances or volumes that are created during launch.this
public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder userData(java.lang.String userData)
CfnLaunchTemplate.LaunchTemplateDataProperty.getUserData()
userData
- The user data to make available to the instance.
You must provide base64-encoded text. User data is limited to 16 KB. For more information, see Running Commands on Your Linux Instance at Launch (Linux) or Adding User Data (Windows).
If you are creating the launch template for use with AWS Batch , the user data must be provided in the MIME multi-part archive format . For more information, see Amazon EC2 user data in launch templates in the AWS Batch User Guide .
this
public CfnLaunchTemplate.LaunchTemplateDataProperty build()
CfnLaunchTemplate.LaunchTemplateDataProperty
java.lang.NullPointerException
- if any required attribute was not provided