Show / Hide Table of Contents

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,
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
UsagePlan
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ApiGateway
Assembly: Pulumi.Aws.dll
Syntax
public class UsagePlan : CustomResource

Constructors

View Source

UsagePlan(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 Source

ApiStages

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>>
View Source

Arn

Amazon Resource Name (ARN)

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

The description of a usage plan.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the usage plan.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

QuotaSettings

The quota settings of the usage plan.

Declaration
public Output<UsagePlanQuotaSettings> QuotaSettings { get; }
Property Value
Type Description
Output<UsagePlanQuotaSettings>
View Source

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>>
View Source

ThrottleSettings

The throttling limits of the usage plan.

Declaration
public Output<UsagePlanThrottleSettings> ThrottleSettings { get; }
Property Value
Type Description
Output<UsagePlanThrottleSettings>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.