Skip to content

Api Gateway  >  Operations  >  create_usage_plan_key

create_usage_plan_key

Operation

create_usage_plan_key async

create_usage_plan_key(input: CreateUsagePlanKeyInput, plugins: list[Plugin] | None = None) -> CreateUsagePlanKeyOutput

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

Parameters:

Name Type Description Default
input CreateUsagePlanKeyInput

An instance of CreateUsagePlanKeyInput.

required
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None

Returns:

Type Description
CreateUsagePlanKeyOutput

An instance of CreateUsagePlanKeyOutput.

Input

CreateUsagePlanKeyInput dataclass

The POST request to create a usage plan key for adding an existing API key to a usage plan.

Attributes

key_id class-attribute instance-attribute
key_id: str | None = None

The identifier of a UsagePlanKey resource for a plan customer.

key_type class-attribute instance-attribute
key_type: str | None = None

The type of a UsagePlanKey resource for a plan customer.

usage_plan_id class-attribute instance-attribute
usage_plan_id: str | None = None

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

Output

CreateUsagePlanKeyOutput dataclass

Represents a usage plan key to identify a plan customer.

Attributes

id class-attribute instance-attribute
id: str | None = None

The Id of a usage plan key.

name class-attribute instance-attribute
name: str | None = None

The name of a usage plan key.

type class-attribute instance-attribute
type: str | None = None

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

value class-attribute instance-attribute
value: str | None = None

The value of a usage plan key.