createFieldLevelEncryptionProfile method
Future<CreateFieldLevelEncryptionProfileResult>
createFieldLevelEncryptionProfile({
- required FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
Create a field-level encryption profile.
May throw FieldLevelEncryptionProfileAlreadyExists.
May throw FieldLevelEncryptionProfileSizeExceeded.
May throw InconsistentQuantities.
May throw InvalidArgument.
May throw NoSuchPublicKey.
May throw TooManyFieldLevelEncryptionEncryptionEntities.
May throw TooManyFieldLevelEncryptionFieldPatterns.
May throw TooManyFieldLevelEncryptionProfiles.
Parameter fieldLevelEncryptionProfileConfig :
The request to create a field-level encryption profile.
Implementation
Future<CreateFieldLevelEncryptionProfileResult>
createFieldLevelEncryptionProfile({
required FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig,
}) async {
final $result = await _protocol.sendRaw(
method: 'POST',
requestUri: '/2020-05-31/field-level-encryption-profile',
payload: fieldLevelEncryptionProfileConfig
.toXml('FieldLevelEncryptionProfileConfig'),
exceptionFnMap: _exceptionFns,
);
final $elem = await _s.xmlFromResponse($result);
return CreateFieldLevelEncryptionProfileResult(
fieldLevelEncryptionProfile: FieldLevelEncryptionProfile.fromXml($elem),
eTag: _s.extractHeaderStringValue($result.headers, 'ETag'),
location: _s.extractHeaderStringValue($result.headers, 'Location'),
);
}