The DATASOURCE::APIG::Environment type is used to query environment.
Syntax
{
"Type": "DATASOURCE::APIG::Environment",
"Properties": {
"EnvironmentId": String,
"RefreshOptions": String
}
}Properties
Property name | Type | Required | Update allowed | Description | Constraint |
EnvironmentId | String | Yes | Yes | The environment ID. | None |
RefreshOptions | String | No | Yes | The data source resources refresh mode when the stack is updated. | Valid values:
|
Return values
Fn::GetAtt
EnvironmentId: Environment ID.
Description: Environment description.
ResourceGroupId: Resource group ID.
EnvironmentName: Environment name.
GatewayId: Gateway ID.
Example
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EnvironmentId:
Type: String
Description:
en: The ID of the Environment.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::APIG::Environment
Properties:
EnvironmentId:
Ref: EnvironmentId
Outputs:
EnvironmentId:
Description: The ID of the Environment.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnvironmentId
Description:
Description: The description of the Environment.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ResourceGroupId
EnvironmentName:
Description: The name of the Environment.
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnvironmentName
GatewayId:
Description: Cloud-native API Gateway ID.
Value:
Fn::GetAtt:
- ExtensionDataSource
- GatewayId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EnvironmentId": {
"Type": "String",
"Description": {
"en": "The ID of the Environment."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::APIG::Environment",
"Properties": {
"EnvironmentId": {
"Ref": "EnvironmentId"
}
}
}
},
"Outputs": {
"EnvironmentId": {
"Description": "The ID of the Environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnvironmentId"
]
}
},
"Description": {
"Description": "The description of the Environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ResourceGroupId"
]
}
},
"EnvironmentName": {
"Description": "The name of the Environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnvironmentName"
]
}
},
"GatewayId": {
"Description": "Cloud-native API Gateway ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"GatewayId"
]
}
}
}
}