Set policy assignments
Assign (or unassign) policies on up to 100 entities. This endpoint returns a task ID and queues a task in the background to execute the request. Use the task ID to monitor task completion.
- application/json
Request Body
items object[]
Items are inputs that represent the list of assets to which a policy is to be assigned or unassigned.
action string requiredPossible values: [
assign
,unassign
]The action to be executed by this request. Possible values include "assign" and "unassign".
entity object required
An entity being assigned or unassigned a policy.
id string requiredA system-generated ID assigned of an entity being assigned or unassigned to a policy.
type string requiredPossible values: [
aws_ebs_volume
,aws_ec2_instance
,aws_rds_cluster
,aws_rds_instance
,aws_dynamodb_table
,protection_group
]The type of an entity being associated or disassociated with a policy. Valid primary entity types include the following:
Primary Entity Type Details aws_ebs_volume AWS EBS volume. aws_ec2_instance AWS EC2 instance. aws_rds_cluster AWS RDS cluster. aws_rds_instance AWS RDS instance. aws_dynamodb_table AWS DynamoDB table. protection_group Protection group. policy_id stringThe Clumio-assigned ID of the policy to be applied to the requested entities. If
action: assign
, then this parameter is required. Otherwise, it must not be provided.
- 202
- default
Success
- application/api.clumio.policy-assignments=v1+json
- Schema
- Example (from schema)
Schema
_links object
URLs to pages related to the resource.
_self object
The HATEOAS link to this resource.
href stringThe URI for the referenced operation.
templated booleanDetermines whether the "href" link is a URI template. If set to
true
, the "href" link is a URI template.type stringThe HTTP method to be used with the "href" link for the referenced operation.
read-task object
A HATEOAS link to the task associated with this resource.
href stringThe URI for the referenced operation.
templated booleanDetermines whether the "href" link is a URI template. If set to
true
, the "href" link is a URI template.type stringThe HTTP method to be used with the "href" link for the referenced operation.
- task_id string
The Clumio-assigned ID of the task generated by this request.
{
"_links": {
"_self": {
"href": "string",
"templated": true,
"type": "string"
},
"read-task": {
"href": "string",
"templated": true,
"type": "string"
}
},
"task_id": "string"
}
Error
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
A list of errors encountered during runtime.
error_code uint32error_message stringThe reason for the error.
{
"errors": [
{
"error_code": 0,
"error_message": "string"
}
]
}