当需要对备份源进行自动备份时,可以创建备份计划,在备份计划中关联备份源和备份策略,指定备份存储空间,并设置备份数据保留规则等。在创建备份计划后,系统将按照关联备份策略配置,对指定备份源进行统一自动备份。
Example Usage
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
resources:
cBRBackupPlanDemo:
type: volcenginecc:cbr:BackupPlan
name: CBRBackupPlanDemo
properties:
name: CBRBackupPlanDemo
policyId: policy-krn3z1wf9ubujxxxxx
resourceLists:
- resource_type: ECS
resource_id: res-krn4bq3sctbwvxxxxx
meta_information:
vepfsMeta: ""
ecsMeta: '{"AutoBackupAllAttachedVolumes":true,"VolumeList":[{"VolumeId":"vol-3wt6m9uygg4kgxxxxx","VolumeName":"emr-d6af13acb6966xxxxx-volume-1-2","VolumeType":"ESSD_FlexPL"},{"VolumeId":"vol-3wt6m9vh3a3qxxxxx","VolumeName":"emr-d6af13acb6966xxxxx-volume-2-2","VolumeType":"ESSD_FlexPL"}]}'
Create BackupPlan Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BackupPlan(name: string, args: BackupPlanArgs, opts?: CustomResourceOptions);@overload
def BackupPlan(resource_name: str,
args: BackupPlanArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BackupPlan(resource_name: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
resource_lists: Optional[Sequence[BackupPlanResourceListArgs]] = None,
policy_id: Optional[str] = None)func NewBackupPlan(ctx *Context, name string, args BackupPlanArgs, opts ...ResourceOption) (*BackupPlan, error)public BackupPlan(string name, BackupPlanArgs args, CustomResourceOptions? opts = null)
public BackupPlan(String name, BackupPlanArgs args)
public BackupPlan(String name, BackupPlanArgs args, CustomResourceOptions options)
type: volcenginecc:cbr:BackupPlan
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 BackupPlanArgs
- 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 BackupPlanArgs
- 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 BackupPlanArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupPlanArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackupPlanArgs
- 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 backupPlanResource = new Volcenginecc.Cbr.BackupPlan("backupPlanResource", new()
{
Name = "string",
ResourceLists = new[]
{
new Volcenginecc.Cbr.Inputs.BackupPlanResourceListArgs
{
MetaInformation = new Volcenginecc.Cbr.Inputs.BackupPlanResourceListMetaInformationArgs
{
EcsMeta = "string",
VepfsMeta = "string",
},
ResourceId = "string",
ResourceType = "string",
},
},
PolicyId = "string",
});
example, err := cbr.NewBackupPlan(ctx, "backupPlanResource", &cbr.BackupPlanArgs{
Name: pulumi.String("string"),
ResourceLists: cbr.BackupPlanResourceListArray{
&cbr.BackupPlanResourceListArgs{
MetaInformation: &cbr.BackupPlanResourceListMetaInformationArgs{
EcsMeta: pulumi.String("string"),
VepfsMeta: pulumi.String("string"),
},
ResourceId: pulumi.String("string"),
ResourceType: pulumi.String("string"),
},
},
PolicyId: pulumi.String("string"),
})
var backupPlanResource = new BackupPlan("backupPlanResource", BackupPlanArgs.builder()
.name("string")
.resourceLists(BackupPlanResourceListArgs.builder()
.metaInformation(BackupPlanResourceListMetaInformationArgs.builder()
.ecsMeta("string")
.vepfsMeta("string")
.build())
.resourceId("string")
.resourceType("string")
.build())
.policyId("string")
.build());
backup_plan_resource = volcenginecc.cbr.BackupPlan("backupPlanResource",
name="string",
resource_lists=[{
"meta_information": {
"ecs_meta": "string",
"vepfs_meta": "string",
},
"resource_id": "string",
"resource_type": "string",
}],
policy_id="string")
const backupPlanResource = new volcenginecc.cbr.BackupPlan("backupPlanResource", {
name: "string",
resourceLists: [{
metaInformation: {
ecsMeta: "string",
vepfsMeta: "string",
},
resourceId: "string",
resourceType: "string",
}],
policyId: "string",
});
type: volcenginecc:cbr:BackupPlan
properties:
name: string
policyId: string
resourceLists:
- metaInformation:
ecsMeta: string
vepfsMeta: string
resourceId: string
resourceType: string
BackupPlan 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 BackupPlan resource accepts the following input properties:
- Name string
- 备份计划名称。
- Resource
Lists List<Volcengine.Backup Plan Resource List> - Policy
Id string - 备份策略 ID。
- Name string
- 备份计划名称。
- Resource
Lists []BackupPlan Resource List Args - Policy
Id string - 备份策略 ID。
- name String
- 备份计划名称。
- resource
Lists List<BackupPlan Resource List> - policy
Id String - 备份策略 ID。
- name string
- 备份计划名称。
- resource
Lists BackupPlan Resource List[] - policy
Id string - 备份策略 ID。
- name str
- 备份计划名称。
- resource_
lists Sequence[BackupPlan Resource List Args] - policy_
id str - 备份策略 ID。
- name String
- 备份计划名称。
- resource
Lists List<Property Map> - policy
Id String - 备份策略 ID。
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupPlan resource produces the following output properties:
- Account
Id string - 创建此计划的账户 ID。
- Created
Time string - 创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Id string - 备份计划 ID。
- Policy
Volcengine.
Backup Plan Policy - 备份策略。
- Updated
Time string - 更新时间。
- Account
Id string - 创建此计划的账户 ID。
- Created
Time string - 创建时间。
- Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Id string - 备份计划 ID。
- Policy
Backup
Plan Policy - 备份策略。
- Updated
Time string - 更新时间。
- account
Id String - 创建此计划的账户 ID。
- created
Time String - 创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- plan
Id String - 备份计划 ID。
- policy
Backup
Plan Policy - 备份策略。
- updated
Time String - 更新时间。
- account
Id string - 创建此计划的账户 ID。
- created
Time string - 创建时间。
- id string
- The provider-assigned unique ID for this managed resource.
- plan
Id string - 备份计划 ID。
- policy
Backup
Plan Policy - 备份策略。
- updated
Time string - 更新时间。
- account_
id str - 创建此计划的账户 ID。
- created_
time str - 创建时间。
- id str
- The provider-assigned unique ID for this managed resource.
- plan_
id str - 备份计划 ID。
- policy
Backup
Plan Policy - 备份策略。
- updated_
time str - 更新时间。
- account
Id String - 创建此计划的账户 ID。
- created
Time String - 创建时间。
- id String
- The provider-assigned unique ID for this managed resource.
- plan
Id String - 备份计划 ID。
- policy Property Map
- 备份策略。
- updated
Time String - 更新时间。
Look up Existing BackupPlan Resource
Get an existing BackupPlan 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?: BackupPlanState, opts?: CustomResourceOptions): BackupPlan@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
created_time: Optional[str] = None,
name: Optional[str] = None,
plan_id: Optional[str] = None,
policy: Optional[BackupPlanPolicyArgs] = None,
policy_id: Optional[str] = None,
resource_lists: Optional[Sequence[BackupPlanResourceListArgs]] = None,
updated_time: Optional[str] = None) -> BackupPlanfunc GetBackupPlan(ctx *Context, name string, id IDInput, state *BackupPlanState, opts ...ResourceOption) (*BackupPlan, error)public static BackupPlan Get(string name, Input<string> id, BackupPlanState? state, CustomResourceOptions? opts = null)public static BackupPlan get(String name, Output<String> id, BackupPlanState state, CustomResourceOptions options)resources: _: type: volcenginecc:cbr:BackupPlan 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 - 创建此计划的账户 ID。
- Created
Time string - 创建时间。
- Name string
- 备份计划名称。
- Plan
Id string - 备份计划 ID。
- Policy
Volcengine.
Backup Plan Policy - 备份策略。
- Policy
Id string - 备份策略 ID。
- Resource
Lists List<Volcengine.Backup Plan Resource List> - Updated
Time string - 更新时间。
- Account
Id string - 创建此计划的账户 ID。
- Created
Time string - 创建时间。
- Name string
- 备份计划名称。
- Plan
Id string - 备份计划 ID。
- Policy
Backup
Plan Policy Args - 备份策略。
- Policy
Id string - 备份策略 ID。
- Resource
Lists []BackupPlan Resource List Args - Updated
Time string - 更新时间。
- account
Id String - 创建此计划的账户 ID。
- created
Time String - 创建时间。
- name String
- 备份计划名称。
- plan
Id String - 备份计划 ID。
- policy
Backup
Plan Policy - 备份策略。
- policy
Id String - 备份策略 ID。
- resource
Lists List<BackupPlan Resource List> - updated
Time String - 更新时间。
- account
Id string - 创建此计划的账户 ID。
- created
Time string - 创建时间。
- name string
- 备份计划名称。
- plan
Id string - 备份计划 ID。
- policy
Backup
Plan Policy - 备份策略。
- policy
Id string - 备份策略 ID。
- resource
Lists BackupPlan Resource List[] - updated
Time string - 更新时间。
- account_
id str - 创建此计划的账户 ID。
- created_
time str - 创建时间。
- name str
- 备份计划名称。
- plan_
id str - 备份计划 ID。
- policy
Backup
Plan Policy Args - 备份策略。
- policy_
id str - 备份策略 ID。
- resource_
lists Sequence[BackupPlan Resource List Args] - updated_
time str - 更新时间。
- account
Id String - 创建此计划的账户 ID。
- created
Time String - 创建时间。
- name String
- 备份计划名称。
- plan
Id String - 备份计划 ID。
- policy Property Map
- 备份策略。
- policy
Id String - 备份策略 ID。
- resource
Lists List<Property Map> - updated
Time String - 更新时间。
Supporting Types
BackupPlanPolicy, BackupPlanPolicyArgs
- Account
Id string - 创建此策略的账户 ID。
- Backup
Type string - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- Created
Time string - 创建时间。
- Crontab string
- 用于指定备份周期,支持标准 crontab 表达式配置。
- Enable
Policy bool - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- Name string
- 策略名称。
- Plan
Number int - 该策略已关联的备份计划数量。
- Policy
Id string - 备份策略 ID。
- Retention
Day int - 恢复点保留时间,-1 表示持续保留。
- Updated
Time string - 更新时间。
- Account
Id string - 创建此策略的账户 ID。
- Backup
Type string - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- Created
Time string - 创建时间。
- Crontab string
- 用于指定备份周期,支持标准 crontab 表达式配置。
- Enable
Policy bool - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- Name string
- 策略名称。
- Plan
Number int - 该策略已关联的备份计划数量。
- Policy
Id string - 备份策略 ID。
- Retention
Day int - 恢复点保留时间,-1 表示持续保留。
- Updated
Time string - 更新时间。
- account
Id String - 创建此策略的账户 ID。
- backup
Type String - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- created
Time String - 创建时间。
- crontab String
- 用于指定备份周期,支持标准 crontab 表达式配置。
- enable
Policy Boolean - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- name String
- 策略名称。
- plan
Number Integer - 该策略已关联的备份计划数量。
- policy
Id String - 备份策略 ID。
- retention
Day Integer - 恢复点保留时间,-1 表示持续保留。
- updated
Time String - 更新时间。
- account
Id string - 创建此策略的账户 ID。
- backup
Type string - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- created
Time string - 创建时间。
- crontab string
- 用于指定备份周期,支持标准 crontab 表达式配置。
- enable
Policy boolean - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- name string
- 策略名称。
- plan
Number number - 该策略已关联的备份计划数量。
- policy
Id string - 备份策略 ID。
- retention
Day number - 恢复点保留时间,-1 表示持续保留。
- updated
Time string - 更新时间。
- account_
id str - 创建此策略的账户 ID。
- backup_
type str - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- created_
time str - 创建时间。
- crontab str
- 用于指定备份周期,支持标准 crontab 表达式配置。
- enable_
policy bool - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- name str
- 策略名称。
- plan_
number int - 该策略已关联的备份计划数量。
- policy_
id str - 备份策略 ID。
- retention_
day int - 恢复点保留时间,-1 表示持续保留。
- updated_
time str - 更新时间。
- account
Id String - 创建此策略的账户 ID。
- backup
Type String - 备份类型,取值说明如下:FULL:全量备份。INCREMENTAL:增量备份。
- created
Time String - 创建时间。
- crontab String
- 用于指定备份周期,支持标准 crontab 表达式配置。
- enable
Policy Boolean - 是否启用策略,取值说明如下:true:启用策略。false:禁用策略。
- name String
- 策略名称。
- plan
Number Number - 该策略已关联的备份计划数量。
- policy
Id String - 备份策略 ID。
- retention
Day Number - 恢复点保留时间,-1 表示持续保留。
- updated
Time String - 更新时间。
BackupPlanResourceList, BackupPlanResourceListArgs
- Meta
Information Volcengine.Backup Plan Resource List Meta Information - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- Resource
Id string - 备份源 ID。
- Resource
Type string - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
- Meta
Information BackupPlan Resource List Meta Information - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- Resource
Id string - 备份源 ID。
- Resource
Type string - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
- meta
Information BackupPlan Resource List Meta Information - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- resource
Id String - 备份源 ID。
- resource
Type String - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
- meta
Information BackupPlan Resource List Meta Information - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- resource
Id string - 备份源 ID。
- resource
Type string - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
- meta_
information BackupPlan Resource List Meta Information - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- resource_
id str - 备份源 ID。
- resource_
type str - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
- meta
Information Property Map - 资源的meta信息,创建备份计划时,用于存储额外的配置。
- resource
Id String - 备份源 ID。
- resource
Type String - 备份源类型,取值如下:ECS:ECS 整机备份。vePFS:vePFS 文件系统备份。
BackupPlanResourceListMetaInformation, BackupPlanResourceListMetaInformationArgs
- ecs_
meta str - ECS 的元数据,是一个 JSON string。
- vepfs_
meta str - vePFS 备份源元数据,是一个 JSON string。
Import
$ pulumi import volcenginecc:cbr/backupPlan:BackupPlan example "plan_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.
