DATASOURCE::APIG::Environments类型用于查询环境列表。
语法
{
"Type": "DATASOURCE::APIG::Environments",
"Properties": {
"GatewayId": String,
"ResourceGroupId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
GatewayId | String | 否 | 是 | 网关 id。 | 无 |
ResourceGroupId | String | 否 | 是 | 资源组 ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
Environments:环境详情列表。
EnvironmentIds:环境ID列表。
属性名称 | 类型 | 描述 | 约束 |
EnvironmentIds | List | 环境ID列表。 | 无 |
Environments | List | 环境详情列表。 | 无 |
EnvironmentName | String | 环境名称。 | 无 |
EnvironmentId | String | 环境ID。 | 无 |
Description | String | 环境描述。 | 无 |
ResourceGroupId | String | 资源组 ID。 | 无 |
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
GatewayId:
Type: String
Description:
en: Cloud-native API Gateway ID.
Required: false
Resources:
ExtensionDataSource:
Type: DATASOURCE::APIG::Environments
Properties:
GatewayId:
Ref: GatewayId
Outputs:
Environments:
Description: The list of environments.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Environments
EnvironmentIds:
Description: The list of environment IDs.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnvironmentIds
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"GatewayId": {
"Type": "String",
"Description": {
"en": "Cloud-native API Gateway ID."
},
"Required": false
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::APIG::Environments",
"Properties": {
"GatewayId": {
"Ref": "GatewayId"
}
}
}
},
"Outputs": {
"Environments": {
"Description": "The list of environments.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Environments"
]
}
},
"EnvironmentIds": {
"Description": "The list of environment IDs.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnvironmentIds"
]
}
}
}
}
该文章对您有帮助吗?