All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::ApiGateway::Apis

Last Updated:Nov 01, 2024

DATASOURCE::ApiGateway::Apis is used to query APIs in API Gateway.

Syntax

{
  "Type": "DATASOURCE::ApiGateway::Apis",
  "Properties": {
    "EnableTagAuth": Boolean,
    "ApiName": String,
    "Visibility": String,
    "ApiId": String,
    "CatalogId": String,
    "GroupId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

EnableTagAuth

Boolean

No

Yes

Specifies whether to enable tag verification.

Valid values:

  • true

  • false

ApiName

String

No

Yes

The API name.

Fuzzy match is supported.

Visibility

String

No

Yes

The visibility of the API.

Valid values:

  • PUBLIC:

    If you set this property to PUBLIC, the API is displayed on the APIs page in the API Gateway console for all users after the API is published to the production environment.

  • PRIVATE:

    If you set this property to PRIVATE, the API is not published in Alibaba Cloud Marketplace after the API group of the API is available in Alibaba Cloud Marketplace.

ApiId

String

No

Yes

The API ID.

None.

CatalogId

String

No

Yes

The category ID.

None.

GroupId

String

No

Yes

The ID of the API group to which the API belongs.

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)

  • ApiIds: the IDs of the APIs.

  • Apis: details of the APIs.

Property

Type

Description

Constraint

ApiIds

List

The IDs of the APIs.

None.

Apis

List

Details of the APIs.

None.

Visibility

String

The visibility of the API.

Valid values:

  • PUBLIC

  • PRIVATE

ApiId

String

The API ID.

None.

ModifiedTime

String

The time when the API was modified.

The time is displayed in UTC.

Description

String

The description of the API.

None.

GroupName

String

The name of the API group to which the API belongs.

None.

GroupId

String

The ID of the API group to which the API belongs.

None.

CreatedTime

String

The creation time.

The time is displayed in UTC.

ApiName

String

The API name.

None.

RegionId

String

The region ID of the API.

None.

Examples

  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "ApiId": {
          "Type": "String",
          "Description": "ID of the specified API."
        }
      },
      "Resources": {
        "ExtensionDataSource": {
          "Type": "DATASOURCE::ApiGateway::Apis",
          "Properties": {
            "ApiId": {
              "Ref": "ApiId"
            }
          }
        }
      },
      "Outputs": {
        "Apis": {
          "Description": "The information about ApiGateway apis.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "Apis"
            ]
          }
        },
        "ApiIds": {
          "Description": "The list of The ApiGateway api ids.",
          "Value": {
            "Fn::GetAtt": [
              "ExtensionDataSource",
              "ApiIds"
            ]
          }
        }
      }
    }
  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      ApiId:
        Type: String
        Description: ID of the specified API.
    Resources:
      ExtensionDataSource:
        Type: DATASOURCE::ApiGateway::Apis
        Properties:
          ApiId:
            Ref: ApiId
    Outputs:
      Apis:
        Description: The information about ApiGateway apis.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - Apis
      ApiIds:
        Description: The list of The ApiGateway api ids.
        Value:
          Fn::GetAtt:
            - ExtensionDataSource
            - ApiIds