purity_fb.SmtpApi

All URIs are relative to https://purity_fb_server/api

Method HTTP request Description
list_smtp GET /1.3/smtp
update_smtp PATCH /1.3/smtp

list_smtp

SmtpResponse list_smtp()

List smtp

Example

from purity_fb import PurityFb, rest

fb = PurityFb("10.255.9.28") # assume the array IP is 10.255.9.28
fb.disable_verify_ssl()
try:
    res = fb.login(API_TOKEN) # login to the array with your API_TOKEN
except rest.ApiException as e:
    print("Exception when logging in to the array: %s\n" % e)
if res:
    try:
        res = fb.smtp.list_smtp() # The SMTP properties are related to alert routing
        print(res)
    except rest.ApiException as e:
        print("Exception when listing smtp settings: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

SmtpResponse

Authorization

AuthTokenHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to Overview]

update_smtp

SmtpResponse update_smtp(smtp_settings)

Update smtp

Example

```python from purity_fb import PurityFb, Smtp, rest

fb = PurityFb("10.255.9.28") # assume the array IP is 10.255.9.28 fb.disable_verify_ssl() try: res = fb.login(API_TOKEN) # login to the array with your API_TOKEN except rest.ApiException as e: print("Exception when logging in to the array: %s\n" % e) if res: try: smtp_settings = Smtp(relay_host="test-host.com", sender_domain="purestorage.com") res = fb.smtp.update_smtp(smtp_settings=smtp_settings) print(res) except rest.ApiException as e: print("Exception when updating smtp configuration settings: %s\n" % e)```

Parameters

Name Type Description Notes
smtp_settings Smtp

Return type

SmtpResponse

Authorization

AuthTokenHeader

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to Overview]