# ApiGatewayHttpMethod

HTTP methods supported by API Gateway.

Obtainable from: ApiGatewayHttpMethod.DELETE, ApiGatewayHttpMethod.GET, ApiGatewayHttpMethod.HEAD, ApiGatewayHttpMethod.OPTIONS, ApiGatewayHttpMethod.PATCH, ApiGatewayHttpMethod.POST, ApiGatewayHttpMethod.PUT, ApiGatewayHttpMethod.of

- Source: [`aws-bedrockagentcore/lib/gateway/targets/target-configuration.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-bedrockagentcore/lib/gateway/targets/target-configuration.ts#L416)
- Type last changed: v2.255.0 · 19 May 2026

## Example

TypeScript:

```ts
const gateway = new agentcore.Gateway(this, "MyGateway", {
  gatewayName: "my-gateway",
});

const api = new apigateway.RestApi(this, 'MyApi', {
  restApiName: 'my-api',
});

// Uses IAM authorization for outbound auth by default
const apiGatewayTarget = gateway.addApiGatewayTarget("MyApiGatewayTarget", {
  restApi: api,
  apiGatewayToolConfiguration: {
    toolFilters: [
      {
        filterPath: "/pets/*",
        methods: [agentcore.ApiGatewayHttpMethod.GET],
      },
    ],
  },
});
```

Python:

```python
gateway = agentcore.Gateway(self, "MyGateway",
    gateway_name="my-gateway"
)

api = apigateway.RestApi(self, "MyApi",
    rest_api_name="my-api"
)

# Uses IAM authorization for outbound auth by default
api_gateway_target = gateway.add_api_gateway_target("MyApiGatewayTarget",
    rest_api=api,
    api_gateway_tool_configuration=agentcore.ApiGatewayToolConfiguration(
        tool_filters=[agentcore.ApiGatewayToolFilter(
            filter_path="/pets/*",
            methods=[agentcore.ApiGatewayHttpMethod.GET]
        )
        ]
    )
)
```

Java:

```java
Gateway gateway = Gateway.Builder.create(this, "MyGateway")
        .gatewayName("my-gateway")
        .build();

RestApi api = RestApi.Builder.create(this, "MyApi")
        .restApiName("my-api")
        .build();

// Uses IAM authorization for outbound auth by default
GatewayTarget apiGatewayTarget = gateway.addApiGatewayTarget("MyApiGatewayTarget", AddApiGatewayTargetOptions.builder()
        .restApi(api)
        .apiGatewayToolConfiguration(ApiGatewayToolConfiguration.builder()
                .toolFilters(List.of(ApiGatewayToolFilter.builder()
                        .filterPath("/pets/*")
                        .methods(List.of(ApiGatewayHttpMethod.GET))
                        .build()))
                .build())
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var gateway = new Gateway(this, "MyGateway", new GatewayProps {
    GatewayName = "my-gateway"
});

var api = new RestApi(this, "MyApi", new RestApiProps {
    RestApiName = "my-api"
});

// Uses IAM authorization for outbound auth by default
var apiGatewayTarget = gateway.AddApiGatewayTarget("MyApiGatewayTarget", new AddApiGatewayTargetOptions {
    RestApi = api,
    ApiGatewayToolConfiguration = new ApiGatewayToolConfiguration {
        ToolFilters = new [] { new ApiGatewayToolFilter {
            FilterPath = "/pets/*",
            Methods = new [] { ApiGatewayHttpMethod.GET }
        } }
    }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
gateway := agentcore.NewGateway(this, jsii.String("MyGateway"), &GatewayProps{
	GatewayName: jsii.String("my-gateway"),
})

api := apigateway.NewRestApi(this, jsii.String("MyApi"), &RestApiProps{
	RestApiName: jsii.String("my-api"),
})

// Uses IAM authorization for outbound auth by default
apiGatewayTarget := gateway.AddApiGatewayTarget(jsii.String("MyApiGatewayTarget"), &AddApiGatewayTargetOptions{
	RestApi: api,
	ApiGatewayToolConfiguration: &ApiGatewayToolConfiguration{
		ToolFilters: []ApiGatewayToolFilter{
			&ApiGatewayToolFilter{
				FilterPath: jsii.String("/pets/*"),
				Methods: []ApiGatewayHttpMethod{
					agentcore.ApiGatewayHttpMethod_GET(),
				},
			},
		},
	},
})
```

## Properties

- `DELETE`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — DELETE method.

- `GET`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — GET method.

- `HEAD`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — HEAD method.

- `OPTIONS`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — OPTIONS method.

- `PATCH`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — PATCH method.

- `POST`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — POST method.

- `PUT`: [ApiGatewayHttpMethod](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.ApiGatewayHttpMethod.html) (static) — PUT method.

- `value`: string — The HTTP method string value.

## Methods

- `of(value: string): ApiGatewayHttpMethod // chainable` (static) — Use a custom HTTP method not yet defined in this class.

  **Parameters**

  - `value` — The HTTP method string value.

- `toString(): string` — Returns the string value.
