patchDataRetentionPolicyWithHttpInfo method
Future<Response>
patchDataRetentionPolicyWithHttpInfo(
- String policyId,
- MmDataRetentionPolicyWithTeamAndChannelIds mmDataRetentionPolicyWithTeamAndChannelIds
Patch a granular data retention policy
Patches (i.e. replaces the fields of) a granular data retention policy. If any fields are omitted, they will not be changed. Minimum server version: 5.35 ##### Permissions Must have the sysconsole_write_compliance_data_retention
permission. ##### License Requires an E20 license.
Note: This method returns the HTTP Response
.
Parameters:
-
String policyId (required): The ID of the granular retention policy.
-
MmDataRetentionPolicyWithTeamAndChannelIds mmDataRetentionPolicyWithTeamAndChannelIds (required):
Implementation
Future<Response> patchDataRetentionPolicyWithHttpInfo(
String policyId,
MmDataRetentionPolicyWithTeamAndChannelIds mmDataRetentionPolicyWithTeamAndChannelIds,
) async {
// ignore: prefer_const_declarations
final path = r'/data_retention/policies/{policy_id}'.replaceAll('{policy_id}', policyId);
// ignore: prefer_final_locals
Object? postBody = mmDataRetentionPolicyWithTeamAndChannelIds;
final queryParams = <MmQueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}