updateServiceSpecificCredential method
Sets the status of a service-specific credential to Active or
Inactive. Service-specific credentials that are inactive
cannot be used for authentication to the service. This operation can be
used to disable a user's service-specific credential as part of a
credential rotation work flow.
May throw NoSuchEntityException.
Parameter serviceSpecificCredentialId :
The unique identifier of the service-specific credential.
This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.
Parameter status :
The status to be assigned to the service-specific credential.
Parameter userName :
The name of the IAM user associated with the service-specific credential.
If you do not specify this value, then the operation assumes the user
whose credentials are used to call the operation.
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: _+=,.@-
Implementation
Future<void> updateServiceSpecificCredential({
required String serviceSpecificCredentialId,
required StatusType status,
String? userName,
}) async {
final $request = <String, String>{
'ServiceSpecificCredentialId': serviceSpecificCredentialId,
'Status': status.value,
if (userName != null) 'UserName': userName,
};
await _protocol.send(
$request,
action: 'UpdateServiceSpecificCredential',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
);
}