deleteRetentionPolicy method
Deletes the specified retention policy from the specified organization.
May throw InvalidParameterException. May throw OrganizationNotFoundException. May throw OrganizationStateException.
Parameter id
:
The retention policy ID.
Parameter organizationId
:
The organization ID.
Implementation
Future<void> deleteRetentionPolicy({
required String id,
required String organizationId,
}) async {
ArgumentError.checkNotNull(id, 'id');
_s.validateStringLength(
'id',
id,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(organizationId, 'organizationId');
_s.validateStringLength(
'organizationId',
organizationId,
34,
34,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'WorkMailService.DeleteRetentionPolicy'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Id': id,
'OrganizationId': organizationId,
},
);
}