- List retention policy assignments
- Assign retention policy
- Get retention policy assignment
- Remove retention policy assignment
- Get files under retention
Returns a list of all retention policy assignments associated with a specified retention policy.
This operation is performed by calling function get_retention_policy_assignments.
See the endpoint docs at API Reference.
client.retention_policy_assignments.get_retention_policy_assignments(
retention_policy.id
)- retention_policy_id
str- The ID of the retention policy. Example: "982312"
- type
Optional[GetRetentionPolicyAssignmentsType]- The type of the retention policy assignment to retrieve.
- fields
Optional[List[str]]- A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
- marker
Optional[str]- Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination.
- limit
Optional[int]- The maximum number of items to return per page.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type RetentionPolicyAssignments.
Returns a list of the retention policy assignments associated with the specified retention policy.
Assigns a retention policy to an item.
This operation is performed by calling function create_retention_policy_assignment.
See the endpoint docs at API Reference.
client.retention_policy_assignments.create_retention_policy_assignment(
retention_policy.id,
CreateRetentionPolicyAssignmentAssignTo(
type=CreateRetentionPolicyAssignmentAssignToTypeField.FOLDER, id=folder.id
),
)- policy_id
str- The ID of the retention policy to assign.
- assign_to
CreateRetentionPolicyAssignmentAssignTo- The item to assign the policy to.
- filter_fields
Optional[List[CreateRetentionPolicyAssignmentFilterFields]]- If the
assign_totype ismetadata_template, then optionally add thefilter_fieldsparameter which will require an array of objects with a field entry and a value entry. Currently only one object offieldandvalueis supported.
- If the
- start_date_field
Optional[str]- The date the retention policy assignment begins. If the
assigned_totype ismetadata_template, this field can be a date field's metadata attribute key id.
- The date the retention policy assignment begins. If the
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type RetentionPolicyAssignment.
Returns a new retention policy assignment object.
Retrieves a retention policy assignment.
This operation is performed by calling function get_retention_policy_assignment_by_id.
See the endpoint docs at API Reference.
client.retention_policy_assignments.get_retention_policy_assignment_by_id(
retention_policy_assignment.id
)- retention_policy_assignment_id
str- The ID of the retention policy assignment. Example: "1233123"
- fields
Optional[List[str]]- A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response. Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type RetentionPolicyAssignment.
Returns the retention policy assignment object.
Removes a retention policy assignment applied to content.
This operation is performed by calling function delete_retention_policy_assignment_by_id.
See the endpoint docs at API Reference.
client.retention_policy_assignments.delete_retention_policy_assignment_by_id(
retention_policy_assignment.id
)- retention_policy_assignment_id
str- The ID of the retention policy assignment. Example: "1233123"
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type None.
Returns an empty response when the policy assignment is successfully deleted.
Returns a list of files under retention for a retention policy assignment.
This operation is performed by calling function get_files_under_retention_policy_assignment.
See the endpoint docs at API Reference.
client.retention_policy_assignments.get_files_under_retention_policy_assignment(
retention_policy_assignment.id
)- retention_policy_assignment_id
str- The ID of the retention policy assignment. Example: "1233123"
- marker
Optional[str]- Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires
usemarkerto be set totrue.
- Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires
- limit
Optional[int]- The maximum number of items to return per page.
- extra_headers
Optional[Dict[str, Optional[str]]]- Extra headers that will be included in the HTTP request.
This function returns a value of type FilesUnderRetention.
Returns a list of files under retention that are associated with the specified retention policy assignment.