

# x-amazon-apigateway-any-method 객체
<a name="api-gateway-swagger-extensions-any-method"></a>

 [OpenAPI 경로 항목 객체(OpenAPI Path Item Object)](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#path-item-object)에서 API Gateway catch-all `ANY` 메서드에 대한 [OpenAPI 작업 객체(OpenAPI Operation Object)](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object)를 지정합니다. 이 객체는 다른 작업 객체들과 함께 존재할 수 있고, 명시적으로 선언되지 않은 모든 HTTP 메서드를 포착합니다.

 다음 표에서는 API Gateway에서 확장한 속성을 나열합니다. 다른 OpenAPI 작업 속성은 OpenAPI 사양을 참조하세요.


| 속성 이름 | 유형 | 설명 | 
| --- | --- | --- | 
| isDefaultRoute | Boolean | 경로가 $default 경로인지 여부를 지정합니다. HTTP API에서만 지원됩니다. 자세한 내용은 [API Gateway에서 HTTP API에 대한 라우팅 생성](http-api-develop-routes.md) 단원을 참조하세요. | 
| x-amazon-apigateway-integration | [x-amazon-apigateway-integration 객체](api-gateway-swagger-extensions-integration.md) |  백엔드와 메서드의 통합을 지정합니다. [OpenAPI 작업](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object) 객체의 확장된 속성입니다. 통합은 AWS, AWS\_PROXY, HTTP, HTTP\_PROXY 또는 MOCK 유형일 수 있습니다. | 

## x-amazon-apigateway-any-method 예제
<a name="api-gateway-swagger-extensions-any-method-example"></a>

다음 예는 프록시 리소스 `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
      }
   }
}
```