全部产品
Search
文档中心

资源编排:DATASOURCE::ARMS::Prometheus

更新时间:Dec 09, 2024

DATASOURCE::ARMS::Prometheus类型用于获取指定Prometheus实例信息。

语法

{
  "Type": "DATASOURCE::ARMS::Prometheus",
  "Properties": {
    "ClusterId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ClusterId

String

Prometheus 实例 ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • VpcId:集群所对应的 VPC。

  • ResourceGroupId:实例所属的资源组 ID。

  • ClusterId:Prometheus 实例 ID。

  • UserId:用户 ID。

  • SecurityGroupId:安全组 ID。

  • VSwitchId:交换机 ID。

  • PaymentType:付费类型。

  • ClusterType:集群类型。

  • Tags:实例所绑定的标签。

  • SubClustersJson:globalView 实例的子实例 json 串。

  • GrafanaInstanceId:Grafana 工作区 ID。

  • PrometheusName:Prometheus实例名称。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ClusterId:
    Type: String
    Description:
      en: The ID of the Prometheus instance.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ARMS::Prometheus
    Properties:
      ClusterId:
        Ref: ClusterId
Outputs:
  VpcId:
    Description: The VPC ID. This parameter is returned only for Prometheus instances for ECS.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VpcId
  ResourceGroupId:
    Description: The ID of the resource group to which the instance belongs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  ClusterId:
    Description: The ID of the Prometheus instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ClusterId
  UserId:
    Description: The user ID.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UserId
  SecurityGroupId:
    Description: The ID of the security group. This parameter is returned only for Prometheus instances for ECS.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SecurityGroupId
  VSwitchId:
    Description: The vSwitch ID. This parameter is returned only for Prometheus instances for ECS.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - VSwitchId
  PaymentType:
    Description: The billing method.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PaymentType
  ClusterType:
    Description: The type of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ClusterType
  Tags:
    Description: The tags of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
  SubClustersJson:
    Description: The child instances of the Prometheus instance for GlobalView.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - SubClustersJson
  GrafanaInstanceId:
    Description: The ID of the Grafana workspace.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GrafanaInstanceId
  PrometheusName:
    Description: The name of the instance.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PrometheusName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ClusterId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Prometheus instance."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ARMS::Prometheus",
      "Properties": {
        "ClusterId": {
          "Ref": "ClusterId"
        }
      }
    }
  },
  "Outputs": {
    "VpcId": {
      "Description": "The VPC ID. This parameter is returned only for Prometheus instances for ECS.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VpcId"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group to which the instance belongs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "ClusterId": {
      "Description": "The ID of the Prometheus instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ClusterId"
        ]
      }
    },
    "UserId": {
      "Description": "The user ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UserId"
        ]
      }
    },
    "SecurityGroupId": {
      "Description": "The ID of the security group. This parameter is returned only for Prometheus instances for ECS.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SecurityGroupId"
        ]
      }
    },
    "VSwitchId": {
      "Description": "The vSwitch ID. This parameter is returned only for Prometheus instances for ECS.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "VSwitchId"
        ]
      }
    },
    "PaymentType": {
      "Description": "The billing method.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PaymentType"
        ]
      }
    },
    "ClusterType": {
      "Description": "The type of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ClusterType"
        ]
      }
    },
    "Tags": {
      "Description": "The tags of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      }
    },
    "SubClustersJson": {
      "Description": "The child instances of the Prometheus instance for GlobalView.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "SubClustersJson"
        ]
      }
    },
    "GrafanaInstanceId": {
      "Description": "The ID of the Grafana workspace.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GrafanaInstanceId"
        ]
      }
    },
    "PrometheusName": {
      "Description": "The name of the instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrometheusName"
        ]
      }
    }
  }
}