createFieldLevelEncryptionProfile2020_05_31 method
Future<CreateFieldLevelEncryptionProfileResult>
createFieldLevelEncryptionProfile2020_05_31({
- required FieldLevelEncryptionProfileConfig fieldLevelEncryptionProfileConfig,
Create a field-level encryption profile.
May throw InconsistentQuantities. May throw InvalidArgument. May throw NoSuchPublicKey. May throw FieldLevelEncryptionProfileAlreadyExists. May throw FieldLevelEncryptionProfileSizeExceeded. May throw TooManyFieldLevelEncryptionProfiles. May throw TooManyFieldLevelEncryptionEncryptionEntities. May throw TooManyFieldLevelEncryptionFieldPatterns.
Parameter fieldLevelEncryptionProfileConfig
:
The request to create a field-level encryption profile.
Implementation
Future<CreateFieldLevelEncryptionProfileResult>
createFieldLevelEncryptionProfile2020_05_31({
required FieldLevelEncryptionProfileConfig
fieldLevelEncryptionProfileConfig,
}) async {
ArgumentError.checkNotNull(
fieldLevelEncryptionProfileConfig, 'fieldLevelEncryptionProfileConfig');
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'),
);
}