1. Packages
  2. AWS Native
  3. API Docs
  4. apigateway
  5. UsagePlan

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws-native.apigateway.UsagePlan

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi

    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 to monitor costs and to manage API requests.

    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,
                  quota: Optional[UsagePlanQuotaSettingsArgs] = None,
                  tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
                  throttle: Optional[UsagePlanThrottleSettingsArgs] = None,
                  usage_plan_name: Optional[str] = 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-native: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.

    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<Pulumi.AwsNative.ApiGateway.Inputs.UsagePlanApiStage>
    The associated API stages of a usage plan.
    Description string
    The description of a usage plan.
    Quota Pulumi.AwsNative.ApiGateway.Inputs.UsagePlanQuotaSettings
    The target maximum number of permitted requests per a given unit time interval.
    Tags List<Pulumi.AwsNative.Inputs.Tag>
    The collection of tags. Each tag element is associated with a given resource.
    Throttle Pulumi.AwsNative.ApiGateway.Inputs.UsagePlanThrottleSettings
    A map containing method level throttling information for API stage in a usage plan.
    UsagePlanName string
    The name of a usage plan.
    ApiStages []UsagePlanApiStageArgs
    The associated API stages of a usage plan.
    Description string
    The description of a usage plan.
    Quota UsagePlanQuotaSettingsArgs
    The target maximum number of permitted requests per a given unit time interval.
    Tags TagArgs
    The collection of tags. Each tag element is associated with a given resource.
    Throttle UsagePlanThrottleSettingsArgs
    A map containing method level throttling information for API stage in a usage plan.
    UsagePlanName string
    The name of a usage plan.
    apiStages List<UsagePlanApiStage>
    The associated API stages of a usage plan.
    description String
    The description of a usage plan.
    quota UsagePlanQuotaSettings
    The target maximum number of permitted requests per a given unit time interval.
    tags List<Tag>
    The collection of tags. Each tag element is associated with a given resource.
    throttle UsagePlanThrottleSettings
    A map containing method level throttling information for API stage in a usage plan.
    usagePlanName String
    The name of a usage plan.
    apiStages UsagePlanApiStage[]
    The associated API stages of a usage plan.
    description string
    The description of a usage plan.
    quota UsagePlanQuotaSettings
    The target maximum number of permitted requests per a given unit time interval.
    tags Tag[]
    The collection of tags. Each tag element is associated with a given resource.
    throttle UsagePlanThrottleSettings
    A map containing method level throttling information for API stage in a usage plan.
    usagePlanName string
    The name of a usage plan.
    api_stages Sequence[UsagePlanApiStageArgs]
    The associated API stages of a usage plan.
    description str
    The description of a usage plan.
    quota UsagePlanQuotaSettingsArgs
    The target maximum number of permitted requests per a given unit time interval.
    tags Sequence[TagArgs]
    The collection of tags. Each tag element is associated with a given resource.
    throttle UsagePlanThrottleSettingsArgs
    A map containing method level throttling information for API stage in a usage plan.
    usage_plan_name str
    The name of a usage plan.
    apiStages List<Property Map>
    The associated API stages of a usage plan.
    description String
    The description of a usage plan.
    quota Property Map
    The target maximum number of permitted requests per a given unit time interval.
    tags List<Property Map>
    The collection of tags. Each tag element is associated with a given resource.
    throttle Property Map
    A map containing method level throttling information for API stage in a usage plan.
    usagePlanName String
    The name of a usage plan.

    Outputs

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

    AwsId string
    The ID for the usage plan. For example: abc123 .
    Id string
    The provider-assigned unique ID for this managed resource.
    AwsId string
    The ID for the usage plan. For example: abc123 .
    Id string
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID for the usage plan. For example: abc123 .
    id String
    The provider-assigned unique ID for this managed resource.
    awsId string
    The ID for the usage plan. For example: abc123 .
    id string
    The provider-assigned unique ID for this managed resource.
    aws_id str
    The ID for the usage plan. For example: abc123 .
    id str
    The provider-assigned unique ID for this managed resource.
    awsId String
    The ID for the usage plan. For example: abc123 .
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    UsagePlanApiStage, UsagePlanApiStageArgs

    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.
    Throttle Dictionary<string, Pulumi.AwsNative.ApiGateway.Inputs.UsagePlanThrottleSettings>
    Map containing method level throttling information for API stage in a 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.
    Throttle map[string]UsagePlanThrottleSettings
    Map containing method level throttling information for API stage in a 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.
    throttle Map<String,UsagePlanThrottleSettings>
    Map containing method level throttling information for API stage in a 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.
    throttle {[key: string]: UsagePlanThrottleSettings}
    Map containing method level throttling information for API stage in a 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.
    throttle Mapping[str, UsagePlanThrottleSettings]
    Map containing method level throttling information for API stage in a 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.
    throttle Map<Property Map>
    Map containing method level throttling information for API stage in a usage plan.

    UsagePlanQuotaSettings, UsagePlanQuotaSettingsArgs

    Limit int
    The target maximum number of requests that can be made in a given time period.
    Offset int
    The number of requests subtracted from the given limit in the initial time period.
    Period string
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
    Limit int
    The target maximum number of requests that can be made in a given time period.
    Offset int
    The number of requests subtracted from the given limit in the initial time period.
    Period string
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
    limit Integer
    The target maximum number of requests that can be made in a given time period.
    offset Integer
    The number of requests subtracted from the given limit in the initial time period.
    period String
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
    limit number
    The target maximum number of requests that can be made in a given time period.
    offset number
    The number of requests subtracted from the given limit in the initial time period.
    period string
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
    limit int
    The target maximum number of requests that can be made in a given time period.
    offset int
    The number of requests subtracted from the given limit in the initial time period.
    period str
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
    limit Number
    The target maximum number of requests that can be made in a given time period.
    offset Number
    The number of requests subtracted from the given limit in the initial time period.
    period String
    The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

    UsagePlanThrottleSettings, UsagePlanThrottleSettingsArgs

    BurstLimit int
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    RateLimit double
    The API target request rate limit.
    BurstLimit int
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    RateLimit float64
    The API target request rate limit.
    burstLimit Integer
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    rateLimit Double
    The API target request rate limit.
    burstLimit number
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    rateLimit number
    The API target request rate limit.
    burst_limit int
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    rate_limit float
    The API target request rate limit.
    burstLimit Number
    The API target request burst rate limit. This allows more requests through for a period of time than the target rate limit.
    rateLimit Number
    The API target request rate limit.

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.109.0 published on Wednesday, Jun 26, 2024 by Pulumi