DATASOURCE::ApiGateway::Apis类型用于查询API网关的API列表。

语法

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

属性

属性名称 类型 必须 允许更新 描述 约束
EnableTagAuth Boolean 是否启用标签验证。 取值:
  • true:启用标签验证。
  • false:禁用标签验证。
ApiName String API名称。 模糊匹配。
Visibility String API是否公开。 取值:
  • PUBLIC:公开。

    如果选择此类型,该API的线上环境定义,会在所有用户的控制台“发现API”页面可见。

  • PRIVATE:不公开。

    如果选择此类型,当该组API在云市场上架时,私有类型的API不会上架。

ApiId String 指定的API编号。
CatalogId String 分类ID。
GroupId String 指定的分组编号。

返回数据(Fn::GetAtt)

  • ApiIds:API编号列表。
  • Apis:API的详情列表。
属性名称 类型 描述 约束
ApiIds List API编号列表。
Apis List API的详情列表。
Visibility String 可见性。 取值:
  • PUBLIC:公开。
  • PRIVATE:私有。
ApiId String API编号。
ModifiedTime String 修改时间。 格林威治时间。
Description String API描述。
GroupName String API分组名称。
GroupId String API分组编号。
CreatedTime String 创建时间。 格林威治时间。
ApiName String API名称。
RegionId String API所在地域ID。

示例

  • JSON格式

    {
      "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格式

    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