CfnUsagePlanProps
Struct External
Properties for defining a CfnUsagePlan.
| Source |
|---|
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';
const cfnUsagePlanProps: apigateway.CfnUsagePlanProps = {
apiStages: [{
apiId: 'apiId',
stage: 'stage',
throttle: {
throttleKey: {
burstLimit: 123,
rateLimit: 123,
},
},
}],
description: 'description',
quota: {
limit: 123,
offset: 123,
period: 'period',
},
tags: [{
key: 'key',
value: 'value',
}],
throttle: {
burstLimit: 123,
rateLimit: 123,
},
usagePlanName: 'usagePlanName',
};
python
from aws_cdk import CfnTag
# 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
cfn_usage_plan_props = apigateway.CfnUsagePlanProps(
api_stages=[apigateway.CfnUsagePlan.ApiStageProperty(
api_id="apiId",
stage="stage",
throttle={
"throttle_key": apigateway.CfnUsagePlan.ThrottleSettingsProperty(
burst_limit=123,
rate_limit=123
)
}
)],
description="description",
quota=apigateway.CfnUsagePlan.QuotaSettingsProperty(
limit=123,
offset=123,
period="period"
),
tags=[CfnTag(
key="key",
value="value"
)],
throttle=apigateway.CfnUsagePlan.ThrottleSettingsProperty(
burst_limit=123,
rate_limit=123
),
usage_plan_name="usagePlanName"
)
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.*;
CfnUsagePlanProps cfnUsagePlanProps = CfnUsagePlanProps.builder()
.apiStages(List.of(ApiStageProperty.builder()
.apiId("apiId")
.stage("stage")
.throttle(Map.of(
"throttleKey", ThrottleSettingsProperty.builder()
.burstLimit(123)
.rateLimit(123)
.build()))
.build()))
.description("description")
.quota(QuotaSettingsProperty.builder()
.limit(123)
.offset(123)
.period("period")
.build())
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.throttle(ThrottleSettingsProperty.builder()
.burstLimit(123)
.rateLimit(123)
.build())
.usagePlanName("usagePlanName")
.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;
var cfnUsagePlanProps = new CfnUsagePlanProps {
ApiStages = new [] { new ApiStageProperty {
ApiId = "apiId",
Stage = "stage",
Throttle = new Dictionary<string, object> {
{ "throttleKey", new ThrottleSettingsProperty {
BurstLimit = 123,
RateLimit = 123
} }
}
} },
Description = "description",
Quota = new QuotaSettingsProperty {
Limit = 123,
Offset = 123,
Period = "period"
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Throttle = new ThrottleSettingsProperty {
BurstLimit = 123,
RateLimit = 123
},
UsagePlanName = "usagePlanName"
};
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"
cfnUsagePlanProps := &CfnUsagePlanProps{
ApiStages: []interface{}{
&ApiStageProperty{
ApiId: jsii.String("apiId"),
Stage: jsii.String("stage"),
Throttle: map[string]interface{}{
"throttleKey": &ThrottleSettingsProperty{
"burstLimit": jsii.Number(123),
"rateLimit": jsii.Number(123),
},
},
},
},
Description: jsii.String("description"),
Quota: &QuotaSettingsProperty{
Limit: jsii.Number(123),
Offset: jsii.Number(123),
Period: jsii.String("period"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
Throttle: &ThrottleSettingsProperty{
BurstLimit: jsii.Number(123),
RateLimit: jsii.Number(123),
},
UsagePlanName: jsii.String("usagePlanName"),
}
Properties
apiStagesoptionalIResolvable | IResolvable | CfnUsagePlan.ApiStageProperty[]api_stagesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ApiStageProperty]]]apiStagesoptionalIResolvableApiStagesoptionalIResolvableApiStagesoptionalinterface{} #The associated API stages of a usage plan.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #The description of a usage plan.
quotaoptionalIResolvable | CfnUsagePlan.quotaoptionaltyping.Union[IResolvable, QuotaSettingsProperty]quotaoptionalIResolvableQuotaoptionalIResolvableQuotaoptionalinterface{} #The target maximum number of permitted requests per a given unit time interval.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The collection of tags.
Each tag element is associated with a given resource.
throttleoptionalIResolvable | CfnUsagePlan.throttleoptionaltyping.Union[IResolvable, ThrottleSettingsProperty]throttleoptionalIResolvableThrottleoptionalIResolvableThrottleoptionalinterface{} #A map containing method level throttling information for API stage in a usage plan.
usagePlanNameoptionalstringusage_plan_nameoptionalstrusagePlanNameoptionalStringUsagePlanNameoptionalstringUsagePlanNameoptional*string #The name of a usage plan.