Class CfnUsagePlan
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.apigateway.CfnUsagePlan
- All Implemented Interfaces:
IInspectable
,ITaggable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-21T06:34:02.564Z")
@Stability(Stable)
public class CfnUsagePlan
extends CfnResource
implements IInspectable, ITaggable
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();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnUsagePlan
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnUsagePlan
(software.amazon.jsii.JsiiObjectRef objRef) CfnUsagePlan
(software.constructs.Construct scope, String id) CfnUsagePlan
(software.constructs.Construct scope, String id, CfnUsagePlanProps props) -
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()
Tag Manager which manages the tags for this resource.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
setTagsRaw
(List<CfnTag> value) The collection of tags.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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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 software.constructs.Construct scope, @NotNull String id, @Nullable CfnUsagePlanProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties.
-
CfnUsagePlan
@Stability(Stable) public CfnUsagePlan(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
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
Tag Manager which manages the tags for this 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. -
getTagsRaw
The collection of tags. -
setTagsRaw
The collection of tags. -
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.
-