DATASOURCE::ARMS::Environment

更新时间:
复制 MD 格式

DATASOURCE::ARMS::Environment类型用于查询单个环境详情。

语法

{
  "Type": "DATASOURCE::ARMS::Environment",
  "Properties": {
    "EnvironmentId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

EnvironmentId

String

环境实例 ID。

RefreshOptions

String

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

取值:

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

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

返回值

Fn::GetAtt

  • ManagedType:托管类型。

  • ResourceGroupId:资源组ID。

  • GrafanaDatasourceUid:Grafana数据源的UID。

  • EnvironmentName:资源的名称。

  • FeePackage:付费套餐。

  • GrafanaFolderUid:绑定的Grafana目录UID。

  • EnvironmentSubType:环境的子类型。

  • EnvironmentId:环境实例 ID。

  • BindResourceType:绑定的资源类型。

  • EnvironmentType:环境的类型。

  • BindResourceId:绑定的容器实例IDVPC ID。

  • UserId:用户ID。

  • PrometheusInstanceId:Prometheus实例ID。

  • BindVpcCidr:绑定的VPC网段。

  • Tags:资源的标签。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EnvironmentId:
    Type: String
    Description:
      en: The first ID of the resource.
    Required: true
  RefreshOptions:
    Type: String
    Description:
      en: |-
        The refresh strategy for the datasource resource when the stack is updated. Valid values:
        - Never: Never refresh the datasource resource when the stack is updated.
        - Always: Always refresh the datasource resource when the stack is updated.
        Default is Never.
    AllowedValues:
      - Always
      - Never
    Default: Never
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::ARMS::Environment
    Properties:
      EnvironmentId:
        Ref: EnvironmentId
      RefreshOptions:
        Ref: RefreshOptions
Outputs:
  ManagedType:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ManagedType
    Description: Hosting type.
  EnvironmentName:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentName
    Description: The name of the resource.
  BindVpcCidr:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BindVpcCidr
    Description: The network segment of the bound vpc.
  EnvironmentSubType:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentSubType
    Description: Subtype of environment.
  FeePackage:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - FeePackage
    Description: Paid package.
  Tags:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Tags
    Description: The tag of the resource.
  UserId:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - UserId
    Description: User ID.
  PrometheusInstanceId:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PrometheusInstanceId
    Description: The ID of the prometheus instance.
  EnvironmentId:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentId
    Description: The first ID of the resource.
  ResourceGroupId:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
    Description: The ID of the resource group.
  GrafanaFolderUid:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GrafanaFolderUid
    Description: Binding Grafana directory uid.
  BindResourceId:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BindResourceId
    Description: The id or vpcId of the bound container instance.
  BindResourceType:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BindResourceType
    Description: Binding resource type.
  GrafanaDatasourceUid:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GrafanaDatasourceUid
    Description: The uid of the Grafana data source.
  EnvironmentType:
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentType
    Description: Type of environment.
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EnvironmentId": {
      "Type": "String",
      "Description": {
        "en": "The first ID of the resource."
      },
      "Required": true
    },
    "RefreshOptions": {
      "Type": "String",
      "Description": {
        "en": "The refresh strategy for the datasource resource when the stack is updated. Valid values:\n- Never: Never refresh the datasource resource when the stack is updated.\n- Always: Always refresh the datasource resource when the stack is updated.\nDefault is Never."
      },
      "AllowedValues": [
        "Always",
        "Never"
      ],
      "Default": "Never",
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::ARMS::Environment",
      "Properties": {
        "EnvironmentId": {
          "Ref": "EnvironmentId"
        },
        "RefreshOptions": {
          "Ref": "RefreshOptions"
        }
      }
    }
  },
  "Outputs": {
    "ManagedType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ManagedType"
        ]
      },
      "Description": "Hosting type."
    },
    "EnvironmentName": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentName"
        ]
      },
      "Description": "The name of the resource."
    },
    "BindVpcCidr": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BindVpcCidr"
        ]
      },
      "Description": "The network segment of the bound vpc."
    },
    "EnvironmentSubType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentSubType"
        ]
      },
      "Description": "Subtype of environment."
    },
    "FeePackage": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "FeePackage"
        ]
      },
      "Description": "Paid package."
    },
    "Tags": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Tags"
        ]
      },
      "Description": "The tag of the resource."
    },
    "UserId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "UserId"
        ]
      },
      "Description": "User ID."
    },
    "PrometheusInstanceId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PrometheusInstanceId"
        ]
      },
      "Description": "The ID of the prometheus instance."
    },
    "EnvironmentId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentId"
        ]
      },
      "Description": "The first ID of the resource."
    },
    "ResourceGroupId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      },
      "Description": "The ID of the resource group."
    },
    "GrafanaFolderUid": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GrafanaFolderUid"
        ]
      },
      "Description": "Binding Grafana directory uid."
    },
    "BindResourceId": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BindResourceId"
        ]
      },
      "Description": "The id or vpcId of the bound container instance."
    },
    "BindResourceType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BindResourceType"
        ]
      },
      "Description": "Binding resource type."
    },
    "GrafanaDatasourceUid": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GrafanaDatasourceUid"
        ]
      },
      "Description": "The uid of the Grafana data source."
    },
    "EnvironmentType": {
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentType"
        ]
      },
      "Description": "Type of environment."
    }
  }
}