DATASOURCE::APIG::Environment

DATASOURCE::APIG::Environment类型用于查询环境。

语法

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

属性

属性名称

类型

必须

允许更新

描述

约束

EnvironmentId

String

环境 id。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • EnvironmentId:环境 id。

  • Description:环境描述信息。

  • ResourceGroupId:资源组 ID。

  • EnvironmentName:环境名称。

  • GatewayId:网关 id。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  EnvironmentId:
    Type: String
    Description:
      en: The ID of the Environment.
    Required: true
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::APIG::Environment
    Properties:
      EnvironmentId:
        Ref: EnvironmentId
Outputs:
  EnvironmentId:
    Description: The ID of the Environment.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentId
  Description:
    Description: The description of the Environment.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  ResourceGroupId:
    Description: The ID of the resource group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ResourceGroupId
  EnvironmentName:
    Description: The name of the Environment.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentName
  GatewayId:
    Description: Cloud-native API Gateway ID.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GatewayId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "EnvironmentId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Environment."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::APIG::Environment",
      "Properties": {
        "EnvironmentId": {
          "Ref": "EnvironmentId"
        }
      }
    }
  },
  "Outputs": {
    "EnvironmentId": {
      "Description": "The ID of the Environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentId"
        ]
      }
    },
    "Description": {
      "Description": "The description of the Environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "ResourceGroupId": {
      "Description": "The ID of the resource group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ResourceGroupId"
        ]
      }
    },
    "EnvironmentName": {
      "Description": "The name of the Environment.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentName"
        ]
      }
    },
    "GatewayId": {
      "Description": "Cloud-native API Gateway ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GatewayId"
        ]
      }
    }
  }
}