全部产品
Search
文档中心

事件总线EventBridge:CreateApiDestination - 创建API端点信息

更新时间:Mar 15, 2024

创建API端点信息。

接口说明

用于创建 API 端点信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ApiDestinationNamestring

API 名称,最大长度 127 个字符。最小长度 2 个字符。

api-destination-name
ConnectionNamestring

连接配置名称。最大长度 127 个字符。最小长度 2 个字符。

注意 需要先调用 Connection 接口创建连接配置,ConnectionName 填写已存在的连接名称。

connection-name
Descriptionstring

API 描述,不超过 255 个字符。

连接配置描述信息
HttpApiParametersobject

API 端点的配置信息。

Endpointstring

API 端点的接入点地址。最大长度 127 个字符。

http://127.0.0.1:8001/api
Methodstring

HTTP 请求方法。

  • GET
  • POST
  • HEAD
  • DELETE
  • PUT
  • PATCH
POST

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

5DAF96FB-A4B6-548C-B999-0BFDCB22****
Messagestring

返回信息。

success
Codestring

接口状态或 POP 错误码。取值说明如下:Success:成功。

Success
Dateobject

返回创建 API 端点成功数据结构。

ApiDestinationNamestring

API 端点名称。

ApiDestinationName

示例

正常返回示例

JSON格式

{
  "RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB22****",
  "Message": "success",
  "Code": "Success",
  "Date": {
    "ApiDestinationName": "ApiDestinationName"
  }
}

错误码

HTTP status code错误码错误信息
409RequestParameterExceptionRequest parameter exception
409RequestParameterInvalidThe ApiDestination name is invalid! Only letters a~z or A~Z, numbers 0~9, underscore (_) and dash (-) are supported.
409RequestParameterInvalidThe connection name length cannot exceed 127.
409ApiDestinationAlreadyExistThe api-destination already existed!
409ConnectionNotExistThe Connection not existed!
409HttpApiParametersIsNullHttpApiParameters is null!
409EndpointIsBlankEndpoint is blank!
409MethodMethod is blank!
409EndpointLengthExceedEndpoint length cannot exceed 127!
409ApiDestinationAlreadyExistThe api-destination already existed!
409ApiDestinationCountExceedLimitThe current count of api-destination is [{0}], which will exceed the limit quota.
500InternalErrorInternalError

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-09-13OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 409 变更
    新增错误码:500
2023-04-12OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:409
2023-04-06OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 409 变更
入参OpenAPI 入参发生变更
    删除入参:InvocationRateLimitPerSecond