flexibleengine.CbrPolicy
Explore with Pulumi AI
Manages a CBR Policy resource within FlexibleEngine.
Example Usage
create a backup policy
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.CbrPolicy;
import com.pulumi.flexibleengine.CbrPolicyArgs;
import com.pulumi.flexibleengine.inputs.CbrPolicyBackupCycleArgs;
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) {
final var config = ctx.config();
final var policyName = config.get("policyName");
var test = new CbrPolicy("test", CbrPolicyArgs.builder()
.type("backup")
.timePeriod(20)
.backupCycle(CbrPolicyBackupCycleArgs.builder()
.frequency("WEEKLY")
.days("MO,TH")
.executionTimes("06:00")
.build())
.build());
}
}
configuration:
policyName:
type: dynamic
resources:
test:
type: flexibleengine:CbrPolicy
properties:
type: backup
timePeriod: 20
backupCycle:
frequency: WEEKLY
days: MO,TH
executionTimes:
- 06:00
create a replication policy
Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.CbrPolicy;
import com.pulumi.flexibleengine.CbrPolicyArgs;
import com.pulumi.flexibleengine.inputs.CbrPolicyBackupCycleArgs;
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) {
final var config = ctx.config();
final var policyName = config.get("policyName");
final var destinationRegion = config.get("destinationRegion");
final var destinationProjectId = config.get("destinationProjectId");
var test = new CbrPolicy("test", CbrPolicyArgs.builder()
.type("replication")
.destinationRegion(destinationRegion)
.destinationProjectId(destinationProjectId)
.backupQuantity(20)
.backupCycle(CbrPolicyBackupCycleArgs.builder()
.frequency("DAILY")
.interval(5)
.executionTimes("21:00")
.build())
.build());
}
}
configuration:
policyName:
type: dynamic
destinationRegion:
type: dynamic
destinationProjectId:
type: dynamic
resources:
test:
type: flexibleengine:CbrPolicy
properties:
type: replication
destinationRegion: ${destinationRegion}
destinationProjectId: ${destinationProjectId}
backupQuantity: 20
backupCycle:
frequency: DAILY
interval: 5
executionTimes:
- 21:00
Create CbrPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CbrPolicy(name: string, args: CbrPolicyArgs, opts?: CustomResourceOptions);
@overload
def CbrPolicy(resource_name: str,
args: CbrPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CbrPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_cycle: Optional[CbrPolicyBackupCycleArgs] = None,
type: Optional[str] = None,
enabled: Optional[bool] = None,
destination_project_id: Optional[str] = None,
destination_region: Optional[str] = None,
enable_acceleration: Optional[bool] = None,
cbr_policy_id: Optional[str] = None,
long_term_retention: Optional[CbrPolicyLongTermRetentionArgs] = None,
name: Optional[str] = None,
region: Optional[str] = None,
time_period: Optional[float] = None,
time_zone: Optional[str] = None,
backup_quantity: Optional[float] = None)
func NewCbrPolicy(ctx *Context, name string, args CbrPolicyArgs, opts ...ResourceOption) (*CbrPolicy, error)
public CbrPolicy(string name, CbrPolicyArgs args, CustomResourceOptions? opts = null)
public CbrPolicy(String name, CbrPolicyArgs args)
public CbrPolicy(String name, CbrPolicyArgs args, CustomResourceOptions options)
type: flexibleengine:CbrPolicy
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 CbrPolicyArgs
- 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 CbrPolicyArgs
- 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 CbrPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CbrPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CbrPolicyArgs
- 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 cbrPolicyResource = new Flexibleengine.CbrPolicy("cbrPolicyResource", new()
{
BackupCycle = new Flexibleengine.Inputs.CbrPolicyBackupCycleArgs
{
ExecutionTimes = new[]
{
"string",
},
Days = "string",
Interval = 0,
},
Type = "string",
Enabled = false,
DestinationProjectId = "string",
DestinationRegion = "string",
EnableAcceleration = false,
CbrPolicyId = "string",
LongTermRetention = new Flexibleengine.Inputs.CbrPolicyLongTermRetentionArgs
{
Daily = 0,
FullBackupInterval = 0,
Monthly = 0,
Weekly = 0,
Yearly = 0,
},
Name = "string",
Region = "string",
TimePeriod = 0,
TimeZone = "string",
BackupQuantity = 0,
});
example, err := flexibleengine.NewCbrPolicy(ctx, "cbrPolicyResource", &flexibleengine.CbrPolicyArgs{
BackupCycle: &flexibleengine.CbrPolicyBackupCycleArgs{
ExecutionTimes: pulumi.StringArray{
pulumi.String("string"),
},
Days: pulumi.String("string"),
Interval: pulumi.Float64(0),
},
Type: pulumi.String("string"),
Enabled: pulumi.Bool(false),
DestinationProjectId: pulumi.String("string"),
DestinationRegion: pulumi.String("string"),
EnableAcceleration: pulumi.Bool(false),
CbrPolicyId: pulumi.String("string"),
LongTermRetention: &flexibleengine.CbrPolicyLongTermRetentionArgs{
Daily: pulumi.Float64(0),
FullBackupInterval: pulumi.Float64(0),
Monthly: pulumi.Float64(0),
Weekly: pulumi.Float64(0),
Yearly: pulumi.Float64(0),
},
Name: pulumi.String("string"),
Region: pulumi.String("string"),
TimePeriod: pulumi.Float64(0),
TimeZone: pulumi.String("string"),
BackupQuantity: pulumi.Float64(0),
})
var cbrPolicyResource = new CbrPolicy("cbrPolicyResource", CbrPolicyArgs.builder()
.backupCycle(CbrPolicyBackupCycleArgs.builder()
.executionTimes("string")
.days("string")
.interval(0)
.build())
.type("string")
.enabled(false)
.destinationProjectId("string")
.destinationRegion("string")
.enableAcceleration(false)
.cbrPolicyId("string")
.longTermRetention(CbrPolicyLongTermRetentionArgs.builder()
.daily(0)
.fullBackupInterval(0)
.monthly(0)
.weekly(0)
.yearly(0)
.build())
.name("string")
.region("string")
.timePeriod(0)
.timeZone("string")
.backupQuantity(0)
.build());
cbr_policy_resource = flexibleengine.CbrPolicy("cbrPolicyResource",
backup_cycle={
"execution_times": ["string"],
"days": "string",
"interval": 0,
},
type="string",
enabled=False,
destination_project_id="string",
destination_region="string",
enable_acceleration=False,
cbr_policy_id="string",
long_term_retention={
"daily": 0,
"full_backup_interval": 0,
"monthly": 0,
"weekly": 0,
"yearly": 0,
},
name="string",
region="string",
time_period=0,
time_zone="string",
backup_quantity=0)
const cbrPolicyResource = new flexibleengine.CbrPolicy("cbrPolicyResource", {
backupCycle: {
executionTimes: ["string"],
days: "string",
interval: 0,
},
type: "string",
enabled: false,
destinationProjectId: "string",
destinationRegion: "string",
enableAcceleration: false,
cbrPolicyId: "string",
longTermRetention: {
daily: 0,
fullBackupInterval: 0,
monthly: 0,
weekly: 0,
yearly: 0,
},
name: "string",
region: "string",
timePeriod: 0,
timeZone: "string",
backupQuantity: 0,
});
type: flexibleengine:CbrPolicy
properties:
backupCycle:
days: string
executionTimes:
- string
interval: 0
backupQuantity: 0
cbrPolicyId: string
destinationProjectId: string
destinationRegion: string
enableAcceleration: false
enabled: false
longTermRetention:
daily: 0
fullBackupInterval: 0
monthly: 0
weekly: 0
yearly: 0
name: string
region: string
timePeriod: 0
timeZone: string
type: string
CbrPolicy 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 CbrPolicy resource accepts the following input properties:
- Backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- Type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- Backup
Quantity double - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - Cbr
Policy stringId - A resource ID in UUID format.
- Destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - Destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - Enable
Acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- Enabled bool
- Specifies whether to enable the policy. Default to true.
- Long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- Name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - Region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- Time
Period double Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- Time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
- Backup
Cycle CbrPolicy Backup Cycle Args - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- Type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- Backup
Quantity float64 - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - Cbr
Policy stringId - A resource ID in UUID format.
- Destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - Destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - Enable
Acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- Enabled bool
- Specifies whether to enable the policy. Default to true.
- Long
Term CbrRetention Policy Long Term Retention Args Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- Name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - Region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- Time
Period float64 Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- Time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
- backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- type String
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Quantity Double - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy StringId - A resource ID in UUID format.
- destination
Project StringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region String - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration Boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled Boolean
- Specifies whether to enable the policy. Default to true.
- long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name String
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region String
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period Double Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone String Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
- backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Quantity number - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy stringId - A resource ID in UUID format.
- destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled boolean
- Specifies whether to enable the policy. Default to true.
- long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period number Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
- backup_
cycle CbrPolicy Backup Cycle Args - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- type str
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup_
quantity float - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr_
policy_ strid - A resource ID in UUID format.
- destination_
project_ strid - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination_
region str - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable_
acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled bool
- Specifies whether to enable the policy. Default to true.
- long_
term_ Cbrretention Policy Long Term Retention Args Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name str
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region str
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time_
period float Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time_
zone str Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
- backup
Cycle Property Map - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- type String
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Quantity Number - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy StringId - A resource ID in UUID format.
- destination
Project StringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region String - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration Boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled Boolean
- Specifies whether to enable the policy. Default to true.
- long
Term Property MapRetention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name String
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region String
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period Number Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone String Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:
Outputs
All input properties are implicitly available as output properties. Additionally, the CbrPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing CbrPolicy Resource
Get an existing CbrPolicy 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?: CbrPolicyState, opts?: CustomResourceOptions): CbrPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_cycle: Optional[CbrPolicyBackupCycleArgs] = None,
backup_quantity: Optional[float] = None,
cbr_policy_id: Optional[str] = None,
destination_project_id: Optional[str] = None,
destination_region: Optional[str] = None,
enable_acceleration: Optional[bool] = None,
enabled: Optional[bool] = None,
long_term_retention: Optional[CbrPolicyLongTermRetentionArgs] = None,
name: Optional[str] = None,
region: Optional[str] = None,
time_period: Optional[float] = None,
time_zone: Optional[str] = None,
type: Optional[str] = None) -> CbrPolicy
func GetCbrPolicy(ctx *Context, name string, id IDInput, state *CbrPolicyState, opts ...ResourceOption) (*CbrPolicy, error)
public static CbrPolicy Get(string name, Input<string> id, CbrPolicyState? state, CustomResourceOptions? opts = null)
public static CbrPolicy get(String name, Output<String> id, CbrPolicyState state, CustomResourceOptions options)
resources: _: type: flexibleengine:CbrPolicy 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.
- Backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- Backup
Quantity double - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - Cbr
Policy stringId - A resource ID in UUID format.
- Destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - Destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - Enable
Acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- Enabled bool
- Specifies whether to enable the policy. Default to true.
- Long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- Name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - Region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- Time
Period double Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- Time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- Type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- Backup
Cycle CbrPolicy Backup Cycle Args - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- Backup
Quantity float64 - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - Cbr
Policy stringId - A resource ID in UUID format.
- Destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - Destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - Enable
Acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- Enabled bool
- Specifies whether to enable the policy. Default to true.
- Long
Term CbrRetention Policy Long Term Retention Args Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- Name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - Region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- Time
Period float64 Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- Time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- Type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- backup
Quantity Double - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy StringId - A resource ID in UUID format.
- destination
Project StringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region String - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration Boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled Boolean
- Specifies whether to enable the policy. Default to true.
- long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name String
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region String
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period Double Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone String Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- type String
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Cycle CbrPolicy Backup Cycle - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- backup
Quantity number - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy stringId - A resource ID in UUID format.
- destination
Project stringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region string - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled boolean
- Specifies whether to enable the policy. Default to true.
- long
Term CbrRetention Policy Long Term Retention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name string
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region string
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period number Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone string Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- type string
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup_
cycle CbrPolicy Backup Cycle Args - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- backup_
quantity float - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr_
policy_ strid - A resource ID in UUID format.
- destination_
project_ strid - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination_
region str - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable_
acceleration bool - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled bool
- Specifies whether to enable the policy. Default to true.
- long_
term_ Cbrretention Policy Long Term Retention Args Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name str
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region str
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time_
period float Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time_
zone str Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- type str
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
- backup
Cycle Property Map - Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
- backup
Quantity Number - Specifies the maximum number of retained backups. The value ranges from
2
to99,999
. This parameter andtime_period
are alternative. - cbr
Policy StringId - A resource ID in UUID format.
- destination
Project StringId - Specifies the ID of the replication destination project, which is
mandatory for cross-region replication. Required if
protection_type
is replication. - destination
Region String - Specifies the name of the replication destination region, which is mandatory
for cross-region replication. Required if
protection_type
is replication. - enable
Acceleration Boolean - Specifies whether to enable the acceleration function to shorten the replication time for cross-region. Changing this will create a new policy.
- enabled Boolean
- Specifies whether to enable the policy. Default to true.
- long
Term Property MapRetention Specifies the long-term retention rules, which is an advanced options of the
backup_quantity
. The object structure is documented below.The configuration of
long_term_retention
andbackup_quantity
will take effect together. When the number of retained backups exceeds the preset value (number ofbackup_quantity
), the system automatically deletes the earliest backups. By default, the system automatically clears data every other day.- name String
- Specifies the policy name.
This parameter can contain a maximum of 64 characters, which may consist of chinese characters, letters, digits, underscores(_) and hyphens (-). - region String
- Specifies the region where the policy is located. If omitted, the provider-level region will be used. Changing this will create a new policy.
- time
Period Number Specifies the duration (in days) for retained backups. The value ranges from
2
to99,999
.NOTE: If this
backup_quantity
andtime_period
are both left blank, the backups will be retained permanently.- time
Zone String Specifies the UTC time zone, e.g.
UTC+08:00
. Only available iflong_term_retention
is set.The
backup_cycle
block supports:- type String
- Specifies the protection type of the policy. Valid values are backup and replication. Changing this will create a new policy.
Supporting Types
CbrPolicyBackupCycle, CbrPolicyBackupCycleArgs
- Execution
Times List<string> Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- Days string
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- Interval double
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
- Execution
Times []string Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- Days string
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- Interval float64
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
- execution
Times List<String> Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- days String
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- interval Double
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
- execution
Times string[] Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- days string
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- interval number
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
- execution_
times Sequence[str] Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- days str
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- interval float
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
- execution
Times List<String> Specifies the backup time. Automated backups will be triggered at the backup time. The current time is in the UTC format (HH:MM). The minutes in the list must be set to 00 and the hours cannot be repeated. In the replication policy, you are advised to set one time point for one day.
The
long_term_retention
block supports:- days String
- Specifies the weekly backup day of backup schedule. It supports seven days a week (MO, TU, WE, TH, FR, SA, SU) and this parameter is separated by a comma (,) without spaces, between date and date during the configuration.
- interval Number
- Specifies the interval (in days) of backup schedule. The value range is
1
to30
. This parameter anddays
are alternative.
CbrPolicyLongTermRetention, CbrPolicyLongTermRetentionArgs
- Daily double
- Specifies the latest backup of each day is saved in the long term.
- Full
Backup doubleInterval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - Monthly double
- Specifies the latest backup of each month is saved in the long term.
- Weekly double
- Specifies the latest backup of each week is saved in the long term.
- Yearly double
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
- Daily float64
- Specifies the latest backup of each day is saved in the long term.
- Full
Backup float64Interval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - Monthly float64
- Specifies the latest backup of each month is saved in the long term.
- Weekly float64
- Specifies the latest backup of each week is saved in the long term.
- Yearly float64
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
- daily Double
- Specifies the latest backup of each day is saved in the long term.
- full
Backup DoubleInterval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - monthly Double
- Specifies the latest backup of each month is saved in the long term.
- weekly Double
- Specifies the latest backup of each week is saved in the long term.
- yearly Double
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
- daily number
- Specifies the latest backup of each day is saved in the long term.
- full
Backup numberInterval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - monthly number
- Specifies the latest backup of each month is saved in the long term.
- weekly number
- Specifies the latest backup of each week is saved in the long term.
- yearly number
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
- daily float
- Specifies the latest backup of each day is saved in the long term.
- full_
backup_ floatinterval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - monthly float
- Specifies the latest backup of each month is saved in the long term.
- weekly float
- Specifies the latest backup of each week is saved in the long term.
- yearly float
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
- daily Number
- Specifies the latest backup of each day is saved in the long term.
- full
Backup NumberInterval - Specifies how often (after how many incremental backups) a full backup is
performed. The valid value ranges from
-1
to100
. If-1
is specified, full backup will not be performed. - monthly Number
- Specifies the latest backup of each month is saved in the long term.
- weekly Number
- Specifies the latest backup of each week is saved in the long term.
- yearly Number
Specifies the latest backup of each year is saved in the long term.
A maximum of 10 backups are retained for failed periodic backup tasks. They are retained for one month and can be manually deleted on the web console.
Import
Policies can be imported by their id
. For example,
bash
$ pulumi import flexibleengine:index/cbrPolicy:CbrPolicy test 4d2c2939-774f-42ef-ab15-e5b126b11ace
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.