1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. AutoSnapshotPolicy
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.ecs.AutoSnapshotPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a ECS Auto Snapshot Policy resource.

    For information about ECS Auto Snapshot Policy and how to use it, see What is Auto Snapshot Policy.

    NOTE: Available in v1.117.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.ecs.AutoSnapshotPolicy("example", {
        repeatWeekdays: [
            "1",
            "2",
            "3",
        ],
        retentionDays: -1,
        timePoints: [
            "1",
            "22",
            "23",
        ],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.ecs.AutoSnapshotPolicy("example",
        repeat_weekdays=[
            "1",
            "2",
            "3",
        ],
        retention_days=-1,
        time_points=[
            "1",
            "22",
            "23",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewAutoSnapshotPolicy(ctx, "example", &ecs.AutoSnapshotPolicyArgs{
    			RepeatWeekdays: pulumi.StringArray{
    				pulumi.String("1"),
    				pulumi.String("2"),
    				pulumi.String("3"),
    			},
    			RetentionDays: -1,
    			TimePoints: pulumi.StringArray{
    				pulumi.String("1"),
    				pulumi.String("22"),
    				pulumi.String("23"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Ecs.AutoSnapshotPolicy("example", new()
        {
            RepeatWeekdays = new[]
            {
                "1",
                "2",
                "3",
            },
            RetentionDays = -1,
            TimePoints = new[]
            {
                "1",
                "22",
                "23",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.AutoSnapshotPolicy;
    import com.pulumi.alicloud.ecs.AutoSnapshotPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new AutoSnapshotPolicy("example", AutoSnapshotPolicyArgs.builder()        
                .repeatWeekdays(            
                    "1",
                    "2",
                    "3")
                .retentionDays("TODO: GenUnaryOpExpression")
                .timePoints(            
                    "1",
                    "22",
                    "23")
                .build());
    
        }
    }
    
    Coming soon!
    

    Create AutoSnapshotPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AutoSnapshotPolicy(name: string, args: AutoSnapshotPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def AutoSnapshotPolicy(resource_name: str,
                           args: AutoSnapshotPolicyArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AutoSnapshotPolicy(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           repeat_weekdays: Optional[Sequence[str]] = None,
                           retention_days: Optional[int] = None,
                           time_points: Optional[Sequence[str]] = None,
                           copied_snapshots_retention_days: Optional[int] = None,
                           enable_cross_region_copy: Optional[bool] = None,
                           name: Optional[str] = None,
                           tags: Optional[Mapping[str, Any]] = None,
                           target_copy_regions: Optional[Sequence[str]] = None)
    func NewAutoSnapshotPolicy(ctx *Context, name string, args AutoSnapshotPolicyArgs, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
    public AutoSnapshotPolicy(string name, AutoSnapshotPolicyArgs args, CustomResourceOptions? opts = null)
    public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args)
    public AutoSnapshotPolicy(String name, AutoSnapshotPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:AutoSnapshotPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AutoSnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AutoSnapshotPolicyArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AutoSnapshotPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AutoSnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AutoSnapshotPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var autoSnapshotPolicyResource = new AliCloud.Ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", new()
    {
        RepeatWeekdays = new[]
        {
            "string",
        },
        RetentionDays = 0,
        TimePoints = new[]
        {
            "string",
        },
        CopiedSnapshotsRetentionDays = 0,
        EnableCrossRegionCopy = false,
        Name = "string",
        Tags = 
        {
            { "string", "any" },
        },
        TargetCopyRegions = new[]
        {
            "string",
        },
    });
    
    example, err := ecs.NewAutoSnapshotPolicy(ctx, "autoSnapshotPolicyResource", &ecs.AutoSnapshotPolicyArgs{
    	RepeatWeekdays: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RetentionDays: pulumi.Int(0),
    	TimePoints: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	CopiedSnapshotsRetentionDays: pulumi.Int(0),
    	EnableCrossRegionCopy:        pulumi.Bool(false),
    	Name:                         pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	TargetCopyRegions: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var autoSnapshotPolicyResource = new AutoSnapshotPolicy("autoSnapshotPolicyResource", AutoSnapshotPolicyArgs.builder()        
        .repeatWeekdays("string")
        .retentionDays(0)
        .timePoints("string")
        .copiedSnapshotsRetentionDays(0)
        .enableCrossRegionCopy(false)
        .name("string")
        .tags(Map.of("string", "any"))
        .targetCopyRegions("string")
        .build());
    
    auto_snapshot_policy_resource = alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource",
        repeat_weekdays=["string"],
        retention_days=0,
        time_points=["string"],
        copied_snapshots_retention_days=0,
        enable_cross_region_copy=False,
        name="string",
        tags={
            "string": "any",
        },
        target_copy_regions=["string"])
    
    const autoSnapshotPolicyResource = new alicloud.ecs.AutoSnapshotPolicy("autoSnapshotPolicyResource", {
        repeatWeekdays: ["string"],
        retentionDays: 0,
        timePoints: ["string"],
        copiedSnapshotsRetentionDays: 0,
        enableCrossRegionCopy: false,
        name: "string",
        tags: {
            string: "any",
        },
        targetCopyRegions: ["string"],
    });
    
    type: alicloud:ecs:AutoSnapshotPolicy
    properties:
        copiedSnapshotsRetentionDays: 0
        enableCrossRegionCopy: false
        name: string
        repeatWeekdays:
            - string
        retentionDays: 0
        tags:
            string: any
        targetCopyRegions:
            - string
        timePoints:
            - string
    

    AutoSnapshotPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AutoSnapshotPolicy resource accepts the following input properties:

    RepeatWeekdays List<string>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    RetentionDays int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    TimePoints List<string>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    CopiedSnapshotsRetentionDays int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    EnableCrossRegionCopy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    Name string
    The snapshot policy name.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TargetCopyRegions List<string>
    The destination region to which the snapshot is copied. You can set a destination region.
    RepeatWeekdays []string
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    RetentionDays int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    TimePoints []string
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    CopiedSnapshotsRetentionDays int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    EnableCrossRegionCopy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    Name string
    The snapshot policy name.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TargetCopyRegions []string
    The destination region to which the snapshot is copied. You can set a destination region.
    repeatWeekdays List<String>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays Integer
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    timePoints List<String>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays Integer
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy Boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name String
    The snapshot policy name.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    targetCopyRegions List<String>
    The destination region to which the snapshot is copied. You can set a destination region.
    repeatWeekdays string[]
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays number
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    timePoints string[]
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays number
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name string
    The snapshot policy name.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    targetCopyRegions string[]
    The destination region to which the snapshot is copied. You can set a destination region.
    repeat_weekdays Sequence[str]
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retention_days int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    time_points Sequence[str]
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copied_snapshots_retention_days int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enable_cross_region_copy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name str
    The snapshot policy name.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    target_copy_regions Sequence[str]
    The destination region to which the snapshot is copied. You can set a destination region.
    repeatWeekdays List<String>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays Number
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    timePoints List<String>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays Number
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy Boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name String
    The snapshot policy name.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    targetCopyRegions List<String>
    The destination region to which the snapshot is copied. You can set a destination region.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AutoSnapshotPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of Auto Snapshot Policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of Auto Snapshot Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of Auto Snapshot Policy.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of Auto Snapshot Policy.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of Auto Snapshot Policy.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of Auto Snapshot Policy.

    Look up Existing AutoSnapshotPolicy Resource

    Get an existing AutoSnapshotPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AutoSnapshotPolicyState, opts?: CustomResourceOptions): AutoSnapshotPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            copied_snapshots_retention_days: Optional[int] = None,
            enable_cross_region_copy: Optional[bool] = None,
            name: Optional[str] = None,
            repeat_weekdays: Optional[Sequence[str]] = None,
            retention_days: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            target_copy_regions: Optional[Sequence[str]] = None,
            time_points: Optional[Sequence[str]] = None) -> AutoSnapshotPolicy
    func GetAutoSnapshotPolicy(ctx *Context, name string, id IDInput, state *AutoSnapshotPolicyState, opts ...ResourceOption) (*AutoSnapshotPolicy, error)
    public static AutoSnapshotPolicy Get(string name, Input<string> id, AutoSnapshotPolicyState? state, CustomResourceOptions? opts = null)
    public static AutoSnapshotPolicy get(String name, Output<String> id, AutoSnapshotPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CopiedSnapshotsRetentionDays int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    EnableCrossRegionCopy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    Name string
    The snapshot policy name.
    RepeatWeekdays List<string>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    RetentionDays int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    Status string
    The status of Auto Snapshot Policy.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    TargetCopyRegions List<string>
    The destination region to which the snapshot is copied. You can set a destination region.
    TimePoints List<string>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    CopiedSnapshotsRetentionDays int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    EnableCrossRegionCopy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    Name string
    The snapshot policy name.
    RepeatWeekdays []string
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    RetentionDays int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    Status string
    The status of Auto Snapshot Policy.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    TargetCopyRegions []string
    The destination region to which the snapshot is copied. You can set a destination region.
    TimePoints []string
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays Integer
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy Boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name String
    The snapshot policy name.
    repeatWeekdays List<String>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays Integer
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    status String
    The status of Auto Snapshot Policy.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    targetCopyRegions List<String>
    The destination region to which the snapshot is copied. You can set a destination region.
    timePoints List<String>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays number
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name string
    The snapshot policy name.
    repeatWeekdays string[]
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays number
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    status string
    The status of Auto Snapshot Policy.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    targetCopyRegions string[]
    The destination region to which the snapshot is copied. You can set a destination region.
    timePoints string[]
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copied_snapshots_retention_days int
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enable_cross_region_copy bool
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name str
    The snapshot policy name.
    repeat_weekdays Sequence[str]
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retention_days int
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    status str
    The status of Auto Snapshot Policy.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    target_copy_regions Sequence[str]
    The destination region to which the snapshot is copied. You can set a destination region.
    time_points Sequence[str]
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).
    copiedSnapshotsRetentionDays Number
    The retention period of the snapshot copied across regions.

    • -1: The snapshot is permanently retained.
    • [1, 65535]: The automatic snapshot is retained for the specified number of days. Default value: -1.
    enableCrossRegionCopy Boolean
    Specifies whether to enable the system to automatically copy snapshots across regions.
    name String
    The snapshot policy name.
    repeatWeekdays List<String>
    The automatic snapshot repetition dates. The unit of measurement is day and the repeating cycle is a week. Value range: [1, 7], which represents days starting from Monday to Sunday, for example 1 indicates Monday. When you want to schedule multiple automatic snapshot tasks for a disk in a week, you can set the RepeatWeekdays to an array.

    • A maximum of seven time points can be selected.
    • The format is an JSON array of ["1", "2", … "7"] and the time points are separated by commas (,).
    retentionDays Number
    The snapshot retention time, and the unit of measurement is day. Optional values:

    • -1: The automatic snapshots are retained permanently.
    • [1, 65536]: The number of days retained. Default value: -1.
    status String
    The status of Auto Snapshot Policy.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    targetCopyRegions List<String>
    The destination region to which the snapshot is copied. You can set a destination region.
    timePoints List<String>
    The automatic snapshot creation schedule, and the unit of measurement is hour. Value range: [0, 23], which represents from 00:00 to 24:00, for example 1 indicates 01:00. When you want to schedule multiple automatic snapshot tasks for a disk in a day, you can set the TimePoints to an array.

    • A maximum of 24 time points can be selected.
    • The format is an JSON array of ["0", "1", … "23"] and the time points are separated by commas (,).

    Import

    ECS Auto Snapshot Policy can be imported using the id, e.g.

    $ pulumi import alicloud:ecs/autoSnapshotPolicy:AutoSnapshotPolicy example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi