Cloud Security Policies
Manage security policies that define which rules apply to which assets.
Create a new cloud security policy.
Name of the policy
Description of the policy
Labels associated with the policy
Type of rule matching for the policy
Rule filter for the policy, required if rule_matching_type is RULE_FILTER
List of rule IDs, required if rule_matching_type is RULES
Type of asset matching for the policy
List of asset group IDs, required if asset_matching_type is ASSET_GROUPS
List of cloud account IDs associated with the policy
Whether the policy is enabled or not
truePolicy created successfully
method of selecting the applicable rules for this policy
present if Rule Matching Type is RULE_FILTER
present if Rule Matching Type is RULES
method of selecting the assets in scope for this policy
present if Asset Matching Type is ASSET_GROUPS
present if Asset Matching Type is CLOUD_ACCOUNTS
whether the policy is built-in (DEFAULT) or user-created (CUSTOM)
in Unix epoch milliseconds
in Unix epoch milliseconds
Bad Request
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
POST /public_api/v1/policy HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 791
{
"name": "API Request with rule_matching_type RULE_FILTER",
"description": "API Request with rule_matching_type RULE_FILTER",
"labels": [
"vm_automation"
],
"rule_matching_type": "RULE_FILTER",
"associated_rule_filter": {
"AND": [
{
"OR": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "low"
},
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "medium"
}
]
},
{
"OR": [
{
"SEARCH_FIELD": "cloudType",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "aws"
},
{
"SEARCH_FIELD": "cloudType",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "azure"
}
]
},
{
"SEARCH_FIELD": "labels",
"SEARCH_TYPE": "ARRAY_CONTAINS",
"SEARCH_VALUE": "test"
},
{
"SEARCH_FIELD": "complianceStandards",
"SEARCH_TYPE": "ARRAY_CONTAINS",
"SEARCH_VALUE": "Australian Energy Sector Cyber Security Framework (AESCSF)"
}
]
},
"asset_matching_type": "ALL_ASSETS",
"enabled": true
}{
"id": "5988e7f2-ed6a-40cf-98b4-a05175f0db53",
"name": "Automation policy rule filter with all assets",
"description": "Test policy rule filter with all assets",
"labels": [
"vm_automation"
],
"rule_matching_type": "RULE_FILTER",
"associated_rule_filter": {
"AND": [
{
"OR": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "low"
},
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "medium"
}
]
},
{
"OR": [
{
"SEARCH_FIELD": "cloudType",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "aws"
},
{
"SEARCH_FIELD": "cloudType",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "azure"
}
]
},
{
"SEARCH_FIELD": "labels",
"SEARCH_TYPE": "ARRAY_CONTAINS",
"SEARCH_VALUE": "test"
}
]
},
"asset_matching_type": "ALL_ASSETS",
"enabled": true,
"mode": "CUSTOM",
"creation_time": 1678886400000,
"created_by": "mock_user",
"modification_time": 1678886400000,
"modified_by": "mock_user"
}Get all cloud security policies.
Filter for policies
Start index for pagination
0End index for pagination
50Successful Response
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
POST /public_api/v1/policy/search HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 281
{
"filter": {
"AND": [
{
"SEARCH_FIELD": "id",
"SEARCH_TYPE": "CONTAINS",
"SEARCH_VALUE": "b2b1279e-8760-44a8-8dca-bcc4508f8ce7"
},
{
"SEARCH_FIELD": "name",
"SEARCH_TYPE": "CONTAINS",
"SEARCH_VALUE": "Cloud Posture Security"
}
]
},
"search_from": 0,
"search_to": 50,
"sort": [
{
"FIELD": "name",
"ORDER": "ASC"
}
]
}{
"data": [
{
"id": "b2b1279e-8760-44a8-8dca-bcc4508f8ce7",
"name": "Default Cloud Posture Security Policy",
"description": "Comprehensive default security policy that identifies risks across you entire cloud security estate. It leverages best practices to scan and detect attack paths, misconfigurations, vulnerabilities, identity risks, data risks, network exposures, and other security gaps across your cloud infrastructure and applications, enabling proactive management and mitigation of cloud security risks.",
"labels": [
"prisma_cloud"
],
"rule_matching_type": "RULE_FILTER",
"associated_rule_filter": {
"OR": [
{
"AND": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "critical"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "high"
}
]
}
]
},
"asset_matching_type": "ALL_ASSETS",
"enabled": true,
"mode": "DEFAULT",
"creation_time": 1732557301240,
"created_by": "Palo Alto Networks",
"modification_time": 1732557301240,
"modified_by": "Palo Alto Networks"
}
],
"metadata": {
"total_count": 5,
"filter_count": 1
}
}Get a cloud security policy by ID.
Successful Response
method of selecting the applicable rules for this policy
present if Rule Matching Type is RULE_FILTER
present if Rule Matching Type is RULES
method of selecting the assets in scope for this policy
present if Asset Matching Type is ASSET_GROUPS
present if Asset Matching Type is CLOUD_ACCOUNTS
whether the policy is built-in (DEFAULT) or user-created (CUSTOM)
in Unix epoch milliseconds
in Unix epoch milliseconds
Unauthorized
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
GET /public_api/v1/policy/{policy_id} HTTP/1.1
Accept: */*
{
"id": "b2b1279e-8760-44a8-8dca-bcc4508f8ce7",
"name": "Default Cloud Posture Security Policy",
"description": "Comprehensive default security policy that identifies risks across you entire cloud security estate. It leverages best practices to scan and detect attack paths, misconfigurations, vulnerabilities, identity risks, data risks, network exposures, and other security gaps across your cloud infrastructure and applications, enabling proactive management and mitigation of cloud security risks.",
"labels": [
"prisma_cloud"
],
"rule_matching_type": "RULE_FILTER",
"associated_rule_filter": {
"OR": [
{
"AND": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "critical"
}
]
},
{
"AND": [
{
"SEARCH_FIELD": "severity",
"SEARCH_TYPE": "EQ",
"SEARCH_VALUE": "high"
}
]
}
]
},
"asset_matching_type": "ALL_ASSETS",
"enabled": true,
"mode": "DEFAULT",
"creation_time": 1732557301240,
"created_by": "Palo Alto Networks",
"modification_time": 1732557301240,
"modified_by": "Palo Alto Networks"
}Delete an existing cloud security policy by ID.
Successful Response
No content
Bad Request
Unauthorized
Forbidden
Not Found
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
DELETE /public_api/v1/policy/{policy_id} HTTP/1.1
Accept: */*
No content
Modify an existing cloud security policy by ID.
method of selecting the applicable rules for this policy
required if Rule Matching Type is RULE_FILTER
required if Rule Matching Type is RULES
method of selecting the assets in scope for this policy
required if Asset Matching Type is ASSET_GROUPS
required if Asset Matching Type is CLOUD_ACCOUNTS
Successful Response
method of selecting the applicable rules for this policy
present if Rule Matching Type is RULE_FILTER
present if Rule Matching Type is RULES
method of selecting the assets in scope for this policy
present if Asset Matching Type is ASSET_GROUPS
present if Asset Matching Type is CLOUD_ACCOUNTS
whether the policy is built-in (DEFAULT) or user-created (CUSTOM)
in Unix epoch milliseconds
in Unix epoch milliseconds
Unauthorized
Forbidden
Not Found
Conflict
Unprocessable Content
Too Many Requests
Internal Server Error
Bad Gateway
Service Unavailable
PATCH /public_api/v1/policy/{policy_id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 386
{
"name": "API Request with rule_matching_type RULES",
"description": "API Request with rule_matching_type RULES",
"labels": [
"prisma_cloud"
],
"rule_matching_type": "RULES",
"associated_rule_ids": [
"60cf2495-32a5-401f-ba56-6bbbf80fe1e2",
"3c16e31e-1421-4a25-854e-e5870093c99f"
],
"asset_matching_type": "CLOUD_ACCOUNTS",
"associated_cloud_account_ids": [
"hvenkatesan-2",
"883588134481"
],
"enabled": false
}{
"id": "b2b1279e-8760-44a8-8dca-bcc4508f8ce6",
"name": "API Request with rule_matching_type RULES",
"description": "API Request with rule_matching_type RULES",
"labels": [
"prisma_cloud"
],
"rule_matching_type": "RULES",
"associated_rule_ids": [
"60cf2495-32a5-401f-ba56-6bbbf80fe1e2",
"3c16e31e-1421-4a25-854e-e5870093c99f"
],
"asset_matching_type": "CLOUD_ACCOUNTS",
"associated_cloud_account_ids": [
"hvenkatesan-2",
"883588134481"
],
"enabled": false,
"mode": "DEFAULT",
"creation_time": 1732557301240,
"created_by": "Palo Alto Networks",
"modification_time": 1732557301240,
"modified_by": "Palo Alto Networks"
}Last updated
Was this helpful?
