Skip to content

CreateRule

Source code in docs_src/capo_dlm/types/create_rule.py
class CreateRule(TypedDict, closed=True):
    location: NotRequired["capo_dlm.types.location_values.LocationValues"]
    """<p> <b>[Custom snapshot policies only]</b> Specifies the destination for snapshots created by the policy. The allowed destinations depend on the location of the targeted resources.</p> <ul> <li> <p>If the policy targets resources in a Region, then you must create snapshots in the same Region as the source resource.</p> </li> <li> <p>If the policy targets resources in a Local Zone, you can create snapshots in the same Local Zone or in its parent Region.</p> </li> <li> <p>If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost or in its parent Region.</p> </li> </ul> <p>Specify one of the following values:</p> <ul> <li> <p>To create snapshots in the same Region as the source resource, specify <code>CLOUD</code>.</p> </li> <li> <p>To create snapshots in the same Local Zone as the source resource, specify <code>LOCAL_ZONE</code>.</p> </li> <li> <p>To create snapshots on the same Outpost as the source resource, specify <code>OUTPOST_LOCAL</code>.</p> </li> </ul> <p>Default: <code>CLOUD</code> </p>"""
    interval: NotRequired["capo_dlm.types.interval.Interval"]
    """<p>The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.</p>"""
    interval_unit: NotRequired["capo_dlm.types.interval_unit_values.IntervalUnitValues"]
    """<p>The interval unit.</p>"""
    times: NotRequired["capo_dlm.types.times_list.TimesList"]
    """<p>The time, in UTC, to start the operation. The supported format is hh:mm.</p> <p>The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.</p>"""
    cron_expression: NotRequired["capo_dlm.types.cron_expression.CronExpression"]
    """<p>The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see the <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-cron-expressions.html">Cron expressions reference</a> in the <i>Amazon EventBridge User Guide</i>.</p>"""
    scripts: NotRequired["capo_dlm.types.scripts_list.ScriptsList"]
    """<p> <b>[Custom snapshot policies that target instances only]</b> Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances. This is useful for creating application-consistent snapshots, or for performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/automate-app-consistent-backups.html">Automating application-consistent snapshots with pre and post scripts</a>.</p>"""

cron_expression instance-attribute

cron_expression: NotRequired[CronExpression]

The schedule, as a Cron expression. The schedule interval must be between 1 hour and 1 year. For more information, see the Cron expressions reference in the Amazon EventBridge User Guide.

interval instance-attribute

interval: NotRequired[Interval]

The interval between snapshots. The supported values are 1, 2, 3, 4, 6, 8, 12, and 24.

interval_unit instance-attribute

interval_unit: NotRequired[IntervalUnitValues]

The interval unit.

location instance-attribute

location: NotRequired[LocationValues]

[Custom snapshot policies only] Specifies the destination for snapshots created by the policy. The allowed destinations depend on the location of the targeted resources.

  • If the policy targets resources in a Region, then you must create snapshots in the same Region as the source resource.

  • If the policy targets resources in a Local Zone, you can create snapshots in the same Local Zone or in its parent Region.

  • If the policy targets resources on an Outpost, then you can create snapshots on the same Outpost or in its parent Region.

Specify one of the following values:

  • To create snapshots in the same Region as the source resource, specify CLOUD.

  • To create snapshots in the same Local Zone as the source resource, specify LOCAL_ZONE.

  • To create snapshots on the same Outpost as the source resource, specify OUTPOST_LOCAL.

Default: CLOUD

scripts instance-attribute

scripts: NotRequired[ScriptsList]

[Custom snapshot policies that target instances only] Specifies pre and/or post scripts for a snapshot lifecycle policy that targets instances. This is useful for creating application-consistent snapshots, or for performing specific administrative tasks before or after Amazon Data Lifecycle Manager initiates snapshot creation.

For more information, see Automating application-consistent snapshots with pre and post scripts.

times instance-attribute

times: NotRequired[TimesList]

The time, in UTC, to start the operation. The supported format is hh:mm.

The operation occurs within a one-hour window following the specified time. If you do not specify a time, Amazon Data Lifecycle Manager selects a time within the next 24 hours.