All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ENS::Instances

Last Updated:Oct 29, 2024

DATASOURCE::ENS::Instances is used to query the details of Edge Node Service (ENS) instances.

Syntax

{
  "Type": "DATASOURCE::ENS::Instances",
  "Properties": {
    "Status": String,
    "InstanceName": String,
    "EnsServiceId": String,
    "ImageId": String,
    "InstanceIds": List,
    "EnsRegionIds": List,
    "InstanceResourceType": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
StatusStringNoYesThe status of the instance. Valid values:
  • Running
  • Stopped
  • Expired
InstanceNameStringNoYesThe name of the instance. None.
EnsServiceIdStringNoYesThe ID of the edge service. None.
ImageIdStringNoYesThe ID of the image. None.
InstanceIdsListNoYesThe IDs of the instances. The property value is a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,).
EnsRegionIdsListNoYesThe region IDs of the instances. The property value is a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,).
InstanceResourceTypeStringNoYesThe condition that is used to filter instances by category. Valid values:
  • EnsInstance: ENS instances that you purchase
  • EnsService: ENS instances that belong to edge services
  • BuildMachine: ENS instances that are configured with image builders

Return values (Fn::GetAtt)

  • Instances: the details of the instances.
  • InstanceIds: the IDs of the instances.
PropertyTypeDescriptionConstraint
InstanceIdsListThe IDs of the instances. None.
InstancesListThe details of the instances. None.
InstanceIdStringThe ID of the instance. None.
StatusStringThe status of the instance. Valid values:
  • Running
  • Stopped
  • Expired
MemoryIntegerThe size of the memory. Unit: MB.
CpuStringThe number of vCPUs. None.
SpecNameStringThe name of the instance type. None.
OSNameStringThe name of the image. None.
InstanceNameStringThe name of the instance. None.
SystemDiskMapThe details of the system disk. Example:
{
                "Category": "file",
                "Size": 20480,
                "disk_type": "system",
                "name": "DiskName",
                "device_type": "file",
                "storage": 20480,
                "DiskName": "DiskName",
                "uuid": "d-5ip4c2dhmas0rn7rt0p96****",
                "DiskId": "d-5ip4c2dhmas0rn7rt0p9****"
            }
DiskIntegerThe total size of the disk. None.
NetworkAttributesMapThe details of the network. Example:
{
                "VSwitchId": "vsw-2zeh0r1pabwtg6wcs****",
                "NetworkId": "n-2zeuphj08tt7q3brd****",
                "PrivateIpAddress": {
                    "IpAddress": "172.17.XX.XX"
                }
            }
InternetMaxBandwidthOutIntegerThe minimum upstream bandwidth. Unit: Mbit/s.
InternetMaxBandwidthInIntegerThe maximum downstream bandwidth. Unit: Mbit/s.
ExpiredTimeStringThe expiration time of the instance. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
CreationTimeStringThe time when the instance was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.
ImageIdStringThe ID of the image. None.
EnsRegionIdStringThe region ID of the instance. None.
HostNameStringThe hostname of the instance. None.
InstanceResourceTypeStringThe category of the instance. Valid values:
  • EnsInstance: ENS instances that you purchase
  • EnsService: ENS instances that belong to edge services
  • BuildMachine: ENS instances that are configured with image builders
SecurityGroupIdsListThe IDs of the security groups. None.
PrivateIpAddressesMapThe details of the private IP addresses. Example:
{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "cmcc",
                    "Ip": "119.147.XX.XX"
                }
PublicIpAddressesMapThe details of the public IP addresses. Example:
{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "unicom",
                    "Ip": "119.147.XX.XX"
                }
InnerIpAddressesListThe details of the internal IP addresses. None.
DataDisksMapThe details of the data disks. Example:
{
                    "Category": "file",
                    "Size": 51200,
                    "disk_type": "pangu",
                    "name": "name",
                    "device_type": "system",
                    "storage": 20480,
                    "DiskName": "DiskName",
                    "uuid": "d-5itef1wtxj961mbff8xe9****",
                    "DiskId": "d-5ip4c2dhmas0vjd5u1r****"
                }

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "Status": {
          "Type": "String",
          "Description": "The status of instance.",
          "Default": "Running"
        }
      },
      "Resources": {
        "Instances": {
          "Type": "DATASOURCE::ENS::Instances",
          "Properties": {
            "Status": {
              "Ref": "Status"
            }
          }
        }
      },
      "Outputs": {
        "Instances": {
          "Description": "The list of instances.",
          "Value": {
            "Fn::GetAtt": [
              "Instances",
              "Instances"
            ]
          }
        },
        "InstanceIds": {
          "Description": "The list of instance IDs.",
          "Value": {
            "Fn::GetAtt": [
              "Instances",
              "InstanceIds"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      Status:
        Type: String
        Description: The status of instance.
        Default: Running
    Resources:
      Instances:
        Type: DATASOURCE::ENS::Instances
        Properties:
          Status:
            Ref: Status
    Outputs:
      Instances:
        Description: The list of instances.
        Value:
          Fn::GetAtt:
            - Instances
            - Instances
      InstanceIds:
        Description: The list of instance IDs.
        Value:
          Fn::GetAtt:
            - Instances
            - InstanceIds