update_user
¶
update_user(
organization_id: OrganizationId,
user_id: EntityIdentifier,
*,
config_overrides: Optional[WorkMailClientConfig] = None,
role: Optional[UserRole] = None,
display_name: Optional[UserAttribute] = None,
first_name: Optional[UserAttribute] = None,
last_name: Optional[UserAttribute] = None,
hidden_from_global_address_list: Optional[BooleanObject] = None,
initials: Optional[UserAttribute] = None,
telephone: Optional[UserAttribute] = None,
street: Optional[UserAttribute] = None,
job_title: Optional[UserAttribute] = None,
city: Optional[UserAttribute] = None,
company: Optional[UserAttribute] = None,
zip_code: Optional[UserAttribute] = None,
department: Optional[UserAttribute] = None,
country: Optional[UserAttribute] = None,
office: Optional[UserAttribute] = None,
identity_provider_user_id: Optional[IdentityProviderUserIdForUpdate] = None,
) -> UpdateUserResponse
Updates data for the user. To have the latest information, it must be preceded by a DescribeUser call. The dataset in the request should be the one expected when performing another DescribeUser call.
Parameters:
-
organization_id(OrganizationId) –The identifier for the organization under which the user exists.
-
user_id(EntityIdentifier) –The identifier for the user to be updated.
The identifier can be the UserId, Username, or email. The following identity formats are available:
-
User ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234
-
Email address: [email protected]
-
User name: user
-
-
role(Optional[UserRole], default:None) –Updates the user role.
You cannot pass SYSTEM_USER or RESOURCE.
-
display_name(Optional[UserAttribute], default:None) –Updates the display name of the user.
-
first_name(Optional[UserAttribute], default:None) –Updates the user's first name.
-
last_name(Optional[UserAttribute], default:None) –Updates the user's last name.
-
hidden_from_global_address_list(Optional[BooleanObject], default:None) –If enabled, the user is hidden from the global address list.
-
initials(Optional[UserAttribute], default:None) –Updates the user's initials.
-
telephone(Optional[UserAttribute], default:None) –Updates the user's contact details.
-
street(Optional[UserAttribute], default:None) –Updates the user's street address.
-
job_title(Optional[UserAttribute], default:None) –Updates the user's job title.
-
city(Optional[UserAttribute], default:None) –Updates the user's city.
-
company(Optional[UserAttribute], default:None) –Updates the user's company.
-
zip_code(Optional[UserAttribute], default:None) –Updates the user's zip code.
-
department(Optional[UserAttribute], default:None) –Updates the user's department.
-
country(Optional[UserAttribute], default:None) –Updates the user's country.
-
office(Optional[UserAttribute], default:None) –Updates the user's office.
-
identity_provider_user_id(Optional[IdentityProviderUserIdForUpdate], default:None) –User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.
Raises:
-
DirectoryServiceAuthenticationFailedException–The directory service doesn't recognize the credentials supplied by WorkMail.
-
DirectoryUnavailableException–The directory is unavailable. It might be located in another Region or deleted.
-
EntityNotFoundException–The identifier supplied for the user, group, or resource does not exist in your organization.
-
EntityStateException–You are performing an operation on a user, group, or resource that isn't in the expected state, such as trying to delete an active user.
-
InvalidParameterException–One or more of the input parameters don't match the service's restrictions.
-
OrganizationNotFoundException–An operation received a valid organization identifier that either doesn't belong or exist in the system.
-
OrganizationStateException–The organization must have a valid state to perform certain operations on the organization or its members.
-
UnsupportedOperationException–You can't perform a write operation against a read-only directory.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_workmail/_services/work_mail.py
6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 | |