全部产品
Search
文档中心

资源编排:DATASOURCE::CR::Instance

更新时间:Mar 26, 2024

DATASOURCE::CR::Instance类型用于查询实例信息。

语法

{
  "Type": "DATASOURCE::CR::Instance",
  "Properties": {
    "InstanceId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

InstanceId

String

实例ID。

返回值

Fn::GetAtt

  • InstanceName:实例名称。

  • ModifiedTime:最近修改时间。

  • ResourceGroupId:资源组ID。

  • InstanceId:实例ID。

  • InstanceSpecification:企业版规格。

  • CreateTime:创建时间。

示例

  • YAML格式

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      InstanceId:
        Description:
          en: The first ID of the resource.
        Required: true
        Type: String
    Resources:
      ExtensionDataSource:
        Properties:
          InstanceId:
            Ref: InstanceId
        Type: DATASOURCE::CR::Instance
    Outputs:
      CreateTime:
        Description: The creation time of the resource.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - CreateTime
      InstanceId:
        Description: The first ID of the resource.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstanceId
      InstanceName:
        Description: InstanceName.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstanceName
      InstanceSpecification:
        Description: InstanceSpecification.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - InstanceSpecification
      ModifiedTime:
        Description: Last modification time.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - ModifiedTime
      ResourceGroupId:
        Description: The ID of the resource group.
        Value:
          Fn::GetAtt:
          - ExtensionDataSource
          - ResourceGroupId
                            
  • JSON格式

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "InstanceId": {
          "Type": "String",
          "Description": {
            "en": "The first ID of the resource."
          },
          "Required": true
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::CR::Instance",
          "Properties": {
            "InstanceId": {
              "Ref": "InstanceId"
            }
          }
        }
      },
      "Outputs": {
        "InstanceName": {
          "Description": "InstanceName.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstanceName"
            ]
          }
        },
        "ModifiedTime": {
          "Description": "Last modification time.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ModifiedTime"
            ]
          }
        },
        "ResourceGroupId": {
          "Description": "The ID of the resource group.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ResourceGroupId"
            ]
          }
        },
        "InstanceId": {
          "Description": "The first ID of the resource.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstanceId"
            ]
          }
        },
        "InstanceSpecification": {
          "Description": "InstanceSpecification.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "InstanceSpecification"
            ]
          }
        },
        "CreateTime": {
          "Description": "The creation time of the resource.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "CreateTime"
            ]
          }
        }
      }
    }