Class UsagePlan
Provides an API Gateway Usage Plan.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var myapi = new Aws.ApiGateway.RestApi("myapi", new Aws.ApiGateway.RestApiArgs
{
});
var dev = new Aws.ApiGateway.Deployment("dev", new Aws.ApiGateway.DeploymentArgs
{
RestApi = myapi.Id,
StageName = "dev",
});
var prod = new Aws.ApiGateway.Deployment("prod", new Aws.ApiGateway.DeploymentArgs
{
RestApi = myapi.Id,
StageName = "prod",
});
var myUsagePlan = new Aws.ApiGateway.UsagePlan("myUsagePlan", new Aws.ApiGateway.UsagePlanArgs
{
ApiStages =
{
new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
{
ApiId = myapi.Id,
Stage = dev.StageName,
},
new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
{
ApiId = myapi.Id,
Stage = prod.StageName,
},
},
Description = "my description",
ProductCode = "MYCODE",
QuotaSettings = new Aws.ApiGateway.Inputs.UsagePlanQuotaSettingsArgs
{
Limit = 20,
Offset = 2,
Period = "WEEK",
},
ThrottleSettings = new Aws.ApiGateway.Inputs.UsagePlanThrottleSettingsArgs
{
BurstLimit = 5,
RateLimit = 10,
},
});
}
}
Inherited Members
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class UsagePlan : CustomResource
Constructors
View SourceUsagePlan(String, UsagePlanArgs, CustomResourceOptions)
Create a UsagePlan resource with the given unique name, arguments, and options.
Declaration
public UsagePlan(string name, UsagePlanArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UsagePlanArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceApiStages
The associated API stages of the usage plan.
Declaration
public Output<ImmutableArray<UsagePlanApiStage>> ApiStages { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<UsagePlanApiStage>> |
Arn
Amazon Resource Name (ARN)
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
The description of a usage plan.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the usage plan.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProductCode
The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
Declaration
public Output<string> ProductCode { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
QuotaSettings
The quota settings of the usage plan.
Declaration
public Output<UsagePlanQuotaSettings> QuotaSettings { get; }
Property Value
| Type | Description |
|---|---|
| Output<UsagePlanQuotaSettings> |
Tags
Key-value map of resource tags
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
ThrottleSettings
The throttling limits of the usage plan.
Declaration
public Output<UsagePlanThrottleSettings> ThrottleSettings { get; }
Property Value
| Type | Description |
|---|---|
| Output<UsagePlanThrottleSettings> |
Methods
View SourceGet(String, Input<String>, UsagePlanState, CustomResourceOptions)
Get an existing UsagePlan resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UsagePlan Get(string name, Input<string> id, UsagePlanState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UsagePlanState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UsagePlan |