createCredentialLocker method

Future<CreateCredentialLockerResponse> createCredentialLocker({
  1. String? clientToken,
  2. String? name,
  3. Map<String, String>? tags,
})

Create a credential locker.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw ValidationException.

Parameter clientToken : An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.

Parameter name : The name of the credential locker.

Parameter tags : A set of key/value pairs that are used to manage the credential locker.

Implementation

Future<CreateCredentialLockerResponse> createCredentialLocker({
  String? clientToken,
  String? name,
  Map<String, String>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (name != null) 'Name': name,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/credential-lockers',
    exceptionFnMap: _exceptionFns,
  );
  return CreateCredentialLockerResponse.fromJson(response);
}