createAutonomousDatabaseWallet method
Creates a new wallet for the specified Autonomous Database.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter autonomousDatabaseId :
The unique identifier of the Autonomous Database to create a wallet for.
Parameter clientToken :
A client-provided token to ensure the idempotency of the request.
Parameter password :
The password to encrypt the keys inside the wallet.
Parameter passwordSource :
The source of the password for encrypting the wallet. When set to
CUSTOMER_MANAGED_AWS_SECRET, the password is retrieved from
an Amazon Web Services Secrets Manager secret.
Parameter passwordSourceConfiguration :
The configuration of the password source for the Autonomous Database
wallet.
Parameter walletType :
The type of wallet to create, either a regional wallet or an instance
wallet.
Implementation
Future<CreateAutonomousDatabaseWalletOutput> createAutonomousDatabaseWallet({
required String autonomousDatabaseId,
String? clientToken,
String? password,
WalletPasswordSource? passwordSource,
WalletPasswordSourceConfigurationInput? passwordSourceConfiguration,
WalletType? walletType,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Odb.CreateAutonomousDatabaseWallet'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'autonomousDatabaseId': autonomousDatabaseId,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (password != null) 'password': password,
if (passwordSource != null) 'passwordSource': passwordSource.value,
if (passwordSourceConfiguration != null)
'passwordSourceConfiguration': passwordSourceConfiguration,
if (walletType != null) 'walletType': walletType.value,
},
);
return CreateAutonomousDatabaseWalletOutput.fromJson(jsonResponse.body);
}