From cb06932026f98c88a65082c05ebdcd2f395945a5 Mon Sep 17 00:00:00 2001 From: Torbjorn van Heeswijck Date: Tue, 2 May 2023 17:29:23 +0930 Subject: [PATCH] #566: Clarify nesting of apiKeys under provider in readme text --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 968a20b9..601a50ea 100644 --- a/README.md +++ b/README.md @@ -879,7 +879,7 @@ You can input an value as json in request body, the value is passed as the input #### Setting API keys for your Rest API -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. +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. Here's an example configuration for setting API keys for your service Rest API: