Skip to content
This repository was archived by the owner on Mar 20, 2025. It is now read-only.

Commit cb06932

Browse files
committed
serverless-operations#566: Clarify nesting of apiKeys under provider in readme text
1 parent 6ef78f0 commit cb06932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ You can input an value as json in request body, the value is passed as the input
879879

880880
#### Setting API keys for your Rest API
881881

882-
You can specify a list of API keys to be used by your service Rest API by adding an apiKeys array property to the provider object in serverless.yml. You'll also need to explicitly specify which endpoints are private and require one of the api keys to be included in the request by adding a private boolean property to the http event object you want to set as private. API Keys are created globally, so if you want to deploy your service to different stages make sure your API key contains a stage variable as defined below. When using API keys, you can optionally define usage plan quota and throttle, using usagePlan object.
882+
You can specify a list of API keys to be used by your service Rest API by adding an apiKeys array property to the apiGateway subsection of the provider object in serverless.yml. You'll also need to explicitly specify which endpoints are private and require one of the api keys to be included in the request by adding a private boolean property to the http event object you want to set as private. API Keys are created globally, so if you want to deploy your service to different stages make sure your API key contains a stage variable as defined below. When using API keys, you can optionally define usage plan quota and throttle, using usagePlan object.
883883

884884
Here's an example configuration for setting API keys for your service Rest API:
885885

0 commit comments

Comments
 (0)