Protect a resource.¶
Method¶
POST https://papi.afi.ai/api/v1/tenants/{tenant_id}/resources/{resource_id}/protect
Description¶
Assigns the specified policy to the resource. By default, a resource can have at most one policy.
Path params¶
|
tenant_id
string
required
Tenant that owns the resource. |
|
resource_id
string
required
ID of the resource to protect. External IDs are not supported here. |
Query params¶
|
policy_id
string
required
Policy ID to assign to the resource. |
curl -X POST \
-H 'Authorization: {api-key}' \
https://papi.afi.ai/api/v1/tenants/{tenant_id}/resources/{resource_id}/protect?policy_id={value}
Successful response (200) schema¶
|
object
ProtectResourceResult contains the job associated with a protection request. |
|
job_id
string
Job ID corresponding to the protection. |