Skip to content

Commit

Permalink
fix: documenation for usageplans
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreya Gangishetty committed Jan 15, 2020
1 parent 80d2cf4 commit 90dde9e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions versions/2016-10-31.md
Original file line number Diff line number Diff line change
Expand Up @@ -1041,8 +1041,7 @@ Define Lambda and Cognito `Authorizers` and specify a `DefaultAuthorizer`. If yo
Auth:
ApiKeyRequired: true # OPTIONAL
UsagePlan: # OPTIONAL
CreateUsagePlan: SINGLE # REQUIRED if UsagePlan property is set. accepted values: SINGLE, SHARED, NONE
# UsagePlanId: !Ref usagePlan # REQUIRED if CreateUsagePlan is None
CreateUsagePlan: PER_API # REQUIRED if UsagePlan property is set. accepted values: PER_API, SHARED, NONE
DefaultAuthorizer: MyCognitoAuth # OPTIONAL, if you use IAM permissions, specify AWS_IAM.
AddDefaultAuthorizerToCorsPreflight: false # OPTIONAL; Default: true
ResourcePolicy:
Expand Down Expand Up @@ -1125,16 +1124,13 @@ Auth:
```

**UsagePlan:**
Create Usage Plan for API Auth. Usage Plans can be set in Globals level as well for Apis.
SAM creates a single Usage Plan, Api Key and Usage Plan Api Key resources if `CreateUsagePlan` is `SHARED` and a Usage Plan, Api Key and Usage Plan Api Key resources per Api when `CreateUsagePlan` is `SINGLE`.
SAM creates Api Key and Usage Plan Api Key and expects `UsagePlanId` property to be set if `CreateUsagePlan` is NONE
Create Usage Plan for API Auth. Usage Plans can be set in Globals level as well for RestApis.
SAM creates a single Usage Plan, Api Key and Usage Plan Api Key resources if `CreateUsagePlan` is `SHARED` and a Usage Plan, Api Key and Usage Plan Api Key resources per Api when `CreateUsagePlan` is `PER_API`.

```yaml
Auth:
UsagePlan:
CreateUsagePlan: NONE # Required supported values: SHARED | NONE | SINGLE
UsagePlanId: !Ref usagePlan # This field is required if CreateUsagePlan is NONE
CreateUsagePlan: NONE # Required supported values: SHARED | NONE | PER_API
```
#### Function Auth Object

Expand Down

0 comments on commit 90dde9e

Please sign in to comment.