# Period

Enum · Stable

Time period for which quota settings apply.

- 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#L39)

## Example

TypeScript:

```ts
declare const api: apigateway.RestApi;

const key = new apigateway.RateLimitedApiKey(this, 'rate-limited-api-key', {
  customerId: 'hello-customer',
  apiStages: [{ stage: api.deploymentStage }],
  quota: {
    limit: 10000,
    period: apigateway.Period.MONTH
  }
});
```

Python:

```python
# api: apigateway.RestApi

key = apigateway.RateLimitedApiKey(self, "rate-limited-api-key",
    customer_id="hello-customer",
    api_stages=[apigateway.UsagePlanPerApiStage(stage=api.deployment_stage)],
    quota=apigateway.QuotaSettings(
        limit=10000,
        period=apigateway.Period.MONTH
    )
)
```

Java:

```java
RestApi api;

RateLimitedApiKey key = RateLimitedApiKey.Builder.create(this, "rate-limited-api-key")
        .customerId("hello-customer")
        .apiStages(List.of(UsagePlanPerApiStage.builder().stage(api.getDeploymentStage()).build()))
        .quota(QuotaSettings.builder()
                .limit(10000)
                .period(Period.MONTH)
                .build())
        .build();
```

C#:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
RestApi api;

var key = new RateLimitedApiKey(this, "rate-limited-api-key", new RateLimitedApiKeyProps {
    CustomerId = "hello-customer",
    ApiStages = new [] { new UsagePlanPerApiStage { Stage = api.DeploymentStage } },
    Quota = new QuotaSettings {
        Limit = 10000,
        Period = Period.MONTH
    }
});
```

Go:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var api RestApi

key := apigateway.NewRateLimitedApiKey(this, jsii.String("rate-limited-api-key"), &RateLimitedApiKeyProps{
	CustomerId: jsii.String("hello-customer"),
	ApiStages: []UsagePlanPerApiStage{
		&UsagePlanPerApiStage{
			Stage: api.DeploymentStage,
		},
	},
	Quota: &QuotaSettings{
		Limit: jsii.Number(10000),
		Period: apigateway.Period_MONTH,
	},
})
```

## Members

| Member | Description |
| --- | --- |
| `DAY` |  |
| `WEEK` |  |
| `MONTH` |  |

## Referenced by

- [`QuotaSettings`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_apigateway.QuotaSettings.html).period
