CfnInstanceProps

class aws_cdk.aws_lightsail.CfnInstanceProps(*, add_ons=None, availability_zone=None, blueprint_id, bundle_id, hardware=None, instance_name, key_pair_name=None, networking=None, tags=None, user_data=None)

Bases: object

Properties for defining a AWS::Lightsail::Instance.

Parameters
  • add_ons (Union[IResolvable, Sequence[Union[IResolvable, AddOnProperty]], None]) – AWS::Lightsail::Instance.AddOns.

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

  • blueprint_id (str) – AWS::Lightsail::Instance.BlueprintId.

  • bundle_id (str) – AWS::Lightsail::Instance.BundleId.

  • hardware (Union[IResolvable, HardwareProperty, None]) – AWS::Lightsail::Instance.Hardware.

  • instance_name (str) – AWS::Lightsail::Instance.InstanceName.

  • key_pair_name (Optional[str]) – AWS::Lightsail::Instance.KeyPairName.

  • networking (Union[IResolvable, NetworkingProperty, None]) – AWS::Lightsail::Instance.Networking.

  • tags (Optional[Sequence[CfnTag]]) – AWS::Lightsail::Instance.Tags.

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

Link

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

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_lightsail as lightsail

cfn_instance_props = lightsail.CfnInstanceProps(
    blueprint_id="blueprintId",
    bundle_id="bundleId",
    instance_name="instanceName",

    # the properties below are optional
    add_ons=[lightsail.CfnInstance.AddOnProperty(
        add_on_type="addOnType",

        # the properties below are optional
        auto_snapshot_add_on_request=lightsail.CfnInstance.AutoSnapshotAddOnProperty(
            snapshot_time_of_day="snapshotTimeOfDay"
        ),
        status="status"
    )],
    availability_zone="availabilityZone",
    hardware=lightsail.CfnInstance.HardwareProperty(
        cpu_count=123,
        disks=[lightsail.CfnInstance.DiskProperty(
            disk_name="diskName",
            path="path",

            # the properties below are optional
            attached_to="attachedTo",
            attachment_state="attachmentState",
            iops=123,
            is_system_disk=False,
            size_in_gb="sizeInGb"
        )],
        ram_size_in_gb=123
    ),
    key_pair_name="keyPairName",
    networking=lightsail.CfnInstance.NetworkingProperty(
        ports=[lightsail.CfnInstance.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
        )],

        # the properties below are optional
        monthly_transfer=123
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    user_data="userData"
)

Attributes

add_ons

AWS::Lightsail::Instance.AddOns.

Link

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

Return type

Union[IResolvable, List[Union[IResolvable, AddOnProperty]], None]

availability_zone

AWS::Lightsail::Instance.AvailabilityZone.

Link

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

Return type

Optional[str]

blueprint_id

AWS::Lightsail::Instance.BlueprintId.

Link

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

Return type

str

bundle_id

AWS::Lightsail::Instance.BundleId.

Link

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

Return type

str

hardware

AWS::Lightsail::Instance.Hardware.

Link

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

Return type

Union[IResolvable, HardwareProperty, None]

instance_name

AWS::Lightsail::Instance.InstanceName.

Link

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

Return type

str

key_pair_name

AWS::Lightsail::Instance.KeyPairName.

Link

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

Return type

Optional[str]

networking

AWS::Lightsail::Instance.Networking.

Link

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

Return type

Union[IResolvable, NetworkingProperty, None]

tags

AWS::Lightsail::Instance.Tags.

Link

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

Return type

Optional[List[CfnTag]]

user_data

AWS::Lightsail::Instance.UserData.

Link

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

Return type

Optional[str]