Class CfnLaunchTemplate.LaunchTemplateDataProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnLaunchTemplate.LaunchTemplateDataProperty>
- Enclosing interface:
CfnLaunchTemplate.LaunchTemplateDataProperty
CfnLaunchTemplate.LaunchTemplateDataProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionblockDeviceMappings
(List<? extends Object> blockDeviceMappings) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
blockDeviceMappings
(IResolvable blockDeviceMappings) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
build()
Builds the configured instance.capacityReservationSpecification
(IResolvable capacityReservationSpecification) capacityReservationSpecification
(CfnLaunchTemplate.CapacityReservationSpecificationProperty capacityReservationSpecification) cpuOptions
(IResolvable cpuOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
cpuOptions
(CfnLaunchTemplate.CpuOptionsProperty cpuOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
creditSpecification
(IResolvable creditSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
creditSpecification
(CfnLaunchTemplate.CreditSpecificationProperty creditSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
disableApiStop
(Boolean disableApiStop) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiStop()
disableApiStop
(IResolvable disableApiStop) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiStop()
disableApiTermination
(Boolean disableApiTermination) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
disableApiTermination
(IResolvable disableApiTermination) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
ebsOptimized
(Boolean ebsOptimized) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
ebsOptimized
(IResolvable ebsOptimized) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
elasticGpuSpecifications
(List<? extends Object> elasticGpuSpecifications) elasticGpuSpecifications
(IResolvable elasticGpuSpecifications) elasticInferenceAccelerators
(List<? extends Object> elasticInferenceAccelerators) elasticInferenceAccelerators
(IResolvable elasticInferenceAccelerators) enclaveOptions
(IResolvable enclaveOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
enclaveOptions
(CfnLaunchTemplate.EnclaveOptionsProperty enclaveOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
hibernationOptions
(IResolvable hibernationOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
hibernationOptions
(CfnLaunchTemplate.HibernationOptionsProperty hibernationOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
iamInstanceProfile
(IResolvable iamInstanceProfile) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
iamInstanceProfile
(CfnLaunchTemplate.IamInstanceProfileProperty iamInstanceProfile) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getImageId()
instanceInitiatedShutdownBehavior
(String instanceInitiatedShutdownBehavior) instanceMarketOptions
(IResolvable instanceMarketOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
instanceMarketOptions
(CfnLaunchTemplate.InstanceMarketOptionsProperty instanceMarketOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
instanceRequirements
(IResolvable instanceRequirements) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
instanceRequirements
(CfnLaunchTemplate.InstanceRequirementsProperty instanceRequirements) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
instanceType
(String instanceType) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceType()
Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getKernelId()
Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getKeyName()
licenseSpecifications
(List<? extends Object> licenseSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
licenseSpecifications
(IResolvable licenseSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
maintenanceOptions
(IResolvable maintenanceOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
maintenanceOptions
(CfnLaunchTemplate.MaintenanceOptionsProperty maintenanceOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
metadataOptions
(IResolvable metadataOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
metadataOptions
(CfnLaunchTemplate.MetadataOptionsProperty metadataOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
monitoring
(IResolvable monitoring) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
monitoring
(CfnLaunchTemplate.MonitoringProperty monitoring) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
networkInterfaces
(List<? extends Object> networkInterfaces) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
networkInterfaces
(IResolvable networkInterfaces) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
placement
(IResolvable placement) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
placement
(CfnLaunchTemplate.PlacementProperty placement) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
privateDnsNameOptions
(IResolvable privateDnsNameOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
privateDnsNameOptions
(CfnLaunchTemplate.PrivateDnsNameOptionsProperty privateDnsNameOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getRamDiskId()
securityGroupIds
(List<String> securityGroupIds) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroupIds()
securityGroups
(List<String> securityGroups) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroups()
tagSpecifications
(List<? extends Object> tagSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
tagSpecifications
(IResolvable tagSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getUserData()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
blockDeviceMappings
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder blockDeviceMappings(IResolvable blockDeviceMappings) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
this
-
blockDeviceMappings
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder blockDeviceMappings(List<? extends Object> blockDeviceMappings) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getBlockDeviceMappings()
- Parameters:
blockDeviceMappings
- The block device mapping.- Returns:
this
-
capacityReservationSpecification
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder capacityReservationSpecification(IResolvable capacityReservationSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCapacityReservationSpecification()
- Parameters:
capacityReservationSpecification
- The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults toopen
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).- Returns:
this
-
capacityReservationSpecification
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder capacityReservationSpecification(CfnLaunchTemplate.CapacityReservationSpecificationProperty capacityReservationSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCapacityReservationSpecification()
- Parameters:
capacityReservationSpecification
- The Capacity Reservation targeting option. If you do not specify this parameter, the instance's Capacity Reservation preference defaults toopen
, which enables it to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone).- Returns:
this
-
cpuOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder cpuOptions(IResolvable cpuOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
- Parameters:
cpuOptions
- The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
cpuOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder cpuOptions(CfnLaunchTemplate.CpuOptionsProperty cpuOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCpuOptions()
- Parameters:
cpuOptions
- The CPU options for the instance. For more information, see Optimizing CPU Options in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
creditSpecification
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder creditSpecification(IResolvable creditSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
- Parameters:
creditSpecification
- The credit option for CPU usage of the instance. Valid only for T instances.- Returns:
this
-
creditSpecification
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder creditSpecification(CfnLaunchTemplate.CreditSpecificationProperty creditSpecification) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getCreditSpecification()
- Parameters:
creditSpecification
- The credit option for CPU usage of the instance. Valid only for T instances.- Returns:
this
-
disableApiStop
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiStop(Boolean disableApiStop) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiStop()
- Parameters:
disableApiStop
- Indicates whether to enable the instance for stop protection. For more information, see Stop protection in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
disableApiStop
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiStop(IResolvable disableApiStop) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiStop()
- Parameters:
disableApiStop
- Indicates whether to enable the instance for stop protection. For more information, see Stop protection in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
disableApiTermination
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiTermination(Boolean disableApiTermination) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
- Parameters:
disableApiTermination
- If you set this parameter totrue
, 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 setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.- Returns:
this
-
disableApiTermination
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder disableApiTermination(IResolvable disableApiTermination) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getDisableApiTermination()
- Parameters:
disableApiTermination
- If you set this parameter totrue
, 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 setInstanceInitiatedShutdownBehavior
toterminate
, you can terminate the instance by running the shutdown command from the instance.- Returns:
this
-
ebsOptimized
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ebsOptimized(Boolean ebsOptimized) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
- Parameters:
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.- Returns:
this
-
ebsOptimized
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ebsOptimized(IResolvable ebsOptimized) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEbsOptimized()
- Parameters:
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.- Returns:
this
-
elasticGpuSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticGpuSpecifications(IResolvable elasticGpuSpecifications) - Parameters:
elasticGpuSpecifications
- An elastic GPU to associate with the instance.- Returns:
this
-
elasticGpuSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticGpuSpecifications(List<? extends Object> elasticGpuSpecifications) - Parameters:
elasticGpuSpecifications
- An elastic GPU to associate with the instance.- Returns:
this
-
elasticInferenceAccelerators
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticInferenceAccelerators(IResolvable elasticInferenceAccelerators) - Parameters:
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.- Returns:
this
-
elasticInferenceAccelerators
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder elasticInferenceAccelerators(List<? extends Object> elasticInferenceAccelerators) - Parameters:
elasticInferenceAccelerators
- The elastic inference accelerator for the instance.- Returns:
this
-
enclaveOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder enclaveOptions(IResolvable enclaveOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
- Parameters:
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.
- Returns:
this
-
enclaveOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder enclaveOptions(CfnLaunchTemplate.EnclaveOptionsProperty enclaveOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getEnclaveOptions()
- Parameters:
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.
- Returns:
this
-
hibernationOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder hibernationOptions(IResolvable hibernationOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
- Parameters:
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 .- Returns:
this
-
hibernationOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder hibernationOptions(CfnLaunchTemplate.HibernationOptionsProperty hibernationOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getHibernationOptions()
- Parameters:
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 .- Returns:
this
-
iamInstanceProfile
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder iamInstanceProfile(IResolvable iamInstanceProfile) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
- Parameters:
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.- Returns:
this
-
iamInstanceProfile
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder iamInstanceProfile(CfnLaunchTemplate.IamInstanceProfileProperty iamInstanceProfile) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getIamInstanceProfile()
- Parameters:
iamInstanceProfile
- The name or Amazon Resource Name (ARN) of an IAM instance profile.- Returns:
this
-
imageId
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder imageId(String imageId) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getImageId()
- Parameters:
imageId
- The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, which will resolve to an AMI ID on launch.Valid formats:
ami-17characters00000
resolve:ssm:parameter-name
resolve:ssm:parameter-name:version-number
resolve:ssm:parameter-name:label
For more information, see Use a Systems Manager parameter to find an AMI in the Amazon Elastic Compute Cloud User Guide .
- Returns:
this
-
instanceInitiatedShutdownBehavior
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceInitiatedShutdownBehavior()
- Parameters:
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
- Returns:
this
-
instanceMarketOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceMarketOptions(IResolvable instanceMarketOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
- Parameters:
instanceMarketOptions
- The market (purchasing) option for the instances.- Returns:
this
-
instanceMarketOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceMarketOptions(CfnLaunchTemplate.InstanceMarketOptionsProperty instanceMarketOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceMarketOptions()
- Parameters:
instanceMarketOptions
- The market (purchasing) option for the instances.- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceRequirements(IResolvable instanceRequirements) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
- Parameters:
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 specifyInstanceType
.- Returns:
this
-
instanceRequirements
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceRequirements(CfnLaunchTemplate.InstanceRequirementsProperty instanceRequirements) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceRequirements()
- Parameters:
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 specifyInstanceType
.- Returns:
this
-
instanceType
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder instanceType(String instanceType) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getInstanceType()
- Parameters:
instanceType
- The instance type. For more information, see Instance types in the Amazon Elastic Compute Cloud User Guide . If you specifyInstanceType
, you can't specifyInstanceRequirements
.- Returns:
this
-
kernelId
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder kernelId(String kernelId) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getKernelId()
- Parameters:
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 .- Returns:
this
-
keyName
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder keyName(String keyName) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getKeyName()
- Parameters:
keyName
- The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair .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.
- Returns:
this
-
licenseSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder licenseSpecifications(IResolvable licenseSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
- Parameters:
licenseSpecifications
- The license configurations.- Returns:
this
-
licenseSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder licenseSpecifications(List<? extends Object> licenseSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getLicenseSpecifications()
- Parameters:
licenseSpecifications
- The license configurations.- Returns:
this
-
maintenanceOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder maintenanceOptions(IResolvable maintenanceOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
- Parameters:
maintenanceOptions
- The maintenance options of your instance.- Returns:
this
-
maintenanceOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder maintenanceOptions(CfnLaunchTemplate.MaintenanceOptionsProperty maintenanceOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMaintenanceOptions()
- Parameters:
maintenanceOptions
- The maintenance options of your instance.- Returns:
this
-
metadataOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder metadataOptions(IResolvable metadataOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
- Parameters:
metadataOptions
- The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
metadataOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder metadataOptions(CfnLaunchTemplate.MetadataOptionsProperty metadataOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMetadataOptions()
- Parameters:
metadataOptions
- The metadata options for the instance. For more information, see Instance metadata and user data in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
monitoring
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder monitoring(IResolvable monitoring) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
- Parameters:
monitoring
- The monitoring for the instance.- Returns:
this
-
monitoring
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder monitoring(CfnLaunchTemplate.MonitoringProperty monitoring) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getMonitoring()
- Parameters:
monitoring
- The monitoring for the instance.- Returns:
this
-
networkInterfaces
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder networkInterfaces(IResolvable networkInterfaces) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
- Parameters:
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.- Returns:
this
-
networkInterfaces
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder networkInterfaces(List<? extends Object> networkInterfaces) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getNetworkInterfaces()
- Parameters:
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.- Returns:
this
-
placement
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder placement(IResolvable placement) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
- Parameters:
placement
- The placement for the instance.- Returns:
this
-
placement
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder placement(CfnLaunchTemplate.PlacementProperty placement) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPlacement()
- Parameters:
placement
- The placement for the instance.- Returns:
this
-
privateDnsNameOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder privateDnsNameOptions(IResolvable privateDnsNameOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
- Parameters:
privateDnsNameOptions
- The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries should be handled. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
privateDnsNameOptions
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder privateDnsNameOptions(CfnLaunchTemplate.PrivateDnsNameOptionsProperty privateDnsNameOptions) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getPrivateDnsNameOptions()
- Parameters:
privateDnsNameOptions
- The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries should be handled. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .- Returns:
this
-
ramDiskId
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder ramDiskId(String ramDiskId) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getRamDiskId()
- Parameters:
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 .
- Returns:
this
-
securityGroupIds
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder securityGroupIds(List<String> securityGroupIds) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroupIds()
- Parameters:
securityGroupIds
- The IDs of the security groups. You can specify the IDs of existing security groups and references to resources created by the stack template.- Returns:
this
-
securityGroups
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder securityGroups(List<String> securityGroups) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getSecurityGroups()
- Parameters:
securityGroups
- 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.- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder tagSpecifications(IResolvable tagSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
- Parameters:
tagSpecifications
- The tags to apply to the resources that are created during instance launch. You can specify tags for the following resources only:- Instances
- Volumes
- Elastic graphics
- Spot Instance requests
- Network interfaces
To tag a resource after it has been created, see CreateTags .
To tag the launch template itself, you must use the TagSpecification parameter.
- Returns:
this
-
tagSpecifications
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder tagSpecifications(List<? extends Object> tagSpecifications) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getTagSpecifications()
- Parameters:
tagSpecifications
- The tags to apply to the resources that are created during instance launch. You can specify tags for the following resources only:- Instances
- Volumes
- Elastic graphics
- Spot Instance requests
- Network interfaces
To tag a resource after it has been created, see CreateTags .
To tag the launch template itself, you must use the TagSpecification parameter.
- Returns:
this
-
userData
@Stability(Stable) public CfnLaunchTemplate.LaunchTemplateDataProperty.Builder userData(String userData) Sets the value ofCfnLaunchTemplate.LaunchTemplateDataProperty.getUserData()
- Parameters:
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 Run commands on your Linux instance at launch (Linux) or Work with instance user data (Windows) in the Amazon Elastic Compute Cloud User Guide .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 .
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnLaunchTemplate.LaunchTemplateDataProperty>
- Returns:
- a new instance of
CfnLaunchTemplate.LaunchTemplateDataProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-