PUT /compliancePolicies
Use this method to modify or export a firmware-update compliance policy.
Authentication
Authentication with username and password is required.
Request URL
PUT https://{management_server_IP}/compliancePolicies
Query parameters
Parameters | Required / Optional | Description |
---|---|---|
action={action} | Required | Action type. This can be one of the following values.
|
PUT https://192.0.2.0/compliancePolicies?type=edit
Request body
Attributes Required / Optional Type Description policy Required Object Information about the compliance policy action Required String Action to take. This is always edit. description Optional String Compliance policy description details Optional Array of objects Details about the compliance policy baseVersion Optional String For CMMs or switches, this is the fix ID of the package. For servers, the following is returned.
xxxx_utl_uxsp_xxxxxx-1.00_xxxx_32-64
components Optional Array of objects Information about each firmware component isDefault Required String Specifies if the component update is the default component (the latest component update). This can be one of the following values.
- yes. This firmware component is the default.
- no. This firmware component is not the default.
name Required String Component name rule Required String Rule for raising a non-compliant alert. This can be one of the following values.
- alertIfNotExactMatch. Show non-compliance when the installed version on device does not exactly match the compliance target.
- alertIfDownlevel. Show non-compliance when the installed version on device is earlier than the compliance target.
- noAlerting. Never show non-compliance.
targetVersion Required String Firmware level that is the baseline for the specified device type type Required String (Servers only) Package type. This can be one of the following values.
- IMM
- IMM
- UEFI
- UEFI-Backup
id Optional String System type used to identify the CMM. Internal use only isDefault Optional String Indicates if the update package is the default package (the latest package). This can be one of the following values.
yes. This is the default update package
no. This is not the default update package
isUXSP Optional String Indicates if this update package is a UXSP package. This can be one of the following values.
yes. This is a UXSP package
no. This is not a UXSP package
rule Optional String Rule for raising a non-compliant alert. This can be one of the following values.
- alertIfNotExactMatch. Show non-compliance when the installed version on device does not exactly match the compliance target.
- alertIfDownlevel. Show non-compliance when the installed version on device is earlier than the compliance target.
- noAlerting. Never show non-compliance.
- custom. Follow the detailed rules of each firmware component.
systemType Optional String Type of device for which the policy applies filterType Optional String Filter type. This can be one of the following values.
all. All supported machine types
managed. Only managed machine types.
name Optional String Compliance policy name oldPolicyName Optional String updateRule Optional String Internal use only user Optional String Name of the user that created the policy The following example modifies a compliance policy when the query parameter action=edit is specified.
{
"policy": {
"action": "edit",
"description": "",
"details": [{
"baseVersion": "lnvgy_fw_cmm_1aon12a-1.5.0a_anyos_noarch",
"components": [],
"id": "8721_Lenovo",
"isDefault": "yes",
"isUXSP": "no",
"rule": "alertIfDownlevel",
"systemType": "8721"
}],
"filterType": "managed",
"name": "Test11",
"oldPolicyName": "Test11",
"updateRule": "",
"user": "USERID"
}
}
Attributes Required / Optional Type Description export Required String List of names of the compliance policies to be exported, separate by a comma. To obtain a list of compliance policy names, use the GET /compliancePolicies method. The following example deletes four compliance policies only if those policies are not in theAssignedstate when the query parameter action=export is specified
{
"export": "test, Copy-test, Copy-Copy-test"
}
Response codes
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
400 | Bad Request | A query parameter or request attribute is missing or not valid, or the operation is not supported. A descriptive error message is returned in the response body. |
403 | Forbidden | The orchestrator server was prevented from fulfilling the request. A descriptive error message is returned in the response body. Ensure that you have privileges to perform the request. |
409 | Conflict | There is a conflict with the current state of the resource. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
Attributes Type Description {message_attributes} varies Status messages (see Status messages) The result attribute can be one of the following values.
informational. The request completed successfully.
minor. The request failed with a minor issue.
major. The request failed with a major issue.
The following example is returned if the request is successful.
{
"result": "informational",
"messages": [{
"id": "FQXHMUP3006I",
"text": "Policy operation completed successfully."
}]
}
Attributes Type Description exportURL String Zip file name of exported files result String Results of the request. This can be one of the following values.
- informational. The request completed successfully.
success String Results of the request. This can be one of the following values.
- success. The request completed successfully.
- failed. The request failed. A descriptive error message was returned.
messages Array Information about one or more messages explanation String Additional information to clarify the reason for the message id String Message identifier of a returned message recovery Array Recovery information text String User actions that can be taken to recover from the event URL String Link to the help system for more information, if available text String Message text associated with the message identifier The following example is returned when compliance policies were exported successfully.
{
"exportURL": "policies2016042517245649.zip",
"success": "success",
"result": "informational",
"messages": [{
"id": "FQXHMUP3031I",
"text": "Policy export completed successfully."
}]
}
Attributes Type Description jobid Integer Job ID The following example is returned when compliance policies were exported successfully.
{
"jobid": "1027"
}