netapp_ontap.resources.autosupport API documentation
Description: Copyright &copy; 2026 NetApp Inc. All rights reserved …

# Module `netapp_ontap.resources.autosupport`

Copyright © 2026 NetApp Inc. All rights reserved.

This file has been automatically generated based on the ONTAP REST API documentation.

## Overview

AutoSupport is the NetApp call home mechanism. AutoSupport sends configuration details, status details, and error reporting details to NetApp.

This endpoint supports both GET and PATCH calls. GET is used to retrieve AutoSupport configuration details for the cluster and PATCH is used to modify the AutoSupport configuration of the cluster. You can also use GET calls to check AutoSupport connectivity.

## Examples

### Configuring 'to' addresses

The following example configures AutoSupport to send emails to 'to' addresses.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.to = ["abc@netapp.com", "xyz@netapp.com"]
        resource.patch()

### Configuring 'SMTP' transport

The following example configures AutoSupport to use 'SMTP' transport. The default transport is 'HTTPS'.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.transport = "smtp"
        resource.patch()

### Configuring 'start_tls' SMTP encryption

The following example configures AutoSupport to use 'start_tls' SMTP encryption. The default value for the smtp_encryption field is 'none'.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.smtp_encryption = "start_tls"
        resource.patch()

### Retrieving the AutoSupport configuration

The following example retrieves AutoSupport configuration for the cluster.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.get()
        print(resource)

Try it out

    Autosupport(
        {
            "contact_support": True,
            "ondemand_enabled": True,
            "smtp_encryption": "none",
            "transport": "smtp",
            "proxy_url": "",
            "to": ["abc@netapp.com", "xyz@netapp.com"],
            "is_minimal": False,
            "from": "Postmaster",
            "mail_hosts": ["mailhost"],
            "enabled": True,
        }
    )

### Retrieving AutoSupport connectivity issues

The following example retrieves AutoSupport connectivity issues for the cluster. The `fields=issues` parameter must be specified, for the response to return connectivity issues. The `corrective_action` section might contain commands which needs to be executed on the ONTAP CLI.

Note that the connectivity check can take up to 10 seconds to complete.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.get(fields="issues")
        print(resource)

Try it out

    Autosupport(
        {
            "issues": [
                {
                    "destination": "mailhost",
                    "issue": {
                        "message": "SMTP connectivity check failed for destination: mailhost. Error: Could not resolve host - 'mailhost'",
                        "code": "53149746",
                    },
                    "component": "mail_server",
                    "node": {
                        "name": "node3",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc"
                            }
                        },
                        "uuid": "0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc",
                    },
                    "corrective_action": {
                        "message": "Check the hostname of the SMTP server",
                        "code": "53149746",
                    },
                },
                {
                    "destination": "https://support.netapp.com/aods/asupmessage",
                    "issue": {
                        "message": 'AutoSupport OnDemand is disabled when "-transport" is not set to "https".',
                        "code": "53149740",
                    },
                    "component": "ondemand_server",
                    "node": {
                        "name": "node3",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc"
                            }
                        },
                        "uuid": "0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc",
                    },
                    "corrective_action": {
                        "message": 'Run "system node autosupport modify -transport https -node <node name>" to set "-transport" to "https".',
                        "code": "53149740",
                    },
                },
            ]
        }
    )

### Retrieving AutoSupport configuration and connectivity issues

The following example retrieves AutoSupport configuration and connectivity issues on the cluster. Use `fields=*,issues` parameter to return both configuration and connectivity issues.

    from netapp_ontap import HostConnection
    from netapp_ontap.resources import Autosupport

    with HostConnection("<mgmt-ip>", username="admin", password="password", verify=False):
        resource = Autosupport()
        resource.get(fields="*,issues")
        print(resource)

Try it out

    Autosupport(
        {
            "contact_support": True,
            "ondemand_enabled": True,
            "issues": [
                {
                    "destination": "mailhost",
                    "issue": {
                        "message": "SMTP connectivity check failed for destination: mailhost. Error: Could not resolve host - 'mailhost'",
                        "code": "53149746",
                    },
                    "component": "mail_server",
                    "node": {
                        "name": "node3",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc"
                            }
                        },
                        "uuid": "0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc",
                    },
                    "corrective_action": {
                        "message": "Check the hostname of the SMTP server",
                        "code": "53149746",
                    },
                },
                {
                    "destination": "https://support.netapp.com/aods/asupmessage",
                    "issue": {
                        "message": 'AutoSupport OnDemand is disabled when "-transport" is not set to "https".',
                        "code": "53149740",
                    },
                    "component": "ondemand_server",
                    "node": {
                        "name": "node3",
                        "_links": {
                            "self": {
                                "href": "/api/cluster/nodes/0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc"
                            }
                        },
                        "uuid": "0ecfd0a6-f1b3-11e8-9d9f-005056bbaadc",
                    },
                    "corrective_action": {
                        "message": 'Run "system node autosupport modify -transport https -node <node name>" to set "-transport" to "https".',
                        "code": "53149740",
                    },
                },
            ],
            "smtp_encryption": "none",
            "transport": "smtp",
            "proxy_url": "",
            "to": ["abc@netapp.com", "xyz@netapp.com"],
            "is_minimal": False,
            "from": "Postmaster",
            "mail_hosts": ["mailhost"],
            "enabled": True,
        }
    )

## Classes

`class Autosupport (*args, **kwargs)`

  Allows interaction with Autosupport objects on the host

  Initialize the instance of the resource.

  Any keyword arguments are set on the instance as properties. For example, if the class was named 'MyResource', then this statement would be true:

      MyResource(name='foo').name == 'foo'

  ## Args

  `*args`
    Each positional argument represents a parent key as used in the URL of the object. That is, each value will be used to fill in a segment of the URL which refers to some parent object. The order of these arguments must match the order they are specified in the URL, from left to right.
  `**kwargs`
    each entry will have its key set as an attribute name on the instance and its value will be the value of that attribute.

  ### Ancestors

  - Resource

  ### Methods

  `def get (self, **kwargs) -> NetAppResponse`

    Retrieves the AutoSupport configuration of the cluster and if requested, returns connectivity issues with the AutoSupport configuration.

    Important note: * The issues field consists of a list of objects containing details of the node that has a connectivity issue, the issue description, and corrective action you can take to address the issue. When not empty, this indicates a connection issue to the HTTPS, SMTP, or AutoSupport On Demand server.

    ### Expensive properties

    There is an added computational cost to retrieving values for these properties. They are not included by default in GET results and must be explicitly requested using the `fields` query parameter. See `Requesting specific fields` to learn more. * `issues`

    ### Related ONTAP commands

    - `system node autosupport show -instance`
    - `system node autosupport check show-details`

    ### Learn more

    - `DOC /support/autosupport`

    Fetch the details of the object from the host.

    Requires the keys to be set (if any). After returning, new or changed properties from the host will be set on the instance.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400 or if not all of the keys required are present and config.STRICT_GET has been set to True.

  `def patch (self, hydrate: bool = False, poll: bool = True, poll_interval: Optional[int] = None, poll_timeout: Optional[int] = None, **kwargs) -> NetAppResponse`

    Updates the AutoSupport configuration for the entire cluster.

    ### Related ONTAP commands

    - `system node autosupport modify`

    ### Learn more

    - `DOC /support/autosupport`

    Send the difference in the object's state to the host as a modification request.

    Calculates the difference in the object's state since the last time we interacted with the host and sends this in the request body.

    ## Args

    `hydrate`
      If set to True, after the response is received from the call, a a GET call will be made to refresh all fields of the object.
    `poll`
      If set to True, the call will not return until the asynchronous job on the host has completed. Has no effect if the host did not return a job response.
    `poll_interval`
      If the operation returns a job, this specifies how often to query the job for updates.
    `poll_timeout`
      If the operation returns a job, this specifies how long to continue monitoring the job's status for completion.
    `connection`
      The `HostConnection` object to use for this API call. If unset, tries to use the connection which is set globally for the library or from the current context.
    `**kwargs`
      Any key/value pairs passed will normally be sent as query parameters to the host. If any of these pairs are parameters that are sent as formdata then only parameters of that type will be accepted and all others will be discarded.

    ## Returns

    A `NetAppResponse` object containing the details of the HTTP response.

    ## Raises

    `NetAppRestError`: If the API call returned a status code >= 400

  ### Inherited members

  - `Resource`:
    - `from_dict`
    - `get_collection_url`
    - `get_connection`
    - `instance_location`
    - `path_keys`
    - `poll`
    - `set_connection`
    - `to_dict`
    - `validate_schema`
`class AutosupportSchema (*, only: types.StrSequenceOrSet | None = None, exclude: types.StrSequenceOrSet = (), many: bool | None = None, context: dict | None = None, load_only: types.StrSequenceOrSet = (), dump_only: types.StrSequenceOrSet = (), partial: bool | types.StrSequenceOrSet | None = None, unknown: str | None = None)`

  The fields of the Autosupport object

  ### Ancestors

  - netapp_ontap.resource.ResourceSchema
  - marshmallow.schema.Schema
  - marshmallow.base.SchemaABC
  - abc.ABC

  ### Class variables

  `contact_support: bool GET POST PATCH`

    Specifies whether to send the AutoSupport messages to vendor support.

    Example: true

  `enabled: bool GET POST PATCH`

    Specifies whether the AutoSupport daemon is enabled. When this setting is disabled, delivery of all AutoSupport messages is turned off.

    Example: true

  `from_: str GET POST PATCH`

    The e-mail address from which the AutoSupport messages are sent. To generate node-specific 'from' addresses, enable '-node-specific-from' parameter via ONTAP CLI.

    Example: postmaster@example.com

  `is_minimal: bool GET POST PATCH`

    Specifies whether the system information is collected in compliant form, to remove private data or in complete form, to enhance diagnostics.

    Example: true

  `issues: List[AutosupportIssues] GET`

    A list of connectivity issues to the HTTPS/SMTP/AOD AutoSupport destinations on the nodes in the cluster along with the corrective actions.

  `mail_hosts: List[str] GET POST PATCH`

    The names of the mail servers used to deliver AutoSupport messages via SMTP.

    Example: ["mailhost1.example.com","mailhost2.example.com"]

  `ondemand_enabled: bool GET POST PATCH`

    Specifies whether the AutoSupport OnDemand feature is enabled. When AutoSupport OnDemand is enabled, support personnel can remotely trigger new AutoSupport messages, resend existing AutoSupport messages, and decline the delivery of unwanted AutoSupport messages. When this option is disabled, the cluster does not respond to any AutoSupport OnDemand requests from support personnel.

    Example: true

  `partner_addresses: List[str] GET POST PATCH`

    The list of partner addresses.

    Example: ["user1@partner.com","user2@partner.com"]

  `proxy_url: str GET POST PATCH`

    Proxy server for AutoSupport message delivery via HTTPS. Optionally specify a username/password for authentication with the proxy server.

    Example: proxy.company.com

  `smtp_encryption: str GET POST PATCH`

    The encryption protocol used to deliver AutoSupport messages via SMTP to the configured mail_hosts.

    Valid choices:

    - none
    - start_tls
  `to: List[str] GET POST PATCH`

    The e-mail addresses to which the AutoSupport messages are sent.

    Example: ["user1@example.com","user2@example.com"]

  `transport: str GET POST PATCH`

    The name of the transport protocol used to deliver AutoSupport messages. Note: 'http' transport is no longer supported by AutoSupport servers.

    Valid choices:

    - smtp
    - https