1. Packages
  2. Packages
  3. Bytepluscc Provider
  4. API Docs
  5. storageebs
  6. SnapshotPolicy
Viewing docs for bytepluscc v0.0.35
published on Monday, Jun 15, 2026 by Byteplus
bytepluscc logo
Viewing docs for bytepluscc v0.0.35
published on Monday, Jun 15, 2026 by Byteplus

    Automatic snapshot policy

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bytepluscc from "@byteplus/pulumi-bytepluscc";
    
    const storageEBSSnapshotPolicyDemo = new bytepluscc.storageebs.SnapshotPolicy("StorageEBSSnapshotPolicyDemo", {
        autoSnapshotPolicyName: "ccapi-test",
        timePoints: [
            "0",
            "1",
        ],
        repeatWeekdays: [
            "2",
            "5",
        ],
        retentionDays: 7,
        projectName: "default",
        addVolumeIds: [
            "vol-3x594jtg0g4cxxxxx",
            "vol-3x594j4dvp4i4txxxxx",
        ],
        tags: [{
            key: "env",
            value: "test",
        }],
    });
    
    import pulumi
    import pulumi_bytepluscc as bytepluscc
    
    storage_ebs_snapshot_policy_demo = bytepluscc.storageebs.SnapshotPolicy("StorageEBSSnapshotPolicyDemo",
        auto_snapshot_policy_name="ccapi-test",
        time_points=[
            "0",
            "1",
        ],
        repeat_weekdays=[
            "2",
            "5",
        ],
        retention_days=7,
        project_name="default",
        add_volume_ids=[
            "vol-3x594jtg0g4cxxxxx",
            "vol-3x594j4dvp4i4txxxxx",
        ],
        tags=[{
            "key": "env",
            "value": "test",
        }])
    
    package main
    
    import (
    	"github.com/byteplus-sdk/pulumi-bytepluscc/sdk/go/bytepluscc/storageebs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := storageebs.NewSnapshotPolicy(ctx, "StorageEBSSnapshotPolicyDemo", &storageebs.SnapshotPolicyArgs{
    			AutoSnapshotPolicyName: pulumi.String("ccapi-test"),
    			TimePoints: pulumi.StringArray{
    				pulumi.String("0"),
    				pulumi.String("1"),
    			},
    			RepeatWeekdays: pulumi.StringArray{
    				pulumi.String("2"),
    				pulumi.String("5"),
    			},
    			RetentionDays: pulumi.Int(7),
    			ProjectName:   pulumi.String("default"),
    			AddVolumeIds: pulumi.StringArray{
    				pulumi.String("vol-3x594jtg0g4cxxxxx"),
    				pulumi.String("vol-3x594j4dvp4i4txxxxx"),
    			},
    			Tags: storageebs.SnapshotPolicyTagArray{
    				&storageebs.SnapshotPolicyTagArgs{
    					Key:   pulumi.String("env"),
    					Value: pulumi.String("test"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bytepluscc = Byteplus.Pulumi.Bytepluscc;
    
    return await Deployment.RunAsync(() => 
    {
        var storageEBSSnapshotPolicyDemo = new Bytepluscc.Storageebs.SnapshotPolicy("StorageEBSSnapshotPolicyDemo", new()
        {
            AutoSnapshotPolicyName = "ccapi-test",
            TimePoints = new[]
            {
                "0",
                "1",
            },
            RepeatWeekdays = new[]
            {
                "2",
                "5",
            },
            RetentionDays = 7,
            ProjectName = "default",
            AddVolumeIds = new[]
            {
                "vol-3x594jtg0g4cxxxxx",
                "vol-3x594j4dvp4i4txxxxx",
            },
            Tags = new[]
            {
                new Bytepluscc.Storageebs.Inputs.SnapshotPolicyTagArgs
                {
                    Key = "env",
                    Value = "test",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.byteplus.bytepluscc.storageebs.SnapshotPolicy;
    import com.byteplus.bytepluscc.storageebs.SnapshotPolicyArgs;
    import com.pulumi.bytepluscc.storageebs.inputs.SnapshotPolicyTagArgs;
    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 storageEBSSnapshotPolicyDemo = new SnapshotPolicy("storageEBSSnapshotPolicyDemo", SnapshotPolicyArgs.builder()
                .autoSnapshotPolicyName("ccapi-test")
                .timePoints(            
                    "0",
                    "1")
                .repeatWeekdays(            
                    "2",
                    "5")
                .retentionDays(7)
                .projectName("default")
                .addVolumeIds(            
                    "vol-3x594jtg0g4cxxxxx",
                    "vol-3x594j4dvp4i4txxxxx")
                .tags(SnapshotPolicyTagArgs.builder()
                    .key("env")
                    .value("test")
                    .build())
                .build());
    
        }
    }
    
    resources:
      storageEBSSnapshotPolicyDemo:
        type: bytepluscc:storageebs:SnapshotPolicy
        name: StorageEBSSnapshotPolicyDemo
        properties:
          autoSnapshotPolicyName: ccapi-test
          timePoints:
            - '0'
            - '1'
          repeatWeekdays:
            - '2'
            - '5'
          retentionDays: 7
          projectName: default
          addVolumeIds:
            - vol-3x594jtg0g4cxxxxx
            - vol-3x594j4dvp4i4txxxxx
          tags:
            - key: env
              value: test
    
    Example coming soon!
    

    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,
                       auto_snapshot_policy_name: Optional[str] = None,
                       retention_days: Optional[int] = None,
                       time_points: Optional[Sequence[str]] = None,
                       add_volume_ids: Optional[Sequence[str]] = None,
                       project_name: Optional[str] = None,
                       remove_volume_ids: Optional[Sequence[str]] = None,
                       repeat_days: Optional[int] = None,
                       repeat_weekdays: Optional[Sequence[str]] = None,
                       tags: Optional[Sequence[SnapshotPolicyTagArgs]] = 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: bytepluscc:storageebs:SnapshotPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "bytepluscc_storageebs_snapshotpolicy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args SnapshotPolicyArgs
    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 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 string
    The unique name of the resource.
    args SnapshotPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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 Bytepluscc.Storageebs.SnapshotPolicy("snapshotPolicyResource", new()
    {
        AutoSnapshotPolicyName = "string",
        RetentionDays = 0,
        TimePoints = new[]
        {
            "string",
        },
        AddVolumeIds = new[]
        {
            "string",
        },
        ProjectName = "string",
        RemoveVolumeIds = new[]
        {
            "string",
        },
        RepeatDays = 0,
        RepeatWeekdays = new[]
        {
            "string",
        },
        Tags = new[]
        {
            new Bytepluscc.Storageebs.Inputs.SnapshotPolicyTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
    });
    
    example, err := storageebs.NewSnapshotPolicy(ctx, "snapshotPolicyResource", &storageebs.SnapshotPolicyArgs{
    	AutoSnapshotPolicyName: pulumi.String("string"),
    	RetentionDays:          pulumi.Int(0),
    	TimePoints: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AddVolumeIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ProjectName: pulumi.String("string"),
    	RemoveVolumeIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	RepeatDays: pulumi.Int(0),
    	RepeatWeekdays: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Tags: storageebs.SnapshotPolicyTagArray{
    		&storageebs.SnapshotPolicyTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    })
    
    resource "bytepluscc_storageebs_snapshotpolicy" "snapshotPolicyResource" {
      auto_snapshot_policy_name = "string"
      retention_days            = 0
      time_points               = ["string"]
      add_volume_ids            = ["string"]
      project_name              = "string"
      remove_volume_ids         = ["string"]
      repeat_days               = 0
      repeat_weekdays           = ["string"]
      tags {
        key   = "string"
        value = "string"
      }
    }
    
    var snapshotPolicyResource = new SnapshotPolicy("snapshotPolicyResource", SnapshotPolicyArgs.builder()
        .autoSnapshotPolicyName("string")
        .retentionDays(0)
        .timePoints("string")
        .addVolumeIds("string")
        .projectName("string")
        .removeVolumeIds("string")
        .repeatDays(0)
        .repeatWeekdays("string")
        .tags(SnapshotPolicyTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build());
    
    snapshot_policy_resource = bytepluscc.storageebs.SnapshotPolicy("snapshotPolicyResource",
        auto_snapshot_policy_name="string",
        retention_days=0,
        time_points=["string"],
        add_volume_ids=["string"],
        project_name="string",
        remove_volume_ids=["string"],
        repeat_days=0,
        repeat_weekdays=["string"],
        tags=[{
            "key": "string",
            "value": "string",
        }])
    
    const snapshotPolicyResource = new bytepluscc.storageebs.SnapshotPolicy("snapshotPolicyResource", {
        autoSnapshotPolicyName: "string",
        retentionDays: 0,
        timePoints: ["string"],
        addVolumeIds: ["string"],
        projectName: "string",
        removeVolumeIds: ["string"],
        repeatDays: 0,
        repeatWeekdays: ["string"],
        tags: [{
            key: "string",
            value: "string",
        }],
    });
    
    type: bytepluscc:storageebs:SnapshotPolicy
    properties:
        addVolumeIds:
            - string
        autoSnapshotPolicyName: string
        projectName: string
        removeVolumeIds:
            - string
        repeatDays: 0
        repeatWeekdays:
            - string
        retentionDays: 0
        tags:
            - key: string
              value: string
        timePoints:
            - string
    

    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:

    AutoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    RetentionDays int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    TimePoints List<string>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    AddVolumeIds List<string>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    ProjectName string
    Project associated with the automatic snapshot policy.
    RemoveVolumeIds List<string>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    RepeatDays int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    RepeatWeekdays List<string>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    Tags List<Byteplus.SnapshotPolicyTag>
    AutoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    RetentionDays int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    TimePoints []string
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    AddVolumeIds []string
    List of cloud disk IDs to associate with the automatic snapshot policy.
    ProjectName string
    Project associated with the automatic snapshot policy.
    RemoveVolumeIds []string
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    RepeatDays int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    RepeatWeekdays []string
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    Tags []SnapshotPolicyTagArgs
    auto_snapshot_policy_name string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    retention_days number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    time_points list(string)
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    add_volume_ids list(string)
    List of cloud disk IDs to associate with the automatic snapshot policy.
    project_name string
    Project associated with the automatic snapshot policy.
    remove_volume_ids list(string)
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeat_days number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeat_weekdays list(string)
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    tags list(object)
    autoSnapshotPolicyName String
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    retentionDays Integer
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    timePoints List<String>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    addVolumeIds List<String>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    projectName String
    Project associated with the automatic snapshot policy.
    removeVolumeIds List<String>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays Integer
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays List<String>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    tags List<SnapshotPolicyTag>
    autoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    retentionDays number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    timePoints string[]
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    addVolumeIds string[]
    List of cloud disk IDs to associate with the automatic snapshot policy.
    projectName string
    Project associated with the automatic snapshot policy.
    removeVolumeIds string[]
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays string[]
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    tags SnapshotPolicyTag[]
    auto_snapshot_policy_name str
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    retention_days int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    time_points Sequence[str]
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    add_volume_ids Sequence[str]
    List of cloud disk IDs to associate with the automatic snapshot policy.
    project_name str
    Project associated with the automatic snapshot policy.
    remove_volume_ids Sequence[str]
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeat_days int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeat_weekdays Sequence[str]
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    tags Sequence[SnapshotPolicyTagArgs]
    autoSnapshotPolicyName String
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    retentionDays Number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    timePoints List<String>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    addVolumeIds List<String>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    projectName String
    Project associated with the automatic snapshot policy.
    removeVolumeIds List<String>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays Number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays List<String>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    tags List<Property Map>

    Outputs

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

    AutoSnapshotPolicyId string
    Automatic snapshot policy ID.
    CreatedAt string
    Creation time of the automatic snapshot policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Reserved parameter.
    UpdatedAt string
    Update time of the automatic snapshot policy.
    VolumeNums int
    Total number of cloud disks.
    AutoSnapshotPolicyId string
    Automatic snapshot policy ID.
    CreatedAt string
    Creation time of the automatic snapshot policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Reserved parameter.
    UpdatedAt string
    Update time of the automatic snapshot policy.
    VolumeNums int
    Total number of cloud disks.
    auto_snapshot_policy_id string
    Automatic snapshot policy ID.
    created_at string
    Creation time of the automatic snapshot policy.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Reserved parameter.
    updated_at string
    Update time of the automatic snapshot policy.
    volume_nums number
    Total number of cloud disks.
    autoSnapshotPolicyId String
    Automatic snapshot policy ID.
    createdAt String
    Creation time of the automatic snapshot policy.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Reserved parameter.
    updatedAt String
    Update time of the automatic snapshot policy.
    volumeNums Integer
    Total number of cloud disks.
    autoSnapshotPolicyId string
    Automatic snapshot policy ID.
    createdAt string
    Creation time of the automatic snapshot policy.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Reserved parameter.
    updatedAt string
    Update time of the automatic snapshot policy.
    volumeNums number
    Total number of cloud disks.
    auto_snapshot_policy_id str
    Automatic snapshot policy ID.
    created_at str
    Creation time of the automatic snapshot policy.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Reserved parameter.
    updated_at str
    Update time of the automatic snapshot policy.
    volume_nums int
    Total number of cloud disks.
    autoSnapshotPolicyId String
    Automatic snapshot policy ID.
    createdAt String
    Creation time of the automatic snapshot policy.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Reserved parameter.
    updatedAt String
    Update time of the automatic snapshot policy.
    volumeNums Number
    Total number of cloud disks.

    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,
            add_volume_ids: Optional[Sequence[str]] = None,
            auto_snapshot_policy_id: Optional[str] = None,
            auto_snapshot_policy_name: Optional[str] = None,
            created_at: Optional[str] = None,
            project_name: Optional[str] = None,
            remove_volume_ids: Optional[Sequence[str]] = None,
            repeat_days: Optional[int] = None,
            repeat_weekdays: Optional[Sequence[str]] = None,
            retention_days: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Sequence[SnapshotPolicyTagArgs]] = None,
            time_points: Optional[Sequence[str]] = None,
            updated_at: Optional[str] = None,
            volume_nums: Optional[int] = 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: bytepluscc:storageebs:SnapshotPolicy    get:      id: ${id}
    import {
      to = bytepluscc_storageebs_snapshotpolicy.example
      id = "${id}"
    }
    
    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:
    AddVolumeIds List<string>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    AutoSnapshotPolicyId string
    Automatic snapshot policy ID.
    AutoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    CreatedAt string
    Creation time of the automatic snapshot policy.
    ProjectName string
    Project associated with the automatic snapshot policy.
    RemoveVolumeIds List<string>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    RepeatDays int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    RepeatWeekdays List<string>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    RetentionDays int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    Status string
    Reserved parameter.
    Tags List<Byteplus.SnapshotPolicyTag>
    TimePoints List<string>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    UpdatedAt string
    Update time of the automatic snapshot policy.
    VolumeNums int
    Total number of cloud disks.
    AddVolumeIds []string
    List of cloud disk IDs to associate with the automatic snapshot policy.
    AutoSnapshotPolicyId string
    Automatic snapshot policy ID.
    AutoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    CreatedAt string
    Creation time of the automatic snapshot policy.
    ProjectName string
    Project associated with the automatic snapshot policy.
    RemoveVolumeIds []string
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    RepeatDays int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    RepeatWeekdays []string
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    RetentionDays int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    Status string
    Reserved parameter.
    Tags []SnapshotPolicyTagArgs
    TimePoints []string
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    UpdatedAt string
    Update time of the automatic snapshot policy.
    VolumeNums int
    Total number of cloud disks.
    add_volume_ids list(string)
    List of cloud disk IDs to associate with the automatic snapshot policy.
    auto_snapshot_policy_id string
    Automatic snapshot policy ID.
    auto_snapshot_policy_name string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    created_at string
    Creation time of the automatic snapshot policy.
    project_name string
    Project associated with the automatic snapshot policy.
    remove_volume_ids list(string)
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeat_days number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeat_weekdays list(string)
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    retention_days number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    status string
    Reserved parameter.
    tags list(object)
    time_points list(string)
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    updated_at string
    Update time of the automatic snapshot policy.
    volume_nums number
    Total number of cloud disks.
    addVolumeIds List<String>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    autoSnapshotPolicyId String
    Automatic snapshot policy ID.
    autoSnapshotPolicyName String
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    createdAt String
    Creation time of the automatic snapshot policy.
    projectName String
    Project associated with the automatic snapshot policy.
    removeVolumeIds List<String>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays Integer
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays List<String>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    retentionDays Integer
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    status String
    Reserved parameter.
    tags List<SnapshotPolicyTag>
    timePoints List<String>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    updatedAt String
    Update time of the automatic snapshot policy.
    volumeNums Integer
    Total number of cloud disks.
    addVolumeIds string[]
    List of cloud disk IDs to associate with the automatic snapshot policy.
    autoSnapshotPolicyId string
    Automatic snapshot policy ID.
    autoSnapshotPolicyName string
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    createdAt string
    Creation time of the automatic snapshot policy.
    projectName string
    Project associated with the automatic snapshot policy.
    removeVolumeIds string[]
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays string[]
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    retentionDays number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    status string
    Reserved parameter.
    tags SnapshotPolicyTag[]
    timePoints string[]
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    updatedAt string
    Update time of the automatic snapshot policy.
    volumeNums number
    Total number of cloud disks.
    add_volume_ids Sequence[str]
    List of cloud disk IDs to associate with the automatic snapshot policy.
    auto_snapshot_policy_id str
    Automatic snapshot policy ID.
    auto_snapshot_policy_name str
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    created_at str
    Creation time of the automatic snapshot policy.
    project_name str
    Project associated with the automatic snapshot policy.
    remove_volume_ids Sequence[str]
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeat_days int
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeat_weekdays Sequence[str]
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    retention_days int
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    status str
    Reserved parameter.
    tags Sequence[SnapshotPolicyTagArgs]
    time_points Sequence[str]
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    updated_at str
    Update time of the automatic snapshot policy.
    volume_nums int
    Total number of cloud disks.
    addVolumeIds List<String>
    List of cloud disk IDs to associate with the automatic snapshot policy.
    autoSnapshotPolicyId String
    Automatic snapshot policy ID.
    autoSnapshotPolicyName String
    Automatic snapshot policy name. Naming rules: The first character must be Chinese, a letter, or an underscore (). It can include Chinese, letters, numbers, underscores (), hyphens (-), or periods (.). Length must be between 1 and 128 characters.
    createdAt String
    Creation time of the automatic snapshot policy.
    projectName String
    Project associated with the automatic snapshot policy.
    removeVolumeIds List<String>
    List of cloud disk IDs to disassociate from the automatic snapshot policy.
    repeatDays Number
    Create snapshots on a daily basis, with a specified interval in days. The value range is [1, 30]. When repeating snapshot creation daily, the day you create the automatic snapshot policy is considered Day 1. Snapshots will not be created for past time points. If all scheduled snapshot times for the day have passed, the day is still counted as Day 1.
    repeatWeekdays List<String>
    Create snapshots on a weekly basis by selecting one or more days from Monday to Sunday. The value range is 1–7. When creating an automatic snapshot policy, you must set either the RepeatWeekdays.N or RepeatDays parameter. Setting both parameters at the same time is not supported.
    retentionDays Number
    Retention period for automatic snapshots, in days. -1: Save permanently; 1–65536: Specify number of days to retain.
    status String
    Reserved parameter.
    tags List<Property Map>
    timePoints List<String>
    Snapshot creation time points, using UTC +8 time. Unit: hour. Value range: 0–23.
    updatedAt String
    Update time of the automatic snapshot policy.
    volumeNums Number
    Total number of cloud disks.

    Supporting Types

    SnapshotPolicyTag, SnapshotPolicyTagArgs

    Key string
    Tag key
    Value string
    Tag value
    Key string
    Tag key
    Value string
    Tag value
    key string
    Tag key
    value string
    Tag value
    key String
    Tag key
    value String
    Tag value
    key string
    Tag key
    value string
    Tag value
    key str
    Tag key
    value str
    Tag value
    key String
    Tag key
    value String
    Tag value

    Import

    $ pulumi import bytepluscc:storageebs/snapshotPolicy:SnapshotPolicy example "auto_snapshot_policy_id"
    

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

    Package Details

    Repository
    bytepluscc byteplus-sdk/pulumi-bytepluscc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the bytepluscc Terraform Provider.
    bytepluscc logo
    Viewing docs for bytepluscc v0.0.35
    published on Monday, Jun 15, 2026 by Byteplus

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial