createFieldLevelEncryptionConfig method
Future<CreateFieldLevelEncryptionConfigResult>
createFieldLevelEncryptionConfig({
- required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
Create a new field-level encryption configuration.
May throw FieldLevelEncryptionConfigAlreadyExists.
May throw InconsistentQuantities.
May throw InvalidArgument.
May throw NoSuchFieldLevelEncryptionProfile.
May throw QueryArgProfileEmpty.
May throw TooManyFieldLevelEncryptionConfigs.
May throw TooManyFieldLevelEncryptionContentTypeProfiles.
May throw TooManyFieldLevelEncryptionQueryArgProfiles.
Parameter fieldLevelEncryptionConfig :
The request to create a new field-level encryption configuration.
Implementation
Future<CreateFieldLevelEncryptionConfigResult>
createFieldLevelEncryptionConfig({
required FieldLevelEncryptionConfig fieldLevelEncryptionConfig,
}) async {
final $result = await _protocol.sendRaw(
method: 'POST',
requestUri: '/2020-05-31/field-level-encryption',
payload: fieldLevelEncryptionConfig.toXml('FieldLevelEncryptionConfig'),
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return CreateFieldLevelEncryptionConfigResult(
fieldLevelEncryption: FieldLevelEncryption.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
location: _s.extractHeaderStringValue($result.headers, 'Location'),
);
}