# ThrottlingPerMethod

Represents per-method throttling for a resource.

- Source: [`aws-apigateway/lib/usage-plan.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-apigateway/lib/usage-plan.ts#L71)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_apigateway as apigateway } from 'aws-cdk-lib';

declare const method: apigateway.Method;
const throttlingPerMethod: apigateway.ThrottlingPerMethod = {
  method: method,
  throttle: {
    burstLimit: 123,
    rateLimit: 123,
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway

# method: apigateway.Method

throttling_per_method = apigateway.ThrottlingPerMethod(
    method=method,
    throttle=apigateway.ThrottleSettings(
        burst_limit=123,
        rate_limit=123
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.apigateway.*;

Method method;

ThrottlingPerMethod throttlingPerMethod = ThrottlingPerMethod.builder()
        .method(method)
        .throttle(ThrottleSettings.builder()
                .burstLimit(123)
                .rateLimit(123)
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;

Method method;

var throttlingPerMethod = new ThrottlingPerMethod {
    Method = method,
    Throttle = new ThrottleSettings {
        BurstLimit = 123,
        RateLimit = 123
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var method Method

throttlingPerMethod := &ThrottlingPerMethod{
	Method: method,
	Throttle: &ThrottleSettings{
		BurstLimit: jsii.Number(123),
		RateLimit: jsii.Number(123),
	},
}
```

## Properties

- `method`: [Method](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.Method.html) (required) = none — [disable-awslint:ref-via-interface] The method for which you specify the throttling settings.

- `throttle`: [ThrottleSettings](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.ThrottleSettings.html) (required) = none — Specifies the overall request rate (average requests per second) and burst capacity.
