@Stability(value=Stable) public static final class CfnInstance.Builder extends Object implements software.amazon.jsii.Builder<CfnInstance>
CfnInstance.| Modifier and Type | Method and Description |
|---|---|
CfnInstance.Builder |
additionalInfo(String additionalInfo)
This property is reserved for internal use.
|
CfnInstance.Builder |
affinity(String affinity)
Indicates whether the instance is associated with a dedicated host.
|
CfnInstance.Builder |
availabilityZone(String availabilityZone)
The Availability Zone of the instance.
|
CfnInstance.Builder |
blockDeviceMappings(IResolvable blockDeviceMappings)
The block device mapping entries that defines the block devices to attach to the instance at launch.
|
CfnInstance.Builder |
blockDeviceMappings(List<? extends Object> blockDeviceMappings)
The block device mapping entries that defines the block devices to attach to the instance at launch.
|
CfnInstance |
build() |
CfnInstance.Builder |
cpuOptions(CfnInstance.CpuOptionsProperty cpuOptions)
The CPU options for the instance.
|
CfnInstance.Builder |
cpuOptions(IResolvable cpuOptions)
The CPU options for the instance.
|
static CfnInstance.Builder |
create(software.constructs.Construct scope,
String id) |
CfnInstance.Builder |
creditSpecification(CfnInstance.CreditSpecificationProperty creditSpecification)
The credit option for CPU usage of the burstable performance instance.
|
CfnInstance.Builder |
creditSpecification(IResolvable creditSpecification)
The credit option for CPU usage of the burstable performance instance.
|
CfnInstance.Builder |
disableApiTermination(Boolean disableApiTermination)
If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;
|
CfnInstance.Builder |
disableApiTermination(IResolvable disableApiTermination)
If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;
|
CfnInstance.Builder |
ebsOptimized(Boolean ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O.
|
CfnInstance.Builder |
ebsOptimized(IResolvable ebsOptimized)
Indicates whether the instance is optimized for Amazon EBS I/O.
|
CfnInstance.Builder |
elasticGpuSpecifications(IResolvable elasticGpuSpecifications)
An elastic GPU to associate with the instance.
|
CfnInstance.Builder |
elasticGpuSpecifications(List<? extends Object> elasticGpuSpecifications)
An elastic GPU to associate with the instance.
|
CfnInstance.Builder |
elasticInferenceAccelerators(IResolvable elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
CfnInstance.Builder |
elasticInferenceAccelerators(List<? extends Object> elasticInferenceAccelerators)
An elastic inference accelerator to associate with the instance.
|
CfnInstance.Builder |
enclaveOptions(CfnInstance.EnclaveOptionsProperty enclaveOptions)
Indicates whether the instance is enabled for AWS Nitro Enclaves.
|
CfnInstance.Builder |
enclaveOptions(IResolvable enclaveOptions)
Indicates whether the instance is enabled for AWS Nitro Enclaves.
|
CfnInstance.Builder |
hibernationOptions(CfnInstance.HibernationOptionsProperty hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
CfnInstance.Builder |
hibernationOptions(IResolvable hibernationOptions)
Indicates whether an instance is enabled for hibernation.
|
CfnInstance.Builder |
hostId(String hostId)
If you specify host for the `Affinity` property, the ID of a dedicated host that the instance is associated with.
|
CfnInstance.Builder |
hostResourceGroupArn(String hostResourceGroupArn)
The ARN of the host resource group in which to launch the instances.
|
CfnInstance.Builder |
iamInstanceProfile(String iamInstanceProfile)
The name of an IAM instance profile.
|
CfnInstance.Builder |
imageId(String imageId)
The ID of the AMI.
|
CfnInstance.Builder |
instanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).
|
CfnInstance.Builder |
instanceType(String instanceType)
The instance type.
|
CfnInstance.Builder |
ipv6AddressCount(Number ipv6AddressCount)
[EC2-VPC] The number of IPv6 addresses to associate with the primary network interface.
|
CfnInstance.Builder |
ipv6Addresses(IResolvable ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
CfnInstance.Builder |
ipv6Addresses(List<? extends Object> ipv6Addresses)
[EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface.
|
CfnInstance.Builder |
kernelId(String kernelId)
The ID of the kernel.
|
CfnInstance.Builder |
keyName(String keyName)
The name of the key pair.
|
CfnInstance.Builder |
launchTemplate(CfnInstance.LaunchTemplateSpecificationProperty launchTemplate)
The launch template to use to launch the instances.
|
CfnInstance.Builder |
launchTemplate(IResolvable launchTemplate)
The launch template to use to launch the instances.
|
CfnInstance.Builder |
licenseSpecifications(IResolvable licenseSpecifications)
The license configurations.
|
CfnInstance.Builder |
licenseSpecifications(List<? extends Object> licenseSpecifications)
The license configurations.
|
CfnInstance.Builder |
monitoring(Boolean monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
CfnInstance.Builder |
monitoring(IResolvable monitoring)
Specifies whether detailed monitoring is enabled for the instance.
|
CfnInstance.Builder |
networkInterfaces(IResolvable networkInterfaces)
The network interfaces to associate with the instance.
|
CfnInstance.Builder |
networkInterfaces(List<? extends Object> networkInterfaces)
The network interfaces to associate with the instance.
|
CfnInstance.Builder |
placementGroupName(String placementGroupName)
The name of an existing placement group that you want to launch the instance into (cluster | partition | spread).
|
CfnInstance.Builder |
privateDnsNameOptions(CfnInstance.PrivateDnsNameOptionsProperty privateDnsNameOptions)
The options for the instance hostname.
|
CfnInstance.Builder |
privateDnsNameOptions(IResolvable privateDnsNameOptions)
The options for the instance hostname.
|
CfnInstance.Builder |
privateIpAddress(String privateIpAddress)
[EC2-VPC] The primary IPv4 address.
|
CfnInstance.Builder |
propagateTagsToVolumeOnCreation(Boolean propagateTagsToVolumeOnCreation)
Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch.
|
CfnInstance.Builder |
propagateTagsToVolumeOnCreation(IResolvable propagateTagsToVolumeOnCreation)
Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch.
|
CfnInstance.Builder |
ramdiskId(String ramdiskId)
The ID of the RAM disk to select.
|
CfnInstance.Builder |
securityGroupIds(List<String> securityGroupIds)
The IDs of the security groups.
|
CfnInstance.Builder |
securityGroups(List<String> securityGroups)
[EC2-Classic, default VPC] The names of the security groups.
|
CfnInstance.Builder |
sourceDestCheck(Boolean sourceDestCheck)
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
|
CfnInstance.Builder |
sourceDestCheck(IResolvable sourceDestCheck)
Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives.
|
CfnInstance.Builder |
ssmAssociations(IResolvable ssmAssociations)
The SSM [document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html) and parameter values in AWS Systems Manager to associate with this instance.
|
CfnInstance.Builder |
ssmAssociations(List<? extends Object> ssmAssociations)
The SSM [document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html) and parameter values in AWS Systems Manager to associate with this instance.
|
CfnInstance.Builder |
subnetId(String subnetId)
[EC2-VPC] The ID of the subnet to launch the instance into.
|
CfnInstance.Builder |
tags(List<? extends CfnTag> tags)
The tags to add to the instance.
|
CfnInstance.Builder |
tenancy(String tenancy)
The tenancy of the instance (if the instance is running in a VPC).
|
CfnInstance.Builder |
userData(String userData)
The user data script to make available to the instance.
|
CfnInstance.Builder |
volumes(IResolvable volumes)
The volumes to attach to the instance.
|
CfnInstance.Builder |
volumes(List<? extends Object> volumes)
The volumes to attach to the instance.
|
@Stability(value=Stable) public static CfnInstance.Builder create(software.constructs.Construct scope, String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.CfnInstance.AssociationParameterProperty.Builder.@Stability(value=Stable) public CfnInstance.Builder additionalInfo(String additionalInfo)
If you use it, the stack fails with this error: Bad property set: [Testing this property] (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterCombination; Request ID: 0XXXXXX-49c7-4b40-8bcc-76885dcXXXXX) .
additionalInfo - This property is reserved for internal use. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder affinity(String affinity)
If you want the instance to always restart on the same host on which it was launched, specify host . If you want the instance to restart on any available host, but try to launch onto the last host it ran on (on a best-effort basis), specify default .
affinity - Indicates whether the instance is associated with a dedicated host. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder availabilityZone(String availabilityZone)
If not specified, an Availability Zone will be automatically chosen for you based on the load balancing criteria for the Region.
This parameter is not supported by DescribeImageAttribute .
availabilityZone - The Availability Zone of the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder blockDeviceMappings(IResolvable blockDeviceMappings)
By default, the block devices specified in the block device mapping for the AMI are used. You can override the AMI block device mapping using the instance block device mapping. For the root volume, you can override only the volume size, volume type, volume encryption settings, and the DeleteOnTermination setting.
After the instance is running, you can modify only the
DeleteOnTerminationparameter for the attached volumes without interrupting the instance. Modifying any other parameter results in instance replacement .
blockDeviceMappings - The block device mapping entries that defines the block devices to attach to the instance at launch. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder blockDeviceMappings(List<? extends Object> blockDeviceMappings)
By default, the block devices specified in the block device mapping for the AMI are used. You can override the AMI block device mapping using the instance block device mapping. For the root volume, you can override only the volume size, volume type, volume encryption settings, and the DeleteOnTermination setting.
After the instance is running, you can modify only the
DeleteOnTerminationparameter for the attached volumes without interrupting the instance. Modifying any other parameter results in instance replacement .
blockDeviceMappings - The block device mapping entries that defines the block devices to attach to the instance at launch. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder cpuOptions(CfnInstance.CpuOptionsProperty cpuOptions)
For more information, see Optimize CPU options in the Amazon Elastic Compute Cloud User Guide .
cpuOptions - The CPU options for the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder cpuOptions(IResolvable cpuOptions)
For more information, see Optimize CPU options in the Amazon Elastic Compute Cloud User Guide .
cpuOptions - The CPU options for the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder creditSpecification(CfnInstance.CreditSpecificationProperty creditSpecification)
Valid values are standard and unlimited . To change this attribute after launch, use ModifyInstanceCreditSpecification . For more information, see Burstable performance instances in the Amazon EC2 User Guide .
Default: standard (T2 instances) or unlimited (T3/T3a instances)
For T3 instances with host tenancy, only standard is supported.
creditSpecification - The credit option for CPU usage of the burstable performance instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder creditSpecification(IResolvable creditSpecification)
Valid values are standard and unlimited . To change this attribute after launch, use ModifyInstanceCreditSpecification . For more information, see Burstable performance instances in the Amazon EC2 User Guide .
Default: standard (T2 instances) or unlimited (T3/T3a instances)
For T3 instances with host tenancy, only standard is supported.
creditSpecification - The credit option for CPU usage of the burstable performance instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder disableApiTermination(Boolean disableApiTermination)
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.
Default: false
disableApiTermination - If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder disableApiTermination(IResolvable disableApiTermination)
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.
Default: false
disableApiTermination - If you set this parameter to `true` , you can't terminate the instance using the Amazon EC2 console, CLI, or API;. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ebsOptimized(Boolean ebsOptimized)
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.
Default: false
ebsOptimized - Indicates whether the instance is optimized for Amazon EBS I/O. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ebsOptimized(IResolvable ebsOptimized)
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.
Default: false
ebsOptimized - Indicates whether the instance is optimized for Amazon EBS I/O. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder elasticGpuSpecifications(IResolvable elasticGpuSpecifications)
An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide .
elasticGpuSpecifications - An elastic GPU to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder elasticGpuSpecifications(List<? extends Object> elasticGpuSpecifications)
An Elastic GPU is a GPU resource that you can attach to your Windows instance to accelerate the graphics performance of your applications. For more information, see Amazon EC2 Elastic GPUs in the Amazon EC2 User Guide .
elasticGpuSpecifications - An elastic GPU to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder elasticInferenceAccelerators(IResolvable elasticInferenceAccelerators)
Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
elasticInferenceAccelerators - An elastic inference accelerator to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder elasticInferenceAccelerators(List<? extends Object> elasticInferenceAccelerators)
Elastic inference accelerators are a resource you can attach to your Amazon EC2 instances to accelerate your Deep Learning (DL) inference workloads.
You cannot specify accelerators from different generations in the same request.
elasticInferenceAccelerators - An elastic inference accelerator to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder enclaveOptions(CfnInstance.EnclaveOptionsProperty enclaveOptions)
enclaveOptions - Indicates whether the instance is enabled for AWS Nitro Enclaves. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder enclaveOptions(IResolvable enclaveOptions)
enclaveOptions - Indicates whether the instance is enabled for AWS Nitro Enclaves. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder hibernationOptions(CfnInstance.HibernationOptionsProperty hibernationOptions)
For more information, see Hibernate your instance in the Amazon EC2 User Guide .
You can't enable hibernation and AWS Nitro Enclaves on the same instance.
hibernationOptions - Indicates whether an instance is enabled for hibernation. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder hibernationOptions(IResolvable hibernationOptions)
For more information, see Hibernate your instance in the Amazon EC2 User Guide .
You can't enable hibernation and AWS Nitro Enclaves on the same instance.
hibernationOptions - Indicates whether an instance is enabled for hibernation. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder hostId(String hostId)
If you don't specify an ID, Amazon EC2 launches the instance onto any available, compatible dedicated host in your account. This type of launch is called an untargeted launch. Note that for untargeted launches, you must have a compatible, dedicated host available to successfully launch instances.
hostId - If you specify host for the `Affinity` property, the ID of a dedicated host that the instance is associated with. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder hostResourceGroupArn(String hostResourceGroupArn)
If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .
hostResourceGroupArn - The ARN of the host resource group in which to launch the instances. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder iamInstanceProfile(String iamInstanceProfile)
To create a new IAM instance profile, use the AWS::IAM::InstanceProfile resource.
iamInstanceProfile - The name of an IAM instance profile. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder imageId(String imageId)
An AMI ID is required to launch an instance and must be specified here or in a launch template.
imageId - The ID of the AMI. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder instanceInitiatedShutdownBehavior(String instanceInitiatedShutdownBehavior)
Default: stop
instanceInitiatedShutdownBehavior - Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown). This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder instanceType(String instanceType)
Default: m1.small
instanceType - The instance type. For more information, see [Instance types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the *Amazon EC2 User Guide* . This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ipv6AddressCount(Number ipv6AddressCount)
Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot specify this option and the option to assign specific IPv6 addresses in the same request. You can specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6AddressCount - [EC2-VPC] The number of IPv6 addresses to associate with the primary network interface. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ipv6Addresses(IResolvable ipv6Addresses)
You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses - [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ipv6Addresses(List<? extends Object> ipv6Addresses)
You cannot specify this option and the option to assign a number of IPv6 addresses in the same request. You cannot specify this option if you've specified a minimum number of instances to launch.
You cannot specify this option and the network interfaces option in the same request.
ipv6Addresses - [EC2-VPC] The IPv6 addresses from the range of the subnet to associate with the primary network interface. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder kernelId(String kernelId)
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide .
kernelId - The ID of the kernel. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder keyName(String keyName)
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.
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) . This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder launchTemplate(CfnInstance.LaunchTemplateSpecificationProperty launchTemplate)
Any parameters that you specify in the AWS CloudFormation template override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
launchTemplate - The launch template to use to launch the instances. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder launchTemplate(IResolvable launchTemplate)
Any parameters that you specify in the AWS CloudFormation template override the same parameters in the launch template. You can specify either the name or ID of a launch template, but not both.
launchTemplate - The launch template to use to launch the instances. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder licenseSpecifications(IResolvable licenseSpecifications)
licenseSpecifications - The license configurations. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder licenseSpecifications(List<? extends Object> licenseSpecifications)
licenseSpecifications - The license configurations. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder monitoring(Boolean monitoring)
Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled. For more information about detailed monitoring, see Enable or turn off detailed monitoring for your instances in the Amazon EC2 User Guide .
monitoring - Specifies whether detailed monitoring is enabled for the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder monitoring(IResolvable monitoring)
Specify true to enable detailed monitoring. Otherwise, basic monitoring is enabled. For more information about detailed monitoring, see Enable or turn off detailed monitoring for your instances in the Amazon EC2 User Guide .
monitoring - Specifies whether detailed monitoring is enabled for the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder networkInterfaces(IResolvable networkInterfaces)
If you use this property to point to a network interface, you must terminate the original interface before attaching a new one to allow the update of the instance to succeed.
If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn Attribute to declare a dependency on the VPC-gateway attachment.
networkInterfaces - The network interfaces to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder networkInterfaces(List<? extends Object> networkInterfaces)
If you use this property to point to a network interface, you must terminate the original interface before attaching a new one to allow the update of the instance to succeed.
If this resource has a public IP address and is also in a VPC that is defined in the same template, you must use the DependsOn Attribute to declare a dependency on the VPC-gateway attachment.
networkInterfaces - The network interfaces to associate with the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder placementGroupName(String placementGroupName)
placementGroupName - The name of an existing placement group that you want to launch the instance into (cluster | partition | spread). This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder privateDnsNameOptions(CfnInstance.PrivateDnsNameOptionsProperty privateDnsNameOptions)
privateDnsNameOptions - The options for the instance hostname. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder privateDnsNameOptions(IResolvable privateDnsNameOptions)
privateDnsNameOptions - The options for the instance hostname. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder privateIpAddress(String privateIpAddress)
Only one private IP address can be designated as primary. You can't specify this option if you've specified the option to designate a private IP address as the primary IP address in a network interface specification. You cannot specify this option if you're launching more than one instance in the request.
You cannot specify this option and the network interfaces option in the same request.
If you make an update to an instance that requires replacement, you must assign a new private IP address. During a replacement, AWS CloudFormation creates a new instance but doesn't delete the old instance until the stack has successfully updated. If the stack update fails, AWS CloudFormation uses the old instance to roll back the stack to the previous working state. The old and new instances cannot have the same private IP address.
privateIpAddress - [EC2-VPC] The primary IPv4 address. You must specify a value from the IPv4 address range of the subnet. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder propagateTagsToVolumeOnCreation(Boolean propagateTagsToVolumeOnCreation)
If you specify true and you assign tags to the instance, those tags are automatically assigned to all of the volumes that you attach to the instance at launch. If you specify false , those tags are not assigned to the attached volumes.
propagateTagsToVolumeOnCreation - Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder propagateTagsToVolumeOnCreation(IResolvable propagateTagsToVolumeOnCreation)
If you specify true and you assign tags to the instance, those tags are automatically assigned to all of the volumes that you attach to the instance at launch. If you specify false , those tags are not assigned to the attached volumes.
propagateTagsToVolumeOnCreation - Indicates whether to assign the tags from the instance to all of the volumes attached to the instance at launch. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ramdiskId(String ramdiskId)
Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, go to the AWS Resource Center and search for the kernel ID.
We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB in the Amazon EC2 User Guide .
ramdiskId - The ID of the RAM disk to select. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder securityGroupIds(List<String> securityGroupIds)
If you specify a network interface, you must specify any security groups as part of the network interface.
securityGroupIds - The IDs of the security groups. You can create a security group using [CreateSecurityGroup](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html) . This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder securityGroups(List<String> securityGroups)
For a nondefault VPC, you must use security group IDs instead.
You cannot specify this option and the network interfaces option in the same request. The list can contain both the name of existing Amazon EC2 security groups or references to AWS::EC2::SecurityGroup resources created in the template.
Default: Amazon EC2 uses the default security group.
securityGroups - [EC2-Classic, default VPC] The names of the security groups. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder sourceDestCheck(Boolean sourceDestCheck)
If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
sourceDestCheck - Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder sourceDestCheck(IResolvable sourceDestCheck)
If the value is true , source/destination checks are enabled; otherwise, they are disabled. The default value is true . You must disable source/destination checks if the instance runs services such as network address translation, routing, or firewalls.
sourceDestCheck - Enable or disable source/destination checks, which ensure that the instance is either the source or the destination of any traffic that it receives. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ssmAssociations(IResolvable ssmAssociations)
You can currently associate only one document with an instance.
ssmAssociations - The SSM [document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html) and parameter values in AWS Systems Manager to associate with this instance. To use this property, you must specify an IAM instance profile role for the instance. For more information, see [Create an Instance Profile for Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-configuring-access-role.html) in the *AWS Systems Manager User Guide* . This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder ssmAssociations(List<? extends Object> ssmAssociations)
You can currently associate only one document with an instance.
ssmAssociations - The SSM [document](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-document.html) and parameter values in AWS Systems Manager to associate with this instance. To use this property, you must specify an IAM instance profile role for the instance. For more information, see [Create an Instance Profile for Systems Manager](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-configuring-access-role.html) in the *AWS Systems Manager User Guide* . This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder subnetId(String subnetId)
If you specify a network interface, you must specify any subnets as part of the network interface.
subnetId - [EC2-VPC] The ID of the subnet to launch the instance into. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder tags(List<? extends CfnTag> tags)
These tags are not applied to the EBS volumes, such as the root volume.
tags - The tags to add to the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder tenancy(String tenancy)
An instance with a tenancy of dedicated runs on single-tenant hardware.
tenancy - The tenancy of the instance (if the instance is running in a VPC). This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder userData(String userData)
For more information, see Run commands on your Linux instance at launch and Run commands on your Windows instance at launch . If you are using a command line tool, base64-encoding is performed for you, and you can load the text from a file. Otherwise, you must provide base64-encoded text. User data is limited to 16 KB.
userData - The user data script to make available to the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder volumes(IResolvable volumes)
volumes - The volumes to attach to the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance.Builder volumes(List<? extends Object> volumes)
volumes - The volumes to attach to the instance. This parameter is required.this@Stability(value=Stable) public CfnInstance build()
build in interface software.amazon.jsii.Builder<CfnInstance>Copyright © 2022. All rights reserved.