Skip to content

Update User Policies

Request

Updates policies by user ID.

Security
ApiKeyAuth
Path
user_idinteger(UserId)required
Example:123
Bodyapplication/json
policy_idsArray of stringsrequired
Example:
[ "1", "2", "42" ]
curl -i -X PATCH \
  https://api.treasuredata.com/v3/access_control/users/123/policies \
  -H 'Authorization: TD1 <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "policy_ids": [
      "1",
      "2",
      "42"
    ]
  }'

Responses

OK

Bodyapplication/json
Array [
idinteger(AccessControlPolicyId)required
Example:67
account_idinteger(AccountId)required
Example:123
namestringrequired

Policy's name

Example:"some_policy"
descriptionstring

Policy's description

Example:"written about the policy"
user_countinteger

The number of users which the policy attaches to

Example:3
]
Response
[ { "id": 67, "account_id": 123, "name": "some_policy", "description": "written about the policy", "user_count": 3 } ]