CfnInstancePropsMixin
- class aws_cdk.mixins_preview.aws_ec2.mixins.CfnInstancePropsMixin(props, *, strategy=None)
Bases:
MixinSpecifies an EC2 instance.
If an Elastic IP address is attached to your instance, AWS CloudFormation reattaches the Elastic IP address after it updates the instance. For more information about updating stacks, see AWS CloudFormation Stacks Updates .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-instance.html
- CloudformationResource:
AWS::EC2::Instance
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins cfn_instance_props_mixin = ec2_mixins.CfnInstancePropsMixin(ec2_mixins.CfnInstanceMixinProps( additional_info="additionalInfo", affinity="affinity", availability_zone="availabilityZone", block_device_mappings=[ec2_mixins.CfnInstancePropsMixin.BlockDeviceMappingProperty( device_name="deviceName", ebs=ec2_mixins.CfnInstancePropsMixin.EbsProperty( delete_on_termination=False, encrypted=False, iops=123, kms_key_id="kmsKeyId", snapshot_id="snapshotId", volume_size=123, volume_type="volumeType" ), no_device=ec2_mixins.CfnInstancePropsMixin.NoDeviceProperty(), virtual_name="virtualName" )], cpu_options=ec2_mixins.CfnInstancePropsMixin.CpuOptionsProperty( core_count=123, threads_per_core=123 ), credit_specification=ec2_mixins.CfnInstancePropsMixin.CreditSpecificationProperty( cpu_credits="cpuCredits" ), disable_api_termination=False, ebs_optimized=False, elastic_gpu_specifications=[ec2_mixins.CfnInstancePropsMixin.ElasticGpuSpecificationProperty( type="type" )], elastic_inference_accelerators=[ec2_mixins.CfnInstancePropsMixin.ElasticInferenceAcceleratorProperty( count=123, type="type" )], enclave_options=ec2_mixins.CfnInstancePropsMixin.EnclaveOptionsProperty( enabled=False ), hibernation_options=ec2_mixins.CfnInstancePropsMixin.HibernationOptionsProperty( configured=False ), host_id="hostId", host_resource_group_arn="hostResourceGroupArn", iam_instance_profile="iamInstanceProfile", image_id="imageId", instance_initiated_shutdown_behavior="instanceInitiatedShutdownBehavior", instance_type="instanceType", ipv6_address_count=123, ipv6_addresses=[ec2_mixins.CfnInstancePropsMixin.InstanceIpv6AddressProperty( ipv6_address="ipv6Address" )], kernel_id="kernelId", key_name="keyName", launch_template=ec2_mixins.CfnInstancePropsMixin.LaunchTemplateSpecificationProperty( launch_template_id="launchTemplateId", launch_template_name="launchTemplateName", version="version" ), license_specifications=[ec2_mixins.CfnInstancePropsMixin.LicenseSpecificationProperty( license_configuration_arn="licenseConfigurationArn" )], metadata_options=ec2_mixins.CfnInstancePropsMixin.MetadataOptionsProperty( http_endpoint="httpEndpoint", http_protocol_ipv6="httpProtocolIpv6", http_put_response_hop_limit=123, http_tokens="httpTokens", instance_metadata_tags="instanceMetadataTags" ), monitoring=False, network_interfaces=[ec2_mixins.CfnInstancePropsMixin.NetworkInterfaceProperty( associate_carrier_ip_address=False, associate_public_ip_address=False, delete_on_termination=False, description="description", device_index="deviceIndex", ena_srd_specification=ec2_mixins.CfnInstancePropsMixin.EnaSrdSpecificationProperty( ena_srd_enabled=False, ena_srd_udp_specification=ec2_mixins.CfnInstancePropsMixin.EnaSrdUdpSpecificationProperty( ena_srd_udp_enabled=False ) ), group_set=["groupSet"], ipv6_address_count=123, ipv6_addresses=[ec2_mixins.CfnInstancePropsMixin.InstanceIpv6AddressProperty( ipv6_address="ipv6Address" )], network_interface_id="networkInterfaceId", private_ip_address="privateIpAddress", private_ip_addresses=[ec2_mixins.CfnInstancePropsMixin.PrivateIpAddressSpecificationProperty( primary=False, private_ip_address="privateIpAddress" )], secondary_private_ip_address_count=123, subnet_id="subnetId" )], placement_group_name="placementGroupName", private_dns_name_options=ec2_mixins.CfnInstancePropsMixin.PrivateDnsNameOptionsProperty( enable_resource_name_dns_aaaa_record=False, enable_resource_name_dns_aRecord=False, hostname_type="hostnameType" ), private_ip_address="privateIpAddress", propagate_tags_to_volume_on_creation=False, ramdisk_id="ramdiskId", security_group_ids=["securityGroupIds"], security_groups=["securityGroups"], source_dest_check=False, ssm_associations=[ec2_mixins.CfnInstancePropsMixin.SsmAssociationProperty( association_parameters=[ec2_mixins.CfnInstancePropsMixin.AssociationParameterProperty( key="key", value=["value"] )], document_name="documentName" )], subnet_id="subnetId", tags=[CfnTag( key="key", value="value" )], tenancy="tenancy", user_data="userData", volumes=[ec2_mixins.CfnInstancePropsMixin.VolumeProperty( device="device", volume_id="volumeId" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::EC2::Instance.- Parameters:
props (
Union[CfnInstanceMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['additionalInfo', 'affinity', 'availabilityZone', 'blockDeviceMappings', 'cpuOptions', 'creditSpecification', 'disableApiTermination', 'ebsOptimized', 'elasticGpuSpecifications', 'elasticInferenceAccelerators', 'enclaveOptions', 'hibernationOptions', 'hostId', 'hostResourceGroupArn', 'iamInstanceProfile', 'imageId', 'instanceInitiatedShutdownBehavior', 'instanceType', 'ipv6AddressCount', 'ipv6Addresses', 'kernelId', 'keyName', 'launchTemplate', 'licenseSpecifications', 'metadataOptions', 'monitoring', 'networkInterfaces', 'placementGroupName', 'privateDnsNameOptions', 'privateIpAddress', 'propagateTagsToVolumeOnCreation', 'ramdiskId', 'securityGroupIds', 'securityGroups', 'sourceDestCheck', 'ssmAssociations', 'subnetId', 'tags', 'tenancy', 'userData', 'volumes']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AssociationParameterProperty
- class CfnInstancePropsMixin.AssociationParameterProperty(*, key=None, value=None)
Bases:
objectSpecifies input parameter values for an SSM document in AWS Systems Manager .
AssociationParameteris a property of the SsmAssociation property type.- Parameters:
key (
Optional[str]) – The name of an input parameter that is in the associated SSM document.value (
Optional[Sequence[str]]) – The value of an input parameter.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins association_parameter_property = ec2_mixins.CfnInstancePropsMixin.AssociationParameterProperty( key="key", value=["value"] )
Attributes
- key
The name of an input parameter that is in the associated SSM document.
- value
The value of an input parameter.
BlockDeviceMappingProperty
- class CfnInstancePropsMixin.BlockDeviceMappingProperty(*, device_name=None, ebs=None, no_device=None, virtual_name=None)
Bases:
objectSpecifies a block device mapping for an instance.
You must specify exactly one of the following properties:
VirtualName,Ebs, orNoDevice.BlockDeviceMappingis a property of the AWS::EC2::Instance resource. .. epigraph:After the instance is running, you can modify only the ``DeleteOnTermination`` parameter for the attached volumes without interrupting the instance. Modifying any other parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
- Parameters:
device_name (
Optional[str]) – The device name. For available device names, see Device names for volumes . .. epigraph:: After the instance is running, this parameter is used to specify the device name of the block device mapping to update.ebs (
Union[IResolvable,EbsProperty,Dict[str,Any],None]) – Parameters used to automatically set up EBS volumes when the instance is launched. .. epigraph:: After the instance is running, you can modify only theDeleteOnTerminationparameter for the attached volumes without interrupting the instance. Modifying any other parameter results in instance replacement .no_device (
Union[IResolvable,NoDeviceProperty,Dict[str,Any],None]) –To omit the device from the block device mapping, specify an empty string. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .
virtual_name (
Optional[str]) –The virtual device name (
ephemeralN). The name must be in the formephemeralX where X is a number starting from zero (0). For example, an instance type with 2 available instance store volumes can specify mappings forephemeral0andephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume. NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect. Constraints : For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins block_device_mapping_property = ec2_mixins.CfnInstancePropsMixin.BlockDeviceMappingProperty( device_name="deviceName", ebs=ec2_mixins.CfnInstancePropsMixin.EbsProperty( delete_on_termination=False, encrypted=False, iops=123, kms_key_id="kmsKeyId", snapshot_id="snapshotId", volume_size=123, volume_type="volumeType" ), no_device=ec2_mixins.CfnInstancePropsMixin.NoDeviceProperty(), virtual_name="virtualName" )
Attributes
- device_name
The device name. For available device names, see Device names for volumes .
After the instance is running, this parameter is used to specify the device name of the block device mapping to update.
- ebs
Parameters used to automatically set up EBS volumes when the instance is launched.
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 .
- no_device
To omit the device from the block device mapping, specify an empty string.
After the instance is running, modifying this parameter results in instance replacement .
- virtual_name
The virtual device name (
ephemeralN).The name must be in the form
ephemeralX where X is a number starting from zero (0). For example, an instance type with 2 available instance store volumes can specify mappings forephemeral0andephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.NVMe instance store volumes are automatically enumerated and assigned a device name. Including them in your block device mapping has no effect.
Constraints : For M3 instances, you must specify instance store volumes in the block device mapping for the instance. When you launch an M3 instance, we ignore any instance store volumes specified in the block device mapping for the AMI. .. epigraph:
After the instance is running, modifying this parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
CpuOptionsProperty
- class CfnInstancePropsMixin.CpuOptionsProperty(*, core_count=None, threads_per_core=None)
Bases:
objectSpecifies the CPU options for the instance.
When you specify CPU options, you must specify both the number of CPU cores and threads per core.
Modifying the CPU options for an instance results in instance replacement .
For more information, see Optimize CPU options in the Amazon Elastic Compute Cloud User Guide .
- Parameters:
core_count (
Union[int,float,None]) – The number of CPU cores for the instance.threads_per_core (
Union[int,float,None]) – The number of threads per CPU core.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins cpu_options_property = ec2_mixins.CfnInstancePropsMixin.CpuOptionsProperty( core_count=123, threads_per_core=123 )
Attributes
- core_count
The number of CPU cores for the instance.
- threads_per_core
The number of threads per CPU core.
CreditSpecificationProperty
- class CfnInstancePropsMixin.CreditSpecificationProperty(*, cpu_credits=None)
Bases:
objectSpecifies the credit option for CPU usage of a T instance.
CreditSpecificationis a property of the AWS::EC2::Instance resource.For more information, see Burstable performance instances in the Amazon EC2 User Guide .
- Parameters:
cpu_credits (
Optional[str]) – The credit option for CPU usage of the instance. Valid values:standard|unlimitedT3 instances withhosttenancy do not support theunlimitedCPU credit option.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins credit_specification_property = ec2_mixins.CfnInstancePropsMixin.CreditSpecificationProperty( cpu_credits="cpuCredits" )
Attributes
- cpu_credits
The credit option for CPU usage of the instance.
Valid values:
standard|unlimitedT3 instances with
hosttenancy do not support theunlimitedCPU credit option.
EbsProperty
- class CfnInstancePropsMixin.EbsProperty(*, delete_on_termination=None, encrypted=None, iops=None, kms_key_id=None, snapshot_id=None, volume_size=None, volume_type=None)
Bases:
objectSpecifies a block device for an EBS volume.
Ebsis a property of the BlockDeviceMapping property type. .. epigraph:After the instance is running, you can modify only the ``DeleteOnTermination`` parameters for the attached volumes without interrupting the instance. Modifying any other parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
- Parameters:
delete_on_termination (
Union[bool,IResolvable,None]) – Indicates whether the EBS volume is deleted on instance termination. For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .encrypted (
Union[bool,IResolvable,None]) –Indicates whether the volume should be encrypted. The effect of setting the encryption state to
truedepends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide . Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types . .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .iops (
Union[int,float,None]) –The number of I/O operations per second (IOPS). For
gp3,io1, andio2volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. The following are the supported values for each volume type: -gp3: 3,000-16,000 IOPS -io1: 100-64,000 IOPS -io2: 100-64,000 IOPS Forio1andio2volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS. This parameter is required forio1andio2volumes. The default forgp3volumes is 3,000 IOPS. This parameter is not supported forgp2,st1,sc1, orstandardvolumes. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .kms_key_id (
Optional[str]) –The identifier of the AWS KMS key to use for Amazon EBS encryption. If
KmsKeyIdis specified, the encrypted state must betrue. If the encrypted state istruebut you do not specifyKmsKeyId, your KMS key for EBS is used. You can specify the KMS key using any of the following: - Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. - Key alias. For example, alias/ExampleAlias. - Key ARN. For example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - Alias ARN. For example, arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .snapshot_id (
Optional[str]) –The ID of the snapshot. If you specify both
SnapshotIdandVolumeSize,VolumeSizemust be equal or greater than the size of the snapshot. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .volume_size (
Union[int,float,None]) –The size of the volume, in GiBs. You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size. The following are the supported volumes sizes for each volume type: -
gp2andgp3:1-16,384 -io1andio2: 4-16,384 -st1andsc1: 125-16,384 -standard: 1-1,024 .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .volume_type (
Optional[str]) –The volume type. For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is
io1orio2, you must specify the IOPS that the volume supports. .. epigraph:: After the instance is running, modifying this parameter results in instance replacement .
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ebs.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins ebs_property = ec2_mixins.CfnInstancePropsMixin.EbsProperty( delete_on_termination=False, encrypted=False, iops=123, kms_key_id="kmsKeyId", snapshot_id="snapshotId", volume_size=123, volume_type="volumeType" )
Attributes
- delete_on_termination
Indicates whether the EBS volume is deleted on instance termination.
For more information, see Preserving Amazon EBS volumes on instance termination in the Amazon EC2 User Guide .
- encrypted
Indicates whether the volume should be encrypted.
The effect of setting the encryption state to
truedepends on the volume origin (new or from a snapshot), starting encryption state, ownership, and whether encryption by default is enabled. For more information, see Encryption by default in the Amazon Elastic Compute Cloud User Guide .Encrypted Amazon EBS volumes must be attached to instances that support Amazon EBS encryption. For more information, see Supported instance types . .. epigraph:
After the instance is running, modifying this parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
- iops
The number of I/O operations per second (IOPS).
For
gp3,io1, andio2volumes, this represents the number of IOPS that are provisioned for the volume. Forgp2volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.The following are the supported values for each volume type:
gp3: 3,000-16,000 IOPSio1: 100-64,000 IOPSio2: 100-64,000 IOPS
For
io1andio2volumes, we guarantee 64,000 IOPS only for Instances built on the Nitro System . Other instance families guarantee performance up to 32,000 IOPS.This parameter is required for
io1andio2volumes. The default forgp3volumes is 3,000 IOPS. This parameter is not supported forgp2,st1,sc1, orstandardvolumes. .. epigraph:After the instance is running, modifying this parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
- kms_key_id
The identifier of the AWS KMS key to use for Amazon EBS encryption.
If
KmsKeyIdis specified, the encrypted state must betrue. If the encrypted state istruebut you do not specifyKmsKeyId, your KMS key for EBS is used.You can specify the KMS key using any of the following:
Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab.
Key alias. For example, alias/ExampleAlias.
Key ARN. For example, arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab.
Alias ARN. For example, arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias.
After the instance is running, modifying this parameter results in instance replacement .
- snapshot_id
The ID of the snapshot.
If you specify both
SnapshotIdandVolumeSize,VolumeSizemust be equal or greater than the size of the snapshot. .. epigraph:After the instance is running, modifying this parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
- volume_size
The size of the volume, in GiBs.
You must specify either a snapshot ID or a volume size. If you specify a snapshot, the default is the snapshot size. You can specify a volume size that is equal to or larger than the snapshot size.
The following are the supported volumes sizes for each volume type:
gp2andgp3:1-16,384io1andio2: 4-16,384st1andsc1: 125-16,384standard: 1-1,024
After the instance is running, modifying this parameter results in instance replacement .
- volume_type
The volume type.
For more information, see Amazon EBS volume types in the Amazon EC2 User Guide . If the volume type is
io1orio2, you must specify the IOPS that the volume supports. .. epigraph:After the instance is running, modifying this parameter results in instance `replacement <https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement>`_ .
ElasticGpuSpecificationProperty
- class CfnInstancePropsMixin.ElasticGpuSpecificationProperty(*, type=None)
Bases:
objectAmazon Elastic Graphics reached end of life on January 8, 2024.
Specifies the type of Elastic GPU. An Elastic GPU is a GPU resource that you can attach to your Amazon EC2 instance to accelerate the graphics performance of your applications.
ElasticGpuSpecificationis a property of the AWS::EC2::Instance resource.Attributes
- type
The type of Elastic Graphics accelerator.
ElasticInferenceAcceleratorProperty
- class CfnInstancePropsMixin.ElasticInferenceAcceleratorProperty(*, count=None, type=None)
Bases:
objectAmazon Elastic Inference is no longer available.
Specifies the Elastic Inference Accelerator for the instance.
ElasticInferenceAcceleratoris a property of the AWS::EC2::Instance resource.Attributes
- count
The number of elastic inference accelerators to attach to the instance.
- type
The type of elastic inference accelerator.
The possible values are
eia1.medium,eia1.large,eia1.xlarge,eia2.medium,eia2.large, andeia2.xlarge.
EnaSrdSpecificationProperty
- class CfnInstancePropsMixin.EnaSrdSpecificationProperty(*, ena_srd_enabled=None, ena_srd_udp_specification=None)
Bases:
objectENA Express uses AWS Scalable Reliable Datagram (SRD) technology to increase the maximum bandwidth used per stream and minimize tail latency of network traffic between EC2 instances.
With ENA Express, you can communicate between two EC2 instances in the same subnet within the same account, or in different accounts. Both sending and receiving instances must have ENA Express enabled.
To improve the reliability of network packet delivery, ENA Express reorders network packets on the receiving end by default. However, some UDP-based applications are designed to handle network packets that are out of order to reduce the overhead for packet delivery at the network layer. When ENA Express is enabled, you can specify whether UDP network traffic uses it.
- Parameters:
ena_srd_enabled (
Union[bool,IResolvable,None]) – Indicates whether ENA Express is enabled for the network interface.ena_srd_udp_specification (
Union[IResolvable,EnaSrdUdpSpecificationProperty,Dict[str,Any],None]) – Configures ENA Express for UDP network traffic.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins ena_srd_specification_property = ec2_mixins.CfnInstancePropsMixin.EnaSrdSpecificationProperty( ena_srd_enabled=False, ena_srd_udp_specification=ec2_mixins.CfnInstancePropsMixin.EnaSrdUdpSpecificationProperty( ena_srd_udp_enabled=False ) )
Attributes
- ena_srd_enabled
Indicates whether ENA Express is enabled for the network interface.
- ena_srd_udp_specification
Configures ENA Express for UDP network traffic.
EnaSrdUdpSpecificationProperty
- class CfnInstancePropsMixin.EnaSrdUdpSpecificationProperty(*, ena_srd_udp_enabled=None)
Bases:
objectENA Express is compatible with both TCP and UDP transport protocols.
When it’s enabled, TCP traffic automatically uses it. However, some UDP-based applications are designed to handle network packets that are out of order, without a need for retransmission, such as live video broadcasting or other near-real-time applications. For UDP traffic, you can specify whether to use ENA Express, based on your application environment needs.
- Parameters:
ena_srd_udp_enabled (
Union[bool,IResolvable,None]) – Indicates whether UDP traffic to and from the instance uses ENA Express. To specify this setting, you must first enable ENA Express.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins ena_srd_udp_specification_property = ec2_mixins.CfnInstancePropsMixin.EnaSrdUdpSpecificationProperty( ena_srd_udp_enabled=False )
Attributes
- ena_srd_udp_enabled
Indicates whether UDP traffic to and from the instance uses ENA Express.
To specify this setting, you must first enable ENA Express.
EnclaveOptionsProperty
- class CfnInstancePropsMixin.EnclaveOptionsProperty(*, enabled=None)
Bases:
objectIndicates whether the instance is enabled for AWS Nitro Enclaves.
- Parameters:
enabled (
Union[bool,IResolvable,None]) – If this parameter is set totrue, the instance is enabled for AWS Nitro Enclaves; otherwise, it is not enabled for AWS Nitro Enclaves.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins enclave_options_property = ec2_mixins.CfnInstancePropsMixin.EnclaveOptionsProperty( enabled=False )
Attributes
- enabled
If this parameter is set to
true, the instance is enabled for AWS Nitro Enclaves;otherwise, it is not enabled for AWS Nitro Enclaves.
HibernationOptionsProperty
- class CfnInstancePropsMixin.HibernationOptionsProperty(*, configured=None)
Bases:
objectSpecifies the hibernation options for the instance.
HibernationOptionsis a property of the AWS::EC2::Instance resource.- Parameters:
configured (
Union[bool,IResolvable,None]) – Set totrueto enable your instance for hibernation. For Spot Instances, if you setConfiguredtotrue, either omit theInstanceInterruptionBehaviorparameter (for`SpotMarketOptions<https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html>`_ ), or set it tohibernate. WhenConfiguredis true: - If you omitInstanceInterruptionBehavior, it defaults tohibernate. - If you setInstanceInterruptionBehaviorto a value other thanhibernate, you’ll get an error. Default:falseDefault: - false- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins hibernation_options_property = ec2_mixins.CfnInstancePropsMixin.HibernationOptionsProperty( configured=False )
Attributes
- configured
Set to
trueto enable your instance for hibernation.For Spot Instances, if you set
Configuredtotrue, either omit theInstanceInterruptionBehaviorparameter (for`SpotMarketOptions<https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html>`_ ), or set it tohibernate. WhenConfiguredis true:If you omit
InstanceInterruptionBehavior, it defaults tohibernate.If you set
InstanceInterruptionBehaviorto a value other thanhibernate, you’ll get an error.
Default:
false
InstanceIpv6AddressProperty
- class CfnInstancePropsMixin.InstanceIpv6AddressProperty(*, ipv6_address=None)
Bases:
objectSpecifies the IPv6 address for the instance.
InstanceIpv6Addressis a property of the AWS::EC2::Instance resource.- Parameters:
ipv6_address (
Optional[str]) – The IPv6 address.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins instance_ipv6_address_property = ec2_mixins.CfnInstancePropsMixin.InstanceIpv6AddressProperty( ipv6_address="ipv6Address" )
Attributes
LaunchTemplateSpecificationProperty
- class CfnInstancePropsMixin.LaunchTemplateSpecificationProperty(*, launch_template_id=None, launch_template_name=None, version=None)
Bases:
objectSpecifies a launch template to use when launching an Amazon EC2 instance.
You must specify the following:
The ID or the name of the launch template, but not both.
The version of the launch template.
For information about creating a launch template, see AWS::EC2::LaunchTemplate and Create a launch template in the Amazon EC2 User Guide . For example launch templates, see the Examples for
AWS::EC2::LaunchTemplate.- Parameters:
launch_template_id (
Optional[str]) – The ID of the launch template. You must specify either the launch template ID or the launch template name, but not both.launch_template_name (
Optional[str]) – The name of the launch template. You must specify either the launch template ID or the launch template name, but not both.version (
Optional[str]) – The version number of the launch template. You must specify this property. To specify the default version of the template, use theFn::GetAttintrinsic function to retrieve theDefaultVersionNumberattribute of the launch template. To specify the latest version of the template, useFn::GetAttto retrieve theLatestVersionNumberattribute. For more information, see AWS::EC2:LaunchTemplate return values for Fn::GetAtt .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins launch_template_specification_property = ec2_mixins.CfnInstancePropsMixin.LaunchTemplateSpecificationProperty( launch_template_id="launchTemplateId", launch_template_name="launchTemplateName", version="version" )
Attributes
- launch_template_id
The ID of the launch template.
You must specify either the launch template ID or the launch template name, but not both.
- launch_template_name
The name of the launch template.
You must specify either the launch template ID or the launch template name, but not both.
- version
The version number of the launch template. You must specify this property.
To specify the default version of the template, use the
Fn::GetAttintrinsic function to retrieve theDefaultVersionNumberattribute of the launch template. To specify the latest version of the template, useFn::GetAttto retrieve theLatestVersionNumberattribute. For more information, see AWS::EC2:LaunchTemplate return values for Fn::GetAtt .
LicenseSpecificationProperty
- class CfnInstancePropsMixin.LicenseSpecificationProperty(*, license_configuration_arn=None)
Bases:
objectSpecifies the license configuration to use.
LicenseSpecificationis a property of the AWS::EC2::Instance resource.- Parameters:
license_configuration_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the license configuration.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins license_specification_property = ec2_mixins.CfnInstancePropsMixin.LicenseSpecificationProperty( license_configuration_arn="licenseConfigurationArn" )
Attributes
- license_configuration_arn
The Amazon Resource Name (ARN) of the license configuration.
MetadataOptionsProperty
- class CfnInstancePropsMixin.MetadataOptionsProperty(*, http_endpoint=None, http_protocol_ipv6=None, http_put_response_hop_limit=None, http_tokens=None, instance_metadata_tags=None)
Bases:
objectSpecifies the metadata options for the instance.
- Parameters:
http_endpoint (
Optional[str]) – Enables or disables the HTTP metadata endpoint on your instances. If you specify a value ofdisabled, you cannot access your instance metadata. Default:enabledhttp_protocol_ipv6 (
Optional[str]) – Enables or disables the IPv6 endpoint for the instance metadata service. Default:disabledhttp_put_response_hop_limit (
Union[int,float,None]) – The maximum number of hops that the metadata token can travel. Possible values: Integers from 1 to 64 Default: - 1http_tokens (
Optional[str]) – Indicates whether IMDSv2 is required. -optional- IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1. -required- IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2. Default: - If the value ofImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0and the account level default is set tono-preference, the default isrequired. - If the value ofImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0, but the account level default is set toV1 or V2, the default isoptional. The default value can also be affected by other combinations of parameters. For more information, see Order of precedence for instance metadata options in the Amazon EC2 User Guide .instance_metadata_tags (
Optional[str]) – Set toenabledto allow access to instance tags from the instance metadata. Set todisabledto turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata . Default:disabled
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins metadata_options_property = ec2_mixins.CfnInstancePropsMixin.MetadataOptionsProperty( http_endpoint="httpEndpoint", http_protocol_ipv6="httpProtocolIpv6", http_put_response_hop_limit=123, http_tokens="httpTokens", instance_metadata_tags="instanceMetadataTags" )
Attributes
- http_endpoint
Enables or disables the HTTP metadata endpoint on your instances.
If you specify a value of
disabled, you cannot access your instance metadata.Default:
enabled
- http_protocol_ipv6
Enables or disables the IPv6 endpoint for the instance metadata service.
Default:
disabled
- http_put_response_hop_limit
The maximum number of hops that the metadata token can travel.
Possible values: Integers from 1 to 64
- http_tokens
Indicates whether IMDSv2 is required.
optional- IMDSv2 is optional, which means that you can use either IMDSv2 or IMDSv1.required- IMDSv2 is required, which means that IMDSv1 is disabled, and you must use IMDSv2.
Default:
If the value of
ImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0and the account level default is set tono-preference, the default isrequired.If the value of
ImdsSupportfor the Amazon Machine Image (AMI) for your instance isv2.0, but the account level default is set toV1 or V2, the default isoptional.
The default value can also be affected by other combinations of parameters. For more information, see Order of precedence for instance metadata options in the Amazon EC2 User Guide .
- instance_metadata_tags
Set to
enabledto allow access to instance tags from the instance metadata.Set to
disabledto turn off access to instance tags from the instance metadata. For more information, see Work with instance tags using the instance metadata .Default:
disabled
NetworkInterfaceProperty
- class CfnInstancePropsMixin.NetworkInterfaceProperty(*, associate_carrier_ip_address=None, associate_public_ip_address=None, delete_on_termination=None, description=None, device_index=None, ena_srd_specification=None, group_set=None, ipv6_address_count=None, ipv6_addresses=None, network_interface_id=None, private_ip_address=None, private_ip_addresses=None, secondary_private_ip_address_count=None, subnet_id=None)
Bases:
objectSpecifies a network interface that is to be attached to an instance.
You can create a network interface when launching an instance. For an example, see the AWS::EC2::Instance examples .
Alternatively, you can attach an existing network interface when launching an instance. For an example, see the AWS::EC2:NetworkInterface examples .
- Parameters:
associate_carrier_ip_address (
Union[bool,IResolvable,None]) – Indicates whether to assign a carrier IP address to the network interface. You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the AWS Wavelength Developer Guide .associate_public_ip_address (
Union[bool,IResolvable,None]) – Indicates whether to assign a public IPv4 address to an instance. Applies only if creating a network interface when launching an instance. The network interface must be the primary network interface. If launching into a default subnet, the default value istrue. AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the VPC pricing page .delete_on_termination (
Union[bool,IResolvable,None]) – Indicates whether the network interface is deleted when the instance is terminated. Applies only if creating a network interface when launching an instance.description (
Optional[str]) – The description of the network interface. Applies only if creating a network interface when launching an instance.device_index (
Optional[str]) – The position of the network interface in the attachment order. A primary network interface has a device index of 0. If you create a network interface when launching an instance, you must specify the device index.ena_srd_specification (
Union[IResolvable,EnaSrdSpecificationProperty,Dict[str,Any],None]) – Configures ENA Express for UDP network traffic.group_set (
Optional[Sequence[str]]) – The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.ipv6_address_count (
Union[int,float,None]) – A number of IPv6 addresses to assign to the network interface. Amazon EC2 chooses the IPv6 addresses from the range of the 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.ipv6_addresses (
Union[IResolvable,Sequence[Union[IResolvable,InstanceIpv6AddressProperty,Dict[str,Any]]],None]) – The IPv6 addresses to assign to the network interface. 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.network_interface_id (
Optional[str]) – The ID of the network interface, when attaching an existing network interface.private_ip_address (
Optional[str]) – The private IPv4 address of the network interface. Applies only if creating a network interface when launching an instance.private_ip_addresses (
Union[IResolvable,Sequence[Union[IResolvable,PrivateIpAddressSpecificationProperty,Dict[str,Any]]],None]) – One or more private IPv4 addresses to assign to the network interface. Only one private IPv4 address can be designated as primary.secondary_private_ip_address_count (
Union[int,float,None]) – The number of secondary private IPv4 addresses. You can’t specify this option and specify more than one private IP address using the private IP addresses option.subnet_id (
Optional[str]) – The ID of the subnet associated with the network interface.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins network_interface_property = ec2_mixins.CfnInstancePropsMixin.NetworkInterfaceProperty( associate_carrier_ip_address=False, associate_public_ip_address=False, delete_on_termination=False, description="description", device_index="deviceIndex", ena_srd_specification=ec2_mixins.CfnInstancePropsMixin.EnaSrdSpecificationProperty( ena_srd_enabled=False, ena_srd_udp_specification=ec2_mixins.CfnInstancePropsMixin.EnaSrdUdpSpecificationProperty( ena_srd_udp_enabled=False ) ), group_set=["groupSet"], ipv6_address_count=123, ipv6_addresses=[ec2_mixins.CfnInstancePropsMixin.InstanceIpv6AddressProperty( ipv6_address="ipv6Address" )], network_interface_id="networkInterfaceId", private_ip_address="privateIpAddress", private_ip_addresses=[ec2_mixins.CfnInstancePropsMixin.PrivateIpAddressSpecificationProperty( primary=False, private_ip_address="privateIpAddress" )], secondary_private_ip_address_count=123, subnet_id="subnetId" )
Attributes
- associate_carrier_ip_address
Indicates whether to assign a carrier IP address to the network interface.
You can only assign a carrier IP address to a network interface that is in a subnet in a Wavelength Zone. For more information about carrier IP addresses, see Carrier IP address in the AWS Wavelength Developer Guide .
- associate_public_ip_address
Indicates whether to assign a public IPv4 address to an instance.
Applies only if creating a network interface when launching an instance. The network interface must be the primary network interface. If launching into a default subnet, the default value is
true.AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the VPC pricing page .
- delete_on_termination
Indicates whether the network interface is deleted when the instance is terminated.
Applies only if creating a network interface when launching an instance.
- description
The description of the network interface.
Applies only if creating a network interface when launching an instance.
- device_index
The position of the network interface in the attachment order.
A primary network interface has a device index of 0.
If you create a network interface when launching an instance, you must specify the device index.
- ena_srd_specification
Configures ENA Express for UDP network traffic.
- group_set
The IDs of the security groups for the network interface.
Applies only if creating a network interface when launching an instance.
- ipv6_address_count
A number of IPv6 addresses to assign to the network interface.
Amazon EC2 chooses the IPv6 addresses from the range of the 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.
- ipv6_addresses
The IPv6 addresses to assign to the network interface.
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.
- network_interface_id
The ID of the network interface, when attaching an existing network interface.
- private_ip_address
The private IPv4 address of the network interface.
Applies only if creating a network interface when launching an instance.
- private_ip_addresses
One or more private IPv4 addresses to assign to the network interface.
Only one private IPv4 address can be designated as primary.
- secondary_private_ip_address_count
The number of secondary private IPv4 addresses.
You can’t specify this option and specify more than one private IP address using the private IP addresses option.
- subnet_id
The ID of the subnet associated with the network interface.
NoDeviceProperty
- class CfnInstancePropsMixin.NoDeviceProperty
Bases:
object- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins no_device_property = ec2_mixins.CfnInstancePropsMixin.NoDeviceProperty()
PrivateDnsNameOptionsProperty
- class CfnInstancePropsMixin.PrivateDnsNameOptionsProperty(*, enable_resource_name_dns_aaaa_record=None, enable_resource_name_dns_a_record=None, hostname_type=None)
Bases:
objectThe type of hostnames to assign to instances in the subnet at launch.
For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
- Parameters:
enable_resource_name_dns_aaaa_record (
Union[bool,IResolvable,None]) –Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
enable_resource_name_dns_a_record (
Union[bool,IResolvable,None]) –Indicates whether to respond to DNS queries for instance hostnames with DNS A records. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
hostname_type (
Optional[str]) –The type of hostnames to assign to instances in the subnet at launch. For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins private_dns_name_options_property = ec2_mixins.CfnInstancePropsMixin.PrivateDnsNameOptionsProperty( enable_resource_name_dns_aaaa_record=False, enable_resource_name_dns_aRecord=False, hostname_type="hostnameType" )
Attributes
- enable_resource_name_dns_a_record
Indicates whether to respond to DNS queries for instance hostnames with DNS A records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
- enable_resource_name_dns_aaaa_record
Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA records.
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
- hostname_type
The type of hostnames to assign to instances in the subnet at launch.
For IPv4 only subnets, an instance DNS name must be based on the instance IPv4 address. For IPv6 only subnets, an instance DNS name must be based on the instance ID. For dual-stack subnets, you can specify whether DNS names use the instance IPv4 address or the instance ID. For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
PrivateIpAddressSpecificationProperty
- class CfnInstancePropsMixin.PrivateIpAddressSpecificationProperty(*, primary=None, private_ip_address=None)
Bases:
objectSpecifies a secondary private IPv4 address for a network interface.
- Parameters:
primary (
Union[bool,IResolvable,None]) – Indicates whether the private IPv4 address is the primary private IPv4 address. Only one IPv4 address can be designated as primary.private_ip_address (
Optional[str]) – The private IPv4 address.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins private_ip_address_specification_property = ec2_mixins.CfnInstancePropsMixin.PrivateIpAddressSpecificationProperty( primary=False, private_ip_address="privateIpAddress" )
Attributes
- primary
Indicates whether the private IPv4 address is the primary private IPv4 address.
Only one IPv4 address can be designated as primary.
- private_ip_address
The private IPv4 address.
SsmAssociationProperty
- class CfnInstancePropsMixin.SsmAssociationProperty(*, association_parameters=None, document_name=None)
Bases:
objectSpecifies the SSM document and parameter values in AWS Systems Manager to associate with an instance.
SsmAssociationsis a property of the AWS::EC2::Instance resource.- Parameters:
association_parameters (
Union[IResolvable,Sequence[Union[IResolvable,AssociationParameterProperty,Dict[str,Any]]],None]) – The input parameter values to use with the associated SSM document.document_name (
Optional[str]) – The name of an SSM document to associate with the instance.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins ssm_association_property = ec2_mixins.CfnInstancePropsMixin.SsmAssociationProperty( association_parameters=[ec2_mixins.CfnInstancePropsMixin.AssociationParameterProperty( key="key", value=["value"] )], document_name="documentName" )
Attributes
- association_parameters
The input parameter values to use with the associated SSM document.
- document_name
The name of an SSM document to associate with the instance.
StateProperty
- class CfnInstancePropsMixin.StateProperty(*, code=None, name=None)
Bases:
objectDescribes the current state of an instance.
- Parameters:
code (
Optional[str]) – The state of the instance as a 16-bit unsigned integer. The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored. The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255. The valid values for instance-state-code will all be in the range of the low byte and they are: -0:pending-16:running-32:shutting-down-48:terminated-64:stopping-80:stoppedYou can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.name (
Optional[str]) – The current state of the instance.
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-state.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins state_property = ec2_mixins.CfnInstancePropsMixin.StateProperty( code="code", name="name" )
Attributes
- code
The state of the instance as a 16-bit unsigned integer.
The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and 65,535. These numerical values are used for internal purposes and should be ignored.
The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values between 0 and 255.
The valid values for instance-state-code will all be in the range of the low byte and they are:
0:pending16:running32:shutting-down48:terminated64:stopping80:stopped
You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in decimal.
- name
The current state of the instance.
VolumeProperty
- class CfnInstancePropsMixin.VolumeProperty(*, device=None, volume_id=None)
Bases:
objectSpecifies a volume to attach to an instance.
Volumeis an embedded property of the AWS::EC2::Instance resource.- Parameters:
device (
Optional[str]) – The device name (for example,/dev/sdhorxvdh).volume_id (
Optional[str]) – The ID of the EBS volume. The volume and instance must be within the same Availability Zone.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_ec2 import mixins as ec2_mixins volume_property = ec2_mixins.CfnInstancePropsMixin.VolumeProperty( device="device", volume_id="volumeId" )
Attributes
- device
The device name (for example,
/dev/sdhorxvdh).
- volume_id
The ID of the EBS volume.
The volume and instance must be within the same Availability Zone.