DirectoryServiceData / Client / update_user
update_user#
- DirectoryServiceData.Client.update_user(**kwargs)#
Updates user information.
See also: AWS API Documentation
Request Syntax
response = client.update_user( ClientToken='string', DirectoryId='string', EmailAddress='string', GivenName='string', OtherAttributes={ 'string': { 'BOOL': True|False, 'N': 123, 'S': 'string', 'SS': [ 'string', ] } }, SAMAccountName='string', Surname='string', UpdateType='ADD'|'REPLACE'|'REMOVE' )
- Parameters:
ClientToken (string) –
A unique and case-sensitive identifier that you provide to make sure the idempotency of the request, so multiple identical calls have the same effect as one single call.
A client token is valid for 8 hours after the first request that uses it completes. After 8 hours, any request with the same client token is treated as a new request. If the request succeeds, any future uses of that token will be idempotent for another 8 hours.
If you submit a request with the same client token but change one of the other parameters within the 8-hour idempotency window, Directory Service Data returns an
ConflictException
.Note
This parameter is optional when using the CLI or SDK.
This field is autopopulated if not provided.
DirectoryId (string) –
[REQUIRED]
The identifier (ID) of the directory that’s associated with the user.
EmailAddress (string) – The email address of the user.
GivenName (string) – The first name of the user.
OtherAttributes (dict) –
An expression that defines one or more attribute names with the data type and value of each attribute. A key is an attribute name, and the value is a list of maps. For a list of supported attributes, see Directory Service Data Attributes.
Note
Attribute names are case insensitive.
(string) –
(dict) –
The data type for an attribute. Each attribute value is described as a name-value pair. The name is the AD schema name, and the value is the data itself. For a list of supported attributes, see Directory Service Data Attributes.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set:
BOOL
,N
,S
,SS
.BOOL (boolean) –
Indicates that the attribute type value is a boolean. For example:
"BOOL": true
N (integer) –
Indicates that the attribute type value is a number. For example:
"N": "16"
S (string) –
Indicates that the attribute type value is a string. For example:
"S": "S Group"
SS (list) –
Indicates that the attribute type value is a string set. For example:
"SS": ["sample_service_class/host.sample.com:1234/sample_service_name_1", "sample_service_class/host.sample.com:1234/sample_service_name_2"]
(string) –
SAMAccountName (string) –
[REQUIRED]
The name of the user.
Surname (string) – The last name of the user.
UpdateType (string) – The type of update to be performed. If no value exists for the attribute, use
ADD
. Otherwise, useREPLACE
to change an attribute value orREMOVE
to clear the attribute value.
- Return type:
dict
- Returns:
Response Syntax
{}
Response Structure
(dict) –
Exceptions
DirectoryServiceData.Client.exceptions.ResourceNotFoundException
DirectoryServiceData.Client.exceptions.AccessDeniedException
DirectoryServiceData.Client.exceptions.InternalServerException
DirectoryServiceData.Client.exceptions.ValidationException
DirectoryServiceData.Client.exceptions.DirectoryUnavailableException
DirectoryServiceData.Client.exceptions.ConflictException
DirectoryServiceData.Client.exceptions.ThrottlingException