ALIYUN::ARMS::ManagedPrometheus

ALIYUN::ARMS::ManagedPrometheus类型用于创建托管(ASK/ECS)Prometheus。

语法

{
  "Type": "ALIYUN::ARMS::ManagedPrometheus",
  "Properties": {
    "VpcId": String,
    "SecurityGroupId": String,
    "VSwitchId": String,
    "ClusterName": String,
    "ClusterType": String,
    "GrafanaInstanceId": String,
    "ClusterId": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterType

String

集群类型。

取值:

  • ecs:ECS集群。

  • ask:ACK集群。

SecurityGroupId

String

集群所对应的安全组ID。

VpcId

String

集群所对应的VPC ID。

VSwitchId

String

集群所对应的交换机ID。

ClusterId

String

阿里云容器服务Kubernetes版的Kubernetes集群ID。

示例值:

cc7a37ee31aea4ed1a059eff8034b****

ClusterName

String

集群名称。

当ClusterType取值为ecs时,本参数必填。

GrafanaInstanceId

String

集群绑定的托管版Grafana工作区ID。

取值为空或free时,绑定到共享版Grafana。

返回值

Fn::GetAtt

  • VpcId:集群所对应的VPC ID。

  • ClusterType:集群类型。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  VpcId:
    Type: String
    Description: The vpc ID of the cluster.
  SecurityGroupId:
    Type: String
    Description: The security group ID of the cluster.
  VSwitchId:
    Type: String
    Description: The vswith ID of the cluster.
  ClusterType:
    Type: String
    Description: The type of the cluster.
    AllowedValues:
      - ecs
    Default: ecs
Resources:
  ManagedPrometheus:
    Type: ALIYUN::ARMS::ManagedPrometheus
    Properties:
      VpcId:
        Ref: VpcId
      SecurityGroupId:
        Ref: SecurityGroupId
      VSwitchId:
        Ref: VSwitchId
      ClusterType:
        Ref: ClusterType
Outputs:
  VpcId:
    Description: The vpc ID of the cluster.
    Value:
      Fn::GetAtt:
        - ManagedPrometheus
        - VpcId
  ClusterType:
    Description: The type of the cluster.
    Value:
      Fn::GetAtt:
        - ManagedPrometheus
        - ClusterType

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "VpcId": {
      "Type": "String",
      "Description": "The vpc ID of the cluster."
    },
    "SecurityGroupId": {
      "Type": "String",
      "Description": "The security group ID of the cluster."
    },
    "VSwitchId": {
      "Type": "String",
      "Description": "The vswith ID of the cluster."
    },
    "ClusterType": {
      "Type": "String",
      "Description": "The type of the cluster.",
      "AllowedValues": [
        "ecs"
      ],
      "Default": "ecs"
    }
  },
  "Resources": {
    "ManagedPrometheus": {
      "Type": "ALIYUN::ARMS::ManagedPrometheus",
      "Properties": {
        "VpcId": {
          "Ref": "VpcId"
        },
        "SecurityGroupId": {
          "Ref": "SecurityGroupId"
        },
        "VSwitchId": {
          "Ref": "VSwitchId"
        },
        "ClusterType": {
          "Ref": "ClusterType"
        }
      }
    }
  },
  "Outputs": {
    "VpcId": {
      "Description": "The vpc ID of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ManagedPrometheus",
          "VpcId"
        ]
      }
    },
    "ClusterType": {
      "Description": "The type of the cluster.",
      "Value": {
        "Fn::GetAtt": [
          "ManagedPrometheus",
          "ClusterType"
        ]
      }
    }
  }
}