createDataRetentionPolicyWithHttpInfo method

Future<Response> createDataRetentionPolicyWithHttpInfo(
  1. MmDataRetentionPolicyCreate mmDataRetentionPolicyCreate
)

Create a new granular data retention policy

Creates a new granular data retention policy with the specified display name and post duration. 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:

Implementation

Future<Response> createDataRetentionPolicyWithHttpInfo(
  MmDataRetentionPolicyCreate mmDataRetentionPolicyCreate,
) async {
  // ignore: prefer_const_declarations
  final path = r'/data_retention/policies';

  // ignore: prefer_final_locals
  Object? postBody = mmDataRetentionPolicyCreate;

  final queryParams = <MmQueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}