update_signing_certificate
async
¶
update_signing_certificate(
certificate_id: certificateIdType,
status: statusType,
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
user_name: Optional[existingUserNameType] = None,
) -> None
Changes the status of the specified user signing certificate from active to disabled, or vice versa. This operation can be used to disable an IAM user's signing certificate as part of a certificate rotation work flow.
If the UserName field is not specified, the user name is determined implicitly based on the Amazon Web Services access key ID used to sign the request. This operation works for access keys under the Amazon Web Services account. Consequently, you can use this operation to manage Amazon Web Services account root user credentials even if the Amazon Web Services account has no associated users.
Parameters:
-
user_name(Optional[existingUserNameType], default:None) –The name of the IAM user the signing certificate belongs to.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
-
certificate_id(certificateIdType) –The ID of the signing certificate you want to update.
This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.
-
status(statusType) –The status you want to assign to the certificate.
Activemeans that the certificate can be used for programmatic calls to Amazon Web ServicesInactivemeans that the certificate cannot be used.
Raises:
-
InvalidInputException–The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
-
LimitExceededException–The request was rejected because it attempted to create resources beyond the current Amazon Web Services account limits. The error message describes the limit exceeded.
-
NoSuchEntityException–The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException–The request processing has failed because of an unknown error, exception or failure.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To change the active status of a signing certificate for an IAM user The following command changes the status of a signing certificate for a user named Bob to Inactive.
>>> await client.update_signing_certificate(user_name='Bob', certificate_id='TA7SMP42TDN5Z26OBPJE7EXAMPLE', status='Inactive')
Source code in docs_src/capo_iam/_services/async_iam.py
11277 11278 11279 11280 11281 11282 11283 11284 11285 11286 11287 11288 11289 11290 11291 11292 11293 11294 11295 11296 11297 11298 11299 11300 11301 11302 11303 11304 11305 11306 11307 11308 11309 11310 11311 11312 11313 11314 11315 11316 11317 11318 11319 11320 11321 11322 11323 11324 11325 11326 11327 11328 11329 11330 11331 11332 11333 11334 11335 11336 11337 | |