Class CfnUsagePlan
A CloudFormation AWS::ApiGateway::UsagePlan
.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public class CfnUsagePlan : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnUsagePlan
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
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
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(Construct, String, ICfnUsagePlanProps) | Create a new |
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 |
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 | 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(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 System.String
- scoped id of the resource.
- props ICfnUsagePlanProps
- resource properties.
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
Properties
ApiStages
The associated API stages of a usage plan.
public virtual object ApiStages { get; set; }
Property Value
System.Object
Remarks
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
Remarks
Quota
The target maximum number of permitted requests per a given unit time interval.
public virtual object Quota { get; set; }
Property Value
System.Object
Remarks
Tags
The collection of tags.
public virtual TagManager Tags { get; }
Property Value
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
System.Object
Remarks
UsagePlanName
The name of a usage plan.
public virtual string UsagePlanName { get; set; }
Property Value
System.String
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 System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>