1. Packages
  2. Packages
  3. Volcenginecc Provider
  4. API Docs
  5. cbr
  6. BackupPolicy
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine
volcenginecc logo
Viewing docs for volcenginecc v0.0.32
published on Thursday, Apr 23, 2026 by Volcengine

    The backup policy defines information such as backup cycle and backup type. Subsequently, backup plans associate the backup policy with backup storage space to achieve automatic backup

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcenginecc from "@pulumi/volcenginecc";
    
    const cBRBackupPolicyDemo = new volcenginecc.index.CbrBackuppolicy("CBRBackupPolicyDemo", {
        backupType: "INCREMENTAL",
        crontab: "0 2,1,0 * * 1,2",
        enablePolicy: false,
        name: "CBRBackupPolicyDemo",
        retentionDay: 67,
        retentionNumMax: -1,
        retentionNumMin: 2,
    });
    
    import pulumi
    import pulumi_volcenginecc as volcenginecc
    
    c_br_backup_policy_demo = volcenginecc.index.CbrBackuppolicy("CBRBackupPolicyDemo",
        backup_type=INCREMENTAL,
        crontab=0 2,1,0 * * 1,2,
        enable_policy=False,
        name=CBRBackupPolicyDemo,
        retention_day=67,
        retention_num_max=-1,
        retention_num_min=2)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcenginecc/sdk/go/volcenginecc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := volcenginecc.NewCbrBackuppolicy(ctx, "CBRBackupPolicyDemo", &volcenginecc.CbrBackuppolicyArgs{
    			BackupType:      "INCREMENTAL",
    			Crontab:         "0 2,1,0 * * 1,2",
    			EnablePolicy:    false,
    			Name:            "CBRBackupPolicyDemo",
    			RetentionDay:    67,
    			RetentionNumMax: -1,
    			RetentionNumMin: 2,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcenginecc = Pulumi.Volcenginecc;
    
    return await Deployment.RunAsync(() => 
    {
        var cBRBackupPolicyDemo = new Volcenginecc.Index.CbrBackuppolicy("CBRBackupPolicyDemo", new()
        {
            BackupType = "INCREMENTAL",
            Crontab = "0 2,1,0 * * 1,2",
            EnablePolicy = false,
            Name = "CBRBackupPolicyDemo",
            RetentionDay = 67,
            RetentionNumMax = -1,
            RetentionNumMin = 2,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcenginecc.cbrBackuppolicy;
    import com.pulumi.volcenginecc.cbrBackuppolicyArgs;
    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 cBRBackupPolicyDemo = new CbrBackuppolicy("cBRBackupPolicyDemo", CbrBackuppolicyArgs.builder()
                .backupType("INCREMENTAL")
                .crontab("0 2,1,0 * * 1,2")
                .enablePolicy(false)
                .name("CBRBackupPolicyDemo")
                .retentionDay(67)
                .retentionNumMax(-1)
                .retentionNumMin(2)
                .build());
    
        }
    }
    
    resources:
      cBRBackupPolicyDemo:
        type: volcenginecc:cbrBackuppolicy
        name: CBRBackupPolicyDemo
        properties:
          backupType: INCREMENTAL
          crontab: 0 2,1,0 * * 1,2
          enablePolicy: false
          name: CBRBackupPolicyDemo
          retentionDay: 67
          retentionNumMax: -1
          retentionNumMin: 2
    

    Create BackupPolicy Resource

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

    Constructor syntax

    new BackupPolicy(name: string, args: BackupPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def BackupPolicy(resource_name: str,
                     args: BackupPolicyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def BackupPolicy(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     backup_type: Optional[str] = None,
                     crontab: Optional[str] = None,
                     enable_policy: Optional[bool] = None,
                     name: Optional[str] = None,
                     retention_day: Optional[int] = None,
                     retention_num_max: Optional[int] = None,
                     retention_num_min: Optional[int] = None)
    func NewBackupPolicy(ctx *Context, name string, args BackupPolicyArgs, opts ...ResourceOption) (*BackupPolicy, error)
    public BackupPolicy(string name, BackupPolicyArgs args, CustomResourceOptions? opts = null)
    public BackupPolicy(String name, BackupPolicyArgs args)
    public BackupPolicy(String name, BackupPolicyArgs args, CustomResourceOptions options)
    
    type: volcenginecc:cbr:BackupPolicy
    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 BackupPolicyArgs
    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 BackupPolicyArgs
    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 BackupPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BackupPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    BackupPolicy 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 BackupPolicy resource accepts the following input properties:

    BackupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    Crontab string
    Backup cycle, using a crontab expression
    EnablePolicy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    Name string
    Policy Name
    RetentionDay int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    RetentionNumMax int
    Maximum number of restore points retained
    RetentionNumMin int
    Minimum restore point retention limit
    BackupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    Crontab string
    Backup cycle, using a crontab expression
    EnablePolicy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    Name string
    Policy Name
    RetentionDay int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    RetentionNumMax int
    Maximum number of restore points retained
    RetentionNumMin int
    Minimum restore point retention limit
    backupType String
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    crontab String
    Backup cycle, using a crontab expression
    enablePolicy Boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name String
    Policy Name
    retentionDay Integer
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax Integer
    Maximum number of restore points retained
    retentionNumMin Integer
    Minimum restore point retention limit
    backupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    crontab string
    Backup cycle, using a crontab expression
    enablePolicy boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name string
    Policy Name
    retentionDay number
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax number
    Maximum number of restore points retained
    retentionNumMin number
    Minimum restore point retention limit
    backup_type str
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    crontab str
    Backup cycle, using a crontab expression
    enable_policy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name str
    Policy Name
    retention_day int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retention_num_max int
    Maximum number of restore points retained
    retention_num_min int
    Minimum restore point retention limit
    backupType String
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    crontab String
    Backup cycle, using a crontab expression
    enablePolicy Boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name String
    Policy Name
    retentionDay Number
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax Number
    Maximum number of restore points retained
    retentionNumMin Number
    Minimum restore point retention limit

    Outputs

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

    AccountId string
    Account ID that created this policy
    CreatedTime string
    Creation time
    Id string
    The provider-assigned unique ID for this managed resource.
    PlanNumber int
    Number of backup plans associated with this policy
    PolicyId string
    Backup Policy ID
    UpdatedTime string
    Update time
    AccountId string
    Account ID that created this policy
    CreatedTime string
    Creation time
    Id string
    The provider-assigned unique ID for this managed resource.
    PlanNumber int
    Number of backup plans associated with this policy
    PolicyId string
    Backup Policy ID
    UpdatedTime string
    Update time
    accountId String
    Account ID that created this policy
    createdTime String
    Creation time
    id String
    The provider-assigned unique ID for this managed resource.
    planNumber Integer
    Number of backup plans associated with this policy
    policyId String
    Backup Policy ID
    updatedTime String
    Update time
    accountId string
    Account ID that created this policy
    createdTime string
    Creation time
    id string
    The provider-assigned unique ID for this managed resource.
    planNumber number
    Number of backup plans associated with this policy
    policyId string
    Backup Policy ID
    updatedTime string
    Update time
    account_id str
    Account ID that created this policy
    created_time str
    Creation time
    id str
    The provider-assigned unique ID for this managed resource.
    plan_number int
    Number of backup plans associated with this policy
    policy_id str
    Backup Policy ID
    updated_time str
    Update time
    accountId String
    Account ID that created this policy
    createdTime String
    Creation time
    id String
    The provider-assigned unique ID for this managed resource.
    planNumber Number
    Number of backup plans associated with this policy
    policyId String
    Backup Policy ID
    updatedTime String
    Update time

    Look up Existing BackupPolicy Resource

    Get an existing BackupPolicy 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?: BackupPolicyState, opts?: CustomResourceOptions): BackupPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            backup_type: Optional[str] = None,
            created_time: Optional[str] = None,
            crontab: Optional[str] = None,
            enable_policy: Optional[bool] = None,
            name: Optional[str] = None,
            plan_number: Optional[int] = None,
            policy_id: Optional[str] = None,
            retention_day: Optional[int] = None,
            retention_num_max: Optional[int] = None,
            retention_num_min: Optional[int] = None,
            updated_time: Optional[str] = None) -> BackupPolicy
    func GetBackupPolicy(ctx *Context, name string, id IDInput, state *BackupPolicyState, opts ...ResourceOption) (*BackupPolicy, error)
    public static BackupPolicy Get(string name, Input<string> id, BackupPolicyState? state, CustomResourceOptions? opts = null)
    public static BackupPolicy get(String name, Output<String> id, BackupPolicyState state, CustomResourceOptions options)
    resources:  _:    type: volcenginecc:cbr:BackupPolicy    get:      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:
    AccountId string
    Account ID that created this policy
    BackupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    CreatedTime string
    Creation time
    Crontab string
    Backup cycle, using a crontab expression
    EnablePolicy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    Name string
    Policy Name
    PlanNumber int
    Number of backup plans associated with this policy
    PolicyId string
    Backup Policy ID
    RetentionDay int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    RetentionNumMax int
    Maximum number of restore points retained
    RetentionNumMin int
    Minimum restore point retention limit
    UpdatedTime string
    Update time
    AccountId string
    Account ID that created this policy
    BackupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    CreatedTime string
    Creation time
    Crontab string
    Backup cycle, using a crontab expression
    EnablePolicy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    Name string
    Policy Name
    PlanNumber int
    Number of backup plans associated with this policy
    PolicyId string
    Backup Policy ID
    RetentionDay int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    RetentionNumMax int
    Maximum number of restore points retained
    RetentionNumMin int
    Minimum restore point retention limit
    UpdatedTime string
    Update time
    accountId String
    Account ID that created this policy
    backupType String
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    createdTime String
    Creation time
    crontab String
    Backup cycle, using a crontab expression
    enablePolicy Boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name String
    Policy Name
    planNumber Integer
    Number of backup plans associated with this policy
    policyId String
    Backup Policy ID
    retentionDay Integer
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax Integer
    Maximum number of restore points retained
    retentionNumMin Integer
    Minimum restore point retention limit
    updatedTime String
    Update time
    accountId string
    Account ID that created this policy
    backupType string
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    createdTime string
    Creation time
    crontab string
    Backup cycle, using a crontab expression
    enablePolicy boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name string
    Policy Name
    planNumber number
    Number of backup plans associated with this policy
    policyId string
    Backup Policy ID
    retentionDay number
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax number
    Maximum number of restore points retained
    retentionNumMin number
    Minimum restore point retention limit
    updatedTime string
    Update time
    account_id str
    Account ID that created this policy
    backup_type str
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    created_time str
    Creation time
    crontab str
    Backup cycle, using a crontab expression
    enable_policy bool
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name str
    Policy Name
    plan_number int
    Number of backup plans associated with this policy
    policy_id str
    Backup Policy ID
    retention_day int
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retention_num_max int
    Maximum number of restore points retained
    retention_num_min int
    Minimum restore point retention limit
    updated_time str
    Update time
    accountId String
    Account ID that created this policy
    backupType String
    Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
    createdTime String
    Creation time
    crontab String
    Backup cycle, using a crontab expression
    enablePolicy Boolean
    Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
    name String
    Policy Name
    planNumber Number
    Number of backup plans associated with this policy
    policyId String
    Backup Policy ID
    retentionDay Number
    Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
    retentionNumMax Number
    Maximum number of restore points retained
    retentionNumMin Number
    Minimum restore point retention limit
    updatedTime String
    Update time

    Import

    $ pulumi import volcenginecc:cbr/backupPolicy:BackupPolicy example "policy_id"
    

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

    Package Details

    Repository
    volcenginecc volcengine/pulumi-volcenginecc
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the volcenginecc Terraform Provider.
    volcenginecc logo
    Viewing docs for volcenginecc v0.0.32
    published on Thursday, Apr 23, 2026 by Volcengine
      Try Pulumi Cloud free. Your team will thank you.