- List retention policies
- Create retention policy
- Get retention policy
- Update retention policy
- Delete retention policy
Retrieves all of the retention policies for an enterprise.
This operation is performed by calling function getRetentionPolicies
.
See the endpoint docs at API Reference.
await client.retentionPolicies.getRetentionPolicies();
- queryParams
GetRetentionPoliciesQueryParams
- Query parameters of getRetentionPolicies method
- headersInput
GetRetentionPoliciesHeadersInput
- Headers of getRetentionPolicies method
- cancellationToken
undefined | CancellationToken
- Token used for request cancellation.
This function returns a value of type RetentionPolicies
.
Returns a list retention policies in the enterprise.
Creates a retention policy.
This operation is performed by calling function createRetentionPolicy
.
See the endpoint docs at API Reference.
await client.retentionPolicies.createRetentionPolicy({
policyName: retentionPolicyName,
policyType: 'finite' as CreateRetentionPolicyRequestBodyPolicyTypeField,
areOwnersNotified: true,
canOwnerExtendRetention: true,
description: retentionDescription,
dispositionAction:
'remove_retention' as CreateRetentionPolicyRequestBodyDispositionActionField,
retentionLength: '1',
retentionType:
'modifiable' as CreateRetentionPolicyRequestBodyRetentionTypeField,
} satisfies CreateRetentionPolicyRequestBody);
- requestBody
CreateRetentionPolicyRequestBody
- Request body of createRetentionPolicy method
This function returns a value of type RetentionPolicy
.
Returns a new retention policy object.
Retrieves a retention policy.
This operation is performed by calling function getRetentionPolicyById
.
See the endpoint docs at API Reference.
await client.retentionPolicies.getRetentionPolicyById(retentionPolicy.id);
- retentionPolicyId
string
- The ID of the retention policy. Example: "982312"
This function returns a value of type RetentionPolicy
.
Returns the retention policy object.
Updates a retention policy.
This operation is performed by calling function updateRetentionPolicyById
.
See the endpoint docs at API Reference.
await client.retentionPolicies.updateRetentionPolicyById(retentionPolicy.id, {
requestBody: {
policyName: updatedRetentionPolicyName,
} satisfies UpdateRetentionPolicyByIdRequestBody,
} satisfies UpdateRetentionPolicyByIdOptionalsInput);
- retentionPolicyId
string
- The ID of the retention policy. Example: "982312"
This function returns a value of type RetentionPolicy
.
Returns the updated retention policy object.
Permanently deletes a retention policy.
This operation is performed by calling function deleteRetentionPolicyById
.
See the endpoint docs at API Reference.
await client.retentionPolicies.deleteRetentionPolicyById(retentionPolicy.id);
- retentionPolicyId
string
- The ID of the retention policy. Example: "982312"
This function returns a value of type undefined
.
Returns an empty response when the policy has been deleted.