DATASOURCE::ENS::Instances

Updated at: 2025-02-05 07:52

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

Syntax

{
  "Type": "DATASOURCE::ENS::Instances",
  "Properties": {
    "InstanceId": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

Property

Type

Required

Editable

Description

Constraint

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

InstanceId

String

No

Yes

The ID of the instance.

None.

Return values (Fn::GetAtt)

  • Instances: details of the instances.

  • InstanceIds: the IDs of the instances.

Property

Type

Description

Constraint

InstanceIds

List

The IDs of the instances.

None.

Instances

List

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 memory size.

Unit: MB.

Cpu

String

The number of vCPUs.

None.

SpecName

String

The instance type.

None.

OSName

String

The name of the image.

None.

InstanceName

String

The name of the instance.

None.

SystemDisk

Map

The returned information about 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 disk size.

None.

NetworkAttributes

Map

The network information.

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 creation 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.

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 returned information about the private IP address.

Example:

{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "cmcc",
                    "Ip": "119.147.XX.XX"
                }

PublicIpAddresses

Map

The returned information about the public IP address.

Example:

{
                    "GateWay": "119.147.XX.XX",
                    "Isp": "unicom",
                    "Ip": "119.147.XX.XX"
                }

InnerIpAddresses

List

The private IP addresses of the instance.

None.

DataDisks

Map

The returned information about the data disk.

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
YAML
{
  "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"
        ]
      }
    }
  }
}
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
  • On this page (1, T)
  • Syntax
  • Properties
  • Return values (Fn::GetAtt)
  • Examples
Feedback
phone Contact Us