ALIYUN::ARMS::Environment類型用于創建環境實例。
語法
{
"Type": "ALIYUN::ARMS::Environment",
"Properties": {
"BindResourceId": String,
"DeletePromInstance": Boolean,
"EnvironmentSubType": String,
"EnvironmentType": String,
"EnvironmentName": String,
"FeePackage": String,
"GrafanaWorkspaceId": String,
"ManagedType": String,
"PrometheusInstanceId": String,
"ResourceGroupId": String,
"Tags": List
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
BindResourceId | String | 是 | 否 | 環境綁定的資源實例 ID。 | 包括容器實例 ID 或 VpcId。 對于 Cloud 類型的環境,當前字段值為 RegionId。 |
EnvironmentSubType | String | 是 | 否 | 環境的子類型。 | 取值:
|
EnvironmentType | String | 是 | 否 | 環境類型。 | 取值:
|
EnvironmentName | String | 是 | 是 | 環境名稱。 | 無 |
DeletePromInstance | Boolean | 否 | 是 | 是否級聯刪除 prometheus 實例。 | 無 |
FeePackage | String | 否 | 是 | 付費套餐。 | 說明
|
GrafanaWorkspaceId | String | 否 | 否 | 環境綁定的 grafana 工作區 id。 | 傳空時,表示使用默認的共享 grafana。 |
ManagedType | String | 否 | 否 | 托管類型。 | 取值:
|
PrometheusInstanceId | String | 否 | 否 | 環境綁定的 prom 實例 id。 | 如果未提供,請調用 InitEnvironment 接口完成存儲實例的初始化。 |
ResourceGroupId | String | 否 | 否 | 資源組 Id。 | 無 |
Tags | List | 否 | 是 | 標簽。 | 最多支持添加20個標簽。 更多信息,請參見Tags屬性。 |
Tags語法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
Key | String | 是 | 否 | 標簽鍵。 | 無 |
Value | String | 否 | 否 | 標簽值。 | 無 |
返回值
Fn::GetAtt
ManagedType:托管類型。
EnvironmentId:環境 id。
EnvironmentSubType:環境的子類型。
EnvironmentType:環境類型。
ResourceGroupId:資源組 Id。
EnvironmentName:環境名稱。
GrafanaWorkspaceId:環境綁定的 grafana 工作區 id。
PrometheusInstanceId:環境綁定的 prom 實例 id。
FeePackage:付費套餐。
示例
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EnvironmentSubType:
Type: String
Description:
en: |-
The subtype of the environment. Valid values:
One: CS type environment
ACK: CS type environment
ECS: ECS type environment
Cloud: cloud service
AllowedValues:
- ACK
- ECS
- One
- Cloud
Required: true
EnvironmentType:
Type: String
Description:
en: |-
The type of the environment. Valid values:
CS: ACK
ECS: ECS
Cloud: cloud service
AllowedValues:
- CS
- ECS
- Cloud
Required: true
EnvironmentName:
Type: String
Description:
en: The name of the environment.
Required: true
BindResourceId:
Type: String
Description:
en: The ID of the resource bound to the environment, such as the container ID or VPC ID. For a Cloud environment, specify the region ID.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ARMS::Environment
Properties:
EnvironmentSubType:
Ref: EnvironmentSubType
EnvironmentType:
Ref: EnvironmentType
EnvironmentName:
Ref: EnvironmentName
BindResourceId:
Ref: BindResourceId
Outputs:
ManagedType:
Description: Specifies whether agents or exporters are managed.
Value:
Fn::GetAtt:
- ExtensionResource
- ManagedType
EnvironmentId:
Description: The id of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentId
EnvironmentSubType:
Description: The subtype of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentSubType
EnvironmentType:
Description: The type of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentType
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionResource
- ResourceGroupId
EnvironmentName:
Description: The name of the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- EnvironmentName
GrafanaWorkspaceId:
Description: The ID of the grafana workspace bound to the environment.
Value:
Fn::GetAtt:
- ExtensionResource
- GrafanaWorkspaceId
PrometheusInstanceId:
Description: The ID of the Prometheus instance.
Value:
Fn::GetAtt:
- ExtensionResource
- PrometheusInstanceId
FeePackage:
Description: The payable resource plan.
Value:
Fn::GetAtt:
- ExtensionResource
- FeePackage
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EnvironmentSubType": {
"Type": "String",
"Description": {
"en": "The subtype of the environment. Valid values:\nOne: CS type environment\nACK: CS type environment\nECS: ECS type environment\nCloud: cloud service"
},
"AllowedValues": [
"ACK",
"ECS",
"One",
"Cloud"
],
"Required": true
},
"EnvironmentType": {
"Type": "String",
"Description": {
"en": "The type of the environment. Valid values:\nCS: ACK\nECS: ECS\nCloud: cloud service"
},
"AllowedValues": [
"CS",
"ECS",
"Cloud"
],
"Required": true
},
"EnvironmentName": {
"Type": "String",
"Description": {
"en": "The name of the environment."
},
"Required": true
},
"BindResourceId": {
"Type": "String",
"Description": {
"en": "The ID of the resource bound to the environment, such as the container ID or VPC ID. For a Cloud environment, specify the region ID."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ARMS::Environment",
"Properties": {
"EnvironmentSubType": {
"Ref": "EnvironmentSubType"
},
"EnvironmentType": {
"Ref": "EnvironmentType"
},
"EnvironmentName": {
"Ref": "EnvironmentName"
},
"BindResourceId": {
"Ref": "BindResourceId"
}
}
}
},
"Outputs": {
"ManagedType": {
"Description": "Specifies whether agents or exporters are managed.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ManagedType"
]
}
},
"EnvironmentId": {
"Description": "The id of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentId"
]
}
},
"EnvironmentSubType": {
"Description": "The subtype of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentSubType"
]
}
},
"EnvironmentType": {
"Description": "The type of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentType"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ResourceGroupId"
]
}
},
"EnvironmentName": {
"Description": "The name of the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"EnvironmentName"
]
}
},
"GrafanaWorkspaceId": {
"Description": "The ID of the grafana workspace bound to the environment.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GrafanaWorkspaceId"
]
}
},
"PrometheusInstanceId": {
"Description": "The ID of the Prometheus instance.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PrometheusInstanceId"
]
}
},
"FeePackage": {
"Description": "The payable resource plan.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FeePackage"
]
}
}
}
}