全部產品
Search
文件中心

:ALIYUN::ARMS::ManagedPrometheus

更新時間:Jun 21, 2024

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

阿里雲Container ServiceKubernetes版的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"
        ]
      }
    }
  }
}