DATASOURCE::KMS::Instances类型用于查询当前用户在当前地域创建的KMS实例。
语法
{
  "Type": "DATASOURCE::KMS::Instances",
  "Properties": {
    "RefreshOptions": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
Fn::GetAtt
- Instances:KMS实例列表。 
- InstanceIds:KMS实例ID列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| InstanceIds | List | KMS实例ID列表。 | 无 | 
| Instances | List | KMS实例列表。 | 无 | 
| PaymentType | String | KMS付费类型。 | 无 | 
| InstanceId | String | KMS实例的ID。 | 无 | 
示例
ROSTemplateFormatVersion: '2015-09-01'
Resources:
  ExtensionDataSource:
    Properties: {}
    Type: DATASOURCE::KMS::Instances
Outputs:
  InstanceIds:
    Description: The list of instance IDs.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - InstanceIds
  Instances:
    Description: The list of instances.
    Value:
      Fn::GetAtt:
      - ExtensionDataSource
      - Instances
                        {
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::KMS::Instances",
      "Properties": {}
    }
  },
  "Outputs": {
    "Instances": {
      "Description": "The list of instances.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Instances"
        ]
      }
    },
    "InstanceIds": {
      "Description": "The list of instance IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "InstanceIds"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?