putRetentionPolicy method
Puts a retention policy to the specified organization.
May throw InvalidParameterException.
May throw LimitExceededException.
May throw OrganizationNotFoundException.
May throw OrganizationStateException.
Parameter folderConfigurations :
The retention policy folder configurations.
Parameter name :
The retention policy name.
Parameter organizationId :
The organization ID.
Parameter description :
The retention policy description.
Parameter id :
The retention policy ID.
Implementation
Future<void> putRetentionPolicy({
required List<FolderConfiguration> folderConfigurations,
required String name,
required String organizationId,
String? description,
String? id,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.PutRetentionPolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'FolderConfigurations': folderConfigurations,
'Name': name,
'OrganizationId': organizationId,
if (description != null) 'Description': description,
if (id != null) 'Id': id,
},
);
}