DATASOURCE::APIG::Services类型用于获取服务列表。
语法
{
  "Type": "DATASOURCE::APIG::Services",
  "Properties": {
    "GatewayId": String,
    "ResourceGroupId": String,
    "RefreshOptions": String,
    "SourceType": String
  }
}属性
| 属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 | 
| GatewayId | String | 否 | 是 | 网关实例 ID。 | 无 | 
| ResourceGroupId | String | 否 | 是 | 资源组 ID。 | 无 | 
| RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
| SourceType | String | 否 | 是 | 服务来源类型。 | 无 | 
返回值
Fn::GetAtt
- ServiceIds:服务ID列表。 
- Services:服务详情列表。 
| 属性名称 | 类型 | 描述 | 约束 | 
| ServiceIds | List | 服务ID列表。 | 无 | 
| Services | List | 服务详情列表。 | 无 | 
| AiServiceConfig | String | AI 服务配置。 | 无 | 
| SourceType | String | 服务来源类型。 | 无 | 
| Addresses | List | 地址信息, ip 或者与域名列表。 | 无 | 
| GroupName | String | 服务分组名。 | 无 | 
| Namespace | String | 命名空间。 | 无 | 
| ResourceGroupId | String | 资源组 ID。 | 无 | 
| ServiceName | String | 服务名。 | 无 | 
| ServiceId | String | 服务唯一 ID。 | 无 | 
| GatewayId | String | 网关实例 ID。 | 无 | 
| Qualifier | String | 函数限定名。 | 无 | 
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::APIG::Services
    Properties: {}
Outputs:
  ServiceIds:
    Description: The list of service IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ServiceIds
  Services:
    Description: The list of services.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Services
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::APIG::Services",
      "Properties": {
      }
    }
  },
  "Outputs": {
    "ServiceIds": {
      "Description": "The list of service IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ServiceIds"
        ]
      }
    },
    "Services": {
      "Description": "The list of services.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Services"
        ]
      }
    }
  }
}
                        该文章对您有帮助吗?