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

Property Type Required Editable Description Constraint
Status String No Yes The status of the instance. Valid values:
  • Running
  • Stopped
  • Expired
InstanceName String No Yes The name of the instance. None.
EnsServiceId String No Yes The ID of the edge service. None.
ImageId String No Yes The ID of the image. None.
InstanceIds List No Yes The IDs of the instances. The property value is a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,).
EnsRegionIds List No Yes The region IDs of the instances. The property value is a JSON array that consists of up to 100 IDs. Separate multiple IDs with commas (,).
InstanceResourceType String No Yes The 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.
Property Type Description Constraint
InstanceIds List The IDs of the instances. None.
Instances List The details of the instances. None.
InstanceId String The ID of the instance. None.
Status String The status of the instance. Valid values:
  • Running
  • Stopped
  • Expired
Memory Integer The size of the memory. Unit: MB.
Cpu String The number of vCPUs. None.
SpecName String The name of the instance type. None.
OSName String The name of the image. None.
InstanceName String The name of the instance. None.
SystemDisk Map The 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****"
            }
Disk Integer The total size of the disk. None.
NetworkAttributes Map The details of the network. Example:
{
                "VSwitchId": "vsw-2zeh0r1pabwtg6wcs****",
                "NetworkId": "n-2zeuphj08tt7q3brd****",
                "PrivateIpAddress": {
                    "IpAddress": "172.17.XX.XX"
                }
            }
InternetMaxBandwidthOut Integer The minimum upstream bandwidth. Unit: Mbit/s.
InternetMaxBandwidthIn Integer The maximum downstream bandwidth. Unit: Mbit/s.
ExpiredTime String The 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.
CreationTime String The 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.
ImageId String The ID of the image. None.
EnsRegionId String The region ID of the instance. None.
HostName String The hostname of the instance. None.
InstanceResourceType String The 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
SecurityGroupIds List The IDs of the security groups. None.
PrivateIpAddresses Map The details of the private IP addresses. Example:
{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "cmcc",
                    "Ip": "119.147.XX.XX"
                }
PublicIpAddresses Map The details of the public IP addresses. Example:
{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "unicom",
                    "Ip": "119.147.XX.XX"
                }
InnerIpAddresses List The details of the internal IP addresses. None.
DataDisks Map The 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