Skip to content

Commit d81632d

Browse files
committed
chore: readme
1 parent 9206af9 commit d81632d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,35 @@ resources:
480480

481481
Source: [AWS::ApiGateway::Method docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-authorizationtype)
482482

483+
484+
485+
### Enabling API Token Authentication
486+
487+
You can indicate whether the method requires clients to submit a valid API key using `private` flag:
488+
489+
```yml
490+
custom:
491+
apiGatewayServiceProxies:
492+
- sqs:
493+
path: /sqs
494+
method: post
495+
queueName: { 'Fn::GetAtt': ['SQSQueue', 'QueueName'] }
496+
cors: true
497+
private: true
498+
499+
resources:
500+
Resources:
501+
SQSQueue:
502+
Type: 'AWS::SQS::Queue'
503+
```
504+
505+
which is the same syntax used in Serverless framework.
506+
507+
Source: [Setting API keys for your Rest API](https://serverless.com/framework/docs/providers/aws/events/apigateway/#setting-api-keys-for-your-rest-api)
508+
509+
Source: [AWS::ApiGateway::Method docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-method.html#cfn-apigateway-method-apikeyrequired)
510+
511+
483512
### Using a Custom IAM Role
484513

485514
By default, the plugin will generate a role with the required permissions for each service type that is configured.

0 commit comments

Comments
 (0)