DATASOURCE::APIG::HttpApi类型用于获取HTTP API信息。
语法
{
"Type": "DATASOURCE::APIG::HttpApi",
"Properties": {
"HttpApiId": String,
"RefreshOptions": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
HttpApiId | String | 是 | 是 | 目标 HTTP API ID。 | 无 |
RefreshOptions | String | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值:
|
返回值
Fn::GetAtt
HttpApiName:API 名称。
Type:API 类型。
Protocols:API 协议列表。
Description:API 描述。
ResourceGroupId:资源组 ID。
BasePath:API 基础路径。
HttpApiId:HTTP API ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
HttpApiId:
Type: String
Description:
en: The ID of the API.
Required: true
Resources:
ExtensionDataSource:
Type: DATASOURCE::APIG::HttpApi
Properties:
HttpApiId:
Ref: HttpApiId
Outputs:
HttpApiName:
Description: The name of the API.
Value:
Fn::GetAtt:
- ExtensionDataSource
- HttpApiName
Type:
Description: The type of HTTP API.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Type
Protocols:
Description: List of API Access Protocols.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Protocols
Description:
Description: Description of API.
Value:
Fn::GetAtt:
- ExtensionDataSource
- Description
ResourceGroupId:
Description: The ID of the resource group.
Value:
Fn::GetAtt:
- ExtensionDataSource
- ResourceGroupId
BasePath:
Description: The base path of the API.
Value:
Fn::GetAtt:
- ExtensionDataSource
- BasePath
HttpApiId:
Description: The ID of the API.
Value:
Fn::GetAtt:
- ExtensionDataSource
- HttpApiId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"HttpApiId": {
"Type": "String",
"Description": {
"en": "The ID of the API."
},
"Required": true
}
},
"Resources": {
"ExtensionDataSource": {
"Type": "DATASOURCE::APIG::HttpApi",
"Properties": {
"HttpApiId": {
"Ref": "HttpApiId"
}
}
}
},
"Outputs": {
"HttpApiName": {
"Description": "The name of the API.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"HttpApiName"
]
}
},
"Type": {
"Description": "The type of HTTP API.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Type"
]
}
},
"Protocols": {
"Description": "List of API Access Protocols.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Protocols"
]
}
},
"Description": {
"Description": "Description of API.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"Description"
]
}
},
"ResourceGroupId": {
"Description": "The ID of the resource group.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"ResourceGroupId"
]
}
},
"BasePath": {
"Description": "The base path of the API.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"BasePath"
]
}
},
"HttpApiId": {
"Description": "The ID of the API.",
"Value": {
"Fn::GetAtt": [
"ExtensionDataSource",
"HttpApiId"
]
}
}
}
}
该文章对您有帮助吗?