The DATASOURCE::ARMS::Environments datasource is used to query the environment list.
Syntax
{
"Type": "DATASOURCE::ARMS::Environments",
"Properties": {
"BindResourceId": String,
"EnvironmentType": String,
"ResourceGroupId": String,
"RefreshOptions": String
}
}Properties
Parameter | Type | Required | Update allowed | Description | Constraints |
BindResourceId | String | No | Yes | The ID of the bound resource. | None |
EnvironmentType | String | No | Yes | The environment type. | Allowed Values:
|
RefreshOptions | String | No | Yes | The refresh strategy for the datasource resource when you update the stack. | Allowed Values:
|
ResourceGroupId | String | No | Yes | The ID of the resource group. | None |
Return values
Fn::GetAtt
Environments: The list of environments.
EnvironmentIds: The list of environment IDs.
Parameter | Type | Description | Constraints |
EnvironmentIds | List | The list of environment IDs. | None |
Environments | List | The list of environments. | None |
ManagedType | String | The managed type. | None |
EnvironmentName | String | The environment name. | None |
BindVpcCidr | String | The CIDR block of the bound VPC. | None |
EnvironmentId | String | The ID of the environment. | None |
Tags | List | The tags associated with the environment. | None |
UserId | String | The user ID. | None |
PrometheusInstanceId | String | The ID of the bound Prometheus instance. | None |
ResourceGroupId | String | The ID of the resource group. | None |
GrafanaFolderUid | String | The unique ID of the Grafana folder. | None |
BindResourceId | String | The ID of the bound resource. | None |
BindResourceType | String | The type of the bound resource. | None |
GrafanaDatasourceUid | String | The unique ID of the Grafana datasource. | None |
EnvironmentType | String | The environment type. | None |
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ResourceGroupId:
Type: String
Description:
en: The ID of the resource group.
AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
Default: Null
Required: false
EnvironmentType:
Type: String
Description:
en: Type of environment.
AllowedValues:
- ECS
- CS
- Cloud
Default: Null
Required: false
BindResourceId:
Type: String
Description:
en: The ID of the bound resource.
Default: Null
Required: false
RefreshOptions:
Type: String
Description:
en: |-
The refresh strategy for the datasource resource when the stack is updated. Valid values:
- Never: The datasource resource is never refreshed when the stack is updated.
- Always: The datasource resource is always refreshed when the stack is updated.
The default value is Never.
AllowedValues:
- Always
- Never
Default: Never
Required: false
Resources:
ExtensionDataSource:
Type: DATASOURCE::ARMS::Environments
Properties:
ResourceGroupId:
Ref: ResourceGroupId
EnvironmentType:
Ref: EnvironmentType
BindResourceId:
Ref: BindResourceId
RefreshOptions:
Ref: RefreshOptions
Outputs:
Environments:
Value:
Fn::GetAtt:
- ExtensionDataSource
- Environments
Description: The list of environments.
EnvironmentIds:
Value:
Fn::GetAtt:
- ExtensionDataSource
- EnvironmentIds
Description: The list of environment IDs.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ResourceGroupId": {
"Type": "String",
"Description": {
"en": "The ID of the resource group."
},
"AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
"Default": null,
"Required": false
},
"EnvironmentType": {
"Type": "String",
"Description": {
"en": "Type of environment."
},
"AllowedValues": [
"ECS",
"CS",
"Cloud"
],
"Default": null,
"Required": false
},
"BindResourceId": {
"Type": "String",
"Description": {
"en": "The ID of the bound resource."
},
"Default": null,
"Required": false
},
"RefreshOptions": {
"Type": "String",
"Description": {
"en": "The refresh strategy for the datasource resource when the stack is updated. Valid values:\n- Never: The datasource resource is never refreshed when the stack is updated.\n- Always: The datasource resource is always refreshed when the stack is updated.\nThe default value is Never."
},
"AllowedValues": [
"Always",
"Never"
],
"Default": "Never",
"Required": false
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::ARMS::Environments",
"Properties": {
"ResourceGroupId": {
"Ref": "ResourceGroupId"
},
"EnvironmentType": {
"Ref": "EnvironmentType"
},
"BindResourceId": {
"Ref": "BindResourceId"
},
"RefreshOptions": {
"Ref": "RefreshOptions"
}
}
}
},
"Outputs": {
"Environments": {
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Environments"
]
},
"Description": "The list of environments."
},
"EnvironmentIds": {
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"EnvironmentIds"
]
},
"Description": "The list of environment IDs."
}
}
}