---
title: "Update a User's IAM role"
method: PUT
path: "/user/{id}"
tags: ["user"]
---

# Update a User's IAM role

`PUT /user/{id}`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/user/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/user/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `role` IamRole: IAM Role
    - `description` string: IAM Role description
    - `labels` Labels
    - `permissions` string[]: IAM Role permissions
    - `assume-role-policy` IamAssumeRolePolicy: Assume Role Policy
      - `rules` IamServicePolicyRule[]: IAM Assume Role Policy rules
        - `action` 'allow' | 'deny'
        - `expression` string
        - `resources` string[]
    - `editable` boolean: IAM Role mutability
    - `name` string: IAM Role name
    - `max-session-ttl` integer: Maximum TTL requester is allowed to ask for when assuming a role
    - `policy` IamPolicy: Policy
      - `default-service-strategy` 'allow' | 'deny', required: IAM default service strategy
      - `services` object, required: IAM services
    - `id` string, uuid: IAM Role ID

## Response `200`

200

- Operation: Operation
  - `id` string, uuid: Operation ID
  - `reason` 'incorrect' | 'unknown' | 'unavailable' | 'forbidden' | 'busy' | 'fault' | 'partial' | 'not-found' | 'interrupted' | 'unsupported' | 'conflict': Operation failure reason
  - `reference` object: Related resource reference
    - `id` string, uuid: Reference ID
    - `link` string: Link to the referenced resource
    - `command` string: Command name
  - `message` string: Operation message
  - `state` 'failure' | 'pending' | 'success' | 'timeout': Operation status

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
