建立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 個字元。 |
This is the description. |
| 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. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。