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"
]
}
}
}
}