All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::SWAS::Instances

更新時間:Apr 02, 2026

The DATASOURCE::SWAS::Instances type retrieves details for one or more Simple Application Server instances in a specified region.

Syntax

{
  "Type": "DATASOURCE::SWAS::Instances",
  "Properties": {
    "InstanceName": String,
    "InstanceIds": List,
    "PlanType": String,
    "ResourceGroupId": String,
    "RefreshOptions": String,
    "Status": String
  }
}

Properties

Property Name

Type

Required

Updatable

Description

Constraint

InstanceName

String

No

Yes

The instance name of the Simple Application Server.

None

InstanceIds

List

No

Yes

A list of instance IDs for the Simple Application Server.

None

PlanType

String

No

Yes

The plan type.

Possible values:

  • NORMAL: General-purpose.

  • CAPACITY: Storage-optimized.

  • PREVIOUS: Previous generation.

  • MULTI_IP: Multiple public IP type.

  • INTERNATIONAL: International type.

ResourceGroupId

String

No

Yes

The resource group ID to which the Simple Application Server belongs.

None

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack updates.

Valid values:

  • Never (default): Never refresh data source resources when updating the stack.

  • Always: Always refresh data source resources when updating the stack.

Status

String

No

Yes

The instance status.

Possible values:

  • Pending: Preparing.

  • Starting: Starting.

  • Running: Running.

  • Stopping: Stopping.

  • Stopped: Stopped.

  • Resetting: Resetting.

  • Upgrading: Upgrading.

  • Disabled: Unavailable.

Return Values

Fn::GetAtt

  • Instances: A list of detailed information about Simple Application Servers.

  • InstanceIds: A list of Simple Application Server IDs.

Property Name

Type

Description

Constraint

InstanceIds

List

A list of Simple Application Server IDs.

None

Instances

List

A list of detailed information about Simple Application Servers.

None

DisableReason

String

The reason the resource is disabled.

None

Status

String

The instance status.

None

ResourceGroupId

String

The resource group ID to which the Simple Application Server belongs.

None

InstanceId

String

The instance ID of the Simple Application Server.

None

PlanId

String

The plan ID.

None

ResourceSpec

Map

The resource specifications.

Example:

{
        "DiskCategory": "ESSD",
        "Cpu": 2,
        "Bandwidth": 200,
        "DiskSize": 60,
        "Memory": 2,
        "Flow": 818
      }

DdosStatus

String

The DDoS status.

None

Image

Map

Image description

Example:

{
        "OsType": "windows",
        "ImageName": "test-custom-1686536882356",
        "ImageVersion": "V3.5",
        "ImageType": "system",
        "ImageIconUrl": "https://img.alicdn.com/imgextra/i3/O****1vdh9651ReKqWNMI2I_!!6000000002136****-24-24.svg",
        "ImageContact": "https://selfs****e.console.aliyun.com/ticket/createIndex"
      }

BusinessStatus

String

The server status.

None

PublicIpAddress

String

The public IP address of the Simple Application Server.

None

InstanceName

String

The instance name of the Simple Application Server.

None

InnerIpAddress

String

The private IP address.

None

NetworkAttributes

List

The network return information.

Example:

[
        {
          "PublicIpAddress": "116.62.XX.XX",
          "PrivateIpAddress": "72.25.XX.XX",
          "PeakBandwidth": 200,
          "PublicIpDdosStatus": "normal"
        }
      ]

Uuid

String

The UUID of the instance.

None

Combination

String

Whether it is a combination plan.

None

ChargeType

String

The billing method of the instance.

None

ExpiredTime

String

Expired At.

None

CreationTime

String

The creation time.

None

ImageId

String

The image ID.

None

PlanType

String

The plan type.

None

Disks

List

A lightweight array of disk information.

[
        {
          "CreationTime": "2023-02-24T02:20:10Z",
          "Status": "In_use",
          "Device": "/dev/xvda",
          "Size": 50,
          "DiskName": "SystemDisk",
          "DiskChargeType": "PrePaid",
          "DiskType": "system",
          "Category": "ESSD",
          "DiskId": "d-bp14wq0149cpp2x****",
          "RegionId": "cn-hangzhou",
          "Remark": "remark",
          "DiskTags": [
            {
              "Key": "TestKey",
              "Value": "TestValue"
            }
          ],
          "ResourceGroupId": "rg-aek2bti7cf7****"
        }
      ]

RegionId

String

The region ID to which the Simple Application Server belongs.

None

Tags

List

A list of tags for the instance.

None

Example

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceIds:
    Type: Json
    Description:
      en: The IDs of instances.
    Required: false
    MinLength: 1
    MaxLength: 100
Resources:
  Instances:
    Type: DATASOURCE::SWAS::Instances
    Properties:
      InstanceIds:
        Ref: InstanceIds
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": {
    "InstanceIds": {
      "Type": "Json",
      "Description": {
        "en": "The IDs of instances."
      },
      "Required": false,
      "MinLength": 1,
      "MaxLength": 100
    }
  },
  "Resources": {
    "Instances": {
      "Type": "DATASOURCE::SWAS::Instances",
      "Properties": {
        "InstanceIds": {
          "Ref": "InstanceIds"
        }
      }
    }
  },
  "Outputs": {
    "Instances": {
      "Description": "The list of instances.",
      "Value": {
        "Fn::GetAtt": [
          "Instances",
          "Instances"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The list of instance IDs.",
      "Value": {
        "Fn::GetAtt": [
          "Instances",
          "InstanceIds"
        ]
      }
    }
  }
}