x-amazon-apigateway-api-key-source property
Specify the source to receive an API key to throttle API methods that require a key. This API-level property
is a String type. For more information about configuring a method to require an API key, see Configure a method to use API keys with an OpenAPI definition.
Specify the source of the API key for requests. Valid values are:
-
HEADERfor receiving the API key from theX-API-Keyheader of a request. -
AUTHORIZERfor receiving the API key from theUsageIdentifierKeyfrom a Lambda authorizer (formerly known as a custom authorizer).
x-amazon-apigateway-api-key-source example
The following example sets the X-API-Key header as the API key
source.