ALIYUN::EventBridge::ApiDestination

更新时间:
复制 MD 格式

ALIYUN::EventBridge::ApiDestination类型用于创建API端点信息。

语法

{
  "Type": "ALIYUN::EventBridge::ApiDestination",
  "Properties": {
    "ApiDestinationName": String,
    "ConnectionName": String,
    "HttpApiParameters": Map,
    "Description": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

ApiDestinationName

String

API 名称。

最大长度为 127 个字符,最小长度为 2 个字符。

ConnectionName

String

连接配置名称。

最大长度为 127 个字符,最小长度为 2 个字符。

HttpApiParameters

Map

API 端点的配置信息。

更多信息,请参考HttpApiParameters属性

Description

String

API 的描述。

不超过 255 个字符。

HttpApiParameters语法

"HttpApiParameters": {
  "Endpoint": String,
  "Method": String
}

HttpApiParameters属性

属性名称

类型

必须

允许更新

描述

约束

Endpoint

String

API 端点的接入点地址。

最大长度为 127 个字符。

Method

String

HTTP 请求方法。

取值:

  • GET

  • POST

  • HEAD

  • DELETE

  • PUT

  • PATCH

返回值

Fn::GetAtt

  • ConnectionName:连接配置名称,最大长度为 127 个字符,最小长度为 2 个字符。

  • Description:API 的描述,不超过 255 个字符。

  • CreateTime:创建时间。

  • HttpApiParameters:API 端点的配置信息。

  • ApiDestinationName:API 名称,最大长度为 127 个字符,最小长度为 2 个字符。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  ApiDestinationName:
    Description:
      en: The name of the api. The maximum length is 127 characters. Minimum length
        2 characters.
    Required: true
    Type: String
  ConnectionName:
    Description:
      en: 'The connection configuration name. The maximum length is 127 characters.
        Minimum length 2 characters.

        - Tip: You must first call the Connection interface to create a Connection
        configuration. Enter the name of the existing Connection.'
    Required: true
    Type: String
  Description:
    AssociationProperty: TextArea
    Description:
      en: The description of the api. It must be no more than 255 characters.
    Required: false
    Type: String
  HttpApiParameters:
    AssociationPropertyMetadata:
      Parameters:
        Endpoint:
          Description:
            en: The access point address of the API endpoint. The maximum length is
              127 characters.
          Required: true
          Type: String
        Method:
          AllowedValues:
            - GET
            - POST
            - HEAD
            - DELETE
            - PUT
            - PATCH
          Description:
            en: 'HTTP request method.'
          Required: true
          Type: String
    Description:
      en: Configuration information for API endpoints.
    Required: true
    Type: Json
Resources:
  ExtensionResource:
    Properties:
      ApiDestinationName:
        Ref: ApiDestinationName
      ConnectionName:
        Ref: ConnectionName
      Description:
        Ref: Description
      HttpApiParameters:
        Ref: HttpApiParameters
    Type: ALIYUN::EventBridge::ApiDestination
Outputs:
  ApiDestinationName:
    Description: The name of the api. The maximum length is 127 characters. Minimum
      length 2 characters.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ApiDestinationName
  ConnectionName:
    Description: The connection configuration name. The maximum length is 127 characters.
      Minimum length 2 characters.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ConnectionName
  CreateTime:
    Description: Creation time.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CreateTime
  Description:
    Description: The description of the api. It must be no more than 255 characters.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Description
  HttpApiParameters:
    Description: Configuration information for API endpoints.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - HttpApiParameters
                        
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "ConnectionName": {
      "Type": "String",
      "Description": {
        "en": "The connection configuration name. The maximum length is 127 characters. Minimum length 2 characters.\n- Tip: You must first call the Connection interface to create a Connection configuration. Enter the name of the existing Connection."
      },
      "Required": true
    },
    "Description": {
      "Type": "String",
      "AssociationProperty": "TextArea",
      "Description": {
        "en": "The description of the api. It must be no more than 255 characters."
      },
      "Required": false
    },
    "HttpApiParameters": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "Endpoint": {
            "Type": "String",
            "Description": {
              "en": "The access point address of the API endpoint. The maximum length is 127 characters."
            },
            "Required": true
          },
          "Method": {
            "Type": "String",
            "Description": {
              "en": "HTTP request method."
            },
            "AllowedValues": [
              "GET",
              "POST",
              "HEAD",
              "DELETE",
              "PUT",
              "PATCH"
            ],
            "Required": true
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Configuration information for API endpoints."
      },
      "Required": true
    },
    "ApiDestinationName": {
      "Type": "String",
      "Description": {
        "en": "The name of the api. The maximum length is 127 characters. Minimum length 2 characters."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::EventBridge::ApiDestination",
      "Properties": {
        "ConnectionName": {
          "Ref": "ConnectionName"
        },
        "Description": {
          "Ref": "Description"
        },
        "HttpApiParameters": {
          "Ref": "HttpApiParameters"
        },
        "ApiDestinationName": {
          "Ref": "ApiDestinationName"
        }
      }
    }
  },
  "Outputs": {
    "ConnectionName": {
      "Description": "The connection configuration name. The maximum length is 127 characters. Minimum length 2 characters.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ConnectionName"
        ]
      }
    },
    "Description": {
      "Description": "The description of the api. It must be no more than 255 characters.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Description"
        ]
      }
    },
    "CreateTime": {
      "Description": "Creation time.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CreateTime"
        ]
      }
    },
    "HttpApiParameters": {
      "Description": "Configuration information for API endpoints.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "HttpApiParameters"
        ]
      }
    },
    "ApiDestinationName": {
      "Description": "The name of the api. The maximum length is 127 characters. Minimum length 2 characters.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ApiDestinationName"
        ]
      }
    }
  }
}