全部产品
Search
文档中心

资源编排:DATASOURCE::ARMS::GrafanaWorkspaces

更新时间:Dec 09, 2024

DATASOURCE::ARMS::GrafanaWorkspaces类型用于查询Grafana工作区信息。

语法

{
  "Type": "DATASOURCE::ARMS::GrafanaWorkspaces",
  "Properties": {
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ResourceGroupId

String

资源组ID。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • GrafanaWorkspaceIds:工作区ID列表。

  • GrafanaWorkspaces:工作区详情列表。

属性名称

类型

描述

约束

GrafanaWorkspaceIds

List

工作区ID列表。

GrafanaWorkspaces

List

工作区详情列表。

ResourceGroupId

String

资源组ID。

GrafanaWorkspaceId

String

工作区ID

Tags

Map

工作区绑定的标签

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ResourceGroupId:
    AssociationProperty: ALIYUN::ECS::ResourceGroup::ResourceGroupId
    Type: String
    Description:
      en: The ID of the resource group to which the Prometheus instance belongs.
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ARMS::GrafanaWorkspaces
    Properties:
      ResourceGroupId:
        Ref: ResourceGroupId
Outputs:
  GrafanaWorkspaceIds:
    Description: The list of grafana workspace IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GrafanaWorkspaceIds
  GrafanaWorkspaces:
    Description: The list of grafana workspaces.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GrafanaWorkspaces
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ResourceGroupId": {
      "AssociationProperty": "ALIYUN::ECS::ResourceGroup::ResourceGroupId",
      "Type": "String",
      "Description": {
        "en": "The ID of the resource group to which the Prometheus instance belongs."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ARMS::GrafanaWorkspaces",
      "Properties": {
        "ResourceGroupId": {
          "Ref": "ResourceGroupId"
        }
      }
    }
  },
  "Outputs": {
    "GrafanaWorkspaceIds": {
      "Description": "The list of grafana workspace IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GrafanaWorkspaceIds"
        ]
      }
    },
    "GrafanaWorkspaces": {
      "Description": "The list of grafana workspaces.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GrafanaWorkspaces"
        ]
      }
    }
  }
}