ALIYUN::ARMS::Prometheus类型用于创建Prometheus实例。
语法
{
"Type": "ALIYUN::ARMS::Prometheus",
"Properties": {
"VpcId": String,
"ResourceGroupId": String,
"ClusterId": String,
"SecurityGroupId": String,
"VSwitchId": String,
"ClusterType": String,
"Tags": List,
"SubClustersJson": List,
"GrafanaInstanceId": String,
"PrometheusName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
ClusterType | String | 是 | 否 | 集群类型。 | 取值:
|
GrafanaInstanceId | String | 是 | 是 | 绑定的Grafana工作区ID。 | 使用共享版Grafana时,值为"free"。 |
PrometheusName | String | 是 | 否 | 用户新建集群实例的名称。 | 当ClusterType为remote-write-prometheus、ecs、global-view时,需要传此参数。 若是ECS类型实例,PrometheusName的命名规则为“name-vpc-id”,且name部分的长度不允许超过24个字符,例如“mytest1-vpc-xxxxxxxxxxx”。 |
ClusterId | String | 否 | 否 | 用户容器服务集群ID。 | 当ClusterType 为ManagedKubernetes时,需要传此参数。 |
ResourceGroupId | String | 否 | 是 | 资源组ID。 | 无 |
SecurityGroupId | String | 否 | 否 | 用户专有网络安全组SecurityGroup。 | 当ClusterType为ecs或者aliyun-cs的托管版ask容器集群时,需要传此参数。 |
SubClustersJson | List | 否 | 是 | globalView实例的子实例JSON串。 | 当ClusterType为global-view时,需要传此参数。 需要聚合的集群的信息列表。
|
Tags | List | 否 | 是 | 自定义标签。 | 最多添加20个标签。 更多信息,请参见Tags属性。 |
VpcId | String | 否 | 否 | 用户专有网络VPC。 | 当ClusterType为ecs或者ManagedKubernetes时,需要传此参数。 |
VSwitchId | String | 否 | 否 | 用户专有网络交换机VSwitch。 | 当ClusterType为ecs或者 ManagedKubernetes时,需要传此参数。 |
Tags语法
"Tags": [
{
"Value": String,
"Key": String
}
]
Tags属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Key | String | 是 | 否 | 标签键。 | 长度为1~128个字符,不能以 |
Value | String | 否 | 否 | 标签值。 | 长度为0~128个字符,不能以 |
返回值
Fn::GetAtt
VpcId:集群实例所对应的VPC ID。
ResourceGroupId:集群实例所对应的资源组ID。
ClusterId:集群实例ID。
UserId:用户ID。
SecurityGroupId:安全组ID.
VSwitchId:集群实例所对应的交换机ID。
PaymentType:集群实例付费类型。
ClusterType:集群实例类型。
Tags:集群实例绑定标签信息。
SubClustersJson:globalView实例的子实例JSON串。
GrafanaInstanceId:绑定的Grafana工作区ID。
PrometheusName:集群实例的名称。
示例
YAML格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
ClusterType:
Type: String
Description:
en: Instance type.
AllowedValues:
- vpc-prometheus
- ManagedKubernetes
- cloud-product-prometheus
- remote-write-prometheus
- GlobalViewV2
- ecs
- global-view
Required: true
GrafanaInstanceId:
Type: String
Description:
en: Grafana workspace ID.
Required: true
PrometheusName:
Type: String
Description:
en: The name of the resource.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ARMS::Prometheus
Properties:
ClusterType:
Ref: ClusterType
GrafanaInstanceId:
Ref: GrafanaInstanceId
PrometheusName:
Ref: PrometheusName
Outputs:
VpcId:
Description: 'The ID of the virtual private cloud (VPC). '
Value:
Fn::GetAtt:
- ExtensionResource
- VpcId
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionResource
- ResourceGroupId
ClusterId:
Description: The ID of the cluster.
Value:
Fn::GetAtt:
- ExtensionResource
- ClusterId
UserId:
Description: User ID.
Value:
Fn::GetAtt:
- ExtensionResource
- UserId
SecurityGroupId:
Description: 'The ID of the security group. '
Value:
Fn::GetAtt:
- ExtensionResource
- SecurityGroupId
VSwitchId:
Description: 'The ID of the vSwitch. '
Value:
Fn::GetAtt:
- ExtensionResource
- VSwitchId
PaymentType:
Description: Payment Type.
Value:
Fn::GetAtt:
- ExtensionResource
- PaymentType
ClusterType:
Description: Instance type.
Value:
Fn::GetAtt:
- ExtensionResource
- ClusterType
Tags:
Description: The tags of the prometheus.
Value:
Fn::GetAtt:
- ExtensionResource
- Tags
SubClustersJson:
Description: Subcluster information of globalVeiw cluster.
Value:
Fn::GetAtt:
- ExtensionResource
- SubClustersJson
GrafanaInstanceId:
Description: Grafana workspace ID.
Value:
Fn::GetAtt:
- ExtensionResource
- GrafanaInstanceId
PrometheusName:
Description: The name of the resource.
Value:
Fn::GetAtt:
- ExtensionResource
- PrometheusName
JSON格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"ClusterType": {
"Type": "String",
"Description": {
"en": "Instance type."
},
"AllowedValues": [
"vpc-prometheus",
"ManagedKubernetes",
"cloud-product-prometheus",
"remote-write-prometheus",
"GlobalViewV2",
"ecs",
"global-view"
],
"Required": true
},
"GrafanaInstanceId": {
"Type": "String",
"Description": {
"en": "Grafana workspace ID."
},
"Required": true
},
"PrometheusName": {
"Type": "String",
"Description": {
"en": "The name of the resource."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ARMS::Prometheus",
"Properties": {
"ClusterType": {
"Ref": "ClusterType"
},
"GrafanaInstanceId": {
"Ref": "GrafanaInstanceId"
},
"PrometheusName": {
"Ref": "PrometheusName"
}
}
}
},
"Outputs": {
"VpcId": {
"Description": "The ID of the virtual private cloud (VPC). ",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VpcId"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ResourceGroupId"
]
}
},
"ClusterId": {
"Description": "The ID of the cluster.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ClusterId"
]
}
},
"UserId": {
"Description": "User ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"UserId"
]
}
},
"SecurityGroupId": {
"Description": "The ID of the security group. ",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SecurityGroupId"
]
}
},
"VSwitchId": {
"Description": "The ID of the vSwitch. ",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"VSwitchId"
]
}
},
"PaymentType": {
"Description": "Payment Type.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PaymentType"
]
}
},
"ClusterType": {
"Description": "Instance type.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ClusterType"
]
}
},
"Tags": {
"Description": "The tags of the prometheus.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Tags"
]
}
},
"SubClustersJson": {
"Description": "Subcluster information of globalVeiw cluster.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"SubClustersJson"
]
}
},
"GrafanaInstanceId": {
"Description": "Grafana workspace ID.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"GrafanaInstanceId"
]
}
},
"PrometheusName": {
"Description": "The name of the resource.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PrometheusName"
]
}
}
}
}