Skip to content
v2.278.0

ThrottlingPerMethod Struct ​

Represents per-method throttling for a resource.

Example ​

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
# 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
// 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();
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
    }
};
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 ​

methodMethodmethodMethodmethodMethodMethodMethodMethodMethod = none required #
[disable-awslint:ref-via-interface] The method for which you specify the throttling settings.
throttleThrottleSettingsthrottleThrottleSettingsthrottleThrottleSettingsThrottleThrottleSettingsThrottleThrottleSettings = none required #
Specifies the overall request rate (average requests per second) and burst capacity.