Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ source_response = event_notifications_service.create_sources(
name=<source-name>,
description=<source-description>,
enabled=False,
store_notifications=True # Optional: Enable to view payload of incoming events for troubleshooting
store_notifications=True # Optional: Enable to view payload of incoming events for troubleshooting,
source=<source-id>
).get_result()

print(json.dumps(source_response, indent=2))
Expand All @@ -183,6 +184,7 @@ print(json.dumps(source_response, indent=2))
- `description` (required): Description of the source
- `enabled` (optional): Whether the source is enabled or not (default: False)
- `store_notifications` (optional): Enable to view the payload of incoming events for troubleshooting (default: False)
- `source` (optional): The source CRN. This field is applicable only for VPC sources.

### List Sources

Expand Down Expand Up @@ -1031,7 +1033,8 @@ create_smtp_config_response = self.event_notifications_service.create_smtp_confi
instance_id=<instance_id>,
name=<smtp-config-name>,
domain=<smtp-domain-name>,
description=<smtp-description>
description=<smtp-description>,
admin_emails=<list-of-admin-emails>,
)

smtp_response = create_smtp_config_response.get_result()
Expand Down Expand Up @@ -1146,6 +1149,7 @@ update_smtp_config_response = self.event_notifications_service.update_smtp_confi
id=<smtp_config_id>,
name=<smtp-name>,
description=<smtp-description>,
admin_emails=<list-of-admin-emails>
)

update_smtp_config_response = update_smtp_config_response.get_result()
Expand Down
7 changes: 6 additions & 1 deletion examples/test_event_notifications_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def test_create_sources_example(self):
description="This source is used for Acme Bank",
enabled=False,
store_notifications=True,
source="crn:v1:bluemix:public:is::a/a3335c51-9ee3-4a28-b1f7-69065709ba67:::",
).get_result()

print(json.dumps(source_response, indent=2))
Expand Down Expand Up @@ -2809,9 +2810,10 @@ def test_create_smtp_configuration_example(self):
name = "SMTP configuration"
domain = "mailx.event-notifications.test.cloud.ibm.com"
description = "SMTP description"
admin_emails= ["admin1@example.com","admin2@example.com"]

create_smtp_config_response = self.event_notifications_service.create_smtp_configuration(
instance_id, name, domain, description=description
instance_id, name, domain, description=description,admin_emails=admin_emails
)

smtp_response = create_smtp_config_response.get_result()
Expand Down Expand Up @@ -2969,11 +2971,14 @@ def test_update_smtp_configuration_example(self):
# begin-update_smtp_configuration
name = 'SMTP configuration update'
description = 'SMTP configuration description update'
admin_emails= ["admin1@example.com","admin2@example.com"]

update_smtp_config_response = self.event_notifications_service.update_smtp_configuration(
instance_id,
id=smtp_config_id,
name=name,
description=description,
admin_emails=admin_emails,
)

update_smtp_config_response = update_smtp_config_response.get_result()
Expand Down
Loading
Loading