DATASOURCE::ApiGateway::Apis

更新时间:
复制 MD 格式

Queries a list of 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

Whether to enable tag verification.

Valid values:

  • true

  • false

ApiName

String

No

Yes

The name of the API.

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 visible on the APIs page in the API Gateway console to all users after being published to the production environment.

  • PRIVATE:

    If you set this property to PRIVATE, the API is not listed in Alibaba Cloud Marketplace even after its API group is made available there.

ApiId

String

No

Yes

The ID of the API.

None.

CatalogId

String

No

Yes

The category ID.

None.

GroupId

String

No

Yes

The ID of the API group.

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 ID of the API.

None.

ModifiedTime

String

The time when the API was last modified.

The time is displayed in 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 creation time.

The time is displayed in UTC.

ApiName

String

The name of the API.

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