Class CfnUsagePlan
The AWS::ApiGateway::UsagePlan
resource creates a usage plan for deployed APIs.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnUsagePlan : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnUsagePlan
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-usageplan.html
CloudformationResource: AWS::ApiGateway::UsagePlan
ExampleMetadata: fixture=_generated
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"
});
Synopsis
Constructors
CfnUsagePlan(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnUsagePlan(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnUsagePlan(Construct, String, ICfnUsagePlanProps) |
Properties
ApiStages | The associated API stages of a usage plan. |
AttrId | The ID for the usage plan. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description of a usage plan. |
Quota | The target maximum number of permitted requests per a given unit time interval. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | The collection of tags. |
Throttle | A map containing method level throttling information for API stage in a usage plan. |
UsagePlanName | The name of a usage plan. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnUsagePlan(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnUsagePlan(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnUsagePlan(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnUsagePlan(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnUsagePlan(Construct, String, ICfnUsagePlanProps)
public CfnUsagePlan(Construct scope, string id, ICfnUsagePlanProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnUsagePlanProps
Resource properties.
Properties
ApiStages
The associated API stages of a usage plan.
public virtual object ApiStages { get; set; }
Property Value
System.Object
AttrId
The ID for the usage plan.
public virtual string AttrId { get; }
Property Value
System.String
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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description of a usage plan.
public virtual string Description { get; set; }
Property Value
System.String
Quota
The target maximum number of permitted requests per a given unit time interval.
public virtual object Quota { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Throttle
A map containing method level throttling information for API stage in a usage plan.
public virtual object Throttle { get; set; }
Property Value
System.Object
UsagePlanName
The name of a usage plan.
public virtual string UsagePlanName { get; set; }
Property Value
System.String
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 System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>