top of page

Nexfs Management API Documentation

Method Index

AttachUserRole

Attach a Role to a User Account using the Nexfs Management API


Action: AttachUserRole

Attaches a Role to a User account


Permissions

A requesting session must have the iam/UpdateUsers role enabled

Request Parameters

A request must be made against the nexfs management console api with the AttachUserRole action.

The request must be signed with a valid AWS V4 style Signature using an active temporary session security token.


Action

AttachUserRole


UserId

The Users Id (The account id/name used for that user to authenticate against the API)


RoleName

The name of the Role to be attached to the UserId


RoleType

A type of role (string) to be created, either "iam" or "user".

Set "iam" for nexfs managment roles or "user" for content (S3) user roles


Request Body

The request does not have a request body.


Response Syntax


HTTP1/1 200

<?xml version="1.0" encoding="UTF-8"?>

<RequestCompleted>

<Code>string</Code>

<AttachUserRoleResponse>

<ResponseMetadata>

<RequestId>integer</RequestId>

</ResponseMetadata>

</AttachUserRoleResponse>

<Resource>string</Resource>

</RequestCompleted>


Response Elements

If the action is successful, the service sends back an HTTP 200 response.


The following data is returned in XML format by the service.

RequestCompleted

Root Level tag for the successful AttachUserRole Session response

Code

OK


AttachUserRoleResponse

A section label with contains the detach user role response details

ResponseMetadata

A section label with makes the start of the response metadata

RequestId

A RequestId number that identifies the request made against the management api


Resource

/nexfsconsoleapi

Errors

Also See Rest Error Responses


400 BadRequest The request was Malformed

A BadRequest will be returned if UserID or RoleName is missing from the request

401 Unauthorized The request cannot be authenticated

403 Forbidden Session does not have the rights to perform the requested action


409 NoSuchEntity No user exists with the request userid

409 NoSuchEntity No role exists with the request rolename


500 InternalServerError An Internal Error was encountered

507 LimitExceeded The request was rejected because it attempted to create resources beyond the current account limits

Example Request

GET http://nexfs.example.com:9200/nexfsconsoleapi?Action=AttachUserRole&RoleName=Example%20Role%20Update&RoleType=iamUserId=ExampleUser

Authorization: AWS4-HMAC-SHA256 Credential=ad3ef4a51dc742208b5b4fc9d80d9756/20220831/nexfs/nexfsconsoleapi/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=f35eb390210d04e985e917dbf535542427442e6d6e15ea2be717debad20b589b

host: nexfs.example.com

x-amz-date: 20220831T153945Z

Example Response


<?xml version="1.0" encoding="UTF-8"?>

<RequestCompleted>

<Code>Ok</Code>

<AttachUserRoleResponse>

<ResponseMetadata>

<RequestId>117</RequestId>

</ResponseMetadata>

</AttachUserRoleResponse>

<Resource>/nexfsconsoleapi</Resource>

</RequestCompleted>






bottom of page