Create a Storage Scan Policy
Use this endpoint to create a storage scan policy. After creating a policy, use the Apply Changes endpoint to update your tenant.
https://<tenant-name>.goskope.com/api/v1/storage_scan_policies/?token=<token>&op=create
Valid parameters include:
Key | Type | Value | Description |
---|---|---|---|
| string |
| Required. Operation performed. |
| string | Ex: | Required. Must be the name of an existing storage scan policy. |
| string |
| Required. The storage platform provider. |
| JSON array of object | AWS
GCP
| Optional. If explicit instances are used, and if DLP profiles are used in the policy, all the instances must have DLP service checked in the Instance setup. If explicit instances are used, and if Threat Protection profiles are used in the policy, all the instances must have Threat Protection service checked in the Instance setup. If blocklist is true => won't scan, return here; if allowlist is true => go to next conditional. |
| JSON array of object | AWS
GCP
| Optional. If explicit, this will be used to narrow down a scan to file events that match the conditional for object store attributes. The attributes listed here pertain to the container/store of objects. For example, for AWS it would be buckets, for Azure it would be StorageAccount etc. If blocklist is true => won't scan, return here; if allowlist is true => go to next conditional. |
| JSON array of object | AWS
GCP:
| Optional. If explicit, it will be used to narrow down a scan to file events that match the conditionals for object attributes. The attributes that are listed here correspond to objects or files. If blocklist is true => won't scan, return here; if allowlist is true => send for scan. |
| string | Array of strings | Optional. Must be an existing DLP profile name.
Cannot be used with |
| string | Array of strings | Required if Must be an existing Threat Protection profile name.
Cannot be used with |
| boolean |
| Required. Use |
| string |
| Optional. Determines how frequent to re-scan any resource (e.g. object), which can be used to manage scan costs. |
| object |
| Details for email notification. |
POST 'https://<tenant>/api/v1/storage_scan_policies?token=<token>op=create' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "policyName",
"cloud_provider": "aws",
"instanceConditional": {
...
},
"objectContainerConditional": {
...
},
"objectConditional": {
...
},
"dlp": {
"profileNames": [
"DLP Profile 1",
"DLP Profile 2"
]
},
"maxScanFrequency": "3h",
"action": "Alert",
"enabled": true,
"notify": {
"interval": "30",
"to_users": [
"admin"
],
"emails": [
"abc@netskope.com"
],
"from_user": "abc@netskope.com"
}
}'