CfnInstance

class aws_cdk.aws_ec2.CfnInstance(scope, id, *, additional_info=None, affinity=None, availability_zone=None, block_device_mappings=None, cpu_options=None, credit_specification=None, disable_api_termination=None, ebs_optimized=None, elastic_gpu_specifications=None, elastic_inference_accelerators=None, hibernation_options=None, host_id=None, host_resource_group_arn=None, iam_instance_profile=None, image_id=None, instance_initiated_shutdown_behavior=None, instance_type=None, ipv6_address_count=None, ipv6_addresses=None, kernel_id=None, key_name=None, launch_template=None, license_specifications=None, monitoring=None, network_interfaces=None, placement_group_name=None, private_ip_address=None, ramdisk_id=None, security_group_ids=None, security_groups=None, source_dest_check=None, ssm_associations=None, subnet_id=None, tags=None, tenancy=None, user_data=None, volumes=None)

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::EC2::Instance.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html

CloudformationResource

AWS::EC2::Instance

Create a new AWS::EC2::Instance.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • additional_info (Optional[str]) – AWS::EC2::Instance.AdditionalInfo.

  • affinity (Optional[str]) – AWS::EC2::Instance.Affinity.

  • availability_zone (Optional[str]) – AWS::EC2::Instance.AvailabilityZone.

  • block_device_mappings (Union[IResolvable, List[Union[IResolvable, BlockDeviceMappingProperty]], None]) – AWS::EC2::Instance.BlockDeviceMappings.

  • cpu_options (Union[IResolvable, CpuOptionsProperty, None]) – AWS::EC2::Instance.CpuOptions.

  • credit_specification (Union[IResolvable, CreditSpecificationProperty, None]) – AWS::EC2::Instance.CreditSpecification.

  • disable_api_termination (Union[bool, IResolvable, None]) – AWS::EC2::Instance.DisableApiTermination.

  • ebs_optimized (Union[bool, IResolvable, None]) – AWS::EC2::Instance.EbsOptimized.

  • elastic_gpu_specifications (Union[IResolvable, List[Union[IResolvable, ElasticGpuSpecificationProperty]], None]) – AWS::EC2::Instance.ElasticGpuSpecifications.

  • elastic_inference_accelerators (Union[IResolvable, List[Union[IResolvable, ElasticInferenceAcceleratorProperty]], None]) – AWS::EC2::Instance.ElasticInferenceAccelerators.

  • hibernation_options (Union[IResolvable, HibernationOptionsProperty, None]) – AWS::EC2::Instance.HibernationOptions.

  • host_id (Optional[str]) – AWS::EC2::Instance.HostId.

  • host_resource_group_arn (Optional[str]) – AWS::EC2::Instance.HostResourceGroupArn.

  • iam_instance_profile (Optional[str]) – AWS::EC2::Instance.IamInstanceProfile.

  • image_id (Optional[str]) – AWS::EC2::Instance.ImageId.

  • instance_initiated_shutdown_behavior (Optional[str]) – AWS::EC2::Instance.InstanceInitiatedShutdownBehavior.

  • instance_type (Optional[str]) – AWS::EC2::Instance.InstanceType.

  • ipv6_address_count (Union[int, float, None]) – AWS::EC2::Instance.Ipv6AddressCount.

  • ipv6_addresses (Union[IResolvable, List[Union[IResolvable, InstanceIpv6AddressProperty]], None]) – AWS::EC2::Instance.Ipv6Addresses.

  • kernel_id (Optional[str]) – AWS::EC2::Instance.KernelId.

  • key_name (Optional[str]) – AWS::EC2::Instance.KeyName.

  • launch_template (Union[IResolvable, LaunchTemplateSpecificationProperty, None]) – AWS::EC2::Instance.LaunchTemplate.

  • license_specifications (Union[IResolvable, List[Union[IResolvable, LicenseSpecificationProperty]], None]) – AWS::EC2::Instance.LicenseSpecifications.

  • monitoring (Union[bool, IResolvable, None]) – AWS::EC2::Instance.Monitoring.

  • network_interfaces (Union[IResolvable, List[Union[IResolvable, NetworkInterfaceProperty]], None]) – AWS::EC2::Instance.NetworkInterfaces.

  • placement_group_name (Optional[str]) – AWS::EC2::Instance.PlacementGroupName.

  • private_ip_address (Optional[str]) – AWS::EC2::Instance.PrivateIpAddress.

  • ramdisk_id (Optional[str]) – AWS::EC2::Instance.RamdiskId.

  • security_group_ids (Optional[List[str]]) – AWS::EC2::Instance.SecurityGroupIds.

  • security_groups (Optional[List[str]]) – AWS::EC2::Instance.SecurityGroups.

  • source_dest_check (Union[bool, IResolvable, None]) – AWS::EC2::Instance.SourceDestCheck.

  • ssm_associations (Union[IResolvable, List[Union[IResolvable, SsmAssociationProperty]], None]) – AWS::EC2::Instance.SsmAssociations.

  • subnet_id (Optional[str]) – AWS::EC2::Instance.SubnetId.

  • tags (Optional[List[CfnTag]]) – AWS::EC2::Instance.Tags.

  • tenancy (Optional[str]) – AWS::EC2::Instance.Tenancy.

  • user_data (Optional[str]) – AWS::EC2::Instance.UserData.

  • volumes (Union[IResolvable, List[Union[IResolvable, VolumeProperty]], None]) – AWS::EC2::Instance.Volumes.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters

path (str) – The path of the value to delete.

Return type

None

add_depends_on(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters

target (CfnResource) –

Return type

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

None

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
   "GlobalSecondaryIndexes": [
     {
       "Projection": {
         "NonKeyAttributes": [ "myattribute" ]
         ...
       }
       ...
     },
     {
       "ProjectionType": "INCLUDE"
       ...
     },
   ]
   ...
}
Parameters
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters

property_path (str) – The path to the property.

Return type

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

Parameters
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters

attribute_name (str) – The name of the attribute.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

Return type

Any

inspect(inspector)

(experimental) Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Stability

experimental

Return type

None

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters

new_logical_id (str) – The new logical ID to use for this stack element.

Return type

None

to_string()

Returns a string representation of this construct.

Return type

str

Returns

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::EC2::Instance'
additional_info

AWS::EC2::Instance.AdditionalInfo.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-additionalinfo

Return type

Optional[str]

affinity

AWS::EC2::Instance.Affinity.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-affinity

Return type

Optional[str]

attr_availability_zone

AvailabilityZone

Type

cloudformationAttribute

Return type

str

attr_private_dns_name

PrivateDnsName

Type

cloudformationAttribute

Return type

str

attr_private_ip

PrivateIp

Type

cloudformationAttribute

Return type

str

attr_public_dns_name

PublicDnsName

Type

cloudformationAttribute

Return type

str

attr_public_ip

PublicIp

Type

cloudformationAttribute

Return type

str

availability_zone

AWS::EC2::Instance.AvailabilityZone.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-availabilityzone

Return type

Optional[str]

block_device_mappings

AWS::EC2::Instance.BlockDeviceMappings.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-blockdevicemappings

Return type

Union[IResolvable, List[Union[IResolvable, BlockDeviceMappingProperty]], None]

cfn_options

Options for this resource, such as condition, update policy etc.

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

cpu_options

AWS::EC2::Instance.CpuOptions.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-cpuoptions

Return type

Union[IResolvable, CpuOptionsProperty, None]

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

Return type

List[str]

credit_specification

AWS::EC2::Instance.CreditSpecification.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-creditspecification

Return type

Union[IResolvable, CreditSpecificationProperty, None]

disable_api_termination

AWS::EC2::Instance.DisableApiTermination.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-disableapitermination

Return type

Union[bool, IResolvable, None]

ebs_optimized

AWS::EC2::Instance.EbsOptimized.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ebsoptimized

Return type

Union[bool, IResolvable, None]

elastic_gpu_specifications

AWS::EC2::Instance.ElasticGpuSpecifications.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-elasticgpuspecifications

Return type

Union[IResolvable, List[Union[IResolvable, ElasticGpuSpecificationProperty]], None]

elastic_inference_accelerators

AWS::EC2::Instance.ElasticInferenceAccelerators.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-elasticinferenceaccelerators

Return type

Union[IResolvable, List[Union[IResolvable, ElasticInferenceAcceleratorProperty]], None]

hibernation_options

AWS::EC2::Instance.HibernationOptions.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-hibernationoptions

Return type

Union[IResolvable, HibernationOptionsProperty, None]

host_id

AWS::EC2::Instance.HostId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-hostid

Return type

Optional[str]

host_resource_group_arn

AWS::EC2::Instance.HostResourceGroupArn.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-hostresourcegrouparn

Return type

Optional[str]

iam_instance_profile

AWS::EC2::Instance.IamInstanceProfile.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-iaminstanceprofile

Return type

Optional[str]

image_id

AWS::EC2::Instance.ImageId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-imageid

Return type

Optional[str]

instance_initiated_shutdown_behavior

AWS::EC2::Instance.InstanceInitiatedShutdownBehavior.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instanceinitiatedshutdownbehavior

Return type

Optional[str]

instance_type

AWS::EC2::Instance.InstanceType.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-instancetype

Return type

Optional[str]

ipv6_address_count

AWS::EC2::Instance.Ipv6AddressCount.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ipv6addresscount

Return type

Union[int, float, None]

ipv6_addresses

AWS::EC2::Instance.Ipv6Addresses.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ipv6addresses

Return type

Union[IResolvable, List[Union[IResolvable, InstanceIpv6AddressProperty]], None]

kernel_id

AWS::EC2::Instance.KernelId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-kernelid

Return type

Optional[str]

key_name

AWS::EC2::Instance.KeyName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-keyname

Return type

Optional[str]

launch_template

AWS::EC2::Instance.LaunchTemplate.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-launchtemplate

Return type

Union[IResolvable, LaunchTemplateSpecificationProperty, None]

license_specifications

AWS::EC2::Instance.LicenseSpecifications.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-licensespecifications

Return type

Union[IResolvable, List[Union[IResolvable, LicenseSpecificationProperty]], None]

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Return type

str

Returns

the logical ID as a stringified token. This value will only get resolved during synthesis.

monitoring

AWS::EC2::Instance.Monitoring.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-monitoring

Return type

Union[bool, IResolvable, None]

network_interfaces

AWS::EC2::Instance.NetworkInterfaces.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-networkinterfaces

Return type

Union[IResolvable, List[Union[IResolvable, NetworkInterfaceProperty]], None]

node

The construct tree node associated with this construct.

Return type

ConstructNode

placement_group_name

AWS::EC2::Instance.PlacementGroupName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-placementgroupname

Return type

Optional[str]

private_ip_address

AWS::EC2::Instance.PrivateIpAddress.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-privateipaddress

Return type

Optional[str]

ramdisk_id

AWS::EC2::Instance.RamdiskId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ramdiskid

Return type

Optional[str]

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

Return type

str

security_group_ids

AWS::EC2::Instance.SecurityGroupIds.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-securitygroupids

Return type

Optional[List[str]]

security_groups

AWS::EC2::Instance.SecurityGroups.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-securitygroups

Return type

Optional[List[str]]

source_dest_check

AWS::EC2::Instance.SourceDestCheck.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-sourcedestcheck

Return type

Union[bool, IResolvable, None]

ssm_associations

AWS::EC2::Instance.SsmAssociations.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-ssmassociations

Return type

Union[IResolvable, List[Union[IResolvable, SsmAssociationProperty]], None]

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

Return type

Stack

subnet_id

AWS::EC2::Instance.SubnetId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-subnetid

Return type

Optional[str]

tags

AWS::EC2::Instance.Tags.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-tags

Return type

TagManager

tenancy

AWS::EC2::Instance.Tenancy.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-tenancy

Return type

Optional[str]

user_data

AWS::EC2::Instance.UserData.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-userdata

Return type

Optional[str]

volumes

AWS::EC2::Instance.Volumes.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#cfn-ec2-instance-volumes

Return type

Union[IResolvable, List[Union[IResolvable, VolumeProperty]], None]

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters

x (Any) –

Return type

bool

Returns

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

AssociationParameterProperty

class CfnInstance.AssociationParameterProperty(*, key, value)

Bases: object

Parameters
  • key (str) – CfnInstance.AssociationParameterProperty.Key.

  • value (List[str]) – CfnInstance.AssociationParameterProperty.Value.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations-associationparameters.html

Attributes

key

CfnInstance.AssociationParameterProperty.Key.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations-associationparameters.html#cfn-ec2-instance-ssmassociations-associationparameters-key

Return type

str

value

CfnInstance.AssociationParameterProperty.Value.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations-associationparameters.html#cfn-ec2-instance-ssmassociations-associationparameters-value

Return type

List[str]

BlockDeviceMappingProperty

class CfnInstance.BlockDeviceMappingProperty(*, device_name, ebs=None, no_device=None, virtual_name=None)

Bases: object

Parameters
  • device_name (str) – CfnInstance.BlockDeviceMappingProperty.DeviceName.

  • ebs (Union[IResolvable, EbsProperty, None]) – CfnInstance.BlockDeviceMappingProperty.Ebs.

  • no_device (Union[IResolvable, NoDeviceProperty, None]) – CfnInstance.BlockDeviceMappingProperty.NoDevice.

  • virtual_name (Optional[str]) – CfnInstance.BlockDeviceMappingProperty.VirtualName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html

Attributes

device_name

CfnInstance.BlockDeviceMappingProperty.DeviceName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html#cfn-ec2-blockdev-mapping-devicename

Return type

str

ebs

CfnInstance.BlockDeviceMappingProperty.Ebs.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html#cfn-ec2-blockdev-mapping-ebs

Return type

Union[IResolvable, EbsProperty, None]

no_device

CfnInstance.BlockDeviceMappingProperty.NoDevice.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html#cfn-ec2-blockdev-mapping-nodevice

Return type

Union[IResolvable, NoDeviceProperty, None]

virtual_name

CfnInstance.BlockDeviceMappingProperty.VirtualName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html#cfn-ec2-blockdev-mapping-virtualname

Return type

Optional[str]

CpuOptionsProperty

class CfnInstance.CpuOptionsProperty(*, core_count=None, threads_per_core=None)

Bases: object

Parameters
  • core_count (Union[int, float, None]) – CfnInstance.CpuOptionsProperty.CoreCount.

  • threads_per_core (Union[int, float, None]) – CfnInstance.CpuOptionsProperty.ThreadsPerCore.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-cpuoptions.html

Attributes

core_count

CfnInstance.CpuOptionsProperty.CoreCount.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-cpuoptions.html#cfn-ec2-instance-cpuoptions-corecount

Return type

Union[int, float, None]

threads_per_core

CfnInstance.CpuOptionsProperty.ThreadsPerCore.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-cpuoptions.html#cfn-ec2-instance-cpuoptions-threadspercore

Return type

Union[int, float, None]

CreditSpecificationProperty

class CfnInstance.CreditSpecificationProperty(*, cpu_credits=None)

Bases: object

Parameters

cpu_credits (Optional[str]) – CfnInstance.CreditSpecificationProperty.CPUCredits.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-creditspecification.html

Attributes

cpu_credits

CfnInstance.CreditSpecificationProperty.CPUCredits.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-creditspecification.html#cfn-ec2-instance-creditspecification-cpucredits

Return type

Optional[str]

EbsProperty

class CfnInstance.EbsProperty(*, delete_on_termination=None, encrypted=None, iops=None, kms_key_id=None, snapshot_id=None, volume_size=None, volume_type=None)

Bases: object

Parameters
  • delete_on_termination (Union[bool, IResolvable, None]) – CfnInstance.EbsProperty.DeleteOnTermination.

  • encrypted (Union[bool, IResolvable, None]) – CfnInstance.EbsProperty.Encrypted.

  • iops (Union[int, float, None]) – CfnInstance.EbsProperty.Iops.

  • kms_key_id (Optional[str]) – CfnInstance.EbsProperty.KmsKeyId.

  • snapshot_id (Optional[str]) – CfnInstance.EbsProperty.SnapshotId.

  • volume_size (Union[int, float, None]) – CfnInstance.EbsProperty.VolumeSize.

  • volume_type (Optional[str]) – CfnInstance.EbsProperty.VolumeType.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html

Attributes

delete_on_termination

CfnInstance.EbsProperty.DeleteOnTermination.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-deleteontermination

Return type

Union[bool, IResolvable, None]

encrypted

CfnInstance.EbsProperty.Encrypted.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-encrypted

Return type

Union[bool, IResolvable, None]

iops

CfnInstance.EbsProperty.Iops.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-iops

Return type

Union[int, float, None]

kms_key_id

CfnInstance.EbsProperty.KmsKeyId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-instance-ebs-kmskeyid

Return type

Optional[str]

snapshot_id

CfnInstance.EbsProperty.SnapshotId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-snapshotid

Return type

Optional[str]

volume_size

CfnInstance.EbsProperty.VolumeSize.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-volumesize

Return type

Union[int, float, None]

volume_type

CfnInstance.EbsProperty.VolumeType.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-template.html#cfn-ec2-blockdev-template-volumetype

Return type

Optional[str]

ElasticGpuSpecificationProperty

class CfnInstance.ElasticGpuSpecificationProperty(*, type)

Bases: object

Parameters

type (str) – CfnInstance.ElasticGpuSpecificationProperty.Type.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticgpuspecification.html

Attributes

type

CfnInstance.ElasticGpuSpecificationProperty.Type.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticgpuspecification.html#cfn-ec2-instance-elasticgpuspecification-type

Return type

str

ElasticInferenceAcceleratorProperty

class CfnInstance.ElasticInferenceAcceleratorProperty(*, type, count=None)

Bases: object

Parameters
  • type (str) – CfnInstance.ElasticInferenceAcceleratorProperty.Type.

  • count (Union[int, float, None]) – CfnInstance.ElasticInferenceAcceleratorProperty.Count.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html

Attributes

count

CfnInstance.ElasticInferenceAcceleratorProperty.Count.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html#cfn-ec2-instance-elasticinferenceaccelerator-count

Return type

Union[int, float, None]

type

CfnInstance.ElasticInferenceAcceleratorProperty.Type.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-elasticinferenceaccelerator.html#cfn-ec2-instance-elasticinferenceaccelerator-type

Return type

str

HibernationOptionsProperty

class CfnInstance.HibernationOptionsProperty(*, configured=None)

Bases: object

Parameters

configured (Union[bool, IResolvable, None]) – CfnInstance.HibernationOptionsProperty.Configured.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-hibernationoptions.html

Attributes

configured

CfnInstance.HibernationOptionsProperty.Configured.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-hibernationoptions.html#cfn-ec2-instance-hibernationoptions-configured

Return type

Union[bool, IResolvable, None]

InstanceIpv6AddressProperty

class CfnInstance.InstanceIpv6AddressProperty(*, ipv6_address)

Bases: object

Parameters

ipv6_address (str) – CfnInstance.InstanceIpv6AddressProperty.Ipv6Address.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-instanceipv6address.html

Attributes

ipv6_address

CfnInstance.InstanceIpv6AddressProperty.Ipv6Address.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-instanceipv6address.html#cfn-ec2-instance-instanceipv6address-ipv6address

Return type

str

LaunchTemplateSpecificationProperty

class CfnInstance.LaunchTemplateSpecificationProperty(*, version, launch_template_id=None, launch_template_name=None)

Bases: object

Parameters
  • version (str) – CfnInstance.LaunchTemplateSpecificationProperty.Version.

  • launch_template_id (Optional[str]) – CfnInstance.LaunchTemplateSpecificationProperty.LaunchTemplateId.

  • launch_template_name (Optional[str]) – CfnInstance.LaunchTemplateSpecificationProperty.LaunchTemplateName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-launchtemplatespecification.html

Attributes

launch_template_id

CfnInstance.LaunchTemplateSpecificationProperty.LaunchTemplateId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-launchtemplatespecification.html#cfn-ec2-instance-launchtemplatespecification-launchtemplateid

Return type

Optional[str]

launch_template_name

CfnInstance.LaunchTemplateSpecificationProperty.LaunchTemplateName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-launchtemplatespecification.html#cfn-ec2-instance-launchtemplatespecification-launchtemplatename

Return type

Optional[str]

version

CfnInstance.LaunchTemplateSpecificationProperty.Version.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-launchtemplatespecification.html#cfn-ec2-instance-launchtemplatespecification-version

Return type

str

LicenseSpecificationProperty

class CfnInstance.LicenseSpecificationProperty(*, license_configuration_arn)

Bases: object

Parameters

license_configuration_arn (str) – CfnInstance.LicenseSpecificationProperty.LicenseConfigurationArn.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-licensespecification.html

Attributes

license_configuration_arn

CfnInstance.LicenseSpecificationProperty.LicenseConfigurationArn.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-licensespecification.html#cfn-ec2-instance-licensespecification-licenseconfigurationarn

Return type

str

NetworkInterfaceProperty

class CfnInstance.NetworkInterfaceProperty(*, device_index, associate_public_ip_address=None, delete_on_termination=None, description=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: object

Parameters
  • device_index (str) – CfnInstance.NetworkInterfaceProperty.DeviceIndex.

  • associate_public_ip_address (Union[bool, IResolvable, None]) – CfnInstance.NetworkInterfaceProperty.AssociatePublicIpAddress.

  • delete_on_termination (Union[bool, IResolvable, None]) – CfnInstance.NetworkInterfaceProperty.DeleteOnTermination.

  • description (Optional[str]) – CfnInstance.NetworkInterfaceProperty.Description.

  • group_set (Optional[List[str]]) – CfnInstance.NetworkInterfaceProperty.GroupSet.

  • ipv6_address_count (Union[int, float, None]) – CfnInstance.NetworkInterfaceProperty.Ipv6AddressCount.

  • ipv6_addresses (Union[IResolvable, List[Union[IResolvable, InstanceIpv6AddressProperty]], None]) – CfnInstance.NetworkInterfaceProperty.Ipv6Addresses.

  • network_interface_id (Optional[str]) – CfnInstance.NetworkInterfaceProperty.NetworkInterfaceId.

  • private_ip_address (Optional[str]) – CfnInstance.NetworkInterfaceProperty.PrivateIpAddress.

  • private_ip_addresses (Union[IResolvable, List[Union[IResolvable, PrivateIpAddressSpecificationProperty]], None]) – CfnInstance.NetworkInterfaceProperty.PrivateIpAddresses.

  • secondary_private_ip_address_count (Union[int, float, None]) – CfnInstance.NetworkInterfaceProperty.SecondaryPrivateIpAddressCount.

  • subnet_id (Optional[str]) – CfnInstance.NetworkInterfaceProperty.SubnetId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html

Attributes

associate_public_ip_address

CfnInstance.NetworkInterfaceProperty.AssociatePublicIpAddress.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-associatepubip

Return type

Union[bool, IResolvable, None]

delete_on_termination

CfnInstance.NetworkInterfaceProperty.DeleteOnTermination.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-delete

Return type

Union[bool, IResolvable, None]

description

CfnInstance.NetworkInterfaceProperty.Description.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-description

Return type

Optional[str]

device_index

CfnInstance.NetworkInterfaceProperty.DeviceIndex.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-deviceindex

Return type

str

group_set

CfnInstance.NetworkInterfaceProperty.GroupSet.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-groupset

Return type

Optional[List[str]]

ipv6_address_count

CfnInstance.NetworkInterfaceProperty.Ipv6AddressCount.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#cfn-ec2-instance-networkinterface-ipv6addresscount

Return type

Union[int, float, None]

ipv6_addresses

CfnInstance.NetworkInterfaceProperty.Ipv6Addresses.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#cfn-ec2-instance-networkinterface-ipv6addresses

Return type

Union[IResolvable, List[Union[IResolvable, InstanceIpv6AddressProperty]], None]

network_interface_id

CfnInstance.NetworkInterfaceProperty.NetworkInterfaceId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-network-iface

Return type

Optional[str]

private_ip_address

CfnInstance.NetworkInterfaceProperty.PrivateIpAddress.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-privateipaddress

Return type

Optional[str]

private_ip_addresses

CfnInstance.NetworkInterfaceProperty.PrivateIpAddresses.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-privateipaddresses

Return type

Union[IResolvable, List[Union[IResolvable, PrivateIpAddressSpecificationProperty]], None]

secondary_private_ip_address_count

CfnInstance.NetworkInterfaceProperty.SecondaryPrivateIpAddressCount.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-secondprivateip

Return type

Union[int, float, None]

subnet_id

CfnInstance.NetworkInterfaceProperty.SubnetId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-iface-embedded.html#aws-properties-ec2-network-iface-embedded-subnetid

Return type

Optional[str]

NoDeviceProperty

class CfnInstance.NoDeviceProperty

Bases: object

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-nodevice.html

PrivateIpAddressSpecificationProperty

class CfnInstance.PrivateIpAddressSpecificationProperty(*, primary, private_ip_address)

Bases: object

Parameters
  • primary (Union[bool, IResolvable]) – CfnInstance.PrivateIpAddressSpecificationProperty.Primary.

  • private_ip_address (str) – CfnInstance.PrivateIpAddressSpecificationProperty.PrivateIpAddress.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html

Attributes

primary

CfnInstance.PrivateIpAddressSpecificationProperty.Primary.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-primary

Return type

Union[bool, IResolvable]

private_ip_address

CfnInstance.PrivateIpAddressSpecificationProperty.PrivateIpAddress.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-network-interface-privateipspec.html#cfn-ec2-networkinterface-privateipspecification-privateipaddress

Return type

str

SsmAssociationProperty

class CfnInstance.SsmAssociationProperty(*, document_name, association_parameters=None)

Bases: object

Parameters
See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations.html

Attributes

association_parameters

CfnInstance.SsmAssociationProperty.AssociationParameters.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations.html#cfn-ec2-instance-ssmassociations-associationparameters

Return type

Union[IResolvable, List[Union[IResolvable, AssociationParameterProperty]], None]

document_name

CfnInstance.SsmAssociationProperty.DocumentName.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance-ssmassociations.html#cfn-ec2-instance-ssmassociations-documentname

Return type

str

VolumeProperty

class CfnInstance.VolumeProperty(*, device, volume_id)

Bases: object

Parameters
  • device (str) – CfnInstance.VolumeProperty.Device.

  • volume_id (str) – CfnInstance.VolumeProperty.VolumeId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-mount-point.html

Attributes

device

CfnInstance.VolumeProperty.Device.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-mount-point.html#cfn-ec2-mountpoint-device

Return type

str

volume_id

CfnInstance.VolumeProperty.VolumeId.

See

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-mount-point.html#cfn-ec2-mountpoint-volumeid

Return type

str