updateSigningCertificate
abstract suspend fun updateSigningCertificate(input: UpdateSigningCertificateRequest): UpdateSigningCertificateResponse
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.
Samples
import aws.sdk.kotlin.services.iam.model.StatusType
fun main() {
//sampleStart
// The following command changes the status of a signing certificate for a user named Bob to Inactive.
iamClient.updateSigningCertificate {
userName = "Bob"
certificateId = "TA7SMP42TDN5Z26OBPJE7EXAMPLE"
status = StatusType.fromValue("Inactive")
}
//sampleEnd
}