1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. CbrPolicy
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.CbrPolicy

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    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:

    BackupCycle CbrPolicyBackupCycle
    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.
    BackupQuantity double
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    CbrPolicyId string
    A resource ID in UUID format.
    DestinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    DestinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    EnableAcceleration 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.
    LongTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    TimePeriod double

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    TimeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_term_retention is set.

    The backup_cycle block supports:

    BackupCycle CbrPolicyBackupCycleArgs
    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.
    BackupQuantity float64
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    CbrPolicyId string
    A resource ID in UUID format.
    DestinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    DestinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    EnableAcceleration 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.
    LongTermRetention CbrPolicyLongTermRetentionArgs

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    TimePeriod float64

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    TimeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_term_retention is set.

    The backup_cycle block supports:

    backupCycle CbrPolicyBackupCycle
    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.
    backupQuantity Double
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId String
    A resource ID in UUID format.
    destinationProjectId String
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion String
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod Double

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone String

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_term_retention is set.

    The backup_cycle block supports:

    backupCycle CbrPolicyBackupCycle
    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.
    backupQuantity number
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId string
    A resource ID in UUID format.
    destinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod number

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_term_retention is set.

    The backup_cycle block supports:

    backup_cycle CbrPolicyBackupCycleArgs
    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 to 99,999. This parameter and time_period are alternative.
    cbr_policy_id str
    A resource ID in UUID format.
    destination_project_id str
    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_retention CbrPolicyLongTermRetentionArgs

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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 to 99,999.

    NOTE: If this backup_quantity and time_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 if long_term_retention is set.

    The backup_cycle block supports:

    backupCycle 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.
    backupQuantity Number
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId String
    A resource ID in UUID format.
    destinationProjectId String
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion String
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention Property Map

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod Number

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone String

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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.
    The following state arguments are supported:
    BackupCycle CbrPolicyBackupCycle
    Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
    BackupQuantity double
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    CbrPolicyId string
    A resource ID in UUID format.
    DestinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    DestinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    EnableAcceleration 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.
    LongTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    TimePeriod double

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    TimeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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.
    BackupCycle CbrPolicyBackupCycleArgs
    Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
    BackupQuantity float64
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    CbrPolicyId string
    A resource ID in UUID format.
    DestinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    DestinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    EnableAcceleration 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.
    LongTermRetention CbrPolicyLongTermRetentionArgs

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    TimePeriod float64

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    TimeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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.
    backupCycle CbrPolicyBackupCycle
    Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
    backupQuantity Double
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId String
    A resource ID in UUID format.
    destinationProjectId String
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion String
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod Double

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone String

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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.
    backupCycle CbrPolicyBackupCycle
    Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
    backupQuantity number
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId string
    A resource ID in UUID format.
    destinationProjectId string
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion string
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention CbrPolicyLongTermRetention

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod number

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone string

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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 CbrPolicyBackupCycleArgs
    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 to 99,999. This parameter and time_period are alternative.
    cbr_policy_id str
    A resource ID in UUID format.
    destination_project_id str
    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_retention CbrPolicyLongTermRetentionArgs

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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 to 99,999.

    NOTE: If this backup_quantity and time_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 if long_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.
    backupCycle Property Map
    Specifies the scheduling rule for the policy backup execution. The backup_cycle structure is documented below.
    backupQuantity Number
    Specifies the maximum number of retained backups. The value ranges from 2 to 99,999. This parameter and time_period are alternative.
    cbrPolicyId String
    A resource ID in UUID format.
    destinationProjectId String
    Specifies the ID of the replication destination project, which is mandatory for cross-region replication. Required if protection_type is replication.
    destinationRegion String
    Specifies the name of the replication destination region, which is mandatory for cross-region replication. Required if protection_type is replication.
    enableAcceleration 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.
    longTermRetention Property Map

    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 and backup_quantity will take effect together. When the number of retained backups exceeds the preset value (number of backup_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.
    timePeriod Number

    Specifies the duration (in days) for retained backups. The value ranges from 2 to 99,999.

    NOTE: If this backup_quantity and time_period are both left blank, the backups will be retained permanently.

    timeZone String

    Specifies the UTC time zone, e.g. UTC+08:00. Only available if long_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

    ExecutionTimes 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 to 30. This parameter and days are alternative.
    ExecutionTimes []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 to 30. This parameter and days are alternative.
    executionTimes 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 to 30. This parameter and days are alternative.
    executionTimes 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 to 30. This parameter and days 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 to 30. This parameter and days are alternative.
    executionTimes 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 to 30. This parameter and days are alternative.

    CbrPolicyLongTermRetention, CbrPolicyLongTermRetentionArgs

    Daily double
    Specifies the latest backup of each day is saved in the long term.
    FullBackupInterval double
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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.
    FullBackupInterval float64
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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.
    fullBackupInterval Double
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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.
    fullBackupInterval number
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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_interval float
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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.
    fullBackupInterval Number
    Specifies how often (after how many incremental backups) a full backup is performed. The valid value ranges from -1 to 100. 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.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud