全部产品
Search
文档中心

资源编排:DATASOURCE::SWAS::Instance

更新时间:Jan 23, 2026

DATASOURCE::SWAS::Instance类型用于查询指定地域下,一个实例的详细信息。

语法

{
  "Type": "DATASOURCE::SWAS::Instance",
  "Properties": {
    "InstanceId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

轻量应用服务器的实例 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • DisableReason:资源被禁用的原因。

  • Status:实例状态

  • ResourceGroupId:轻量应用服务器所属的资源组 ID。

  • InstanceId:轻量应用服务器的实例 ID。

  • PlanId:套餐 ID。

  • ResourceSpec:资源规格。

  • DdosStatus:DDos 状态。

  • Image:镜像的说明信息。

  • BusinessStatus:服务器状态。

  • PublicIpAddress:公网 IP 地址。

  • InstanceName:服务器名称。

  • InnerIpAddress:内网 IP 地址。

  • NetworkAttributes:网络返回信息。

  • Uuid:实例的 UUID。

  • Combination:是否为组合套餐。

  • ChargeType:实例的计费方式。

  • ExpiredTime:到期时间。

  • CreationTime:创建时间。

  • ImageId:镜像 ID。

  • PlanType:套餐类型,

  • Disks:轻量对应磁盘信息的数组。

  • RegionId:地域 ID。

  • Tags:实例的标签列表。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: The ID of the instance.
    Required: true
Resources:
  Instance:
    Type: DATASOURCE::SWAS::Instance
    Properties:
      InstanceId:
        Ref: InstanceId
Outputs:
  DisableReason:
    Description: The reason why the instance is disabled.
    Value:
      Fn::GetAtt:
        - Instance
        - DisableReason
  Status:
    Description: The status of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Status
  ResourceGroupId:
    Description: The ID of the resource group to which the instance belongs.
    Value:
      Fn::GetAtt:
        - Instance
        - ResourceGroupId
  InstanceId:
    Description: The ID of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceId
  PlanId:
    Description: The plan ID of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - PlanId
  ResourceSpec:
    Description: The resource specification of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - ResourceSpec
  DdosStatus:
    Description: The anti-DDoS status of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - DdosStatus
  Image:
    Description: The image information of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Image
  BusinessStatus:
    Description: The business status of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - BusinessStatus
  PublicIpAddress:
    Description: The public IP address of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - PublicIpAddress
  InstanceName:
    Description: The name of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InstanceName
  InnerIpAddress:
    Description: The private IP address of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - InnerIpAddress
  NetworkAttributes:
    Description: The network attributes of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - NetworkAttributes
  Uuid:
    Description: The unique identifier of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Uuid
  Combination:
    Description: Indicates whether the instance is a combination instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Combination
  ChargeType:
    Description: The billing method of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - ChargeType
  ExpiredTime:
    Description: The expiration time of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - ExpiredTime
  CreationTime:
    Description: The creation time of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - CreationTime
  ImageId:
    Description: The ID of the image used by the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - ImageId
  PlanType:
    Description: The plan type of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - PlanType
  Disks:
    Description: The disks of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Disks
  RegionId:
    Description: The ID of the region where the instance is deployed.
    Value:
      Fn::GetAtt:
        - Instance
        - RegionId
  Tags:
    Description: The tags of the instance.
    Value:
      Fn::GetAtt:
        - Instance
        - Tags
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the instance."
      },
      "Required": true
    }
  },
  "Resources": {
    "Instance": {
      "Type": "DATASOURCE::SWAS::Instance",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        }
      }
    }
  },
  "Outputs": {
    "DisableReason": {
      "Description": "The reason why the instance is disabled.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "DisableReason"
        ]
      }
    },
    "Status": {
      "Description": "The status of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Status"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group to which the instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "ResourceGroupId"
        ]
      }
    },
    "InstanceId": {
      "Description": "The ID of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceId"
        ]
      }
    },
    "PlanId": {
      "Description": "The plan ID of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "PlanId"
        ]
      }
    },
    "ResourceSpec": {
      "Description": "The resource specification of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "ResourceSpec"
        ]
      }
    },
    "DdosStatus": {
      "Description": "The anti-DDoS status of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "DdosStatus"
        ]
      }
    },
    "Image": {
      "Description": "The image information of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Image"
        ]
      }
    },
    "BusinessStatus": {
      "Description": "The business status of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "BusinessStatus"
        ]
      }
    },
    "PublicIpAddress": {
      "Description": "The public IP address of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "PublicIpAddress"
        ]
      }
    },
    "InstanceName": {
      "Description": "The name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InstanceName"
        ]
      }
    },
    "InnerIpAddress": {
      "Description": "The private IP address of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "InnerIpAddress"
        ]
      }
    },
    "NetworkAttributes": {
      "Description": "The network attributes of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "NetworkAttributes"
        ]
      }
    },
    "Uuid": {
      "Description": "The unique identifier of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Uuid"
        ]
      }
    },
    "Combination": {
      "Description": "Indicates whether the instance is a combination instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Combination"
        ]
      }
    },
    "ChargeType": {
      "Description": "The billing method of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "ChargeType"
        ]
      }
    },
    "ExpiredTime": {
      "Description": "The expiration time of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "ExpiredTime"
        ]
      }
    },
    "CreationTime": {
      "Description": "The creation time of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "CreationTime"
        ]
      }
    },
    "ImageId": {
      "Description": "The ID of the image used by the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "ImageId"
        ]
      }
    },
    "PlanType": {
      "Description": "The plan type of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "PlanType"
        ]
      }
    },
    "Disks": {
      "Description": "The disks of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Disks"
        ]
      }
    },
    "RegionId": {
      "Description": "The ID of the region where the instance is deployed.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "RegionId"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "Instance",
          "Tags"
        ]
      }
    }
  }
}