创建API端点信息。
接口说明
用于创建 API 端点信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eventbridge:CreateApiDestination |
create |
*ApiDestination
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ApiDestinationName |
string |
是 |
API 名称,最大长度 127 个字符。最小长度 2 个字符。 |
api-destination-name |
| ConnectionName |
string |
是 |
连接配置名称。最大长度 127 个字符。最小长度 2 个字符。 重要 需要先调用 Connection 接口创建连接配置,ConnectionName 填写已存在的连接名称。 |
connection-name |
| Description |
string |
否 |
API 描述,不超过 255 个字符。 |
连接配置描述信息 |
| HttpApiParameters |
object |
是 |
API 端点的配置信息。 |
|
| Endpoint |
string |
是 |
API 端点的接入点地址。最大长度 127 个字符。 |
http://127.0.0.1:8001/api |
| Method |
string |
是 |
HTTP 请求方法。
|
POST |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
5DAF96FB-A4B6-548C-B999-0BFDCB22**** |
| Message |
string |
返回信息。 |
success |
| Code |
string |
接口状态或 POP 错误码。取值说明如下:Success:成功。 |
Success |
| Date |
object |
返回创建 API 端点成功数据结构。 |
|
| ApiDestinationName |
string |
API 端点名称。 |
ApiDestinationName |
示例
正常返回示例
JSON格式
{
"RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB22****",
"Message": "success",
"Code": "Success",
"Date": {
"ApiDestinationName": "ApiDestinationName"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 500 | InternalError | InternalError | |
| 409 | RequestParameterException | Request parameter exception | |
| 409 | RequestParameterInvalid | The ApiDestination name is invalid! Only letters a~z or A~Z, numbers 0~9, underscore (_) and dash (-) are supported. | |
| 409 | ApiDestinationAlreadyExist | The api-destination already existed! | |
| 409 | ConnectionNotExist | The Connection not existed! | |
| 409 | HttpApiParametersIsNull | HttpApiParameters is null! | |
| 409 | EndpointIsBlank | Endpoint is blank! | |
| 409 | Method | Method is blank! | |
| 409 | EndpointLengthExceed | Endpoint length cannot exceed 127! | |
| 409 | ApiDestinationCountExceedLimit | The current count of api-destination is [{0}], which will exceed the limit quota. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。