Iam cloudformation update, singificant cloudformation refactoring (#3218)
* IAM User Cloudformation Enhancements: update, delete, getatt. * AWS::IAM::Policy Support * Added unit tests for AWS:IAM:Policy for roles and groups. Fixed bug related to groups. * AWS:IAM:AccessKey CloudFormation support. * Refactor of CloudFormation parsing.py methods to simplify and standardize how they call to the models. Adjusted some models accordingly. * Further model CloudFormation support changes to align with revised CloudFormation logic. Mostly avoidance of getting resoure name from properties. * Support for Kinesis Stream RetentionPeriodHours param. * Kinesis Stream Cloudformation Tag Support. * Added omitted 'region' param to boto3.client() calls in new tests. Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
This commit is contained in:
parent
3b06ce689e
commit
49d92861c0
25 changed files with 1912 additions and 318 deletions
|
|
@ -88,7 +88,7 @@ class Rule(CloudFormationModel):
|
|||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
event_backend = events_backends[region_name]
|
||||
event_name = properties.get("Name") or resource_name
|
||||
event_name = resource_name
|
||||
return event_backend.put_rule(name=event_name, **properties)
|
||||
|
||||
@classmethod
|
||||
|
|
@ -104,9 +104,8 @@ class Rule(CloudFormationModel):
|
|||
def delete_from_cloudformation_json(
|
||||
cls, resource_name, cloudformation_json, region_name
|
||||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
event_backend = events_backends[region_name]
|
||||
event_name = properties.get("Name") or resource_name
|
||||
event_name = resource_name
|
||||
event_backend.delete_rule(name=event_name)
|
||||
|
||||
|
||||
|
|
@ -176,7 +175,7 @@ class EventBus(CloudFormationModel):
|
|||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
event_backend = events_backends[region_name]
|
||||
event_name = properties["Name"]
|
||||
event_name = resource_name
|
||||
event_source_name = properties.get("EventSourceName")
|
||||
return event_backend.create_event_bus(
|
||||
name=event_name, event_source_name=event_source_name
|
||||
|
|
@ -195,9 +194,8 @@ class EventBus(CloudFormationModel):
|
|||
def delete_from_cloudformation_json(
|
||||
cls, resource_name, cloudformation_json, region_name
|
||||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
event_backend = events_backends[region_name]
|
||||
event_bus_name = properties["Name"]
|
||||
event_bus_name = resource_name
|
||||
event_backend.delete_event_bus(event_bus_name)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue