All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ARMS::Prometheus

更新时间:Dec 23, 2024

DATASOURCE::ARMS::Prometheus is used to query the information about a Prometheus instance.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

ClusterId

String

Yes

Yes

The ID of the Prometheus instance.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • VpcId: the virtual private cloud (VPC) that is associated with the Prometheus instance.

  • ResourceGroupId: the ID of the resource group to which the Prometheus instance belongs.

  • ClusterId: the ID of the Prometheus instance.

  • UserId: the user ID.

  • SecurityGroupId: the ID of the security group.

  • VSwitchId: the vSwitch ID.

  • PaymentType: the billing method.

  • ClusterType: the type of the Prometheus instance.

  • Tags: the tags that are added to the Prometheus instance.

  • SubClustersJson: the child instances of the Prometheus instance for GlobalView. The value is a JSON string.

  • GrafanaInstanceId: the ID of the Grafana workspace.

  • PrometheusName: the name of the Prometheus instance.

Examples

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