import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CreateLifecyclePolicyRequest, CreateLifecyclePolicyResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; /** * @public * * The input for {@link CreateLifecyclePolicyCommand}. */ export interface CreateLifecyclePolicyCommandInput extends CreateLifecyclePolicyRequest { } /** * @public * * The output of {@link CreateLifecyclePolicyCommand}. */ export interface CreateLifecyclePolicyCommandOutput extends CreateLifecyclePolicyResponse, __MetadataBearer { } declare const CreateLifecyclePolicyCommand_base: { new (input: CreateLifecyclePolicyCommandInput): import("@smithy/core/client").CommandImpl; new (input: CreateLifecyclePolicyCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions; }; /** *

Creates an Amazon Data Lifecycle Manager lifecycle policy. Amazon Data Lifecycle Manager supports the following policy types:

* *

For more information, see * Default policies vs custom policies.

* *

If you create a default policy, you can specify the request parameters either in * the request body, or in the PolicyDetails request structure, but not both.

*
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { DLMClient, CreateLifecyclePolicyCommand } from "@aws-sdk/client-dlm"; // ES Modules import * // const { DLMClient, CreateLifecyclePolicyCommand } = require("@aws-sdk/client-dlm"); // CommonJS import * // import type { DLMClientConfig } from "@aws-sdk/client-dlm"; * const config = {}; // type is DLMClientConfig * const client = new DLMClient(config); * const input = { // CreateLifecyclePolicyRequest * ExecutionRoleArn: "STRING_VALUE", // required * Description: "STRING_VALUE", // required * State: "ENABLED" || "DISABLED", // required * PolicyDetails: { // PolicyDetails * PolicyType: "EBS_SNAPSHOT_MANAGEMENT" || "IMAGE_MANAGEMENT" || "EVENT_BASED_POLICY", * ResourceTypes: [ // ResourceTypeValuesList * "VOLUME" || "INSTANCE", * ], * ResourceLocations: [ // ResourceLocationList * "CLOUD" || "OUTPOST" || "LOCAL_ZONE", * ], * TargetTags: [ // TargetTagList * { // Tag * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * Schedules: [ // ScheduleList * { // Schedule * Name: "STRING_VALUE", * CopyTags: true || false, * TagsToAdd: [ // TagsToAddList * { * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * VariableTags: [ // VariableTagsList * { * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", // required * }, * ], * CreateRule: { // CreateRule * Location: "CLOUD" || "OUTPOST_LOCAL" || "LOCAL_ZONE", * Interval: Number("int"), * IntervalUnit: "HOURS", * Times: [ // TimesList * "STRING_VALUE", * ], * CronExpression: "STRING_VALUE", * Scripts: [ // ScriptsList * { // Script * Stages: [ // StagesList * "PRE" || "POST", * ], * ExecutionHandlerService: "AWS_SYSTEMS_MANAGER", * ExecutionHandler: "STRING_VALUE", // required * ExecuteOperationOnScriptFailure: true || false, * ExecutionTimeout: Number("int"), * MaximumRetryCount: Number("int"), * }, * ], * }, * RetainRule: { // RetainRule * Count: Number("int"), * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * FastRestoreRule: { // FastRestoreRule * Count: Number("int"), * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * AvailabilityZones: [ // AvailabilityZoneList * "STRING_VALUE", * ], * AvailabilityZoneIds: [ // AvailabilityZoneIdList * "STRING_VALUE", * ], * }, * CrossRegionCopyRules: [ // CrossRegionCopyRules * { // CrossRegionCopyRule * TargetRegion: "STRING_VALUE", * Target: "STRING_VALUE", * Encrypted: true || false, // required * CmkArn: "STRING_VALUE", * CopyTags: true || false, * RetainRule: { // CrossRegionCopyRetainRule * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * DeprecateRule: { // CrossRegionCopyDeprecateRule * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * }, * ], * ShareRules: [ // ShareRules * { // ShareRule * TargetAccounts: [ // ShareTargetAccountList // required * "STRING_VALUE", * ], * UnshareInterval: Number("int"), * UnshareIntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * ], * DeprecateRule: { // DeprecateRule * Count: Number("int"), * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * ArchiveRule: { // ArchiveRule * RetainRule: { // ArchiveRetainRule * RetentionArchiveTier: { // RetentionArchiveTier * Count: Number("int"), * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * }, * }, * }, * ], * Parameters: { // Parameters * ExcludeBootVolume: true || false, * NoReboot: true || false, * ExcludeDataVolumeTags: [ // ExcludeDataVolumeTagList * "", * ], * }, * EventSource: { // EventSource * Type: "MANAGED_CWE", // required * Parameters: { // EventParameters * EventType: "shareSnapshot", // required * SnapshotOwner: [ // SnapshotOwnerList // required * "STRING_VALUE", * ], * DescriptionRegex: "STRING_VALUE", // required * }, * }, * Actions: [ // ActionList * { // Action * Name: "STRING_VALUE", // required * CrossRegionCopy: [ // CrossRegionCopyActionList // required * { // CrossRegionCopyAction * Target: "STRING_VALUE", // required * EncryptionConfiguration: { // EncryptionConfiguration * Encrypted: true || false, // required * CmkArn: "STRING_VALUE", * }, * RetainRule: { * Interval: Number("int"), * IntervalUnit: "DAYS" || "WEEKS" || "MONTHS" || "YEARS", * }, * }, * ], * }, * ], * PolicyLanguage: "SIMPLIFIED" || "STANDARD", * ResourceType: "VOLUME" || "INSTANCE", * CreateInterval: Number("int"), * RetainInterval: Number("int"), * CopyTags: true || false, * CrossRegionCopyTargets: [ // CrossRegionCopyTargetList * { // CrossRegionCopyTarget * TargetRegion: "STRING_VALUE", * }, * ], * ExtendDeletion: true || false, * Exclusions: { // Exclusions * ExcludeBootVolumes: true || false, * ExcludeVolumeTypes: [ // ExcludeVolumeTypesList * "STRING_VALUE", * ], * ExcludeTags: [ // ExcludeTagsList * "", * ], * }, * }, * Tags: { // TagMap * "": "STRING_VALUE", * }, * DefaultPolicy: "VOLUME" || "INSTANCE", * CreateInterval: Number("int"), * RetainInterval: Number("int"), * CopyTags: true || false, * ExtendDeletion: true || false, * CrossRegionCopyTargets: [ * { * TargetRegion: "STRING_VALUE", * }, * ], * Exclusions: { * ExcludeBootVolumes: true || false, * ExcludeVolumeTypes: [ * "STRING_VALUE", * ], * ExcludeTags: [ * "", * ], * }, * }; * const command = new CreateLifecyclePolicyCommand(input); * const response = await client.send(command); * // { // CreateLifecyclePolicyResponse * // PolicyId: "STRING_VALUE", * // }; * * ``` * * @param CreateLifecyclePolicyCommandInput - {@link CreateLifecyclePolicyCommandInput} * @returns {@link CreateLifecyclePolicyCommandOutput} * @see {@link CreateLifecyclePolicyCommandInput} for command's `input` shape. * @see {@link CreateLifecyclePolicyCommandOutput} for command's `response` shape. * @see {@link DLMClientResolvedConfig | config} for DLMClient's `config` shape. * * @throws {@link InternalServerException} (server fault) *

The service failed in an unexpected way.

* * @throws {@link InvalidRequestException} (client fault) *

Bad request. The request is missing required parameters or has invalid * parameters.

* * @throws {@link LimitExceededException} (client fault) *

The request failed because a limit was exceeded.

* * @throws {@link DLMServiceException} *

Base exception class for all service exceptions from DLM service.

* * * @public */ export declare class CreateLifecyclePolicyCommand extends CreateLifecyclePolicyCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateLifecyclePolicyRequest; output: CreateLifecyclePolicyResponse; }; sdk: { input: CreateLifecyclePolicyCommandInput; output: CreateLifecyclePolicyCommandOutput; }; }; }