GetDefaultRetentionPolicyCommand

Gets the default retention policy details for the specified organization.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { WorkMailClient, GetDefaultRetentionPolicyCommand } from "@aws-sdk/client-workmail"; // ES Modules import
// const { WorkMailClient, GetDefaultRetentionPolicyCommand } = require("@aws-sdk/client-workmail"); // CommonJS import
const client = new WorkMailClient(config);
const input = { // GetDefaultRetentionPolicyRequest
  OrganizationId: "STRING_VALUE", // required
};
const command = new GetDefaultRetentionPolicyCommand(input);
const response = await client.send(command);
// { // GetDefaultRetentionPolicyResponse
//   Id: "STRING_VALUE",
//   Name: "STRING_VALUE",
//   Description: "STRING_VALUE",
//   FolderConfigurations: [ // FolderConfigurations
//     { // FolderConfiguration
//       Name: "INBOX" || "DELETED_ITEMS" || "SENT_ITEMS" || "DRAFTS" || "JUNK_EMAIL", // required
//       Action: "NONE" || "DELETE" || "PERMANENTLY_DELETE", // required
//       Period: Number("int"),
//     },
//   ],
// };

GetDefaultRetentionPolicyCommand Input

Parameter
Type
Description
OrganizationId
Required
string | undefined

The organization ID.

GetDefaultRetentionPolicyCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Description
string | undefined

The retention policy description.

FolderConfigurations
FolderConfiguration[] | undefined

The retention policy folder configurations.

Id
string | undefined

The retention policy ID.

Name
string | undefined

The retention policy name.

Throws

Name
Fault
Details
EntityNotFoundException
client

The identifier supplied for the user, group, or resource does not exist in your organization.

InvalidParameterException
client

One or more of the input parameters don't match the service's restrictions.

OrganizationNotFoundException
client

An operation received a valid organization identifier that either doesn't belong or exist in the system.

OrganizationStateException
client

The organization must have a valid state to perform certain operations on the organization or its members.

WorkMailServiceException
Base exception class for all service exceptions from WorkMail service.