DATASOURCE::ECS::Instances is used to query the details of Elastic Compute Service (ECS) instances.
Syntax
{
"Type": "DATASOURCE::ECS::Instances",
"Properties": {
"InnerIpAddresses": List,
"ResourceGroupId": String,
"PrivateIpAddresses": List,
"InstanceChargeType": String,
"InstanceTypeFamily": String,
"InstanceNetworkType": String,
"Filters": List,
"AdditionalAttributes": List,
"ImageId": String,
"PublicIpAddresses": List,
"RdmaIpAddresses": String,
"InstanceIds": List,
"InstanceType": String,
"Ipv6Address": List,
"Tags": List,
"Status": String,
"KeyPairName": String,
"IoOptimized": Boolean,
"ZoneId": String,
"InstanceId": String,
"HpcClusterId": String,
"VSwitchId": String,
"SecurityGroupId": String,
"InternetChargeType": String,
"InstanceName": String,
"EipAddresses": List,
"VpcId": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
InnerIpAddresses | List | No | Yes | The internal IP addresses of the instance in the classic network. | This property takes effect when the InstanceNetworkType property is set to classic.
You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). Example: |
ResourceGroupId | String | No | Yes | The ID of the resource group to which the instance belongs. | None. |
PrivateIpAddresses | List | No | Yes | The private IP addresses of the instance in the virtual private cloud (VPC). | This property takes effect when the InstanceNetworkType property is set to vpc.
You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). Example: |
InstanceChargeType | String | No | Yes | The billing method of the instance. | Valid values:
|
InstanceTypeFamily | String | No | Yes | The instance family of the instance. | None. |
InstanceNetworkType | String | No | Yes | The network type of the instance. | Valid values:
|
Filters | List | No | Yes | The filters that are used to query resources. | For more information, see Filters properties. |
AdditionalAttributes | List | No | Yes | Other properties of the instance. | Valid values:
|
ImageId | String | No | Yes | The ID of the image. | None. |
PublicIpAddresses | List | No | Yes | The public IP addresses of the instance. | You can specify up to 100 IP addresses. Separate multiple IP addresses with commas
(,).
Example: |
RdmaIpAddresses | String | No | Yes | The remote direct memory access (RDMA) IP addresses of the instance that belongs to a High Performance Computing (HPC) cluster. | None. |
InstanceIds | List | No | Yes | The IDs of the instances. | You can specify up to 100 IDs. Separate multiple IDs with commas (,). |
InstanceType | String | No | Yes | The instance type of the instance. | None. |
Ipv6Address | List | No | Yes | The IPv6 addresses of the ENI. | You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). |
Tags | List | No | Yes | The tags of the instance. | You can specify up to 20 tags.
For more information, see Tags properties. |
Status | String | No | Yes | The state of the instance. | Valid values:
|
KeyPairName | String | No | Yes | The name of the SSH key pair for the instance. | None. |
IoOptimized | Boolean | No | Yes | Indicates whether the instance is an I/O optimized instance. | Valid values:
|
ZoneId | String | No | Yes | The ID of the zone. | None. |
InstanceId | String | No | Yes | The ID of the instance. | None. |
HpcClusterId | String | No | Yes | The ID of the HPC cluster to which the instance belongs. | None. |
VSwitchId | String | No | Yes | The ID of the vSwitch. | None. |
SecurityGroupId | String | No | Yes | The ID of the security group. | None. |
InternetChargeType | String | No | Yes | The metering method for network usage. | Valid values:
|
InstanceName | String | No | Yes | The name of the instance. | None. |
EipAddresses | List | No | Yes | The elastic IP addresses (EIPs) of the instance. | This property takes effect when the InstanceNetworkType property is set to vpc.
You can specify up to 100 IP addresses. Separate multiple IP addresses with commas (,). |
VpcId | String | No | Yes | The ID of the VPC. | None. |
Filters syntax
"Filters": [
{
"Value": String,
"Key": String
}
]
Filters properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the filter. | Set the value to CreationStartTime. The value specifies the beginning of the time
range during which resources are created.
You can set the Key property to CreationStartTime and set the Value property to a point in time to query resources that are created after the point in time. |
Value | String | No | No | The value of the filter. | Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mmZ format. The time must be in UTC+0.
|
Tags syntax
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
Key | String | Yes | No | The key of the tag. | None. |
Value | String | No | No | The value of the tag. | None. |
Return values (Fn::GetAtt)
- InstanceIds: the IDs of the instances.
- Instances: details of the instances.
Property | Type | Description | Constraint |
---|---|---|---|
InstanceIds | List | The IDs of the instances. | None. |
Instances | List | Details of the instances. | None. |
SerialNumber | String | The serial number of the instance. | None. |
Status | String | The state of the instance. | None. |
DeploymentSetId | String | The ID of the deployment set. | None. |
SpotStrategy | String | The bidding policy for the instance. | Valid values:
|
DeviceAvailable | Boolean | Indicates whether data disks can be attached to the instance. | Valid values:
|
Description | String | The description of the instance. | None. |
InstanceNetworkType | String | The network type of the instance. | Valid values:
|
InstanceName | String | The name of the instance. | None. |
OSNameEn | String | The English name of the OS that is used by the instance. | None. |
SpotPriceLimit | Number | The maximum hourly price of the instance. | This property takes effect when the SpotStrategy property is set to SpotWithPriceLimit. |
Memory | Number | The memory size. | Unit: MiB. |
OSName | String | The Chinese name of the OS that is used by the instance. | None. |
ImageId | String | The ID of the image. | None. |
GPUSpec | String | The GPU model with which the instance type is equipped. | None. |
StoppedMode | String | Indicates whether the system implements billing after the instance is stopped. | Valid values:
|
GPUAmount | Number | The number of GPUs with which the instance type is equipped. | None. |
HostName | String | The hostname of the instance. | None. |
InstanceId | String | The ID of the instance. | None. |
InternetMaxBandwidthOut | Number | The maximum outbound public bandwidth. | Unit: Mbit/s. |
InternetMaxBandwidthIn | Number | The maximum inbound public bandwidth. | Unit: Mbit/s. |
InstanceType | String | The instance type of the instance. | None. |
InstanceChargeType | String | The billing method of the instance. | Valid values:
|
IoOptimized | Boolean | Indicates whether the instance is an I/O optimized instance. | Valid values:
|
Cpu | Number | The number of vCPUs. | None. |
ResourceGroupId | String | The ID of the resource group to which the instance belongs. | None. |
InternetChargeType | String | The metering method for network usage. | Valid values:
|
ZoneId | String | The ID of the zone. | None. |
InstanceTypeFamily | String | The instance family of the instance. | None. |
OSType | String | The OS type of the instance. | Valid values:
|
NetworkInterfaces | List | The ENIs that are attached to the instance. | None. |
Tags | List | The tags of the instance. | None. |
SecurityGroupIds | List | The IDs of the security groups to which the instance belongs. | None. |
PublicIpAddress | List | The public IP addresses of the instance. | None. |
InnerIpAddress | List | The private IP addresses of the instance in the classic network. | None. |
EipAddress | List | The EIPs of the instance. | None. |
DedicatedHostAttribute | List | The properties of the dedicated host. | None. |
EcsCapacityReservationAttr | List | The properties of capacity reservation that is configured for the instance. | None. |
DedicatedInstanceAttribute | List | The properties of the instance on the dedicated host. | None. |
Examples
-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "InstanceIds": { "Type": "Json", "Default": [ "i-bp17f03tk0f4bi86***" ] } }, "Resources": { "NetworkInterfaces": { "Type": "DATASOURCE::ECS::Instances", "Properties": { "InstanceIds": { "Ref": "InstanceIds" } } } }, "Outputs": { "Images": { "Value": { "Fn::GetAtt": [ "NetworkInterfaces", "InstanceIds" ] } }, "ImageIds": { "Value": { "Fn::GetAtt": [ "NetworkInterfaces", "Instances" ] } } } }