1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. SnapshotPolicy
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.ecs.SnapshotPolicy

Explore with Pulumi AI

DEPRECATED: This resource has been renamed to alicloud.ecs.AutoSnapshotPolicy from version 1.117.0.

Provides an ECS snapshot policy resource.

For information about snapshot policy and how to use it, see Snapshot.

NOTE: Available in 1.42.0+.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const sp = new alicloud.ecs.SnapshotPolicy("sp", {
    name: "tf-testAcc-sp",
    repeatWeekdays: [
        "1",
        "2",
        "3",
    ],
    retentionDays: -1,
    timePoints: [
        "1",
        "22",
        "23",
    ],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

sp = alicloud.ecs.SnapshotPolicy("sp",
    name="tf-testAcc-sp",
    repeat_weekdays=[
        "1",
        "2",
        "3",
    ],
    retention_days=-1,
    time_points=[
        "1",
        "22",
        "23",
    ])
Copy
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.NewSnapshotPolicy(ctx, "sp", &ecs.SnapshotPolicyArgs{
			Name: pulumi.String("tf-testAcc-sp"),
			RepeatWeekdays: pulumi.StringArray{
				pulumi.String("1"),
				pulumi.String("2"),
				pulumi.String("3"),
			},
			RetentionDays: pulumi.Int(-1),
			TimePoints: pulumi.StringArray{
				pulumi.String("1"),
				pulumi.String("22"),
				pulumi.String("23"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var sp = new AliCloud.Ecs.SnapshotPolicy("sp", new()
    {
        Name = "tf-testAcc-sp",
        RepeatWeekdays = new[]
        {
            "1",
            "2",
            "3",
        },
        RetentionDays = -1,
        TimePoints = new[]
        {
            "1",
            "22",
            "23",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.SnapshotPolicy;
import com.pulumi.alicloud.ecs.SnapshotPolicyArgs;
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 sp = new SnapshotPolicy("sp", SnapshotPolicyArgs.builder()
            .name("tf-testAcc-sp")
            .repeatWeekdays(            
                "1",
                "2",
                "3")
            .retentionDays(-1)
            .timePoints(            
                "1",
                "22",
                "23")
            .build());

    }
}
Copy
resources:
  sp:
    type: alicloud:ecs:SnapshotPolicy
    properties:
      name: tf-testAcc-sp
      repeatWeekdays:
        - '1'
        - '2'
        - '3'
      retentionDays: -1
      timePoints:
        - '1'
        - '22'
        - '23'
Copy

Create SnapshotPolicy Resource

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

Constructor syntax

new SnapshotPolicy(name: string, args: SnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def SnapshotPolicy(resource_name: str,
                   args: SnapshotPolicyArgs,
                   opts: Optional[ResourceOptions] = None)

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

Parameters

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

Constructor example

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

var snapshotPolicyResource = new AliCloud.Ecs.SnapshotPolicy("snapshotPolicyResource", new()
{
    RepeatWeekdays = new[]
    {
        "string",
    },
    RetentionDays = 0,
    TimePoints = new[]
    {
        "string",
    },
    AutoSnapshotPolicyName = "string",
    CopiedSnapshotsRetentionDays = 0,
    CopyEncryptionConfiguration = new AliCloud.Ecs.Inputs.SnapshotPolicyCopyEncryptionConfigurationArgs
    {
        Encrypted = false,
        KmsKeyId = "string",
    },
    EnableCrossRegionCopy = false,
    ResourceGroupId = "string",
    Tags = 
    {
        { "string", "string" },
    },
    TargetCopyRegions = new[]
    {
        "string",
    },
});
Copy
example, err := ecs.NewSnapshotPolicy(ctx, "snapshotPolicyResource", &ecs.SnapshotPolicyArgs{
	RepeatWeekdays: pulumi.StringArray{
		pulumi.String("string"),
	},
	RetentionDays: pulumi.Int(0),
	TimePoints: pulumi.StringArray{
		pulumi.String("string"),
	},
	AutoSnapshotPolicyName:       pulumi.String("string"),
	CopiedSnapshotsRetentionDays: pulumi.Int(0),
	CopyEncryptionConfiguration: &ecs.SnapshotPolicyCopyEncryptionConfigurationArgs{
		Encrypted: pulumi.Bool(false),
		KmsKeyId:  pulumi.String("string"),
	},
	EnableCrossRegionCopy: pulumi.Bool(false),
	ResourceGroupId:       pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	TargetCopyRegions: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var snapshotPolicyResource = new SnapshotPolicy("snapshotPolicyResource", SnapshotPolicyArgs.builder()
    .repeatWeekdays("string")
    .retentionDays(0)
    .timePoints("string")
    .autoSnapshotPolicyName("string")
    .copiedSnapshotsRetentionDays(0)
    .copyEncryptionConfiguration(SnapshotPolicyCopyEncryptionConfigurationArgs.builder()
        .encrypted(false)
        .kmsKeyId("string")
        .build())
    .enableCrossRegionCopy(false)
    .resourceGroupId("string")
    .tags(Map.of("string", "string"))
    .targetCopyRegions("string")
    .build());
Copy
snapshot_policy_resource = alicloud.ecs.SnapshotPolicy("snapshotPolicyResource",
    repeat_weekdays=["string"],
    retention_days=0,
    time_points=["string"],
    auto_snapshot_policy_name="string",
    copied_snapshots_retention_days=0,
    copy_encryption_configuration={
        "encrypted": False,
        "kms_key_id": "string",
    },
    enable_cross_region_copy=False,
    resource_group_id="string",
    tags={
        "string": "string",
    },
    target_copy_regions=["string"])
Copy
const snapshotPolicyResource = new alicloud.ecs.SnapshotPolicy("snapshotPolicyResource", {
    repeatWeekdays: ["string"],
    retentionDays: 0,
    timePoints: ["string"],
    autoSnapshotPolicyName: "string",
    copiedSnapshotsRetentionDays: 0,
    copyEncryptionConfiguration: {
        encrypted: false,
        kmsKeyId: "string",
    },
    enableCrossRegionCopy: false,
    resourceGroupId: "string",
    tags: {
        string: "string",
    },
    targetCopyRegions: ["string"],
});
Copy
type: alicloud:ecs:SnapshotPolicy
properties:
    autoSnapshotPolicyName: string
    copiedSnapshotsRetentionDays: 0
    copyEncryptionConfiguration:
        encrypted: false
        kmsKeyId: string
    enableCrossRegionCopy: false
    repeatWeekdays:
        - string
    resourceGroupId: string
    retentionDays: 0
    tags:
        string: string
    targetCopyRegions:
        - string
    timePoints:
        - string
Copy

SnapshotPolicy Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SnapshotPolicy resource accepts the following input properties:

RepeatWeekdays This property is required. 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 This property is required. 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 This property is required. 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 (,).
AutoSnapshotPolicyName string
CopiedSnapshotsRetentionDays int
CopyEncryptionConfiguration Pulumi.AliCloud.Ecs.Inputs.SnapshotPolicyCopyEncryptionConfiguration
EnableCrossRegionCopy bool
Name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

ResourceGroupId string
Tags Dictionary<string, string>
TargetCopyRegions List<string>
RepeatWeekdays This property is required. []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 This property is required. 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 This property is required. []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 (,).
AutoSnapshotPolicyName string
CopiedSnapshotsRetentionDays int
CopyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfigurationArgs
EnableCrossRegionCopy bool
Name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

ResourceGroupId string
Tags map[string]string
TargetCopyRegions []string
repeatWeekdays This property is required. 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 This property is required. 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 This property is required. 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 (,).
autoSnapshotPolicyName String
copiedSnapshotsRetentionDays Integer
copyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfiguration
enableCrossRegionCopy Boolean
name String
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

resourceGroupId String
tags Map<String,String>
targetCopyRegions List<String>
repeatWeekdays This property is required. 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 This property is required. 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 This property is required. 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 (,).
autoSnapshotPolicyName string
copiedSnapshotsRetentionDays number
copyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfiguration
enableCrossRegionCopy boolean
name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

resourceGroupId string
tags {[key: string]: string}
targetCopyRegions string[]
repeat_weekdays This property is required. 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 This property is required. 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 This property is required. 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 (,).
auto_snapshot_policy_name str
copied_snapshots_retention_days int
copy_encryption_configuration SnapshotPolicyCopyEncryptionConfigurationArgs
enable_cross_region_copy bool
name str
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

resource_group_id str
tags Mapping[str, str]
target_copy_regions Sequence[str]
repeatWeekdays This property is required. 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 This property is required. 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 This property is required. 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 (,).
autoSnapshotPolicyName String
copiedSnapshotsRetentionDays Number
copyEncryptionConfiguration Property Map
enableCrossRegionCopy Boolean
name String
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

resourceGroupId String
tags Map<String>
targetCopyRegions List<String>

Outputs

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

CreateTime string
Id string
The provider-assigned unique ID for this managed resource.
RegionId string
Status string
CreateTime string
Id string
The provider-assigned unique ID for this managed resource.
RegionId string
Status string
createTime String
id String
The provider-assigned unique ID for this managed resource.
regionId String
status String
createTime string
id string
The provider-assigned unique ID for this managed resource.
regionId string
status string
create_time str
id str
The provider-assigned unique ID for this managed resource.
region_id str
status str
createTime String
id String
The provider-assigned unique ID for this managed resource.
regionId String
status String

Look up Existing SnapshotPolicy Resource

Get an existing SnapshotPolicy 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?: SnapshotPolicyState, opts?: CustomResourceOptions): SnapshotPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auto_snapshot_policy_name: Optional[str] = None,
        copied_snapshots_retention_days: Optional[int] = None,
        copy_encryption_configuration: Optional[SnapshotPolicyCopyEncryptionConfigurationArgs] = None,
        create_time: Optional[str] = None,
        enable_cross_region_copy: Optional[bool] = None,
        name: Optional[str] = None,
        region_id: Optional[str] = None,
        repeat_weekdays: Optional[Sequence[str]] = None,
        resource_group_id: Optional[str] = None,
        retention_days: Optional[int] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        target_copy_regions: Optional[Sequence[str]] = None,
        time_points: Optional[Sequence[str]] = None) -> SnapshotPolicy
func GetSnapshotPolicy(ctx *Context, name string, id IDInput, state *SnapshotPolicyState, opts ...ResourceOption) (*SnapshotPolicy, error)
public static SnapshotPolicy Get(string name, Input<string> id, SnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static SnapshotPolicy get(String name, Output<String> id, SnapshotPolicyState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:SnapshotPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AutoSnapshotPolicyName string
CopiedSnapshotsRetentionDays int
CopyEncryptionConfiguration Pulumi.AliCloud.Ecs.Inputs.SnapshotPolicyCopyEncryptionConfiguration
CreateTime string
EnableCrossRegionCopy bool
Name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

RegionId string
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 (,).
ResourceGroupId string
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
Tags Dictionary<string, string>
TargetCopyRegions List<string>
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 (,).
AutoSnapshotPolicyName string
CopiedSnapshotsRetentionDays int
CopyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfigurationArgs
CreateTime string
EnableCrossRegionCopy bool
Name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

RegionId string
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 (,).
ResourceGroupId string
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
Tags map[string]string
TargetCopyRegions []string
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 (,).
autoSnapshotPolicyName String
copiedSnapshotsRetentionDays Integer
copyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfiguration
createTime String
enableCrossRegionCopy Boolean
name String
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

regionId String
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 (,).
resourceGroupId String
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
tags Map<String,String>
targetCopyRegions List<String>
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 (,).
autoSnapshotPolicyName string
copiedSnapshotsRetentionDays number
copyEncryptionConfiguration SnapshotPolicyCopyEncryptionConfiguration
createTime string
enableCrossRegionCopy boolean
name string
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

regionId string
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 (,).
resourceGroupId string
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
tags {[key: string]: string}
targetCopyRegions string[]
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 (,).
auto_snapshot_policy_name str
copied_snapshots_retention_days int
copy_encryption_configuration SnapshotPolicyCopyEncryptionConfigurationArgs
create_time str
enable_cross_region_copy bool
name str
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

region_id str
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 (,).
resource_group_id str
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
tags Mapping[str, str]
target_copy_regions Sequence[str]
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 (,).
autoSnapshotPolicyName String
copiedSnapshotsRetentionDays Number
copyEncryptionConfiguration Property Map
createTime String
enableCrossRegionCopy Boolean
name String
The snapshot policy name.

Deprecated: Field name has been deprecated from provider version 1.236.0. New field auto_snapshot_policy_name instead.

regionId String
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 (,).
resourceGroupId String
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
tags Map<String>
targetCopyRegions List<String>
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 (,).

Supporting Types

SnapshotPolicyCopyEncryptionConfiguration
, SnapshotPolicyCopyEncryptionConfigurationArgs

Encrypted bool
KmsKeyId string
Encrypted bool
KmsKeyId string
encrypted Boolean
kmsKeyId String
encrypted boolean
kmsKeyId string
encrypted Boolean
kmsKeyId String

Import

Snapshot can be imported using the id, e.g.

$ pulumi import alicloud:ecs/snapshotPolicy:SnapshotPolicy snapshot sp-abc1234567890000
Copy

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.