published on Thursday, Apr 23, 2026 by Volcengine
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:
- Backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- Crontab string
- 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 string
- Policy Name
- Retention
Day int - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- Retention
Num intMax - Maximum number of restore points retained
- Retention
Num intMin - Minimum restore point retention limit
- Backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- Crontab string
- 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 string
- Policy Name
- Retention
Day int - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- Retention
Num intMax - Maximum number of restore points retained
- Retention
Num intMin - Minimum restore point retention limit
- backup
Type String - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- crontab String
- Backup cycle, using a crontab expression
- enable
Policy Boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name String
- Policy Name
- retention
Day Integer - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num IntegerMax - Maximum number of restore points retained
- retention
Num IntegerMin - Minimum restore point retention limit
- backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- crontab string
- Backup cycle, using a crontab expression
- enable
Policy boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name string
- Policy Name
- retention
Day number - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num numberMax - Maximum number of restore points retained
- retention
Num numberMin - 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_ intmax - Maximum number of restore points retained
- retention_
num_ intmin - Minimum restore point retention limit
- backup
Type String - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- crontab String
- Backup cycle, using a crontab expression
- enable
Policy Boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name String
- Policy Name
- retention
Day Number - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num NumberMax - Maximum number of restore points retained
- retention
Num NumberMin - Minimum restore point retention limit
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupPolicy resource produces the following output properties:
- Account
Id string - Account ID that created this policy
- Created
Time string - Creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Number int - Number of backup plans associated with this policy
- Policy
Id string - Backup Policy ID
- Updated
Time string - Update time
- Account
Id string - Account ID that created this policy
- Created
Time string - Creation time
- Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Number int - Number of backup plans associated with this policy
- Policy
Id string - Backup Policy ID
- Updated
Time string - Update time
- account
Id String - Account ID that created this policy
- created
Time String - Creation time
- id String
- The provider-assigned unique ID for this managed resource.
- plan
Number Integer - Number of backup plans associated with this policy
- policy
Id String - Backup Policy ID
- updated
Time String - Update time
- account
Id string - Account ID that created this policy
- created
Time string - Creation time
- id string
- The provider-assigned unique ID for this managed resource.
- plan
Number number - Number of backup plans associated with this policy
- policy
Id string - Backup Policy ID
- updated
Time 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
- account
Id String - Account ID that created this policy
- created
Time String - Creation time
- id String
- The provider-assigned unique ID for this managed resource.
- plan
Number Number - Number of backup plans associated with this policy
- policy
Id String - Backup Policy ID
- updated
Time 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) -> BackupPolicyfunc 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.
- Account
Id string - Account ID that created this policy
- Backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- Created
Time string - Creation time
- Crontab string
- 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 string
- Policy Name
- Plan
Number int - Number of backup plans associated with this policy
- Policy
Id string - Backup Policy ID
- Retention
Day int - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- Retention
Num intMax - Maximum number of restore points retained
- Retention
Num intMin - Minimum restore point retention limit
- Updated
Time string - Update time
- Account
Id string - Account ID that created this policy
- Backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- Created
Time string - Creation time
- Crontab string
- 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 string
- Policy Name
- Plan
Number int - Number of backup plans associated with this policy
- Policy
Id string - Backup Policy ID
- Retention
Day int - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- Retention
Num intMax - Maximum number of restore points retained
- Retention
Num intMin - Minimum restore point retention limit
- Updated
Time string - Update time
- account
Id String - Account ID that created this policy
- backup
Type String - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- created
Time String - Creation time
- crontab String
- Backup cycle, using a crontab expression
- enable
Policy Boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name String
- Policy Name
- plan
Number Integer - Number of backup plans associated with this policy
- policy
Id String - Backup Policy ID
- retention
Day Integer - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num IntegerMax - Maximum number of restore points retained
- retention
Num IntegerMin - Minimum restore point retention limit
- updated
Time String - Update time
- account
Id string - Account ID that created this policy
- backup
Type string - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- created
Time string - Creation time
- crontab string
- Backup cycle, using a crontab expression
- enable
Policy boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name string
- Policy Name
- plan
Number number - Number of backup plans associated with this policy
- policy
Id string - Backup Policy ID
- retention
Day number - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num numberMax - Maximum number of restore points retained
- retention
Num numberMin - Minimum restore point retention limit
- updated
Time 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_ intmax - Maximum number of restore points retained
- retention_
num_ intmin - Minimum restore point retention limit
- updated_
time str - Update time
- account
Id String - Account ID that created this policy
- backup
Type String - Backup type. Values are as follows: FULL: full backup; INCREMENTAL: incremental backup
- created
Time String - Creation time
- crontab String
- Backup cycle, using a crontab expression
- enable
Policy Boolean - Whether the policy is enabled. Values are as follows: true: policy enabled; false: policy disabled
- name String
- Policy Name
- plan
Number Number - Number of backup plans associated with this policy
- policy
Id String - Backup Policy ID
- retention
Day Number - Restore point retention period. -1 means retain indefinitely. Other valid values range from [1, 999999]
- retention
Num NumberMax - Maximum number of restore points retained
- retention
Num NumberMin - Minimum restore point retention limit
- updated
Time 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
volcengineccTerraform Provider.
published on Thursday, Apr 23, 2026 by Volcengine
