API 宛先を作成します。
操作説明
この API オペレーションを呼び出して、API 宛先を作成できます。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
eventbridge:CreateApiDestination |
create |
*ApiDestination
|
なし | なし |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| ApiDestinationName |
string |
必須 |
API 宛先の名前。名前の長さは 2~127 文字である必要があります。 |
api-destination-name |
| ConnectionName |
string |
必須 |
接続の名前。名前の長さは 2~127 文字である必要があります。 説明
このパラメーターを設定する前に、CreateConnection オペレーションを呼び出して接続を作成する必要があります。その後、このパラメーターを、作成した接続の名前に設定します。 |
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 |
返された応答コード。値が `Success` の場合、リクエストは成功です。 |
Success |
| Date |
object |
API 宛先が作成された場合に返されるデータ。 |
|
| ApiDestinationName |
string |
API 宛先の名前。 |
ApiDestinationName |
例
成功レスポンス
JSONJSON
{
"RequestId": "5DAF96FB-A4B6-548C-B999-0BFDCB22****",
"Message": "success",
"Code": "Success",
"Date": {
"ApiDestinationName": "ApiDestinationName"
}
}
エラーコード
|
HTTP ステータスコード |
エラーコード |
エラーメッセージ |
説明 |
|---|---|---|---|
| 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. |
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。