Learn whether you can convert an assignable role to an assumable role in Vultr IAM. Understand the differences between the two role types and how to switch.
Yes. An assignable role can be converted to an assumable role and vice versa via the Vultr API using the Update Role endpoint. The permission policies bundled in the role are preserved during conversion, only the access pattern changes.
To convert a role, send a PUT request to /v2/roles/{id} with the role_type field set to either assignable or assumable:
$ curl -X 'PUT' 'https://api.vultr.com/v2/roles/{role_id}' \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{
"role_type": "assignable",
"max_session_duration": 7200
}'
The max_session_duration field is optional. If omitted, it defaults to 3,600 seconds (1 hour). When specified, the value must be between 900 seconds (15 minutes) and 43,200 seconds (12 hours).