Delete a role trust from a Vultr IAM role. Remove the trust relationship to prevent specified users, groups, or issuers from assuming the role going forward.
Deleting a role trust removes the trust relationship, preventing the trusted entity from assuming the role. The role itself is not deleted. The trust can be restored using the Restore Role Trust endpoint if you have its id.
This guide explains how to delete a role trust using the Vultr API.
Send a GET request to the List Role Trusts endpoint to retrieve all role trusts in your organization.
$ curl "https://api.vultr.com/v2/role-trusts" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the role trust you want to delete.
Send a DELETE request to the Delete Role Trust endpoint to delete the trust. Replace {role-trust-id} with the id of the role trust you want to delete.
$ curl "https://api.vultr.com/v2/role-trusts/{role-trust-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
A successful deletion returns an HTTP 204 No Content response with no response body.
Send a GET request to the List Role Trusts endpoint to retrieve all role trusts.
$ curl "https://api.vultr.com/v2/role-trusts" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Verify that the deleted trust no longer appears in the list.