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
  }
}

Properties

Property Type Required Editable Description Constraint
EnableTagAuth Boolean No Yes Specifies whether to enable tag verification. Valid values:
  • true: enables tag verification.
  • false: disables tag verification.
ApiName String No Yes The name of the API. Fuzzy match is supported.
Visibility String No Yes Specifies whether to make the API public. Valid values:
  • PUBLIC: Make the API public.

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

  • PRIVATE: Make the API private.

    Private APIs are not displayed in Alibaba Cloud Marketplace after the API group to which they belong is made available in Alibaba Cloud Marketplace.

ApiId String No Yes The ID of the API. None
CatalogId String No Yes The ID of the category to which the API belongs. None
GroupId String No Yes The ID of the group to which the API belongs. None

Return values (Fn::GetAtt)

  • ApiIds: the IDs of the APIs.
  • Apis: details of the APIs.
Parameter Type Description Constraint
ApiIds List The IDs of the APIs. None.
Apis List Details of the APIs. None.
Visibility String Indicates whether the API is public or private. Valid values:
  • PUBLIC
  • PRIVATE
ApiId String The ID of the API. None.
ModifiedTime String The time when the API was modified. The time is displayed in Coordinated Universal Time (UTC).
Description String The description of the API. None.
GroupName String The name of the API group. None.
GroupId String The ID of the API group. None.
CreatedTime String The time when the API was created. The time is displayed in UTC.
ApiName String The name of the API. None.
RegionId String The ID of the region in which the API is deployed. 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