aws logo
AWS Classic v5.33.0, Mar 24 23

aws.apigateway.UsagePlan

Provides an API Gateway Usage Plan.

Example Usage

using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

	private static string ComputeSHA1(string input) {
		return BitConverter.ToString(
			SHA1.Create().ComputeHash(Encoding.UTF8.GetBytes(input))
		).Replace("-","").ToLowerInvariant());
	}

return await Deployment.RunAsync(() => 
{
    var exampleRestApi = new Aws.ApiGateway.RestApi("exampleRestApi", new()
    {
        Body = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["openapi"] = "3.0.1",
            ["info"] = new Dictionary<string, object?>
            {
                ["title"] = "example",
                ["version"] = "1.0",
            },
            ["paths"] = new Dictionary<string, object?>
            {
                ["/path1"] = new Dictionary<string, object?>
                {
                    ["get"] = new Dictionary<string, object?>
                    {
                        ["x-amazon-apigateway-integration"] = new Dictionary<string, object?>
                        {
                            ["httpMethod"] = "GET",
                            ["payloadFormatVersion"] = "1.0",
                            ["type"] = "HTTP_PROXY",
                            ["uri"] = "https://ip-ranges.amazonaws.com/ip-ranges.json",
                        },
                    },
                },
            },
        }),
    });

    var exampleDeployment = new Aws.ApiGateway.Deployment("exampleDeployment", new()
    {
        RestApi = exampleRestApi.Id,
        Triggers = 
        {
            { "redeployment", exampleRestApi.Body.Apply(body => JsonSerializer.Serialize(body)).Apply(toJSON => ComputeSHA1(toJSON)) },
        },
    });

    var development = new Aws.ApiGateway.Stage("development", new()
    {
        Deployment = exampleDeployment.Id,
        RestApi = exampleRestApi.Id,
        StageName = "development",
    });

    var production = new Aws.ApiGateway.Stage("production", new()
    {
        Deployment = exampleDeployment.Id,
        RestApi = exampleRestApi.Id,
        StageName = "production",
    });

    var exampleUsagePlan = new Aws.ApiGateway.UsagePlan("exampleUsagePlan", new()
    {
        Description = "my description",
        ProductCode = "MYCODE",
        ApiStages = new[]
        {
            new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
            {
                ApiId = exampleRestApi.Id,
                Stage = development.StageName,
            },
            new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
            {
                ApiId = exampleRestApi.Id,
                Stage = production.StageName,
            },
        },
        QuotaSettings = new Aws.ApiGateway.Inputs.UsagePlanQuotaSettingsArgs
        {
            Limit = 20,
            Offset = 2,
            Period = "WEEK",
        },
        ThrottleSettings = new Aws.ApiGateway.Inputs.UsagePlanThrottleSettingsArgs
        {
            BurstLimit = 5,
            RateLimit = 10,
        },
    });

});
package main

import (
	"crypto/sha1"
	"encoding/json"
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func sha1Hash(input string) string {
	hash := sha1.Sum([]byte(input))
	return hex.EncodeToString(hash[:])
}

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"openapi": "3.0.1",
			"info": map[string]interface{}{
				"title":   "example",
				"version": "1.0",
			},
			"paths": map[string]interface{}{
				"/path1": map[string]interface{}{
					"get": map[string]interface{}{
						"x-amazon-apigateway-integration": map[string]interface{}{
							"httpMethod":           "GET",
							"payloadFormatVersion": "1.0",
							"type":                 "HTTP_PROXY",
							"uri":                  "https://ip-ranges.amazonaws.com/ip-ranges.json",
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		exampleRestApi, err := apigateway.NewRestApi(ctx, "exampleRestApi", &apigateway.RestApiArgs{
			Body: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		exampleDeployment, err := apigateway.NewDeployment(ctx, "exampleDeployment", &apigateway.DeploymentArgs{
			RestApi: exampleRestApi.ID(),
			Triggers: pulumi.StringMap{
				"redeployment": exampleRestApi.Body.ApplyT(func(body *string) (pulumi.String, error) {
					var _zero pulumi.String
					tmpJSON1, err := json.Marshal(body)
					if err != nil {
						return _zero, err
					}
					json1 := string(tmpJSON1)
					return pulumi.String(json1), nil
				}).(pulumi.StringOutput).ApplyT(func(toJSON string) (pulumi.String, error) {
					return pulumi.String(sha1Hash(toJSON)), nil
				}).(pulumi.StringOutput),
			},
		})
		if err != nil {
			return err
		}
		development, err := apigateway.NewStage(ctx, "development", &apigateway.StageArgs{
			Deployment: exampleDeployment.ID(),
			RestApi:    exampleRestApi.ID(),
			StageName:  pulumi.String("development"),
		})
		if err != nil {
			return err
		}
		production, err := apigateway.NewStage(ctx, "production", &apigateway.StageArgs{
			Deployment: exampleDeployment.ID(),
			RestApi:    exampleRestApi.ID(),
			StageName:  pulumi.String("production"),
		})
		if err != nil {
			return err
		}
		_, err = apigateway.NewUsagePlan(ctx, "exampleUsagePlan", &apigateway.UsagePlanArgs{
			Description: pulumi.String("my description"),
			ProductCode: pulumi.String("MYCODE"),
			ApiStages: apigateway.UsagePlanApiStageArray{
				&apigateway.UsagePlanApiStageArgs{
					ApiId: exampleRestApi.ID(),
					Stage: development.StageName,
				},
				&apigateway.UsagePlanApiStageArgs{
					ApiId: exampleRestApi.ID(),
					Stage: production.StageName,
				},
			},
			QuotaSettings: &apigateway.UsagePlanQuotaSettingsArgs{
				Limit:  pulumi.Int(20),
				Offset: pulumi.Int(2),
				Period: pulumi.String("WEEK"),
			},
			ThrottleSettings: &apigateway.UsagePlanThrottleSettingsArgs{
				BurstLimit: pulumi.Int(5),
				RateLimit:  pulumi.Float64(10),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.RestApi;
import com.pulumi.aws.apigateway.RestApiArgs;
import com.pulumi.aws.apigateway.Deployment;
import com.pulumi.aws.apigateway.DeploymentArgs;
import com.pulumi.aws.apigateway.Stage;
import com.pulumi.aws.apigateway.StageArgs;
import com.pulumi.aws.apigateway.UsagePlan;
import com.pulumi.aws.apigateway.UsagePlanArgs;
import com.pulumi.aws.apigateway.inputs.UsagePlanApiStageArgs;
import com.pulumi.aws.apigateway.inputs.UsagePlanQuotaSettingsArgs;
import com.pulumi.aws.apigateway.inputs.UsagePlanThrottleSettingsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleRestApi = new RestApi("exampleRestApi", RestApiArgs.builder()        
            .body(serializeJson(
                jsonObject(
                    jsonProperty("openapi", "3.0.1"),
                    jsonProperty("info", jsonObject(
                        jsonProperty("title", "example"),
                        jsonProperty("version", "1.0")
                    )),
                    jsonProperty("paths", jsonObject(
                        jsonProperty("/path1", jsonObject(
                            jsonProperty("get", jsonObject(
                                jsonProperty("x-amazon-apigateway-integration", jsonObject(
                                    jsonProperty("httpMethod", "GET"),
                                    jsonProperty("payloadFormatVersion", "1.0"),
                                    jsonProperty("type", "HTTP_PROXY"),
                                    jsonProperty("uri", "https://ip-ranges.amazonaws.com/ip-ranges.json")
                                ))
                            ))
                        ))
                    ))
                )))
            .build());

        var exampleDeployment = new Deployment("exampleDeployment", DeploymentArgs.builder()        
            .restApi(exampleRestApi.id())
            .triggers(Map.of("redeployment", exampleRestApi.body().applyValue(body -> serializeJson(
                body)).applyValue(toJSON -> computeSHA1(toJSON))))
            .build());

        var development = new Stage("development", StageArgs.builder()        
            .deployment(exampleDeployment.id())
            .restApi(exampleRestApi.id())
            .stageName("development")
            .build());

        var production = new Stage("production", StageArgs.builder()        
            .deployment(exampleDeployment.id())
            .restApi(exampleRestApi.id())
            .stageName("production")
            .build());

        var exampleUsagePlan = new UsagePlan("exampleUsagePlan", UsagePlanArgs.builder()        
            .description("my description")
            .productCode("MYCODE")
            .apiStages(            
                UsagePlanApiStageArgs.builder()
                    .apiId(exampleRestApi.id())
                    .stage(development.stageName())
                    .build(),
                UsagePlanApiStageArgs.builder()
                    .apiId(exampleRestApi.id())
                    .stage(production.stageName())
                    .build())
            .quotaSettings(UsagePlanQuotaSettingsArgs.builder()
                .limit(20)
                .offset(2)
                .period("WEEK")
                .build())
            .throttleSettings(UsagePlanThrottleSettingsArgs.builder()
                .burstLimit(5)
                .rateLimit(10)
                .build())
            .build());

    }
}
import pulumi
import hashlib
import json
import pulumi_aws as aws

example_rest_api = aws.apigateway.RestApi("exampleRestApi", body=json.dumps({
    "openapi": "3.0.1",
    "info": {
        "title": "example",
        "version": "1.0",
    },
    "paths": {
        "/path1": {
            "get": {
                "x-amazon-apigateway-integration": {
                    "httpMethod": "GET",
                    "payloadFormatVersion": "1.0",
                    "type": "HTTP_PROXY",
                    "uri": "https://ip-ranges.amazonaws.com/ip-ranges.json",
                },
            },
        },
    },
}))
example_deployment = aws.apigateway.Deployment("exampleDeployment",
    rest_api=example_rest_api.id,
    triggers={
        "redeployment": example_rest_api.body.apply(lambda body: json.dumps(body)).apply(lambda to_json: hashlib.sha1(to_json.encode()).hexdigest()),
    })
development = aws.apigateway.Stage("development",
    deployment=example_deployment.id,
    rest_api=example_rest_api.id,
    stage_name="development")
production = aws.apigateway.Stage("production",
    deployment=example_deployment.id,
    rest_api=example_rest_api.id,
    stage_name="production")
example_usage_plan = aws.apigateway.UsagePlan("exampleUsagePlan",
    description="my description",
    product_code="MYCODE",
    api_stages=[
        aws.apigateway.UsagePlanApiStageArgs(
            api_id=example_rest_api.id,
            stage=development.stage_name,
        ),
        aws.apigateway.UsagePlanApiStageArgs(
            api_id=example_rest_api.id,
            stage=production.stage_name,
        ),
    ],
    quota_settings=aws.apigateway.UsagePlanQuotaSettingsArgs(
        limit=20,
        offset=2,
        period="WEEK",
    ),
    throttle_settings=aws.apigateway.UsagePlanThrottleSettingsArgs(
        burst_limit=5,
        rate_limit=10,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as crypto from "crypto";

const exampleRestApi = new aws.apigateway.RestApi("exampleRestApi", {body: JSON.stringify({
    openapi: "3.0.1",
    info: {
        title: "example",
        version: "1.0",
    },
    paths: {
        "/path1": {
            get: {
                "x-amazon-apigateway-integration": {
                    httpMethod: "GET",
                    payloadFormatVersion: "1.0",
                    type: "HTTP_PROXY",
                    uri: "https://ip-ranges.amazonaws.com/ip-ranges.json",
                },
            },
        },
    },
})});
const exampleDeployment = new aws.apigateway.Deployment("exampleDeployment", {
    restApi: exampleRestApi.id,
    triggers: {
        redeployment: exampleRestApi.body.apply(body => JSON.stringify(body)).apply(toJSON => crypto.createHash('sha1').update(toJSON).digest('hex')),
    },
});
const development = new aws.apigateway.Stage("development", {
    deployment: exampleDeployment.id,
    restApi: exampleRestApi.id,
    stageName: "development",
});
const production = new aws.apigateway.Stage("production", {
    deployment: exampleDeployment.id,
    restApi: exampleRestApi.id,
    stageName: "production",
});
const exampleUsagePlan = new aws.apigateway.UsagePlan("exampleUsagePlan", {
    description: "my description",
    productCode: "MYCODE",
    apiStages: [
        {
            apiId: exampleRestApi.id,
            stage: development.stageName,
        },
        {
            apiId: exampleRestApi.id,
            stage: production.stageName,
        },
    ],
    quotaSettings: {
        limit: 20,
        offset: 2,
        period: "WEEK",
    },
    throttleSettings: {
        burstLimit: 5,
        rateLimit: 10,
    },
});

Coming soon!

Create UsagePlan Resource

new UsagePlan(name: string, args?: UsagePlanArgs, opts?: CustomResourceOptions);
@overload
def UsagePlan(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              api_stages: Optional[Sequence[UsagePlanApiStageArgs]] = None,
              description: Optional[str] = None,
              name: Optional[str] = None,
              product_code: Optional[str] = None,
              quota_settings: Optional[UsagePlanQuotaSettingsArgs] = None,
              tags: Optional[Mapping[str, str]] = None,
              throttle_settings: Optional[UsagePlanThrottleSettingsArgs] = None)
@overload
def UsagePlan(resource_name: str,
              args: Optional[UsagePlanArgs] = None,
              opts: Optional[ResourceOptions] = None)
func NewUsagePlan(ctx *Context, name string, args *UsagePlanArgs, opts ...ResourceOption) (*UsagePlan, error)
public UsagePlan(string name, UsagePlanArgs? args = null, CustomResourceOptions? opts = null)
public UsagePlan(String name, UsagePlanArgs args)
public UsagePlan(String name, UsagePlanArgs args, CustomResourceOptions options)
type: aws:apigateway:UsagePlan
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args UsagePlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args UsagePlanArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args UsagePlanArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args UsagePlanArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args UsagePlanArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

UsagePlan Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The UsagePlan resource accepts the following input properties:

ApiStages List<UsagePlanApiStageArgs>

Associated API stages of the usage plan.

Description string

Description of a usage plan.

Name string

Name of the usage plan.

ProductCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

QuotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

Tags Dictionary<string, string>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ThrottleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

ApiStages []UsagePlanApiStageArgs

Associated API stages of the usage plan.

Description string

Description of a usage plan.

Name string

Name of the usage plan.

ProductCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

QuotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

Tags map[string]string

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ThrottleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages List<UsagePlanApiStageArgs>

Associated API stages of the usage plan.

description String

Description of a usage plan.

name String

Name of the usage plan.

productCode String

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags Map<String,String>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

throttleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages UsagePlanApiStageArgs[]

Associated API stages of the usage plan.

description string

Description of a usage plan.

name string

Name of the usage plan.

productCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags {[key: string]: string}

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

throttleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

api_stages Sequence[UsagePlanApiStageArgs]

Associated API stages of the usage plan.

description str

Description of a usage plan.

name str

Name of the usage plan.

product_code str

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quota_settings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags Mapping[str, str]

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

throttle_settings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages List<Property Map>

Associated API stages of the usage plan.

description String

Description of a usage plan.

name String

Name of the usage plan.

productCode String

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings Property Map

The quota settings of the usage plan.

tags Map<String>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

throttleSettings Property Map

The throttling limits of the usage plan.

Outputs

All input properties are implicitly available as output properties. Additionally, the UsagePlan resource produces the following output properties:

Arn string

ARN

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Arn string

ARN

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

ARN

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn string

ARN

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn str

ARN

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

arn String

ARN

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Look up Existing UsagePlan Resource

Get an existing UsagePlan resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: UsagePlanState, opts?: CustomResourceOptions): UsagePlan
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_stages: Optional[Sequence[UsagePlanApiStageArgs]] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        product_code: Optional[str] = None,
        quota_settings: Optional[UsagePlanQuotaSettingsArgs] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        throttle_settings: Optional[UsagePlanThrottleSettingsArgs] = None) -> UsagePlan
func GetUsagePlan(ctx *Context, name string, id IDInput, state *UsagePlanState, opts ...ResourceOption) (*UsagePlan, error)
public static UsagePlan Get(string name, Input<string> id, UsagePlanState? state, CustomResourceOptions? opts = null)
public static UsagePlan get(String name, Output<String> id, UsagePlanState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiStages List<UsagePlanApiStageArgs>

Associated API stages of the usage plan.

Arn string

ARN

Description string

Description of a usage plan.

Name string

Name of the usage plan.

ProductCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

QuotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

Tags Dictionary<string, string>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

ThrottleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

ApiStages []UsagePlanApiStageArgs

Associated API stages of the usage plan.

Arn string

ARN

Description string

Description of a usage plan.

Name string

Name of the usage plan.

ProductCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

QuotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

Tags map[string]string

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

ThrottleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages List<UsagePlanApiStageArgs>

Associated API stages of the usage plan.

arn String

ARN

description String

Description of a usage plan.

name String

Name of the usage plan.

productCode String

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags Map<String,String>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

throttleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages UsagePlanApiStageArgs[]

Associated API stages of the usage plan.

arn string

ARN

description string

Description of a usage plan.

name string

Name of the usage plan.

productCode string

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags {[key: string]: string}

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

throttleSettings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

api_stages Sequence[UsagePlanApiStageArgs]

Associated API stages of the usage plan.

arn str

ARN

description str

Description of a usage plan.

name str

Name of the usage plan.

product_code str

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quota_settings UsagePlanQuotaSettingsArgs

The quota settings of the usage plan.

tags Mapping[str, str]

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

throttle_settings UsagePlanThrottleSettingsArgs

The throttling limits of the usage plan.

apiStages List<Property Map>

Associated API stages of the usage plan.

arn String

ARN

description String

Description of a usage plan.

name String

Name of the usage plan.

productCode String

AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.

quotaSettings Property Map

The quota settings of the usage plan.

tags Map<String>

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

throttleSettings Property Map

The throttling limits of the usage plan.

Supporting Types

UsagePlanApiStage

ApiId string

API Id of the associated API stage in a usage plan.

Stage string

API stage name of the associated API stage in a usage plan.

Throttles List<UsagePlanApiStageThrottle>

The throttling limits of the usage plan.

ApiId string

API Id of the associated API stage in a usage plan.

Stage string

API stage name of the associated API stage in a usage plan.

Throttles []UsagePlanApiStageThrottle

The throttling limits of the usage plan.

apiId String

API Id of the associated API stage in a usage plan.

stage String

API stage name of the associated API stage in a usage plan.

throttles List<UsagePlanApiStageThrottle>

The throttling limits of the usage plan.

apiId string

API Id of the associated API stage in a usage plan.

stage string

API stage name of the associated API stage in a usage plan.

throttles UsagePlanApiStageThrottle[]

The throttling limits of the usage plan.

api_id str

API Id of the associated API stage in a usage plan.

stage str

API stage name of the associated API stage in a usage plan.

throttles Sequence[UsagePlanApiStageThrottle]

The throttling limits of the usage plan.

apiId String

API Id of the associated API stage in a usage plan.

stage String

API stage name of the associated API stage in a usage plan.

throttles List<Property Map>

The throttling limits of the usage plan.

UsagePlanApiStageThrottle

Path string

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

BurstLimit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

RateLimit double

The API request steady-state rate limit.

Path string

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

BurstLimit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

RateLimit float64

The API request steady-state rate limit.

path String

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

burstLimit Integer

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit Double

The API request steady-state rate limit.

path string

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

burstLimit number

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit number

The API request steady-state rate limit.

path str

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

burst_limit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rate_limit float

The API request steady-state rate limit.

path String

Method to apply the throttle settings for. Specfiy the path and method, for example /test/GET.

burstLimit Number

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit Number

The API request steady-state rate limit.

UsagePlanQuotaSettings

Limit int

Maximum number of requests that can be made in a given time period.

Period string

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

Offset int

Number of requests subtracted from the given limit in the initial time period.

Limit int

Maximum number of requests that can be made in a given time period.

Period string

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

Offset int

Number of requests subtracted from the given limit in the initial time period.

limit Integer

Maximum number of requests that can be made in a given time period.

period String

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

offset Integer

Number of requests subtracted from the given limit in the initial time period.

limit number

Maximum number of requests that can be made in a given time period.

period string

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

offset number

Number of requests subtracted from the given limit in the initial time period.

limit int

Maximum number of requests that can be made in a given time period.

period str

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

offset int

Number of requests subtracted from the given limit in the initial time period.

limit Number

Maximum number of requests that can be made in a given time period.

period String

Time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

offset Number

Number of requests subtracted from the given limit in the initial time period.

UsagePlanThrottleSettings

BurstLimit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

RateLimit double

The API request steady-state rate limit.

BurstLimit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

RateLimit float64

The API request steady-state rate limit.

burstLimit Integer

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit Double

The API request steady-state rate limit.

burstLimit number

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit number

The API request steady-state rate limit.

burst_limit int

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rate_limit float

The API request steady-state rate limit.

burstLimit Number

The API request burst limit, the maximum rate limit over a time ranging from one to a few seconds, depending upon whether the underlying token bucket is at its full capacity.

rateLimit Number

The API request steady-state rate limit.

Import

AWS API Gateway Usage Plan can be imported using the id, e.g.,

 $ pulumi import aws:apigateway/usagePlan:UsagePlan myusageplan <usage_plan_id>

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.