deleteServiceSpecificCredential method

Future<void> deleteServiceSpecificCredential({
  1. required String serviceSpecificCredentialId,
  2. String? userName,
})

Deletes the specified service-specific credential.

May throw NoSuchEntityException.

Parameter serviceSpecificCredentialId : The unique identifier of the service-specific credential. You can get this value by calling ListServiceSpecificCredentials.

This parameter allows (through its regex pattern) a string of characters that can consist of any upper or lowercased letter or digit.

Parameter userName : The name of the IAM user associated with the service-specific credential. If this value is not specified, 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> deleteServiceSpecificCredential({
  required String serviceSpecificCredentialId,
  String? userName,
}) async {
  ArgumentError.checkNotNull(
      serviceSpecificCredentialId, 'serviceSpecificCredentialId');
  _s.validateStringLength(
    'serviceSpecificCredentialId',
    serviceSpecificCredentialId,
    20,
    128,
    isRequired: true,
  );
  _s.validateStringLength(
    'userName',
    userName,
    1,
    64,
  );
  final $request = <String, dynamic>{};
  $request['ServiceSpecificCredentialId'] = serviceSpecificCredentialId;
  userName?.also((arg) => $request['UserName'] = arg);
  await _protocol.send(
    $request,
    action: 'DeleteServiceSpecificCredential',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DeleteServiceSpecificCredentialRequest'],
    shapes: shapes,
  );
}