APIGateway / Client / create_usage_plan_key

create_usage_plan_key#

APIGateway.Client.create_usage_plan_key(**kwargs)#

Creates a usage plan key for adding an existing API key to a usage plan.

See also: AWS API Documentation

Request Syntax

response = client.create_usage_plan_key(
    usagePlanId='string',
    keyId='string',
    keyType='string'
)
Parameters:
  • usagePlanId (string) –

    [REQUIRED]

    The Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.

  • keyId (string) –

    [REQUIRED]

    The identifier of a UsagePlanKey resource for a plan customer.

  • keyType (string) –

    [REQUIRED]

    The type of a UsagePlanKey resource for a plan customer.

Return type:

dict

Returns:

Response Syntax

{
    'id': 'string',
    'type': 'string',
    'value': 'string',
    'name': 'string'
}

Response Structure

  • (dict) –

    Represents a usage plan key to identify a plan customer.

    • id (string) –

      The Id of a usage plan key.

    • type (string) –

      The type of a usage plan key. Currently, the valid key type is API_KEY.

    • value (string) –

      The value of a usage plan key.

    • name (string) –

      The name of a usage plan key.

Exceptions

  • APIGateway.Client.exceptions.BadRequestException

  • APIGateway.Client.exceptions.ConflictException

  • APIGateway.Client.exceptions.LimitExceededException

  • APIGateway.Client.exceptions.NotFoundException

  • APIGateway.Client.exceptions.UnauthorizedException

  • APIGateway.Client.exceptions.TooManyRequestsException