CfnInstancePropsMixin

class aws_cdk.mixins_preview.aws_lightsail.mixins.CfnInstancePropsMixin(props, *, strategy=None)

Bases: Mixin

The AWS::Lightsail::Instance resource specifies an Amazon Lightsail instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-instance.html

CloudformationResource:

AWS::Lightsail::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_lightsail import mixins as lightsail_mixins

cfn_instance_props_mixin = lightsail_mixins.CfnInstancePropsMixin(lightsail_mixins.CfnInstanceMixinProps(
    add_ons=[lightsail_mixins.CfnInstancePropsMixin.AddOnProperty(
        add_on_type="addOnType",
        auto_snapshot_add_on_request=lightsail_mixins.CfnInstancePropsMixin.AutoSnapshotAddOnProperty(
            snapshot_time_of_day="snapshotTimeOfDay"
        ),
        status="status"
    )],
    availability_zone="availabilityZone",
    blueprint_id="blueprintId",
    bundle_id="bundleId",
    hardware=lightsail_mixins.CfnInstancePropsMixin.HardwareProperty(
        cpu_count=123,
        disks=[lightsail_mixins.CfnInstancePropsMixin.DiskProperty(
            attached_to="attachedTo",
            attachment_state="attachmentState",
            disk_name="diskName",
            iops=123,
            is_system_disk=False,
            path="path",
            size_in_gb="sizeInGb"
        )],
        ram_size_in_gb=123
    ),
    instance_name="instanceName",
    key_pair_name="keyPairName",
    location=lightsail_mixins.CfnInstancePropsMixin.LocationProperty(
        availability_zone="availabilityZone",
        region_name="regionName"
    ),
    networking=lightsail_mixins.CfnInstancePropsMixin.NetworkingProperty(
        monthly_transfer=lightsail_mixins.CfnInstancePropsMixin.MonthlyTransferProperty(
            gb_per_month_allocated="gbPerMonthAllocated"
        ),
        ports=[lightsail_mixins.CfnInstancePropsMixin.PortProperty(
            access_direction="accessDirection",
            access_from="accessFrom",
            access_type="accessType",
            cidr_list_aliases=["cidrListAliases"],
            cidrs=["cidrs"],
            common_name="commonName",
            from_port=123,
            ipv6_cidrs=["ipv6Cidrs"],
            protocol="protocol",
            to_port=123
        )]
    ),
    state=lightsail_mixins.CfnInstancePropsMixin.StateProperty(
        code=123,
        name="name"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_data="userData"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Lightsail::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:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['addOns', 'availabilityZone', 'blueprintId', 'bundleId', 'hardware', 'instanceName', 'keyPairName', 'location', 'networking', 'state', 'tags', 'userData']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

AddOnProperty

class CfnInstancePropsMixin.AddOnProperty(*, add_on_type=None, auto_snapshot_add_on_request=None, status=None)

Bases: object

AddOn is a property of the AWS::Lightsail::Instance resource. It describes the add-ons for an instance.

Parameters:
  • add_on_type (Optional[str]) – The add-on type (for example, AutoSnapshot ). .. epigraph:: AutoSnapshot is the only add-on that can be enabled for an instance.

  • auto_snapshot_add_on_request (Union[IResolvable, AutoSnapshotAddOnProperty, Dict[str, Any], None]) – The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.

  • status (Optional[str]) – The status of the add-on. Valid Values: Enabled | Disabled

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.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_lightsail import mixins as lightsail_mixins

add_on_property = lightsail_mixins.CfnInstancePropsMixin.AddOnProperty(
    add_on_type="addOnType",
    auto_snapshot_add_on_request=lightsail_mixins.CfnInstancePropsMixin.AutoSnapshotAddOnProperty(
        snapshot_time_of_day="snapshotTimeOfDay"
    ),
    status="status"
)

Attributes

add_on_type

The add-on type (for example, AutoSnapshot ).

AutoSnapshot is the only add-on that can be enabled for an instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-addontype

auto_snapshot_add_on_request

The parameters for the automatic snapshot add-on, such as the daily time when an automatic snapshot will be created.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-autosnapshotaddonrequest

status

The status of the add-on.

Valid Values: Enabled | Disabled

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-addon.html#cfn-lightsail-instance-addon-status

AutoSnapshotAddOnProperty

class CfnInstancePropsMixin.AutoSnapshotAddOnProperty(*, snapshot_time_of_day=None)

Bases: object

AutoSnapshotAddOn is a property of the AddOn property. It describes the automatic snapshot add-on for an instance.

Parameters:

snapshot_time_of_day (Optional[str]) – The daily time when an automatic snapshot will be created. Constraints: - Must be in HH:00 format, and in an hourly increment. - Specified in Coordinated Universal Time (UTC). - The snapshot will be automatically created between the time specified and up to 45 minutes after.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-autosnapshotaddon.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_lightsail import mixins as lightsail_mixins

auto_snapshot_add_on_property = lightsail_mixins.CfnInstancePropsMixin.AutoSnapshotAddOnProperty(
    snapshot_time_of_day="snapshotTimeOfDay"
)

Attributes

snapshot_time_of_day

The daily time when an automatic snapshot will be created.

Constraints:

  • Must be in HH:00 format, and in an hourly increment.

  • Specified in Coordinated Universal Time (UTC).

  • The snapshot will be automatically created between the time specified and up to 45 minutes after.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-autosnapshotaddon.html#cfn-lightsail-instance-autosnapshotaddon-snapshottimeofday

DiskProperty

class CfnInstancePropsMixin.DiskProperty(*, attached_to=None, attachment_state=None, disk_name=None, iops=None, is_system_disk=None, path=None, size_in_gb=None)

Bases: object

Disk is a property of the Hardware property. It describes a disk attached to an instance.

Parameters:
  • attached_to (Optional[str]) – The resources to which the disk is attached.

  • attachment_state (Optional[str]) – (Deprecated) The attachment state of the disk. .. epigraph:: In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.

  • disk_name (Optional[str]) – The unique name of the disk.

  • iops (Union[int, float, None]) – The input/output operations per second (IOPS) of the disk.

  • is_system_disk (Union[bool, IResolvable, None]) – A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

  • path (Optional[str]) – The disk path.

  • size_in_gb (Optional[str]) – The size of the disk in GB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.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_lightsail import mixins as lightsail_mixins

disk_property = lightsail_mixins.CfnInstancePropsMixin.DiskProperty(
    attached_to="attachedTo",
    attachment_state="attachmentState",
    disk_name="diskName",
    iops=123,
    is_system_disk=False,
    path="path",
    size_in_gb="sizeInGb"
)

Attributes

attached_to

The resources to which the disk is attached.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-attachedto

attachment_state

(Deprecated) The attachment state of the disk.

In releases prior to November 14, 2017, this parameter returned attached for system disks in the API response. It is now deprecated, but still included in the response. Use isAttached instead.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-attachmentstate

disk_name

The unique name of the disk.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-diskname

iops

The input/output operations per second (IOPS) of the disk.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-iops

is_system_disk

A Boolean value indicating whether this disk is a system disk (has an operating system loaded on it).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-issystemdisk

path

The disk path.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-path

size_in_gb

The size of the disk in GB.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-disk.html#cfn-lightsail-instance-disk-sizeingb

HardwareProperty

class CfnInstancePropsMixin.HardwareProperty(*, cpu_count=None, disks=None, ram_size_in_gb=None)

Bases: object

Hardware is a property of the AWS::Lightsail::Instance resource. It describes the hardware properties for the instance, such as the vCPU count, attached disks, and amount of RAM.

Parameters:
  • cpu_count (Union[int, float, None]) – The number of vCPUs the instance has. .. epigraph:: The CpuCount property is read-only and should not be specified in a create instance or update instance request.

  • disks (Union[IResolvable, Sequence[Union[IResolvable, DiskProperty, Dict[str, Any]]], None]) – The disks attached to the instance. The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn’t attached to it.

  • ram_size_in_gb (Union[int, float, None]) – The amount of RAM in GB on the instance (for example, 1.0 ). .. epigraph:: The RamSizeInGb property is read-only and should not be specified in a create instance or update instance request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.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_lightsail import mixins as lightsail_mixins

hardware_property = lightsail_mixins.CfnInstancePropsMixin.HardwareProperty(
    cpu_count=123,
    disks=[lightsail_mixins.CfnInstancePropsMixin.DiskProperty(
        attached_to="attachedTo",
        attachment_state="attachmentState",
        disk_name="diskName",
        iops=123,
        is_system_disk=False,
        path="path",
        size_in_gb="sizeInGb"
    )],
    ram_size_in_gb=123
)

Attributes

cpu_count

The number of vCPUs the instance has.

The CpuCount property is read-only and should not be specified in a create instance or update instance request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html#cfn-lightsail-instance-hardware-cpucount

disks

The disks attached to the instance.

The instance restarts when performing an attach disk or detach disk request. This resets the public IP address of your instance if a static IP isn’t attached to it.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html#cfn-lightsail-instance-hardware-disks

ram_size_in_gb

The amount of RAM in GB on the instance (for example, 1.0 ).

The RamSizeInGb property is read-only and should not be specified in a create instance or update instance request.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-hardware.html#cfn-lightsail-instance-hardware-ramsizeingb

LocationProperty

class CfnInstancePropsMixin.LocationProperty(*, availability_zone=None, region_name=None)

Bases: object

Location is a property of the AWS::Lightsail::Instance resource. It describes the location for an instance.

Parameters:
  • availability_zone (Optional[str]) – The Availability Zone for the instance.

  • region_name (Optional[str]) – The name of the AWS Region for the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-location.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_lightsail import mixins as lightsail_mixins

location_property = lightsail_mixins.CfnInstancePropsMixin.LocationProperty(
    availability_zone="availabilityZone",
    region_name="regionName"
)

Attributes

availability_zone

The Availability Zone for the instance.

See:

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

region_name

The name of the AWS Region for the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-location.html#cfn-lightsail-instance-location-regionname

MonthlyTransferProperty

class CfnInstancePropsMixin.MonthlyTransferProperty(*, gb_per_month_allocated=None)

Bases: object

MonthlyTransfer is a property of the Networking property. It describes the amount of allocated monthly data transfer (in GB) for an instance.

Parameters:

gb_per_month_allocated (Optional[str]) – The amount of allocated monthly data transfer (in GB) for an instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-monthlytransfer.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_lightsail import mixins as lightsail_mixins

monthly_transfer_property = lightsail_mixins.CfnInstancePropsMixin.MonthlyTransferProperty(
    gb_per_month_allocated="gbPerMonthAllocated"
)

Attributes

gb_per_month_allocated

The amount of allocated monthly data transfer (in GB) for an instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-monthlytransfer.html#cfn-lightsail-instance-monthlytransfer-gbpermonthallocated

NetworkingProperty

class CfnInstancePropsMixin.NetworkingProperty(*, monthly_transfer=None, ports=None)

Bases: object

Networking is a property of the AWS::Lightsail::Instance resource. It describes the public ports and the monthly amount of data transfer allocated for the instance.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.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_lightsail import mixins as lightsail_mixins

networking_property = lightsail_mixins.CfnInstancePropsMixin.NetworkingProperty(
    monthly_transfer=lightsail_mixins.CfnInstancePropsMixin.MonthlyTransferProperty(
        gb_per_month_allocated="gbPerMonthAllocated"
    ),
    ports=[lightsail_mixins.CfnInstancePropsMixin.PortProperty(
        access_direction="accessDirection",
        access_from="accessFrom",
        access_type="accessType",
        cidr_list_aliases=["cidrListAliases"],
        cidrs=["cidrs"],
        common_name="commonName",
        from_port=123,
        ipv6_cidrs=["ipv6Cidrs"],
        protocol="protocol",
        to_port=123
    )]
)

Attributes

monthly_transfer

The monthly amount of data transfer, in GB, allocated for the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.html#cfn-lightsail-instance-networking-monthlytransfer

ports

An array of ports to open on the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-networking.html#cfn-lightsail-instance-networking-ports

PortProperty

class CfnInstancePropsMixin.PortProperty(*, access_direction=None, access_from=None, access_type=None, cidr_list_aliases=None, cidrs=None, common_name=None, from_port=None, ipv6_cidrs=None, protocol=None, to_port=None)

Bases: object

Port is a property of the Networking property. It describes information about ports for an instance.

Parameters:
  • access_direction (Optional[str]) – The access direction ( inbound or outbound ). .. epigraph:: Lightsail currently supports only inbound access direction.

  • access_from (Optional[str]) – The location from which access is allowed. For example, Anywhere (0.0.0.0/0) , or Custom if a specific IP address or range of IP addresses is allowed.

  • access_type (Optional[str]) – The type of access ( Public or Private ).

  • cidr_list_aliases (Optional[Sequence[str]]) – An alias that defines access for a preconfigured range of IP addresses. The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.

  • cidrs (Optional[Sequence[str]]) – The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. .. epigraph:: The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance. Examples: - To allow the IP address 192.0.2.44 , specify 192.0.2.44 or 192.0.2.44/32 . - To allow the IP addresses 192.0.2.0 to 192.0.2.255 , specify 192.0.2.0/24 .

  • common_name (Optional[str]) – The common name of the port information.

  • from_port (Union[int, float, None]) – The first port in a range of open ports on an instance. Allowed ports: - TCP and UDP - 0 to 65535 - ICMP - The ICMP type for IPv4 addresses. For example, specify 8 as the fromPort (ICMP type), and -1 as the toPort (ICMP code), to enable ICMP Ping. - ICMPv6 - The ICMP type for IPv6 addresses. For example, specify 128 as the fromPort (ICMPv6 type), and 0 as toPort (ICMPv6 code).

  • ipv6_cidrs (Optional[Sequence[str]]) – The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol. Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used. .. epigraph:: The cidrs parameter lists the IPv4 addresses that are allowed to connect to an instance.

  • protocol (Optional[str]) – The IP protocol name. The name can be one of the following: - tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn’t require reliable data stream service, use UDP instead. - all - All transport layer protocol types. - udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don’t require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead. - icmp - Internet Control Message Protocol (ICMP) is used to send error messages and operational information indicating success or failure when communicating with an instance. For example, an error is indicated when an instance could not be reached. When you specify icmp as the protocol , you must specify the ICMP type using the fromPort parameter, and ICMP code using the toPort parameter.

  • to_port (Union[int, float, None]) – The last port in a range of open ports on an instance. Allowed ports: - TCP and UDP - 0 to 65535 - ICMP - The ICMP code for IPv4 addresses. For example, specify 8 as the fromPort (ICMP type), and -1 as the toPort (ICMP code), to enable ICMP Ping. - ICMPv6 - The ICMP code for IPv6 addresses. For example, specify 128 as the fromPort (ICMPv6 type), and 0 as toPort (ICMPv6 code).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.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_lightsail import mixins as lightsail_mixins

port_property = lightsail_mixins.CfnInstancePropsMixin.PortProperty(
    access_direction="accessDirection",
    access_from="accessFrom",
    access_type="accessType",
    cidr_list_aliases=["cidrListAliases"],
    cidrs=["cidrs"],
    common_name="commonName",
    from_port=123,
    ipv6_cidrs=["ipv6Cidrs"],
    protocol="protocol",
    to_port=123
)

Attributes

access_direction

The access direction ( inbound or outbound ).

Lightsail currently supports only inbound access direction.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-accessdirection

access_from

The location from which access is allowed.

For example, Anywhere (0.0.0.0/0) , or Custom if a specific IP address or range of IP addresses is allowed.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-accessfrom

access_type

The type of access ( Public or Private ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-accesstype

cidr_list_aliases

An alias that defines access for a preconfigured range of IP addresses.

The only alias currently supported is lightsail-connect , which allows IP addresses of the browser-based RDP/SSH client in the Lightsail console to connect to your instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-cidrlistaliases

cidrs

The IPv4 address, or range of IPv4 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.

The ipv6Cidrs parameter lists the IPv6 addresses that are allowed to connect to an instance.

Examples:

  • To allow the IP address 192.0.2.44 , specify 192.0.2.44 or 192.0.2.44/32 .

  • To allow the IP addresses 192.0.2.0 to 192.0.2.255 , specify 192.0.2.0/24 .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-cidrs

common_name

The common name of the port information.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-commonname

from_port

The first port in a range of open ports on an instance.

Allowed ports:

  • TCP and UDP - 0 to 65535

  • ICMP - The ICMP type for IPv4 addresses. For example, specify 8 as the fromPort (ICMP type), and -1 as the toPort (ICMP code), to enable ICMP Ping.

  • ICMPv6 - The ICMP type for IPv6 addresses. For example, specify 128 as the fromPort (ICMPv6 type), and 0 as toPort (ICMPv6 code).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-fromport

ipv6_cidrs

The IPv6 address, or range of IPv6 addresses (in CIDR notation) that are allowed to connect to an instance through the ports, and the protocol.

Only devices with an IPv6 address can connect to an instance through IPv6; otherwise, IPv4 should be used. .. epigraph:

The ``cidrs`` parameter lists the IPv4 addresses that are allowed to connect to an instance.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-ipv6cidrs

protocol

The IP protocol name.

The name can be one of the following:

  • tcp - Transmission Control Protocol (TCP) provides reliable, ordered, and error-checked delivery of streamed data between applications running on hosts communicating by an IP network. If you have an application that doesn’t require reliable data stream service, use UDP instead.

  • all - All transport layer protocol types.

  • udp - With User Datagram Protocol (UDP), computer applications can send messages (or datagrams) to other hosts on an Internet Protocol (IP) network. Prior communications are not required to set up transmission channels or data paths. Applications that don’t require reliable data stream service can use UDP, which provides a connectionless datagram service that emphasizes reduced latency over reliability. If you do require reliable data stream service, use TCP instead.

  • icmp - Internet Control Message Protocol (ICMP) is used to send error messages and operational information indicating success or failure when communicating with an instance. For example, an error is indicated when an instance could not be reached. When you specify icmp as the protocol , you must specify the ICMP type using the fromPort parameter, and ICMP code using the toPort parameter.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-protocol

to_port

The last port in a range of open ports on an instance.

Allowed ports:

  • TCP and UDP - 0 to 65535

  • ICMP - The ICMP code for IPv4 addresses. For example, specify 8 as the fromPort (ICMP type), and -1 as the toPort (ICMP code), to enable ICMP Ping.

  • ICMPv6 - The ICMP code for IPv6 addresses. For example, specify 128 as the fromPort (ICMPv6 type), and 0 as toPort (ICMPv6 code).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-port.html#cfn-lightsail-instance-port-toport

StateProperty

class CfnInstancePropsMixin.StateProperty(*, code=None, name=None)

Bases: object

State is a property of the AWS::Lightsail::Instance resource. It describes the status code and the state (for example, running ) of an instance.

Parameters:
  • code (Union[int, float, None]) – The status code of the instance.

  • name (Optional[str]) – The state of the instance (for example, running or pending ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-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_lightsail import mixins as lightsail_mixins

state_property = lightsail_mixins.CfnInstancePropsMixin.StateProperty(
    code=123,
    name="name"
)

Attributes

code

The status code of the instance.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-state.html#cfn-lightsail-instance-state-code

name

The state of the instance (for example, running or pending ).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lightsail-instance-state.html#cfn-lightsail-instance-state-name