Class CfnUsagePlan
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.CfnElement
software.amazon.awscdk.core.CfnRefElement
software.amazon.awscdk.core.CfnResource
software.amazon.awscdk.services.apigateway.CfnUsagePlan
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:44.911Z")
@Stability(Stable)
public class CfnUsagePlan
extends CfnResource
implements IInspectable
A CloudFormation
AWS::ApiGateway::UsagePlan
.
The AWS::ApiGateway::UsagePlan
resource creates a usage plan for deployed APIs. A usage plan sets a target for the throttling and quota limits on individual client API keys. For more information, see Creating and Using API Usage Plans in Amazon API Gateway in the API Gateway Developer Guide .
In some cases clients can exceed the targets that you set. Don’t rely on usage plans to control costs. Consider using AWS Budgets to monitor costs and AWS WAF to manage API requests.
Example:
// 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.*; CfnUsagePlan cfnUsagePlan = CfnUsagePlan.Builder.create(this, "MyCfnUsagePlan") .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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
API stage name of the associated API stage in a usage plan.static final class
A fluent builder forCfnUsagePlan
.static interface
QuotaSettings
is a property of the AWS::ApiGateway::UsagePlan resource that specifies a target for the maximum number of requests users can make to your REST APIs.static interface
ThrottleSettings
is a property of the AWS::ApiGateway::UsagePlan resource that specifies the overall request rate (average requests per second) and burst capacity when users call your REST APIs.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnUsagePlan
(Construct scope, String id) Create a newAWS::ApiGateway::UsagePlan
.CfnUsagePlan
(Construct scope, String id, CfnUsagePlanProps props) Create a newAWS::ApiGateway::UsagePlan
.protected
CfnUsagePlan
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnUsagePlan
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionThe associated API stages of a usage plan.The ID for the usage plan.The description of a usage plan.getQuota()
The target maximum number of permitted requests per a given unit time interval.getTags()
The collection of tags.A map containing method level throttling information for API stage in a usage plan.The name of a usage plan.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setApiStages
(List<Object> value) The associated API stages of a usage plan.void
setApiStages
(IResolvable value) The associated API stages of a usage plan.void
setDescription
(String value) The description of a usage plan.void
setQuota
(IResolvable value) The target maximum number of permitted requests per a given unit time interval.void
The target maximum number of permitted requests per a given unit time interval.void
setThrottle
(IResolvable value) A map containing method level throttling information for API stage in a usage plan.void
A map containing method level throttling information for API stage in a usage plan.void
setUsagePlanName
(String value) The name of a usage plan.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnUsagePlan
protected CfnUsagePlan(software.amazon.jsii.JsiiObjectRef objRef) -
CfnUsagePlan
protected CfnUsagePlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnUsagePlan
@Stability(Stable) public CfnUsagePlan(@NotNull Construct scope, @NotNull String id, @Nullable CfnUsagePlanProps props) Create a newAWS::ApiGateway::UsagePlan
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
CfnUsagePlan
Create a newAWS::ApiGateway::UsagePlan
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID for the usage plan.For example:
abc123
. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
The collection of tags.Each tag element is associated with a given resource.
-
getApiStages
The associated API stages of a usage plan. -
setApiStages
The associated API stages of a usage plan. -
setApiStages
The associated API stages of a usage plan. -
getDescription
The description of a usage plan. -
setDescription
The description of a usage plan. -
getQuota
The target maximum number of permitted requests per a given unit time interval. -
setQuota
The target maximum number of permitted requests per a given unit time interval. -
setQuota
The target maximum number of permitted requests per a given unit time interval. -
getThrottle
A map containing method level throttling information for API stage in a usage plan. -
setThrottle
A map containing method level throttling information for API stage in a usage plan. -
setThrottle
A map containing method level throttling information for API stage in a usage plan. -
getUsagePlanName
The name of a usage plan. -
setUsagePlanName
The name of a usage plan.
-