createDataProtectionSettings method
Creates a data protection settings resource that can be associated with a web portal.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter additionalEncryptionContext :
Additional encryption context of the data protection settings.
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
returns 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.
Parameter customerManagedKey :
The custom managed key of the data protection settings.
Parameter description :
The description of the data protection settings.
Parameter displayName :
The display name of the data protection settings.
Parameter inlineRedactionConfiguration :
The inline redaction configuration of the data protection settings that
will be applied to all sessions.
Parameter tags :
The tags to add to the data protection settings resource. A tag is a
key-value pair.
Implementation
Future<CreateDataProtectionSettingsResponse> createDataProtectionSettings({
Map<String, String>? additionalEncryptionContext,
String? clientToken,
String? customerManagedKey,
String? description,
String? displayName,
InlineRedactionConfiguration? inlineRedactionConfiguration,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
if (additionalEncryptionContext != null)
'additionalEncryptionContext': additionalEncryptionContext,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (customerManagedKey != null) 'customerManagedKey': customerManagedKey,
if (description != null) 'description': description,
if (displayName != null) 'displayName': displayName,
if (inlineRedactionConfiguration != null)
'inlineRedactionConfiguration': inlineRedactionConfiguration,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/dataProtectionSettings',
exceptionFnMap: _exceptionFns,
);
return CreateDataProtectionSettingsResponse.fromJson(response);
}