DATASOURCE::APIG::HttpApis

Updated at:

DATASOURCE::APIG::HttpApis类型用于获取HTTP API列表。

语法

{
  "Type": "DATASOURCE::APIG::HttpApis",
  "Properties": {
    "HttpApiName": String,
    "ResourceGroupId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

HttpApiName

String

否

是

API 名称。

无

ResourceGroupId

String

否

是

资源组 ID。

无

RefreshOptions

String

否

是

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • HttpApis:API 详情信息列表。

  • HttpApiIds:API ID信息列表。

属性名称

类型

描述

约束

HttpApiIds

List

API 详情信息列表。

无

HttpApis

List

API ID信息列表。

无

Description

String

API 描述。

无

HttpApiId

String

API ID。

无

BasePath

String

API 基础路径。

无

ResourceGroupId

String

资源组 ID。

无

HttpApiName

String

API 名称。

无

Type

String

API 类型。

无

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  HttpApiName:
    Type: String
    Description:
      en: The name of the API.
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::APIG::HttpApis
    Properties:
      HttpApiName:
        Ref: HttpApiName
Outputs:
  HttpApis:
    Description: The list of http apis.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HttpApis
  HttpApiIds:
    Description: The list of http api IDs.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - HttpApiIds
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "HttpApiName": {
      "Type": "String",
      "Description": {
        "en": "The name of the API."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::APIG::HttpApis",
      "Properties": {
        "HttpApiName": {
          "Ref": "HttpApiName"
        }
      }
    }
  },
  "Outputs": {
    "HttpApis": {
      "Description": "The list of http apis.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HttpApis"
        ]
      }
    },
    "HttpApiIds": {
      "Description": "The list of http api IDs.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "HttpApiIds"
        ]
      }
    }
  }
}