All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::APIG::HttpApi

更新时间:Jun 18, 2025

DATASOURCE::APIG::HttpApi is used to query the information about an HTTP API.

Syntax

{
  "Type": "DATASOURCE::APIG::HttpApi",
  "Properties": {
    "HttpApiId": String,
    "RefreshOptions": String
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

HttpApiId

String

Yes

Yes

The ID of the API.

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

  • HttpApiName: the name of the API.

  • Type: the API type.

  • Protocols: the protocols of the API.

  • Description: the description of the API.

  • ResourceGroupId: the ID of the resource group.

  • BasePath: the base path of the API.

  • HttpApiId: the ID of the API.

Examples

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