aws.apigateway.UsagePlan
Explore with Pulumi AI
Provides an API Gateway Usage Plan.
Create UsagePlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UsagePlan(name: string, args?: UsagePlanArgs, opts?: CustomResourceOptions);
@overload
def UsagePlan(resource_name: str,
args: Optional[UsagePlanArgs] = None,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var usagePlanResource = new Aws.ApiGateway.UsagePlan("usagePlanResource", new()
{
ApiStages = new[]
{
new Aws.ApiGateway.Inputs.UsagePlanApiStageArgs
{
ApiId = "string",
Stage = "string",
Throttles = new[]
{
new Aws.ApiGateway.Inputs.UsagePlanApiStageThrottleArgs
{
Path = "string",
BurstLimit = 0,
RateLimit = 0,
},
},
},
},
Description = "string",
Name = "string",
ProductCode = "string",
QuotaSettings = new Aws.ApiGateway.Inputs.UsagePlanQuotaSettingsArgs
{
Limit = 0,
Period = "string",
Offset = 0,
},
Tags =
{
{ "string", "string" },
},
ThrottleSettings = new Aws.ApiGateway.Inputs.UsagePlanThrottleSettingsArgs
{
BurstLimit = 0,
RateLimit = 0,
},
});
example, err := apigateway.NewUsagePlan(ctx, "usagePlanResource", &apigateway.UsagePlanArgs{
ApiStages: apigateway.UsagePlanApiStageArray{
&apigateway.UsagePlanApiStageArgs{
ApiId: pulumi.String("string"),
Stage: pulumi.String("string"),
Throttles: apigateway.UsagePlanApiStageThrottleArray{
&apigateway.UsagePlanApiStageThrottleArgs{
Path: pulumi.String("string"),
BurstLimit: pulumi.Int(0),
RateLimit: pulumi.Float64(0),
},
},
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
ProductCode: pulumi.String("string"),
QuotaSettings: &apigateway.UsagePlanQuotaSettingsArgs{
Limit: pulumi.Int(0),
Period: pulumi.String("string"),
Offset: pulumi.Int(0),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
ThrottleSettings: &apigateway.UsagePlanThrottleSettingsArgs{
BurstLimit: pulumi.Int(0),
RateLimit: pulumi.Float64(0),
},
})
var usagePlanResource = new UsagePlan("usagePlanResource", UsagePlanArgs.builder()
.apiStages(UsagePlanApiStageArgs.builder()
.apiId("string")
.stage("string")
.throttles(UsagePlanApiStageThrottleArgs.builder()
.path("string")
.burstLimit(0)
.rateLimit(0)
.build())
.build())
.description("string")
.name("string")
.productCode("string")
.quotaSettings(UsagePlanQuotaSettingsArgs.builder()
.limit(0)
.period("string")
.offset(0)
.build())
.tags(Map.of("string", "string"))
.throttleSettings(UsagePlanThrottleSettingsArgs.builder()
.burstLimit(0)
.rateLimit(0)
.build())
.build());
usage_plan_resource = aws.apigateway.UsagePlan("usagePlanResource",
api_stages=[{
"apiId": "string",
"stage": "string",
"throttles": [{
"path": "string",
"burstLimit": 0,
"rateLimit": 0,
}],
}],
description="string",
name="string",
product_code="string",
quota_settings={
"limit": 0,
"period": "string",
"offset": 0,
},
tags={
"string": "string",
},
throttle_settings={
"burstLimit": 0,
"rateLimit": 0,
})
const usagePlanResource = new aws.apigateway.UsagePlan("usagePlanResource", {
apiStages: [{
apiId: "string",
stage: "string",
throttles: [{
path: "string",
burstLimit: 0,
rateLimit: 0,
}],
}],
description: "string",
name: "string",
productCode: "string",
quotaSettings: {
limit: 0,
period: "string",
offset: 0,
},
tags: {
string: "string",
},
throttleSettings: {
burstLimit: 0,
rateLimit: 0,
},
});
type: aws:apigateway:UsagePlan
properties:
apiStages:
- apiId: string
stage: string
throttles:
- burstLimit: 0
path: string
rateLimit: 0
description: string
name: string
productCode: string
quotaSettings:
limit: 0
offset: 0
period: string
tags:
string: string
throttleSettings:
burstLimit: 0
rateLimit: 0
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:
- Api
Stages List<UsagePlan Api Stage> - Associated API stages of the usage plan.
- Description string
- Description of a usage plan.
- Name string
- Name of the usage plan.
- Product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- Quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- Dictionary<string, string>
- Throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- Api
Stages []UsagePlan Api Stage Args - Associated API stages of the usage plan.
- Description string
- Description of a usage plan.
- Name string
- Name of the usage plan.
- Product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- Quota
Settings UsagePlan Quota Settings Args - Quota of the usage plan.
- map[string]string
- Throttle
Settings UsagePlan Throttle Settings Args - Throttling limits of the usage plan.
- api
Stages List<UsagePlan Api Stage> - Associated API stages of the usage plan.
- description String
- Description of a usage plan.
- name String
- Name of the usage plan.
- product
Code String - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- Map<String,String>
- throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- api
Stages UsagePlan Api Stage[] - Associated API stages of the usage plan.
- description string
- Description of a usage plan.
- name string
- Name of the usage plan.
- product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- {[key: string]: string}
- throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- api_
stages Sequence[UsagePlan Api Stage Args] - 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 UsagePlan Quota Settings Args - Quota of the usage plan.
- Mapping[str, str]
- throttle_
settings UsagePlan Throttle Settings Args - Throttling limits of the usage plan.
- api
Stages List<Property Map> - Associated API stages of the usage plan.
- description String
- Description of a usage plan.
- name String
- Name of the usage plan.
- product
Code String - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings Property Map - Quota of the usage plan.
- Map<String>
- throttle
Settings Property Map - 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:
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.
- Api
Stages List<UsagePlan Api Stage> - Associated API stages of the usage plan.
- Arn string
- ARN
- Description string
- Description of a usage plan.
- Name string
- Name of the usage plan.
- Product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- Quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- Dictionary<string, string>
- Dictionary<string, string>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- Api
Stages []UsagePlan Api Stage Args - Associated API stages of the usage plan.
- Arn string
- ARN
- Description string
- Description of a usage plan.
- Name string
- Name of the usage plan.
- Product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- Quota
Settings UsagePlan Quota Settings Args - Quota of the usage plan.
- map[string]string
- map[string]string
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Throttle
Settings UsagePlan Throttle Settings Args - Throttling limits of the usage plan.
- api
Stages List<UsagePlan Api Stage> - Associated API stages of the usage plan.
- arn String
- ARN
- description String
- Description of a usage plan.
- name String
- Name of the usage plan.
- product
Code String - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- Map<String,String>
- Map<String,String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- api
Stages UsagePlan Api Stage[] - Associated API stages of the usage plan.
- arn string
- ARN
- description string
- Description of a usage plan.
- name string
- Name of the usage plan.
- product
Code string - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings UsagePlan Quota Settings - Quota of the usage plan.
- {[key: string]: string}
- {[key: string]: string}
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - throttle
Settings UsagePlan Throttle Settings - Throttling limits of the usage plan.
- api_
stages Sequence[UsagePlan Api Stage Args] - 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 UsagePlan Quota Settings Args - Quota of the usage plan.
- Mapping[str, str]
- Mapping[str, str]
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - throttle_
settings UsagePlan Throttle Settings Args - Throttling limits of the usage plan.
- api
Stages 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.
- product
Code String - AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
- quota
Settings Property Map - Quota of the usage plan.
- Map<String>
- Map<String>
- Map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - throttle
Settings Property Map - Throttling limits of the usage plan.
Supporting Types
UsagePlanApiStage, UsagePlanApiStageArgs
- Api
Id 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<Usage
Plan Api Stage Throttle> - The throttling limits of the usage plan.
- Api
Id 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
[]Usage
Plan Api Stage Throttle - The throttling limits of the usage plan.
- api
Id 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<Usage
Plan Api Stage Throttle> - The throttling limits of the usage plan.
- api
Id 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
Usage
Plan Api Stage Throttle[] - 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[Usage
Plan Api Stage Throttle] - The throttling limits of the usage plan.
- api
Id 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, UsagePlanApiStageThrottleArgs
- Path string
- 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 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
. - 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 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
. - burst
Limit 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.
- rate
Limit 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
. - burst
Limit 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.
- rate
Limit 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
. - burst
Limit 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.
- rate
Limit Number - The API request steady-state rate limit.
UsagePlanQuotaSettings, UsagePlanQuotaSettingsArgs
UsagePlanThrottleSettings, UsagePlanThrottleSettingsArgs
- Burst
Limit int - Rate
Limit double
- Burst
Limit int - Rate
Limit float64
- burst
Limit Integer - rate
Limit Double
- burst
Limit number - rate
Limit number
- burst_
limit int - rate_
limit float
- burst
Limit Number - rate
Limit Number
Import
Using pulumi import
, import AWS API Gateway Usage Plan using the id
. For example:
$ pulumi import aws:apigateway/usagePlan:UsagePlan myusageplan <usage_plan_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.