Editing the configuration of an SLA policy

You can edit settings for a site. You can change the site name and other options for the default Primary and Secondary sites.

Method and URI

To update the configuration of an SLA policy, use a POST method and a URI:

PUT     https://{hostname|IPv4}/ngp/slapolicy/{slapolicyId}

Tip

To get an {slapolicyId} value based on the name of the site, follow the instructions in Getting an {slapolicyId}.

Parameters

None.

Data

The data key-value pairs are the same as for an SLA policy. For more information, follow the instructions in Adding an SLA policy.

If you use the same name value for the SLA policy name, the same SLA policy is updated. If you use a different name, the SLA policy will be updated and a copy of the original SLA policy will be created automatically.

Use the same or greater spec > subpolicy > retention > age value for the number of days to retain the backup snapshots. If you update an SLA policy with a smaller number of the retention days, IBM Spectrum Protect Plus purges all backup snapshots that exceed the retention days.

Example: Edit the configuration of an SLA policy

Assume that you added an SLA policy Diamond ({slapolicyId} 2121) as described in Example 1: Add an SLA policy for VMware instances (Type 1). You want to update this SLA policy:

  • Name: Moissanite

  • Type: VMware, Hyper-V, Exchange, Microsoft 365, SQL Server, Oracle Database, Db2, MongoDB, IBM Spectrum Protect Plus Catalog, and Windows File Systems (Type 1)

  • Backup policy: Required

    • Retention: 7 days

    • Frequency: every 2 hours

    • Start time: 1 June 2020 at 0:00 US Central Time

    • Target Site: Dallas

    • Only use encrypted disk storage: No

  • Replication policy: Disable

  • Incremental copy to standard object storage: Disable

  • Full copy to archive object storage: Disable

A Python snippet that is similar to the following example can be used to update the configuration of an SLA policy:

slapolicy_id = "2121"    # Diamond

_data = f'''{{
    "name":        "Moissanite",
    "type":        "backup",
    "spec":        {{
        "subpolicy": [
            {{
                "type":          "REPLICATION",
                "software":      true,
                "retention":     {{
                    "age": 2
                }},
                "useEncryption": false,
                "trigger":       {{
                    "frequency":    15,
                    "type":         "SUBHOURLY",
                    "activateDate": 1590901200000,
                    "timezone":     "America/Chicago"
                }},
                "site":          "Dallas"
            }}
        ]
    }}
}}'''

requests.put('https://10.0.0.100/ngp/slapolicy/' + slapolicy_id,
    headers={...}, data=_data, verify=...)
_images/reference_sla_edit01.png

Figure 20 The same action can be taken in the IBM Spectrum Protect Plus web user interface: In the navigation pane, click Manage Protection > Policy Overview, and see the SLA Policies section. Click the Edit icon for the SLA policy you want to edit its configuration.

After you run the Python snippet, ensure that you get a response with the HTTP status of 200 (OK) and that the SLA policy is updated.