EventBridge: put_rule and list_rules should store and retrieve EventBusName property (#3472)
Co-authored-by: Guillermo Arribas <garribas@atlassian.com>
This commit is contained in:
parent
5fe921c2bc
commit
62fd975da0
3 changed files with 6 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ class Rule(CloudFormationModel):
|
|||
self.state = kwargs.get("State") or "ENABLED"
|
||||
self.description = kwargs.get("Description")
|
||||
self.role_arn = kwargs.get("RoleArn")
|
||||
self.event_bus_name = kwargs.get("EventBusName", "default")
|
||||
self.targets = []
|
||||
|
||||
@property
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class EventsHandler(BaseResponse):
|
|||
"Description": rule.description,
|
||||
"ScheduleExpression": rule.schedule_exp,
|
||||
"RoleArn": rule.role_arn,
|
||||
"EventBusName": rule.event_bus_name,
|
||||
}
|
||||
|
||||
@property
|
||||
|
|
@ -167,6 +168,7 @@ class EventsHandler(BaseResponse):
|
|||
state = self._get_param("State")
|
||||
desc = self._get_param("Description")
|
||||
role_arn = self._get_param("RoleArn")
|
||||
event_bus_name = self._get_param("EventBusName")
|
||||
|
||||
if not name:
|
||||
return self.error("ValidationException", "Parameter Name is required.")
|
||||
|
|
@ -199,6 +201,7 @@ class EventsHandler(BaseResponse):
|
|||
State=state,
|
||||
Description=desc,
|
||||
RoleArn=role_arn,
|
||||
EventBusName=event_bus_name,
|
||||
)
|
||||
|
||||
return json.dumps({"RuleArn": rule.arn}), self.response_headers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue