Update Serverless Vulnerability Policy
PUT/api/v31.02/policies/vulnerability/serverless
x-prisma-cloud-target-env: {"permission":"policyServerless","saas":true,"self-hosted":true}
x-public: true
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
- 200
- default
OK