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
|
|
@ -374,10 +374,7 @@ class Queue(CloudFormationModel):
|
|||
|
||||
sqs_backend = sqs_backends[region_name]
|
||||
return sqs_backend.create_queue(
|
||||
name=properties["QueueName"],
|
||||
tags=tags_dict,
|
||||
region=region_name,
|
||||
**properties
|
||||
name=resource_name, tags=tags_dict, region=region_name, **properties
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
|
@ -385,7 +382,7 @@ class Queue(CloudFormationModel):
|
|||
cls, original_resource, new_resource_name, cloudformation_json, region_name
|
||||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
queue_name = properties["QueueName"]
|
||||
queue_name = original_resource.name
|
||||
|
||||
sqs_backend = sqs_backends[region_name]
|
||||
queue = sqs_backend.get_queue(queue_name)
|
||||
|
|
@ -402,10 +399,8 @@ class Queue(CloudFormationModel):
|
|||
def delete_from_cloudformation_json(
|
||||
cls, resource_name, cloudformation_json, region_name
|
||||
):
|
||||
properties = cloudformation_json["Properties"]
|
||||
queue_name = properties["QueueName"]
|
||||
sqs_backend = sqs_backends[region_name]
|
||||
sqs_backend.delete_queue(queue_name)
|
||||
sqs_backend.delete_queue(resource_name)
|
||||
|
||||
@property
|
||||
def approximate_number_of_messages_delayed(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue