All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::APIG::Environments

更新時間:Jul 21, 2025

The DATASOURCE::APIG:: Environments type is used to query environment list.

Syntax

{
  "Type": "DATASOURCE::APIG::Environments",
  "Properties": {
    "GatewayId": String,
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

Properties

Property name

Type

Required

Update allowed

Description

Constraint

GatewayId

String

No

Yes

The gateway ID.

None

ResourceGroupId

String

No

Yes

The resource group ID.

None

RefreshOptions

String

No

Yes

The data source resources refresh mode when the stack is updated.

Valid values:

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

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

Return values

Fn::GetAtt

  • Environments: Environment detail list.

  • EnvironmentIds: Environment ID list.

Property name

Type

Description

Constraint

EnvironmentIds

List

Environment ID list.

None

Environments

List

Environment detail list.

None

EnvironmentName

String

Environment name.

None

EnvironmentId

String

Environment ID.

None

Description

String

Environment description.

None

ResourceGroupId

String

Eesource group ID.

None

Example

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  GatewayId:
    Type: String
    Description:
      en: Cloud-native API Gateway ID.
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::APIG::Environments
    Properties:
      GatewayId:
        Ref: GatewayId
Outputs:
  Environments:
    Description: The list of environments.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Environments
  EnvironmentIds:
    Description: The list of environment IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnvironmentIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "GatewayId": {
      "Type": "String",
      "Description": {
        "en": "Cloud-native API Gateway ID."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::APIG::Environments",
      "Properties": {
        "GatewayId": {
          "Ref": "GatewayId"
        }
      }
    }
  },
  "Outputs": {
    "Environments": {
      "Description": "The list of environments.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Environments"
        ]
      }
    },
    "EnvironmentIds": {
      "Description": "The list of environment IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnvironmentIds"
        ]
      }
    }
  }
}