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
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAPI stage name of the associated API stage in a usage plan.static final classA fluent builder forCfnUsagePlan.static interfaceQuotaSettingsis 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 interfaceThrottleSettingsis 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.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnUsagePlan(Construct scope, String id) Create a newAWS::ApiGateway::UsagePlan.CfnUsagePlan(Construct scope, String id, CfnUsagePlanProps props) Create a newAWS::ApiGateway::UsagePlan.protectedCfnUsagePlan(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnUsagePlan(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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetApiStages(List<Object> value) The associated API stages of a usage plan.voidsetApiStages(IResolvable value) The associated API stages of a usage plan.voidsetDescription(String value) The description of a usage plan.voidsetQuota(IResolvable value) The target maximum number of permitted requests per a given unit time interval.voidThe target maximum number of permitted requests per a given unit time interval.voidsetThrottle(IResolvable value) A map containing method level throttling information for API stage in a usage plan.voidA map containing method level throttling information for API stage in a usage plan.voidsetUsagePlanName(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, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
The ID for the usage plan.For example:
abc123. -
getCfnProperties
- Overrides:
getCfnPropertiesin 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.
-