CmdID

CmdID / aws / aws apigateway

aws apigateway create-usage-plan-key

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

1 example 3 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To associate an existing API key with a Usage Plan

The following create-usage-plan-key example associates an existing API key with a usage plan.

aws apigateway create-usage-plan-key --usage-plan-id a1b2c3 --key-type "API_KEY" --key-id 4vq3yryqm5Identify
--usage-plan-idThe Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.
--key-typeThe type of a UsagePlanKey resource for a plan customer.
--key-idThe identifier of a UsagePlanKey resource for a plan customer.
Its output
{
    "id": "4vq3yryqm5",
    "type": "API_KEY",
    "value": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",
    "name": "My API Key"
}

For more information, see Set up usage plans for REST APIs in API Gateway in the Amazon API Gateway Developer Guide.

Options

3 in the AWS CLI reference
--key-idThe identifier of a UsagePlanKey resource for a plan customer.
--key-typeThe type of a UsagePlanKey resource for a plan customer.
--usage-plan-idThe Id of the UsagePlan resource representing the usage plan containing the to-be-created UsagePlanKey resource representing a plan customer.