Remediation Update Policy

Remediation Update Policy

This API is used for updating a remediation rule or policy. Update API expects all parameters retrived via get API. Fields "policy_name", "created_on" and "last_updated" are read-only and can't be updated. Any missing non mandatory field in udpate request, will be set to default values.

Request
URI
PUT
https://{api_host}/tcsa.host.com/policy/{policy_name}
COPY
Path Parameters
string
policy_name
Required

Unique id, to indentify the user-preference


Request Body
RemediationPolicy of type(s) application/json
Required

Show optional properties

{
    "action_name": "slack_action",
    "events": [
        {
            "class": "KubernetesPod",
            "name": "Failed",
            "type": "event"
        }
    ],
    "policy_name": "CheckManualFilterPolicy1",
    "policy_type": "manual"
}
{
    "policy_name": "string",
    "policy_type": "manual",
    "action_name": "string",
    "action_params": "string",
    "events": [
        {}
    ],
    "conditions": [
        {}
    ],
    "created_on": "string",
    "last_updated": "string"
}
string
policy_name
Required

remediation rule name

string
policy_type
Required

either manual or automated

string
action_name
Required

Name of the remediation action

string
action_params
Optional

optional field for multi event rules

array of object
events
Required

JSON list of dicts containing class, name and type fields.

array of object
conditions
Optional

JSON list of dicts containing propName, operation and propValue fields.

string
created_on
Optional

rule creation timestamp

string
last_updated
Optional

rule last update timestamp

Authentication
This operation uses the following authentication methods.
Responses
201

Created

Returns RemediationPolicy of type(s) application/json
{
    "action_name": "slack_action",
    "action_params": "",
    "conditions": [
        {
            "operation": "equals",
            "propName": "Active",
            "propValue": "true"
        }
    ],
    "created_on": "21 Nov, 2022, 00:42:45 UTC",
    "description": "check servertools filterset",
    "events": [
        {
            "class": "KubernetesPod",
            "name": "Failed",
            "type": "event"
        }
    ],
    "last_updated": "21 Nov, 2022, 00:42:45 UTC",
    "policy_name": "CheckManualFilterPolicy1",
    "policy_type": "manual"
}
string
policy_name
Required

remediation rule name

string
policy_type
Required

either manual or automated

string
action_name
Required

Name of the remediation action

string
action_params
Optional

optional field for multi event rules

array of object
events
Required

JSON list of dicts containing class, name and type fields.

array of object
conditions
Optional

JSON list of dicts containing propName, operation and propValue fields.

string
created_on
Optional

rule creation timestamp

string
last_updated
Optional

rule last update timestamp


400

Invalid Request sent by the user

Operation doesn't return any data structure

404

resouce not found

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure