Skip to main content

Update Serverless Vulnerability Policy

PUT 

/api/v32.07/policies/vulnerability/serverless

x-prisma-cloud-target-env: {"permission":"policyServerless"}

Updates the vulnerability policy for serverless functions situated in your cloud provider's infrastructure. All rules in the policy are updated in a single shot.

This endpoint maps to the policy table in Defend > Vulnerabilities > Functions in the Console UI.

cURL Request

Refer to the following example cURL command that overwrites all rules in your current policy with a new policy that has a single rule:

$ curl -k 'https://<CONSOLE>/api/v<VERSION>/policies/vulnerability/serverless' \
-X PUT \
-u <USER> \
-H 'Content-Type: application/json' \
-d \
'{
"rules": [
{
"name": "<RULE_NAME>",
"collections": [
{
"name":"<COLLECTION_NAME>"
}
],
"alertThreshold": {
"value": 1,
"disabled": false
}
}
],
"policyType": "serverlessVulnerability"
}'

Note: No response will be returned upon successful execution.

Request

Responses

OK