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
13243 13244 13245 13246 13247 13248 13249 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 13266 13267 13268 13269 13270 13271 13272 13273 13274 13275 13276 13277 13278 13279 13280 13281 13282 13283 13284 13285 13286 13287 13288 13289 13290 13291 13292 13293 13294 13295 13296 13297 13298 13299 13300 13301 13302 13303 | |