Class CfnUsagePlan
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
A CloudFormation AWS::ApiGateway::UsagePlan
.
public class CfnUsagePlan : CfnResource, IInspectable
- Inheritance
-
CfnUsagePlan
- Implements
-
IInspectable
Examples
// 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 cfnUsagePlan = new CfnUsagePlan(this, "MyCfnUsagePlan", 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"
});
Remarks
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.
CloudformationResource: AWS::ApiGateway::UsagePlan
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html
ExampleMetadata: fixture=_generated
Constructors
CfnUsagePlan(Construct, string, ICfnUsagePlanProps?)
Create a new AWS::ApiGateway::UsagePlan
.
public CfnUsagePlan(Construct scope, string id, ICfnUsagePlanProps? props = null)
Parameters
scope
Construct- scope in which this resource is defined.
id
string- scoped id of the resource.
props
ICfnUsagePlanProps- resource properties.
Properties
ApiStages
The associated API stages of a usage plan.
public virtual object? ApiStages { get; set; }
Property Value
Remarks
AttrId
The ID for the usage plan.
public virtual string AttrId { get; }
Property Value
Remarks
For example: abc123
.
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Description
The description of a usage plan.
public virtual string? Description { get; set; }
Property Value
Remarks
Quota
The target maximum number of permitted requests per a given unit time interval.
public virtual object? Quota { get; set; }
Property Value
Remarks
Tags
The collection of tags.
public virtual TagManager Tags { get; }
Property Value
- TagManager
Remarks
Each tag element is associated with a given resource.
Throttle
A map containing method level throttling information for API stage in a usage plan.
public virtual object? Throttle { get; set; }
Property Value
Remarks
UsagePlanName
The name of a usage plan.
public virtual string? UsagePlanName { get; set; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspector
TreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props
IDictionary<string, object>