import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
 * Provides a resource to manage rds mysql backup policy
 * ## Example Usage
 *
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as volcengine from "@volcengine/pulumi";
 *
 * const foo = new volcengine.rds_mysql.BackupPolicy("foo", {
 *     binlogFileCountsEnable: true,
 *     binlogSpaceLimitEnable: true,
 *     crossBackupPolicy: {
 *         backupEnabled: true,
 *         crossBackupRegion: "cn-chongqing-sdv",
 *         logBackupEnabled: true,
 *         retention: 10,
 *     },
 *     dataFullBackupPeriods: [
 *         "Monday",
 *         "Sunday",
 *         "Tuesday",
 *     ],
 *     instanceId: "mysql-b51d37110dd1",
 *     lockDdlTime: 80,
 * });
 * ```
 *
 * ## Import
 *
 * RdsMysqlBackupPolicy can be imported using the id, e.g.
 *
 * ```sh
 * $ pulumi import volcengine:rds_mysql/backupPolicy:BackupPolicy default instanceId:backupPolicy
 * ```
 * Warning:The resource cannot be deleted, and the destroy operation will not perform any actions.
 */
export declare class BackupPolicy extends pulumi.CustomResource {
    /**
     * Get an existing BackupPolicy resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state Any extra arguments used during the lookup.
     * @param opts Optional settings to control the behavior of the CustomResource.
     */
    static get(name: string, id: pulumi.Input<pulumi.ID>, state?: BackupPolicyState, opts?: pulumi.CustomResourceOptions): BackupPolicy;
    /**
     * Returns true if the given object is an instance of BackupPolicy.  This is designed to work even
     * when multiple copies of the Pulumi SDK have been loaded into the same process.
     */
    static isInstance(obj: any): obj is BackupPolicy;
    /**
     * List of destination regions for cross - region backup.
     */
    readonly availableCrossRegions: pulumi.Output<string[]>;
    /**
     * Whether to retain all log backups before releasing an instance. Values:
     * true: Yes.
     * false: No. Description: BinlogBackupAllRetention is ineffective when the value of RetentionPolicySynced is true.
     */
    readonly binlogBackupAllRetention: pulumi.Output<boolean>;
    /**
     * Whether to enable log backup function. Values:
     * true: Yes.
     * false: No.
     */
    readonly binlogBackupEnabled: pulumi.Output<boolean>;
    /**
     * Is encryption enabled for log backups? Values:
     * true: Yes.
     * false: No.
     */
    readonly binlogBackupEncryptionEnabled: pulumi.Output<boolean>;
    /**
     * Whether to enable the upper limit of local Binlog retention. Values: true: Enabled. false: Disabled. Description:When modifying the log backup policy, this parameter needs to be passed in.
     */
    readonly binlogFileCountsEnable: pulumi.Output<boolean>;
    /**
     * Number of local Binlog retained, ranging from 6 to 1000, in units of pieces. Automatically delete local logs that exceed the retained number. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    readonly binlogLimitCount: pulumi.Output<number>;
    /**
     * Local Binlog retention duration, with a value ranging from 0 to 168, in hours. Local logs exceeding the retention duration will be automatically deleted. When set to 0, local logs will not be automatically deleted. Note: When modifying the log backup policy, this parameter needs to be passed.
     */
    readonly binlogLocalRetentionHour: pulumi.Output<number>;
    /**
     * Whether to enable automatic cleanup of Binlog when space is too large. When the total storage space occupancy rate of the instance exceeds 80% or the remaining space is less than 5GB, the system will automatically start cleaning up the earliest local Binlog until the total space occupancy rate is lower than 80% and the remaining space is greater than 5GB. true: Enabled. false: Disabled. Description: This parameter needs to be passed in when modifying the log backup policy.
     */
    readonly binlogSpaceLimitEnable: pulumi.Output<boolean>;
    /**
     * Maximum storage space usage rate can be set to 20% - 50%. After exceeding this limit, the earliest Binlog file will be automatically deleted until the space usage rate is lower than this ratio. Local Binlog space usage rate = Local Binlog size / Total available (purchased) instance space size. When modifying the log backup policy, this parameter needs to be passed in. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    readonly binlogStoragePercentage: pulumi.Output<number>;
    /**
     * Cross - region backup strategy.
     */
    readonly crossBackupPolicy: pulumi.Output<outputs.rds_mysql.BackupPolicyCrossBackupPolicy>;
    /**
     * Whether to retain all data backups before releasing the instance. Values:
     * true: Yes.
     * false: No.
     */
    readonly dataBackupAllRetention: pulumi.Output<boolean>;
    /**
     * Whether to enable encryption for data backup. Values:
     * true: Yes.
     * false: No.
     */
    readonly dataBackupEncryptionEnabled: pulumi.Output<boolean>;
    /**
     * Data backup retention days, value range: 7 to 365 days. Default retention is 7 days.
     */
    readonly dataBackupRetentionDay: pulumi.Output<number>;
    /**
     * Full backup period. It is recommended to select at least 2 days for full backup every week. Multiple values are separated by English commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday. When modifying the data backup policy, this parameter needs to be passed in.
     */
    readonly dataFullBackupPeriods: pulumi.Output<string[] | undefined>;
    /**
     * The start point (UTC time) of the time window for starting the full backup task. The time window length is 1 hour. Explanation: Both DataFullBackupStartUTCHour and DataFullBackupTime can be used to indicate the full backup time period of an instance. DataFullBackupStartUTCHour has higher priority. If both fields are returned at the same time, DataFullBackupStartUTCHour shall prevail.
     */
    readonly dataFullBackupStartUtcHour: pulumi.Output<number>;
    /**
     * Time window for executing backup tasks is one hour. Format: HH:mmZ-HH:mmZ (UTC time). Explanation: This parameter needs to be passed in when modifying the data backup policy.
     */
    readonly dataFullBackupTime: pulumi.Output<string>;
    /**
     * Incremental backup period. Multiple values are separated by commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday.Description: The incremental backup period cannot conflict with the full backup. When modifying the data backup policy, this parameter needs to be passed in.
     */
    readonly dataIncrBackupPeriods: pulumi.Output<string[] | undefined>;
    /**
     * Backup retention days when an instance is released. Currently, only a value of 7 is supported.
     */
    readonly dataKeepDaysAfterReleased: pulumi.Output<number>;
    /**
     * Policy for retaining a backup of an instance after it is released. The values are: Last: Keep the last backup. Default value. All: Keep all backups of the instance.
     */
    readonly dataKeepPolicyAfterReleased: pulumi.Output<string>;
    /**
     * Whether to enable high-frequency backup function. Values:
     * true: Yes.
     * false: No.
     */
    readonly hourlyIncrBackupEnable: pulumi.Output<boolean>;
    /**
     * Frequency of performing high-frequency incremental backups. Values: 2: Perform an incremental backup every 2 hours. 4: Perform an incremental backup every 4 hours. 6: Perform an incremental backup every 6 hours. 12: Perform an incremental backup every 12 hours. Description: This parameter takes effect only when HourlyIncrBackupEnable is set to true.
     */
    readonly incrBackupHourPeriod: pulumi.Output<number>;
    /**
     * The ID of the RDS instance.
     */
    readonly instanceId: pulumi.Output<string>;
    /**
     * Maximum waiting time for DDL. The default value is 30. The minimum value is 10. The maximum value is 1440. The unit is minutes. Description: Only instances of MySQL 8.0 version support this setting.
     */
    readonly lockDdlTime: pulumi.Output<number>;
    /**
     * Binlog backup retention period. The value range is 7 to 365, in days. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    readonly logBackupRetentionDay: pulumi.Output<number>;
    /**
     * Is the retention policy for log backups the same as that for data backups?
     * Explanation: When the value is true, LogBackupRetentionDay and BinlogBackupAllRetention are ignored.
     */
    readonly retentionPolicySynced: pulumi.Output<boolean>;
    /**
     * Create a BackupPolicy resource with the given unique name, arguments, and options.
     *
     * @param name The _unique_ name of the resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(name: string, args: BackupPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
 * Input properties used for looking up and filtering BackupPolicy resources.
 */
export interface BackupPolicyState {
    /**
     * List of destination regions for cross - region backup.
     */
    availableCrossRegions?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * Whether to retain all log backups before releasing an instance. Values:
     * true: Yes.
     * false: No. Description: BinlogBackupAllRetention is ineffective when the value of RetentionPolicySynced is true.
     */
    binlogBackupAllRetention?: pulumi.Input<boolean>;
    /**
     * Whether to enable log backup function. Values:
     * true: Yes.
     * false: No.
     */
    binlogBackupEnabled?: pulumi.Input<boolean>;
    /**
     * Is encryption enabled for log backups? Values:
     * true: Yes.
     * false: No.
     */
    binlogBackupEncryptionEnabled?: pulumi.Input<boolean>;
    /**
     * Whether to enable the upper limit of local Binlog retention. Values: true: Enabled. false: Disabled. Description:When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogFileCountsEnable?: pulumi.Input<boolean>;
    /**
     * Number of local Binlog retained, ranging from 6 to 1000, in units of pieces. Automatically delete local logs that exceed the retained number. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogLimitCount?: pulumi.Input<number>;
    /**
     * Local Binlog retention duration, with a value ranging from 0 to 168, in hours. Local logs exceeding the retention duration will be automatically deleted. When set to 0, local logs will not be automatically deleted. Note: When modifying the log backup policy, this parameter needs to be passed.
     */
    binlogLocalRetentionHour?: pulumi.Input<number>;
    /**
     * Whether to enable automatic cleanup of Binlog when space is too large. When the total storage space occupancy rate of the instance exceeds 80% or the remaining space is less than 5GB, the system will automatically start cleaning up the earliest local Binlog until the total space occupancy rate is lower than 80% and the remaining space is greater than 5GB. true: Enabled. false: Disabled. Description: This parameter needs to be passed in when modifying the log backup policy.
     */
    binlogSpaceLimitEnable?: pulumi.Input<boolean>;
    /**
     * Maximum storage space usage rate can be set to 20% - 50%. After exceeding this limit, the earliest Binlog file will be automatically deleted until the space usage rate is lower than this ratio. Local Binlog space usage rate = Local Binlog size / Total available (purchased) instance space size. When modifying the log backup policy, this parameter needs to be passed in. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogStoragePercentage?: pulumi.Input<number>;
    /**
     * Cross - region backup strategy.
     */
    crossBackupPolicy?: pulumi.Input<inputs.rds_mysql.BackupPolicyCrossBackupPolicy>;
    /**
     * Whether to retain all data backups before releasing the instance. Values:
     * true: Yes.
     * false: No.
     */
    dataBackupAllRetention?: pulumi.Input<boolean>;
    /**
     * Whether to enable encryption for data backup. Values:
     * true: Yes.
     * false: No.
     */
    dataBackupEncryptionEnabled?: pulumi.Input<boolean>;
    /**
     * Data backup retention days, value range: 7 to 365 days. Default retention is 7 days.
     */
    dataBackupRetentionDay?: pulumi.Input<number>;
    /**
     * Full backup period. It is recommended to select at least 2 days for full backup every week. Multiple values are separated by English commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday. When modifying the data backup policy, this parameter needs to be passed in.
     */
    dataFullBackupPeriods?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The start point (UTC time) of the time window for starting the full backup task. The time window length is 1 hour. Explanation: Both DataFullBackupStartUTCHour and DataFullBackupTime can be used to indicate the full backup time period of an instance. DataFullBackupStartUTCHour has higher priority. If both fields are returned at the same time, DataFullBackupStartUTCHour shall prevail.
     */
    dataFullBackupStartUtcHour?: pulumi.Input<number>;
    /**
     * Time window for executing backup tasks is one hour. Format: HH:mmZ-HH:mmZ (UTC time). Explanation: This parameter needs to be passed in when modifying the data backup policy.
     */
    dataFullBackupTime?: pulumi.Input<string>;
    /**
     * Incremental backup period. Multiple values are separated by commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday.Description: The incremental backup period cannot conflict with the full backup. When modifying the data backup policy, this parameter needs to be passed in.
     */
    dataIncrBackupPeriods?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * Backup retention days when an instance is released. Currently, only a value of 7 is supported.
     */
    dataKeepDaysAfterReleased?: pulumi.Input<number>;
    /**
     * Policy for retaining a backup of an instance after it is released. The values are: Last: Keep the last backup. Default value. All: Keep all backups of the instance.
     */
    dataKeepPolicyAfterReleased?: pulumi.Input<string>;
    /**
     * Whether to enable high-frequency backup function. Values:
     * true: Yes.
     * false: No.
     */
    hourlyIncrBackupEnable?: pulumi.Input<boolean>;
    /**
     * Frequency of performing high-frequency incremental backups. Values: 2: Perform an incremental backup every 2 hours. 4: Perform an incremental backup every 4 hours. 6: Perform an incremental backup every 6 hours. 12: Perform an incremental backup every 12 hours. Description: This parameter takes effect only when HourlyIncrBackupEnable is set to true.
     */
    incrBackupHourPeriod?: pulumi.Input<number>;
    /**
     * The ID of the RDS instance.
     */
    instanceId?: pulumi.Input<string>;
    /**
     * Maximum waiting time for DDL. The default value is 30. The minimum value is 10. The maximum value is 1440. The unit is minutes. Description: Only instances of MySQL 8.0 version support this setting.
     */
    lockDdlTime?: pulumi.Input<number>;
    /**
     * Binlog backup retention period. The value range is 7 to 365, in days. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    logBackupRetentionDay?: pulumi.Input<number>;
    /**
     * Is the retention policy for log backups the same as that for data backups?
     * Explanation: When the value is true, LogBackupRetentionDay and BinlogBackupAllRetention are ignored.
     */
    retentionPolicySynced?: pulumi.Input<boolean>;
}
/**
 * The set of arguments for constructing a BackupPolicy resource.
 */
export interface BackupPolicyArgs {
    /**
     * Whether to retain all log backups before releasing an instance. Values:
     * true: Yes.
     * false: No. Description: BinlogBackupAllRetention is ineffective when the value of RetentionPolicySynced is true.
     */
    binlogBackupAllRetention?: pulumi.Input<boolean>;
    /**
     * Whether to enable log backup function. Values:
     * true: Yes.
     * false: No.
     */
    binlogBackupEnabled?: pulumi.Input<boolean>;
    /**
     * Is encryption enabled for log backups? Values:
     * true: Yes.
     * false: No.
     */
    binlogBackupEncryptionEnabled?: pulumi.Input<boolean>;
    /**
     * Whether to enable the upper limit of local Binlog retention. Values: true: Enabled. false: Disabled. Description:When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogFileCountsEnable?: pulumi.Input<boolean>;
    /**
     * Number of local Binlog retained, ranging from 6 to 1000, in units of pieces. Automatically delete local logs that exceed the retained number. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogLimitCount?: pulumi.Input<number>;
    /**
     * Local Binlog retention duration, with a value ranging from 0 to 168, in hours. Local logs exceeding the retention duration will be automatically deleted. When set to 0, local logs will not be automatically deleted. Note: When modifying the log backup policy, this parameter needs to be passed.
     */
    binlogLocalRetentionHour?: pulumi.Input<number>;
    /**
     * Whether to enable automatic cleanup of Binlog when space is too large. When the total storage space occupancy rate of the instance exceeds 80% or the remaining space is less than 5GB, the system will automatically start cleaning up the earliest local Binlog until the total space occupancy rate is lower than 80% and the remaining space is greater than 5GB. true: Enabled. false: Disabled. Description: This parameter needs to be passed in when modifying the log backup policy.
     */
    binlogSpaceLimitEnable?: pulumi.Input<boolean>;
    /**
     * Maximum storage space usage rate can be set to 20% - 50%. After exceeding this limit, the earliest Binlog file will be automatically deleted until the space usage rate is lower than this ratio. Local Binlog space usage rate = Local Binlog size / Total available (purchased) instance space size. When modifying the log backup policy, this parameter needs to be passed in. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    binlogStoragePercentage?: pulumi.Input<number>;
    /**
     * Cross - region backup strategy.
     */
    crossBackupPolicy?: pulumi.Input<inputs.rds_mysql.BackupPolicyCrossBackupPolicy>;
    /**
     * Whether to retain all data backups before releasing the instance. Values:
     * true: Yes.
     * false: No.
     */
    dataBackupAllRetention?: pulumi.Input<boolean>;
    /**
     * Whether to enable encryption for data backup. Values:
     * true: Yes.
     * false: No.
     */
    dataBackupEncryptionEnabled?: pulumi.Input<boolean>;
    /**
     * Data backup retention days, value range: 7 to 365 days. Default retention is 7 days.
     */
    dataBackupRetentionDay?: pulumi.Input<number>;
    /**
     * Full backup period. It is recommended to select at least 2 days for full backup every week. Multiple values are separated by English commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday. When modifying the data backup policy, this parameter needs to be passed in.
     */
    dataFullBackupPeriods?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * The start point (UTC time) of the time window for starting the full backup task. The time window length is 1 hour. Explanation: Both DataFullBackupStartUTCHour and DataFullBackupTime can be used to indicate the full backup time period of an instance. DataFullBackupStartUTCHour has higher priority. If both fields are returned at the same time, DataFullBackupStartUTCHour shall prevail.
     */
    dataFullBackupStartUtcHour?: pulumi.Input<number>;
    /**
     * Time window for executing backup tasks is one hour. Format: HH:mmZ-HH:mmZ (UTC time). Explanation: This parameter needs to be passed in when modifying the data backup policy.
     */
    dataFullBackupTime?: pulumi.Input<string>;
    /**
     * Incremental backup period. Multiple values are separated by commas (,). Values: Monday. Tuesday. Wednesday. Thursday. Friday. Saturday. Sunday.Description: The incremental backup period cannot conflict with the full backup. When modifying the data backup policy, this parameter needs to be passed in.
     */
    dataIncrBackupPeriods?: pulumi.Input<pulumi.Input<string>[]>;
    /**
     * Backup retention days when an instance is released. Currently, only a value of 7 is supported.
     */
    dataKeepDaysAfterReleased?: pulumi.Input<number>;
    /**
     * Policy for retaining a backup of an instance after it is released. The values are: Last: Keep the last backup. Default value. All: Keep all backups of the instance.
     */
    dataKeepPolicyAfterReleased?: pulumi.Input<string>;
    /**
     * Whether to enable high-frequency backup function. Values:
     * true: Yes.
     * false: No.
     */
    hourlyIncrBackupEnable?: pulumi.Input<boolean>;
    /**
     * Frequency of performing high-frequency incremental backups. Values: 2: Perform an incremental backup every 2 hours. 4: Perform an incremental backup every 4 hours. 6: Perform an incremental backup every 6 hours. 12: Perform an incremental backup every 12 hours. Description: This parameter takes effect only when HourlyIncrBackupEnable is set to true.
     */
    incrBackupHourPeriod?: pulumi.Input<number>;
    /**
     * The ID of the RDS instance.
     */
    instanceId: pulumi.Input<string>;
    /**
     * Maximum waiting time for DDL. The default value is 30. The minimum value is 10. The maximum value is 1440. The unit is minutes. Description: Only instances of MySQL 8.0 version support this setting.
     */
    lockDdlTime?: pulumi.Input<number>;
    /**
     * Binlog backup retention period. The value range is 7 to 365, in days. Explanation: When modifying the log backup policy, this parameter needs to be passed in.
     */
    logBackupRetentionDay?: pulumi.Input<number>;
    /**
     * Is the retention policy for log backups the same as that for data backups?
     * Explanation: When the value is true, LogBackupRetentionDay and BinlogBackupAllRetention are ignored.
     */
    retentionPolicySynced?: pulumi.Input<boolean>;
}
