Links
Comment on page

M9SAPIJE to edit a policy

Limitations

Only the following policy types are eligible for the edit command:
  1. 1.
    Data set backup
  2. 2.
    Data set import
  3. 3.
    Data set archive
  4. 4.
    Full volume dump
All other policy types will be rejected for this command.
The edit command allows editing the following fields:
  1. 1.
    Retention period
  2. 2.
    Add by criteria
  3. 3.
    Policy filters
Specifying other fields will cause the operation to be rejected
For the "Data set backup" policy type, editing the retention will be rejected if the policy is defined with the "Use SMS policy" or if the policy is "Generation" based.
For the "Data set archive" policy type, editing the retention will be rejected unless the "Override Retention" option is checked.

Running M9SAPIJE to edit a policy

Customize the following M9SAPI parameters:
Parameter
Details
TOKEN
Name of the data set created in Creating an API key that contains the key details.
HOST
The management server IP address or DNS
PORT
The management server port number
VERBOSE
The messages can be displayed in INFO or DEBUG mode. The default is INFO.
VRFYCERT
The default is YES, meaning that a trusted certificate is defined for the server.
If you wish to use a trusted certificate, see Configure the Remote Server API section in the Installation guide for details. Note that communications between the M9SAPI and the management server are always encrypted, regardless of the VRFYCERT value.
POLICY
The policy name in quotes. *This parameter is mutually exclusive with POLICYID.
POLICYID
Can be used when the POLICY name is too long or contains non-MF characters. The POLICYID can be found in the policy’s “More Details” accessed via the 3-dot menu. *This parameter is mutually exclusive with POLICY
Customize the SYSIN DD card with the input JSON with the edit information.

SYSIN parameters

All the parameters must be specified in lowercase format
Each specified block will overwrite the existing policy settings however when a block is not specified it won't be changed.

options - Optional

Retention

Parameter
Accepted values
Description
method
Only the "period" value
The retention method used for expiration
periodValue
Numeric value larger than 0
Sets the value of the expiration period
periodType
days|weeks|month|years
The type of the expiration value

criteria - Optional

addBy - Optional

Parameter
Accepted values
Description
Policy type
selectBy
"data set name" | "volume name" | "storage group name"
The general selection criteria type
Data set backup | Data set archive
selectBy
"data set name"
The general selection criteria type
Data set import
selectBy
"volume name" | "storage group name"
The general selection criteria type
Full dump
pattern
String array separated by commas
The main patterns used by the policy to scan and process
All

filters - Optional

Parameter
Accepted values
Description
Policy type
filterBy
"data set name" | "volume name" | "storage group name" | "data set is zfs" | "data set organization"
A filter criteria type
Data set backup | Data set archive
filterBy
"data set name" | "volume name"
A filter criteria type
Data set import
filterBy
"volume name" | "storage group name"
A filter criteria type
Full dump
filterType
"exclude" | "include only"
The exclude or include only the selected filter
All
pattern
String containing only one pattern or explicit resource name
The main patterns used by the policy to scan and process
All
For "data set is zfs" only filterType is required, specifying a pattern will cause the operation to be rejected
For "data set organization" only the filterType value "exclude" is supported

Edit policy examples

  • Backup policy edit operation with retention of 10 days, three add-by patterns, and two filters (one exclusion and one include only).
  • Backup policy edit operation with one add-by pattern excluding ZFS and all partitioned data sets.
  • Backup policy edit operation which clears all the filters and leaves all other settings as is.