updateTrustStore method
Updates the trust store.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter trustStoreArn :
The ARN of the trust store.
Parameter certificatesToAdd :
A list of CA certificates to add to the trust store.
Parameter certificatesToDelete :
A list of CA certificates to delete from a trust store.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure the
idempotency of the request. Idempotency ensures that an API request
completes only once. With an idempotent request, if the original request
completes successfully, subsequent retries with the same client token
return the result from the original successful request.
If you do not specify a client token, one is automatically generated by the Amazon Web Services SDK.
Implementation
Future<UpdateTrustStoreResponse> updateTrustStore({
required String trustStoreArn,
List<Uint8List>? certificatesToAdd,
List<String>? certificatesToDelete,
String? clientToken,
}) async {
final $payload = <String, dynamic>{
if (certificatesToAdd != null)
'certificatesToAdd': certificatesToAdd.map(base64Encode).toList(),
if (certificatesToDelete != null)
'certificatesToDelete': certificatesToDelete,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/trustStores/${trustStoreArn.split('/').map(Uri.encodeComponent).join('/')}',
exceptionFnMap: _exceptionFns,
);
return UpdateTrustStoreResponse.fromJson(response);
}