Skip to content

Disks

This class encapsulates and extends the ROS resource type DATASOURCE::ECS::Disks, which is used to query the Elastic Block Storage (EBS) devices that you created.

The following EBS devices are supported: cloud disks and local disks.

Initializers

from ros_cdk_ecs import datasource
datasource.Disks(
  scope: Construct,
  id: str,
  additional_attributes: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
  auto_snapshot_policy_id: typing.Union[str, IResolvable] = None,
  category: typing.Union[str, IResolvable] = None,
  delete_auto_snapshot: typing.Union[str, IResolvable] = None,
  delete_with_instance: typing.Union[bool, IResolvable] = None,
  disk_charge_type: typing.Union[str, IResolvable] = None,
  disk_ids: typing.Union[IResolvable, typing.List[typing.Union[str, IResolvable]]] = None,
  disk_name: typing.Union[str, IResolvable] = None,
  disk_type: typing.Union[str, IResolvable] = None,
  enable_automated_snapshot_policy: typing.Union[bool, IResolvable] = None,
  enable_auto_snapshot: typing.Union[bool, IResolvable] = None,
  enable_shared: typing.Union[str, IResolvable] = None,
  encrypted: typing.Union[bool, IResolvable] = None,
  filters: typing.Union[IResolvable, typing.List[typing.Union[FiltersProperty, IResolvable]]] = None,
  instance_id: typing.Union[str, IResolvable] = None,
  kms_key_id: typing.Union[str, IResolvable] = None,
  multi_attach: typing.Union[str, IResolvable] = None,
  portable: typing.Union[str, IResolvable] = None,
  refresh_options: typing.Union[str, IResolvable] = None,
  resource_group_id: typing.Union[str, IResolvable] = None,
  snapshot_id: typing.Union[str, IResolvable] = None,
  status: typing.Union[str, IResolvable] = None,
  tags: typing.List[TagsProperty] = None,
  zone_id: typing.Union[str, IResolvable] = None,
  enable_resource_property_constraint: bool = None
)
Name Type Description
scope ros_cdk_core.Construct No description.
id str No description.
additional_attributes typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property additionalAttributes: The value of attribute N.
auto_snapshot_policy_id typing.Union[str, ros_cdk_core.IResolvable] Property autoSnapshotPolicyId: The ID of the automatic snapshot policy that is applied to the cloud disk.
category typing.Union[str, ros_cdk_core.IResolvable] Property category: The category of the disk.
delete_auto_snapshot typing.Union[str, ros_cdk_core.IResolvable] Property deleteAutoSnapshot: Specifies whether to delete the automatic snapshots of the cloud disk when the disk is released.
delete_with_instance typing.Union[bool, ros_cdk_core.IResolvable] Property deleteWithInstance: Specifies whether to release the cloud disk when its associated instance is released.
disk_charge_type typing.Union[str, ros_cdk_core.IResolvable] Property diskChargeType: The billing method of the disk.
disk_ids typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]] Property diskIds: The IDs of disks.
disk_name typing.Union[str, ros_cdk_core.IResolvable] Property diskName: The name of the disk.
disk_type typing.Union[str, ros_cdk_core.IResolvable] Property diskType: The type of the disk.
enable_automated_snapshot_policy typing.Union[bool, ros_cdk_core.IResolvable] Property enableAutomatedSnapshotPolicy: Specifies whether an automatic snapshot policy is applied to the cloud disk.
enable_auto_snapshot typing.Union[bool, ros_cdk_core.IResolvable] Property enableAutoSnapshot: Specifies whether the automatic snapshot policy feature is enabled for the cloud disk.
enable_shared typing.Union[str, ros_cdk_core.IResolvable] Property enableShared: Specifies whether the disk is a Shared Block Storage device.
encrypted typing.Union[bool, ros_cdk_core.IResolvable] Property encrypted: Specifies whether to query only encrypted cloud disks.
filters typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_ecs.datasource.RosDisks.FiltersProperty, ros_cdk_core.IResolvable]]] Property filters: Filter value when querying resources.
instance_id typing.Union[str, ros_cdk_core.IResolvable] Property instanceId: The ID of the instance to which the disk is attached.
kms_key_id typing.Union[str, ros_cdk_core.IResolvable] Property kmsKeyId: The ID of the Key Management Service (KMS) key used by the cloud disk.
multi_attach typing.Union[str, ros_cdk_core.IResolvable] Property multiAttach: Specifies whether the multi-attach feature is enabled for the disk.
portable typing.Union[str, ros_cdk_core.IResolvable] Property portable: Specifies whether the disk is removable.
refresh_options typing.Union[str, ros_cdk_core.IResolvable] Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.
resource_group_id typing.Union[str, ros_cdk_core.IResolvable] Property resourceGroupId: The ID of the resource group to which the disk belongs.
snapshot_id typing.Union[str, ros_cdk_core.IResolvable] Property snapshotId: The ID of the snapshot used to create the cloud disk.
status typing.Union[str, ros_cdk_core.IResolvable] Property status: The state of the cloud disk.
tags typing.List[ros_cdk_ecs.datasource.RosDisks.TagsProperty] Property tags: Tags of disks.
zone_id typing.Union[str, ros_cdk_core.IResolvable] Property zoneId: The ID of the zone for which to query resources.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

additional_attributesOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

Property additionalAttributes: The value of attribute N.

Set the value to IOPS, which indicates the maximum IOPS of the disk.


auto_snapshot_policy_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property autoSnapshotPolicyId: The ID of the automatic snapshot policy that is applied to the cloud disk.


categoryOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property category: The category of the disk.

Valid values: all: all disk categories cloud: basic disk cloud_efficiency: ultra disk cloud_ssd: standard SSD ephemeral: retired local disk ephemeral_ssd: local SSD cloud_essd: ESSD local_ssd_pro: I/O-intensive local disk local_hdd_pro: throughput-intensive local disk


delete_auto_snapshotOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property deleteAutoSnapshot: Specifies whether to delete the automatic snapshots of the cloud disk when the disk is released.

Default value: false.


delete_with_instanceOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property deleteWithInstance: Specifies whether to release the cloud disk when its associated instance is released.

Valid values: true: The cloud disk is released when its associated instance is released. false: The cloud disk is not released but is retained as a pay-as-you-go data disk when its associated instance is released. Default value: false.


disk_charge_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property diskChargeType: The billing method of the disk.

Valid values: PrePaid: subscription PostPaid: pay-as-you-go


disk_idsOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[str, ros_cdk_core.IResolvable]]]

Property diskIds: The IDs of disks.

The value is a JSON array that consists of up to 100 disk IDs. Separate the disk IDs with commas (,).


disk_nameOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property diskName: The name of the disk.


disk_typeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property diskType: The type of the disk.

Valid values: all: system disk and data disk system: system disk data: data disk Default value: all.


enable_automated_snapshot_policyOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property enableAutomatedSnapshotPolicy: Specifies whether an automatic snapshot policy is applied to the cloud disk.

true: An automatic snapshot policy is applied to the cloud disk. false: No automatic snapshot policy is applied to the cloud disk. Default value: false.


enable_auto_snapshotOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property enableAutoSnapshot: Specifies whether the automatic snapshot policy feature is enabled for the cloud disk.

true: The automatic snapshot policy feature is enabled for the cloud disk. false: The automatic snapshot policy feature is disabled for the cloud disk. Note By default, the automatic snapshot policy feature is enabled for created cloud disks. You need only to apply an automatic snapshot policy to a cloud disk before you can use the automatic snapshot policy.


enable_sharedOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property enableShared: Specifies whether the disk is a Shared Block Storage device.


encryptedOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property encrypted: Specifies whether to query only encrypted cloud disks.

Default value: false.


filtersOptional

  • Type: typing.Union[ros_cdk_core.IResolvable, typing.List[typing.Union[ros_cdk_ecs.datasource.RosDisks.FiltersProperty, ros_cdk_core.IResolvable]]]

Property filters: Filter value when querying resources.


instance_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property instanceId: The ID of the instance to which the disk is attached.


kms_key_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property kmsKeyId: The ID of the Key Management Service (KMS) key used by the cloud disk.


multi_attachOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property multiAttach: Specifies whether the multi-attach feature is enabled for the disk.

Valid values: Disabled: The multi-attach feature is disabled. Enabled: The multi-attach feature is enabled. LegacyShared: Shared Block Storage devices are queried. The multi-attach feature is in invitational preview. To use this feature, submit a ticket.


portableOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property portable: Specifies whether the disk is removable.

Valid values: true: The disk is removable.A removable disk can independently exist and can be attached to or detached from an instance within the same zone. false: The disk is not removable. A disk that is not removable cannot independently exist or be attached to or detached from an instance within the same zone. The Portable attribute of the following disks is false, and these disks share the same lifecycle with their associated instances: Local disks Local SSDs Subscription data disks


refresh_optionsOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property refreshOptions: The refresh strategy for the datasource resource when the stack is updated.

Valid values:

  • Never: Never refresh the datasource resource when the stack is updated.
  • Always: Always refresh the datasource resource when the stack is updated. Default is Never.

resource_group_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property resourceGroupId: The ID of the resource group to which the disk belongs.

If this parameter is specified to query resources,up to 1,000 resources that belong to the specified resource group can be displayed in the response.


snapshot_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property snapshotId: The ID of the snapshot used to create the cloud disk.


statusOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property status: The state of the cloud disk.

For more information, see Disk states. Valid values: In_use Available Attaching Detaching Creating ReIniting All Default value: All.


tagsOptional

  • Type: typing.List[ros_cdk_ecs.datasource.RosDisks.TagsProperty]

Property tags: Tags of disks.


zone_idOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property zoneId: The ID of the zone for which to query resources.


enable_resource_property_constraintOptional

  • Type: bool

Methods

Name Description
to_string Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
add_condition No description.
add_count No description.
add_dependency No description.
add_resource_desc No description.
apply_removal_policy No description.
get_att No description.
set_metadata No description.

to_string

def to_string() -> str

Returns a string representation of this construct.

synthesize

def synthesize(
  session: ISynthesisSession
) -> None

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • Type: typing.Any

Static Functions

Name Description
is_construct Return whether the given object is a Construct.

is_construct

from ros_cdk_ecs import datasource
datasource.Disks.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • Type: typing.Any

Properties

Name Type Description
node ros_cdk_core.ConstructNode The construct tree node associated with this construct.
ref str No description.
stack ros_cdk_core.Stack The stack in which this resource is defined.
resource ros_cdk_core.RosResource No description.
attr_disk_ids ros_cdk_core.IResolvable Attribute DiskIds: The list of disk IDs.
attr_disks ros_cdk_core.IResolvable Attribute Disks: The list of disks.

nodeRequired

node: ConstructNode
  • Type: ros_cdk_core.ConstructNode

The construct tree node associated with this construct.


refRequired

ref: str
  • Type: str

stackRequired

stack: Stack
  • Type: ros_cdk_core.Stack

The stack in which this resource is defined.


resourceOptional

resource: RosResource
  • Type: ros_cdk_core.RosResource

attr_disk_idsRequired

attr_disk_ids: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute DiskIds: The list of disk IDs.


attr_disksRequired

attr_disks: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Disks: The list of disks.