CfnDiskProps

class aws_cdk.aws_lightsail.CfnDiskProps(*, disk_name, size_in_gb, add_ons=None, availability_zone=None, tags=None)

Bases: object

Properties for defining a CfnDisk.

Parameters
  • disk_name (str) – The name of the disk.

  • size_in_gb (Union[int, float]) – The size of the disk in GB.

  • add_ons (Union[IResolvable, Sequence[Union[IResolvable, AddOnProperty, Dict[str, Any]]], None]) – An array of add-ons for the disk. .. epigraph:: If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.

  • availability_zone (Optional[str]) – The AWS Region and Availability Zone location for the disk (for example, us-east-1a ).

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – An array of key-value pairs to apply to this resource. For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:: The Value of Tags is optional for Lightsail resources.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lightsail-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.
import aws_cdk.aws_lightsail as lightsail

cfn_disk_props = lightsail.CfnDiskProps(
    disk_name="diskName",
    size_in_gb=123,

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

        # the properties below are optional
        auto_snapshot_add_on_request=lightsail.CfnDisk.AutoSnapshotAddOnProperty(
            snapshot_time_of_day="snapshotTimeOfDay"
        ),
        status="status"
    )],
    availability_zone="availabilityZone",
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)

Attributes

add_ons

An array of add-ons for the disk.

If the disk has an add-on enabled when performing a delete disk request, the add-on is automatically disabled before the disk is deleted.

Link

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

Return type

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

availability_zone

The AWS Region and Availability Zone location for the disk (for example, us-east-1a ).

Link

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

Return type

Optional[str]

disk_name

The name of the disk.

Link

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

Return type

str

size_in_gb

The size of the disk in GB.

Link

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

Return type

Union[int, float]

tags

An array of key-value pairs to apply to this resource.

For more information, see Tag in the AWS CloudFormation User Guide . .. epigraph:

The ``Value`` of ``Tags`` is optional for Lightsail resources.
Link

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

Return type

Optional[List[CfnTag]]