Changes user password(s) and/or access string.
Parameters:
-
user_name
(UserName)
–
-
authentication_mode
(Optional[AuthenticationMode], default:
None
)
–
Denotes the user's authentication properties, such as whether it requires a password to authenticate.
-
access_string
(Optional[AccessString], default:
None
)
–
Access permissions string used for this user.
Raises:
Source code in docs_src/capo_memorydb/_services/memory_db.py
| def update_user(
self,
user_name: "capo_memorydb.types.user_name.UserName",
*,
config_overrides: Optional[MemoryDBClientConfig] = None,
authentication_mode: Optional[
"capo_memorydb.types.authentication_mode.AuthenticationMode"
] = None,
access_string: Optional[
"capo_memorydb.types.access_string.AccessString"
] = None,
) -> "capo_memorydb.types.update_user_response.UpdateUserResponse":
"""<p>Changes user password(s) and/or access string.</p>
Args:
user_name: <p>The name of the user</p>
authentication_mode: <p>Denotes the user's authentication properties, such as whether it requires a password to authenticate.</p>
access_string: <p>Access permissions string used for this user.</p>
Raises:
capo_memorydb.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: <p>The specified parameter combination is not valid.</p>
capo_memorydb.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>The specified parameter value is not valid.</p>
capo_memorydb.errors.invalid_user_state_fault.InvalidUserStateFault: <p>The user is not in a valid state for the requested operation.</p>
capo_memorydb.errors.user_not_found_fault.UserNotFoundFault: <p>The specified user does not exist.</p>
capo_memorydb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_memorydb.types.update_user_request.UpdateUserRequest]",
) -> OperationResponse[
"capo_memorydb.types.update_user_response.UpdateUserResponse"
]:
import capo_memorydb._operations.amazon_memory_db.update_user
output, http_response = (
capo_memorydb._operations.amazon_memory_db.update_user.update_user(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateUser")
)
input_: capo_memorydb.types.update_user_request.UpdateUserRequest = {
"user_name": user_name
}
if authentication_mode is not None:
input_["authentication_mode"] = authentication_mode
if access_string is not None:
input_["access_string"] = access_string
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|