x-amazon-apigateway-any-method オブジェクト
OpenAPI Path Item オブジェクトANY
メソッドの OpenAPI Operation オブジェクト
次の表は、API Gateway が拡張するプロパティを示します。他の OpenAPI Operation プロパティについては、OpenAPI の仕様を参照してください。
プロパティ名 | タイプ | 説明 |
---|---|---|
isDefaultRoute |
Boolean |
ルートが $default ルートであるかどうかを指定します。HTTP API に対してのみサポートされます。詳細については、「API Gateway で HTTP API のルートを作成する」を参照してください。 |
x-amazon-apigateway-integration |
x-amazon-apigateway-integration オブジェクト | メソッドとバックエンドの統合を指定します。これは、OpenAPI OperationAWS 、AWS_PROXY 、HTTP 、HTTP_PROXY 、または MOCK です。 |
x-amazon-apigateway-any-method の例
次の例では、プロキシリソース、 ANY
の {proxy+}
メソッドを Lambda 関数、TestSimpleProxy
と統合しています。
"/{proxy+}": { "x-amazon-apigateway-any-method": { "produces": [ "application/json" ], "parameters": [ { "name": "proxy", "in": "path", "required": true, "type": "string" } ], "responses": {}, "x-amazon-apigateway-integration": { "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:TestSimpleProxy/invocations", "httpMethod": "POST", "type": "aws_proxy" }
次の例では、Lambda 関数、$default
と統合する HTTP API の HelloWorld
ルートを作成します。
"/$default": { "x-amazon-apigateway-any-method": { "isDefaultRoute": true, "x-amazon-apigateway-integration": { "type": "AWS_PROXY", "httpMethod": "POST", "uri": "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:123456789012:function:HelloWorld/invocations", "timeoutInMillis": 1000, "connectionType": "INTERNET", "payloadFormatVersion": 1.0 } } }