Update a rule
Updates an existing policy rule.
Path Parameters
- rule_id string required
Performs the operation on the rule with the specified ID.
- application/json
Request Body
action object required
- condition string required
The following table describes the possible conditions for a rule.
Field Rule Condition Description aws_account_native_id $eq, $in Denotes the AWS account to conditionalize on {"aws_account_native_id":{"$eq":"111111111111"}}
{"aws_account_native_id":{"$in":["111111111111", "222222222222"]}}
aws_region $eq, $in Denotes the AWS region to conditionalize on {"aws_region":{"$eq":"us-west-2"}}
{"aws_region":{"$in":["us-west-2", "us-east-1"]}}
aws_tag $eq, $in, $all, $contains, $not_eq, $not_in, $not_all, $not_contains Denotes the AWS tag(s) to conditionalize on. Max 100 tags allowed in each rule and tag key can be upto 128 characters and value can be upto 256 characters long. {"aws_tag":{"$eq":{"key":"Environment", "value":"Prod"}}}
{"aws_tag":{"$in":[{"key":"Environment", "value":"Prod"}, {"key":"Hello", "value":"World"}]}}
{"aws_tag":{"$all":[{"key":"Environment", "value":"Prod"}, {"key":"Hello", "value":"World"}]}}
{"aws_tag":{"$contains":{"key":"Environment", "value":"Prod"}}}
{"aws_tag":{"$not_eq":{"key":"Environment", "value":"Prod"}}}
{"aws_tag":{"$not_in":[{"key":"Environment", "value":"Prod"}, {"key":"Hello", "value":"World"}]}}
{"aws_tag":{"$not_all":[{"key":"Environment", "value":"Prod"}, {"key":"Hello", "value":"World"}]}}
{"aws_tag":{"$not_contains":{"key":"Environment", "value":"Prod"}}}
entity_type $eq, $in Denotes the AWS entity type to conditionalize on. (Required) {"entity_type":{"$eq":"aws_rds_instance"}}
{"entity_type":{"$in":["aws_rds_instance", "aws_ebs_volume", "aws_ec2_instance","aws_dynamodb_table", "aws_rds_cluster"]}}
- name string required
Name of the rule. Max 100 characters.
priority object
Responses
- 200
- default
Success
- application/api.clumio.policy-rules=v1+json
- Schema
- Example (from schema)
Schema
_links object
rule object
- 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"
}
},
"rule": {
"_embedded": {},
"_links": {
"_self": {
"href": "string",
"templated": true,
"type": "string"
},
"delete-policy-rule": {
"href": "string",
"templated": true,
"type": "string"
},
"read-policy-definition": {
"href": "string",
"templated": true,
"type": "string"
},
"update-policy-rule": {
"href": "string",
"templated": true,
"type": "string"
}
},
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"id": "string",
"name": "string",
"organizational_unit_id": "string",
"priority": {
"before_rule_id": "string"
}
},
"task_id": "string"
}
Error
- application/json
- Schema
- Example (from schema)
Schema
errors object[]
{
"errors": [
{
"error_code": 0,
"error_message": "string"
}
]
}
PUT /policies/rules/:rule_id
Authorization
Request
Request
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'
curl -L -X PUT 'https://us-west-2.api.clumio.com/policies/rules/:rule_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/api.clumio.policy-rules=v1+json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"action": {
"assign_policy": {
"policy_id": "string"
}
},
"condition": "string",
"name": "string",
"priority": {
"before_rule_id": "string"
}
}'