Update Roles To Entity

Update Roles To Entity
Replace the roles assigned to a user or group

Overwrites the set of roles held by the entity identified by binding-id with the roles provided in the request body. This is a full replacement, not a merge - any role currently held but omitted from the request is removed.

Request
URI
PUT
https://{api_host}/sspi/iam/role-bindings/{binding-id}
COPY
Path Parameters
string
binding-id
Required  

The id of the role binding to update, as returned by GET /iam/role-bindings.


Request Body
RoleBinding of type(s) application/json
Required  
This request body class requires all of the following: ManagedResource , InlineRoleBinding1
{
    "entity_name": "[email protected]",
    "user_type": "REMOTE_USER",
    "roles": [
        {
            "role": "SUPPORT_BUNDLE_COLLECTOR"
        },
        {
            "role": "AUDITOR"
        }
    ],
    "_revision": 3
}
Authentication
This operation uses the following authentication methods.
Responses
200

The role binding was updated successfully.

Returns RoleBinding of type(s) application/json
This response body class contains all of the following: ManagedResource , InlineRoleBinding1
{
    "_create_user": "string",
    "_create_time": 0,
    "_last_modified_user": "string",
    "_last_modified_time": 0,
    "_revision": 0,
    "_resource_type": "string",
    "_system_owned": false,
    "id": "string",
    "display_name": "string",
    "description": "string",
    "site_ids": [
        "string"
    ],
    "entity_name": "string",
    "user_type": "string",
    "roles": [
        {
            "role": "string",
            "display_name": "string"
        }
    ]
}

400

Bad Request

Returns BadRequest of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


401

Unauthorized

Returns Unauthorized of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


403

Forbidden

Returns Forbidden of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


409

The role binding was modified by another request since it was last read. Re-fetch the binding via GET /iam/role-bindings/{binding-id} and retry with its current state.

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


412

Precondition Failed

Returns PreconditionFailed of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


428

Precondition Required

Returns PreconditionRequired of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


429

Too Many Requests

Returns TooManyRequests of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


default

4XX and 5XX type errors with appropriate message

Returns Error of type(s) application/json
{
    "error_code": 0,
    "module_name": "string",
    "error_message": "string"
}
integer
error_code
Required  

HTTP Status or Application error code.

string
module_name
Optional

Module where the error happened.

string
error_message
Required  

Message describing the error.


Code Samples
COPY
                    curl -X PUT -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"entity_name":"string","roles":["object"]}' https://{api_host}/sspi/iam/role-bindings/{binding-id}