Skip to content

Commit

Permalink
Add AWS::ApiGateway::UsagePlan (fixes cloudtools#585)
Browse files Browse the repository at this point in the history
  • Loading branch information
markpeek authored and covataamos committed Oct 24, 2016
1 parent 3a9d670 commit 2ade28c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions troposphere/apigateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,37 @@ class Stage(AWSObject):
"StageName": (basestring, True),
"Variables": (dict, False)
}


class ApiStage(AWSProperty):
props = {
"ApiId": (basestring, False),
"Stage": (basestring, False),
}


class QuotaSettings(AWSProperty):
props = {
"Limit": (positive_integer, False),
"Offset": (positive_integer, False),
"Period": (basestring, False),
}


class ThrottleSettings(AWSProperty):
props = {
"BurstLimit": (positive_integer, False),
"RateLimit": (positive_integer, False),
}


class UsagePlan(AWSObject):
resource_type = "AWS::ApiGateway::UsagePlan"

props = {
"ApiStages": ([ApiStage], False),
"Description": (basestring, False),
"Quota": (QuotaSettings, False),
"Throttle": (ThrottleSettings, False),
"UsagePlanName": (basestring, False),
}

0 comments on commit 2ade28c

Please sign in to comment.