Rule's cloudformation support for updates (#3043)
* add support to update stack using cloudformation * blacked test file
This commit is contained in:
parent
90e200f0f6
commit
149e307bc9
2 changed files with 49 additions and 0 deletions
|
|
@ -80,6 +80,15 @@ class Rule(BaseModel):
|
|||
event_name = properties.get("Name") or resource_name
|
||||
return event_backend.put_rule(name=event_name, **properties)
|
||||
|
||||
@classmethod
|
||||
def update_from_cloudformation_json(
|
||||
cls, original_resource, new_resource_name, cloudformation_json, region_name
|
||||
):
|
||||
original_resource.delete(region_name)
|
||||
return cls.create_from_cloudformation_json(
|
||||
new_resource_name, cloudformation_json, region_name
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def delete_from_cloudformation_json(
|
||||
cls, resource_name, cloudformation_json, region_name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue