def __init__(__self__, resource_name, opts=None, api_stages=None, description=None, name=None, product_code=None, quota_settings=None, tags=None, throttle_settings=None, __props__=None, __name__=None, __opts__=None):
    '\n        Provides an API Gateway Usage Plan.\n\n        ## Example Usage\n\n\n\n        ```python\n        import pulumi\n        import pulumi_aws as aws\n\n        myapi = aws.apigateway.RestApi("myapi")\n        dev = aws.apigateway.Deployment("dev",\n            rest_api=myapi.id,\n            stage_name="dev")\n        prod = aws.apigateway.Deployment("prod",\n            rest_api=myapi.id,\n            stage_name="prod")\n        my_usage_plan = aws.apigateway.UsagePlan("myUsagePlan",\n            api_stages=[\n                {\n                    "api_id": myapi.id,\n                    "stage": dev.stage_name,\n                },\n                {\n                    "api_id": myapi.id,\n                    "stage": prod.stage_name,\n                },\n            ],\n            description="my description",\n            product_code="MYCODE",\n            quota_settings={\n                "limit": 20,\n                "offset": 2,\n                "period": "WEEK",\n            },\n            throttle_settings={\n                "burstLimit": 5,\n                "rate_limit": 10,\n            })\n        ```\n\n        :param str resource_name: The name of the resource.\n        :param pulumi.ResourceOptions opts: Options for the resource.\n        :param pulumi.Input[list] api_stages: The associated API stages of the usage plan.\n        :param pulumi.Input[str] description: The description of a usage plan.\n        :param pulumi.Input[str] name: The name of the usage plan.\n        :param pulumi.Input[str] product_code: The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.\n        :param pulumi.Input[dict] quota_settings: The quota settings of the usage plan.\n        :param pulumi.Input[dict] tags: Key-value map of resource tags\n        :param pulumi.Input[dict] throttle_settings: The throttling limits of the usage plan.\n\n        The **api_stages** object supports the following:\n\n          * `api_id` (`pulumi.Input[str]`) - API Id of the associated API stage in a usage plan.\n          * `stage` (`pulumi.Input[str]`) - API stage name of the associated API stage in a usage plan.\n\n        The **quota_settings** object supports the following:\n\n          * `limit` (`pulumi.Input[float]`) - The maximum number of requests that can be made in a given time period.\n          * `offset` (`pulumi.Input[float]`) - The number of requests subtracted from the given limit in the initial time period.\n          * `period` (`pulumi.Input[str]`) - The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".\n\n        The **throttle_settings** object supports the following:\n\n          * `burstLimit` (`pulumi.Input[float]`) - 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.\n          * `rate_limit` (`pulumi.Input[float]`) - The API request steady-state rate limit.\n        '
    if (__name__ is not None):
        warnings.warn('explicit use of __name__ is deprecated', DeprecationWarning)
        resource_name = __name__
    if (__opts__ is not None):
        warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
        opts = __opts__
    if (opts is None):
        opts = pulumi.ResourceOptions()
    if (not isinstance(opts, pulumi.ResourceOptions)):
        raise TypeError('Expected resource options to be a ResourceOptions instance')
    if (opts.version is None):
        opts.version = utilities.get_version()
    if (opts.id is None):
        if (__props__ is not None):
            raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
        __props__ = dict()
        __props__['api_stages'] = api_stages
        __props__['description'] = description
        __props__['name'] = name
        __props__['product_code'] = product_code
        __props__['quota_settings'] = quota_settings
        __props__['tags'] = tags
        __props__['throttle_settings'] = throttle_settings
        __props__['arn'] = None
    super(UsagePlan, __self__).__init__('aws:apigateway/usagePlan:UsagePlan', resource_name, __props__, opts)
Provides an API Gateway Usage Plan.

## Example Usage



```python
import pulumi
import pulumi_aws as aws

myapi = aws.apigateway.RestApi("myapi")
dev = aws.apigateway.Deployment("dev",
    rest_api=myapi.id,
    stage_name="dev")
prod = aws.apigateway.Deployment("prod",
    rest_api=myapi.id,
    stage_name="prod")
my_usage_plan = aws.apigateway.UsagePlan("myUsagePlan",
    api_stages=[
        {
            "api_id": myapi.id,
            "stage": dev.stage_name,
        },
        {
            "api_id": myapi.id,
            "stage": prod.stage_name,
        },
    ],
    description="my description",
    product_code="MYCODE",
    quota_settings={
        "limit": 20,
        "offset": 2,
        "period": "WEEK",
    },
    throttle_settings={
        "burstLimit": 5,
        "rate_limit": 10,
    })
```

:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[list] api_stages: The associated API stages of the usage plan.
:param pulumi.Input[str] description: The description of a usage plan.
:param pulumi.Input[str] name: The name of the usage plan.
:param pulumi.Input[str] product_code: The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
:param pulumi.Input[dict] quota_settings: The quota settings of the usage plan.
:param pulumi.Input[dict] tags: Key-value map of resource tags
:param pulumi.Input[dict] throttle_settings: The throttling limits of the usage plan.

The **api_stages** object supports the following:

  * `api_id` (`pulumi.Input[str]`) - API Id of the associated API stage in a usage plan.
  * `stage` (`pulumi.Input[str]`) - API stage name of the associated API stage in a usage plan.

The **quota_settings** object supports the following:

  * `limit` (`pulumi.Input[float]`) - The maximum number of requests that can be made in a given time period.
  * `offset` (`pulumi.Input[float]`) - The number of requests subtracted from the given limit in the initial time period.
  * `period` (`pulumi.Input[str]`) - The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".

The **throttle_settings** object supports the following:

  * `burstLimit` (`pulumi.Input[float]`) - 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` (`pulumi.Input[float]`) - The API request steady-state rate limit.
def __init__(__self__, resource_name, opts=None, api_stages=None, description=None, name=None, product_code=None, quota_settings=None, tags=None, throttle_settings=None, __props__=None, __name__=None, __opts__=None):
    '\n        Provides an API Gateway Usage Plan.\n\n        ## Example Usage\n\n\n\n        ```python\n        import pulumi\n        import pulumi_aws as aws\n\n        myapi = aws.apigateway.RestApi("myapi")\n        dev = aws.apigateway.Deployment("dev",\n            rest_api=myapi.id,\n            stage_name="dev")\n        prod = aws.apigateway.Deployment("prod",\n            rest_api=myapi.id,\n            stage_name="prod")\n        my_usage_plan = aws.apigateway.UsagePlan("myUsagePlan",\n            api_stages=[\n                {\n                    "api_id": myapi.id,\n                    "stage": dev.stage_name,\n                },\n                {\n                    "api_id": myapi.id,\n                    "stage": prod.stage_name,\n                },\n            ],\n            description="my description",\n            product_code="MYCODE",\n            quota_settings={\n                "limit": 20,\n                "offset": 2,\n                "period": "WEEK",\n            },\n            throttle_settings={\n                "burstLimit": 5,\n                "rate_limit": 10,\n            })\n        ```\n\n        :param str resource_name: The name of the resource.\n        :param pulumi.ResourceOptions opts: Options for the resource.\n        :param pulumi.Input[list] api_stages: The associated API stages of the usage plan.\n        :param pulumi.Input[str] description: The description of a usage plan.\n        :param pulumi.Input[str] name: The name of the usage plan.\n        :param pulumi.Input[str] product_code: The AWS Markeplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.\n        :param pulumi.Input[dict] quota_settings: The quota settings of the usage plan.\n        :param pulumi.Input[dict] tags: Key-value map of resource tags\n        :param pulumi.Input[dict] throttle_settings: The throttling limits of the usage plan.\n\n        The **api_stages** object supports the following:\n\n          * `api_id` (`pulumi.Input[str]`) - API Id of the associated API stage in a usage plan.\n          * `stage` (`pulumi.Input[str]`) - API stage name of the associated API stage in a usage plan.\n\n        The **quota_settings** object supports the following:\n\n          * `limit` (`pulumi.Input[float]`) - The maximum number of requests that can be made in a given time period.\n          * `offset` (`pulumi.Input[float]`) - The number of requests subtracted from the given limit in the initial time period.\n          * `period` (`pulumi.Input[str]`) - The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".\n\n        The **throttle_settings** object supports the following:\n\n          * `burstLimit` (`pulumi.Input[float]`) - 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.\n          * `rate_limit` (`pulumi.Input[float]`) - The API request steady-state rate limit.\n        '
    if (__name__ is not None):
        warnings.warn('explicit use of __name__ is deprecated', DeprecationWarning)
        resource_name = __name__
    if (__opts__ is not None):
        warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
        opts = __opts__
    if (opts is None):
        opts = pulumi.ResourceOptions()
    if (not isinstance(opts, pulumi.ResourceOptions)):
        raise TypeError('Expected resource options to be a ResourceOptions instance')
    if (opts.version is None):
        opts.version = utilities.get_version()
    if (opts.id is None):
        if (__props__ is not None):
            raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
        __props__ = dict()
        __props__['api_stages'] = api_stages
        __props__['description'] = description
        __props__['name'] = name
        __props__['product_code'] = product_code
        __props__['quota_settings'] = quota_settings
        __props__['tags'] = tags
        __props__['throttle_settings'] = throttle_settings
        __props__['arn'] = None
    super(UsagePlan, __self__).__init__('aws:apigateway/usagePlan:UsagePlan', resource_name, __props__, opts)