Skip to content

Images

This class encapsulates and extends the ROS resource type DATASOURCE::ECS::Images, which is used to query available images.

Initializers

from ros_cdk_ecs import datasource
datasource.Images(
  scope: Construct,
  id: str,
  action_type: typing.Union[str, IResolvable] = None,
  architecture: typing.Union[str, IResolvable] = None,
  image_family: typing.Union[str, IResolvable] = None,
  image_id: typing.Union[str, IResolvable] = None,
  image_name: typing.Union[str, IResolvable] = None,
  image_owner_alias: typing.Union[str, IResolvable] = None,
  instance_type: typing.Union[str, IResolvable] = None,
  is_public: typing.Union[bool, IResolvable] = None,
  is_support_cloudinit: typing.Union[bool, IResolvable] = None,
  is_support_io_optimized: typing.Union[bool, IResolvable] = None,
  os_type: 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,
  usage: 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.
action_type typing.Union[str, ros_cdk_core.IResolvable] Property actionType: The scenario in which the image is used.
architecture typing.Union[str, ros_cdk_core.IResolvable] Property architecture: The image architecture.
image_family typing.Union[str, ros_cdk_core.IResolvable] Property imageFamily: The name of the image family.
image_id typing.Union[str, ros_cdk_core.IResolvable] Property imageId: The ID of the image.
image_name typing.Union[str, ros_cdk_core.IResolvable] Property imageName: The name of the image.
image_owner_alias typing.Union[str, ros_cdk_core.IResolvable] Property imageOwnerAlias: The source of the image.
instance_type typing.Union[str, ros_cdk_core.IResolvable] Property instanceType: The instance type for which the image can be used.
is_public typing.Union[bool, ros_cdk_core.IResolvable] Property isPublic: Specifies whether to query published community images.
is_support_cloudinit typing.Union[bool, ros_cdk_core.IResolvable] Property isSupportCloudinit: Specifies whether the image supports cloud-init.
is_support_io_optimized typing.Union[bool, ros_cdk_core.IResolvable] Property isSupportIoOptimized: Specifies whether the image can be used on I\/O optimized instances.
os_type typing.Union[str, ros_cdk_core.IResolvable] Property osType: The operating system type of the image.
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 custom image belongs.
snapshot_id typing.Union[str, ros_cdk_core.IResolvable] Property snapshotId: The ID of the snapshot used to create the custom image.
status typing.Union[str, ros_cdk_core.IResolvable] Property status: The state of the image.
tags typing.List[ros_cdk_ecs.datasource.RosImages.TagsProperty] Property tags: Tags of image.
usage typing.Union[str, ros_cdk_core.IResolvable] Property usage: Specifies whether the image is running on an Elastic Compute Service (ECS) instance.
enable_resource_property_constraint bool No description.

scopeRequired

  • Type: ros_cdk_core.Construct

idRequired

  • Type: str

action_typeOptional

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

Property actionType: The scenario in which the image is used.

Default value: CreateEcs. Valid values: CreateEcs: instance creation ChangeOS: replacement of the system disk or operating system


architectureOptional

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

Property architecture: The image architecture.

Valid values: i38 x86_64 arm64


image_familyOptional

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

Property imageFamily: The name of the image family.

You can set this parameter to query images of the specified image family. This parameter is empty by default.


image_idOptional

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

Property imageId: The ID of the image.


image_nameOptional

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

Property imageName: The name of the image.

Support for fuzzy queries using *.


image_owner_aliasOptional

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

Property imageOwnerAlias: The source of the image.

Valid values: system: public images provided by Alibaba Cloud. self: your custom images. others: shared images from other Alibaba Cloud accounts, or community images published by other Alibaba Cloud accounts. Take note of the following items:

  • To query community images, you must set IsPublic to true. To query shared images, you must set IsPublic to false or leave the IsPublic parameter empty. marketplace: Alibaba Cloud Marketplace images. If Alibaba Cloud Marketplace images are returned in the response, you can use the images without subscription. You must pay attention to the billing details of Alibaba Cloud Marketplace images. This parameter is empty by default, which indicates that the results that match system, self, and others are returned.

instance_typeOptional

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

Property instanceType: The instance type for which the image can be used.


is_publicOptional

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

Property isPublic: Specifies whether to query published community images.

Valid values: true: queries published community images. When you set this parameter to true, you must set ImageOwnerAlias to others. false: queries other image types than community images. The specific image types to be queried are determined by the ImageOwnerAlias value. Default value: false.


is_support_cloudinitOptional

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

Property isSupportCloudinit: Specifies whether the image supports cloud-init.


is_support_io_optimizedOptional

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

Property isSupportIoOptimized: Specifies whether the image can be used on I\/O optimized instances.


os_typeOptional

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

Property osType: The operating system type of the image.

Valid values: windows linux


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 custom image 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 custom image.


statusOptional

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

Property status: The state of the image.

Default value: Available. Valid values: Creating: The image is being created. Waiting: The image is waiting to be processed. Available: The image is available. UnAvailable: The image is unavailable. CreateFailed: The image failed to be created. Deprecated: The image is discontinued. You can specify multiple values. Separate multiple values with commas (,).


tagsOptional

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

Property tags: Tags of image.


usageOptional

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

Property usage: Specifies whether the image is running on an Elastic Compute Service (ECS) instance.

Valid values: instance: The image is already in use and running on an ECS instance. none: The image is not in use.


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.Images.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_image_ids ros_cdk_core.IResolvable Attribute ImageIds: The list of image IDs.
attr_images ros_cdk_core.IResolvable Attribute Images: The list of images.

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_image_idsRequired

attr_image_ids: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute ImageIds: The list of image IDs.


attr_imagesRequired

attr_images: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute Images: The list of images.