alicloud.polardb.BackupPolicy
Explore with Pulumi AI
Import
PolarDB backup policy can be imported using the id or cluster id, e.g.
$ pulumi import alicloud:polardb/backupPolicy:BackupPolicy example "rm-12345678"
Create BackupPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BackupPolicy(name: string, args: BackupPolicyArgs, opts?: CustomResourceOptions);
@overload
def BackupPolicy(resource_name: str,
args: BackupPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BackupPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
db_cluster_id: Optional[str] = None,
data_level2_backup_another_region_retention_period: Optional[int] = None,
data_level2_backup_another_region_region: Optional[str] = None,
data_level1_backup_frequency: Optional[str] = None,
data_level1_backup_periods: Optional[Sequence[str]] = None,
data_level2_backup_periods: Optional[Sequence[str]] = None,
data_level1_backup_time: Optional[str] = None,
backup_retention_policy_on_cluster_deletion: Optional[str] = None,
backup_frequency: Optional[str] = None,
data_level1_backup_retention_period: Optional[int] = None,
data_level2_backup_retention_period: Optional[int] = None,
backup_retention_period: Optional[str] = None,
log_backup_another_region_region: Optional[str] = None,
log_backup_another_region_retention_period: Optional[int] = None,
log_backup_retention_period: Optional[int] = None,
preferred_backup_periods: Optional[Sequence[str]] = None,
preferred_backup_time: Optional[str] = None)
func NewBackupPolicy(ctx *Context, name string, args BackupPolicyArgs, opts ...ResourceOption) (*BackupPolicy, error)
public BackupPolicy(string name, BackupPolicyArgs args, CustomResourceOptions? opts = null)
public BackupPolicy(String name, BackupPolicyArgs args)
public BackupPolicy(String name, BackupPolicyArgs args, CustomResourceOptions options)
type: alicloud:polardb:BackupPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args BackupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BackupPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BackupPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackupPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var examplebackupPolicyResourceResourceFromPolardbbackupPolicy = new AliCloud.PolarDB.BackupPolicy("examplebackupPolicyResourceResourceFromPolardbbackupPolicy", new()
{
DbClusterId = "string",
DataLevel2BackupAnotherRegionRetentionPeriod = 0,
DataLevel2BackupAnotherRegionRegion = "string",
DataLevel1BackupFrequency = "string",
DataLevel1BackupPeriods = new[]
{
"string",
},
DataLevel2BackupPeriods = new[]
{
"string",
},
DataLevel1BackupTime = "string",
BackupRetentionPolicyOnClusterDeletion = "string",
BackupFrequency = "string",
DataLevel1BackupRetentionPeriod = 0,
DataLevel2BackupRetentionPeriod = 0,
BackupRetentionPeriod = "string",
LogBackupAnotherRegionRegion = "string",
LogBackupAnotherRegionRetentionPeriod = 0,
LogBackupRetentionPeriod = 0,
PreferredBackupPeriods = new[]
{
"string",
},
PreferredBackupTime = "string",
});
example, err := polardb.NewBackupPolicy(ctx, "examplebackupPolicyResourceResourceFromPolardbbackupPolicy", &polardb.BackupPolicyArgs{
DbClusterId: pulumi.String("string"),
DataLevel2BackupAnotherRegionRetentionPeriod: pulumi.Int(0),
DataLevel2BackupAnotherRegionRegion: pulumi.String("string"),
DataLevel1BackupFrequency: pulumi.String("string"),
DataLevel1BackupPeriods: pulumi.StringArray{
pulumi.String("string"),
},
DataLevel2BackupPeriods: pulumi.StringArray{
pulumi.String("string"),
},
DataLevel1BackupTime: pulumi.String("string"),
BackupRetentionPolicyOnClusterDeletion: pulumi.String("string"),
BackupFrequency: pulumi.String("string"),
DataLevel1BackupRetentionPeriod: pulumi.Int(0),
DataLevel2BackupRetentionPeriod: pulumi.Int(0),
BackupRetentionPeriod: pulumi.String("string"),
LogBackupAnotherRegionRegion: pulumi.String("string"),
LogBackupAnotherRegionRetentionPeriod: pulumi.Int(0),
LogBackupRetentionPeriod: pulumi.Int(0),
PreferredBackupPeriods: pulumi.StringArray{
pulumi.String("string"),
},
PreferredBackupTime: pulumi.String("string"),
})
var examplebackupPolicyResourceResourceFromPolardbbackupPolicy = new BackupPolicy("examplebackupPolicyResourceResourceFromPolardbbackupPolicy", BackupPolicyArgs.builder()
.dbClusterId("string")
.dataLevel2BackupAnotherRegionRetentionPeriod(0)
.dataLevel2BackupAnotherRegionRegion("string")
.dataLevel1BackupFrequency("string")
.dataLevel1BackupPeriods("string")
.dataLevel2BackupPeriods("string")
.dataLevel1BackupTime("string")
.backupRetentionPolicyOnClusterDeletion("string")
.backupFrequency("string")
.dataLevel1BackupRetentionPeriod(0)
.dataLevel2BackupRetentionPeriod(0)
.backupRetentionPeriod("string")
.logBackupAnotherRegionRegion("string")
.logBackupAnotherRegionRetentionPeriod(0)
.logBackupRetentionPeriod(0)
.preferredBackupPeriods("string")
.preferredBackupTime("string")
.build());
examplebackup_policy_resource_resource_from_polardbbackup_policy = alicloud.polardb.BackupPolicy("examplebackupPolicyResourceResourceFromPolardbbackupPolicy",
db_cluster_id="string",
data_level2_backup_another_region_retention_period=0,
data_level2_backup_another_region_region="string",
data_level1_backup_frequency="string",
data_level1_backup_periods=["string"],
data_level2_backup_periods=["string"],
data_level1_backup_time="string",
backup_retention_policy_on_cluster_deletion="string",
backup_frequency="string",
data_level1_backup_retention_period=0,
data_level2_backup_retention_period=0,
backup_retention_period="string",
log_backup_another_region_region="string",
log_backup_another_region_retention_period=0,
log_backup_retention_period=0,
preferred_backup_periods=["string"],
preferred_backup_time="string")
const examplebackupPolicyResourceResourceFromPolardbbackupPolicy = new alicloud.polardb.BackupPolicy("examplebackupPolicyResourceResourceFromPolardbbackupPolicy", {
dbClusterId: "string",
dataLevel2BackupAnotherRegionRetentionPeriod: 0,
dataLevel2BackupAnotherRegionRegion: "string",
dataLevel1BackupFrequency: "string",
dataLevel1BackupPeriods: ["string"],
dataLevel2BackupPeriods: ["string"],
dataLevel1BackupTime: "string",
backupRetentionPolicyOnClusterDeletion: "string",
backupFrequency: "string",
dataLevel1BackupRetentionPeriod: 0,
dataLevel2BackupRetentionPeriod: 0,
backupRetentionPeriod: "string",
logBackupAnotherRegionRegion: "string",
logBackupAnotherRegionRetentionPeriod: 0,
logBackupRetentionPeriod: 0,
preferredBackupPeriods: ["string"],
preferredBackupTime: "string",
});
type: alicloud:polardb:BackupPolicy
properties:
backupFrequency: string
backupRetentionPeriod: string
backupRetentionPolicyOnClusterDeletion: string
dataLevel1BackupFrequency: string
dataLevel1BackupPeriods:
- string
dataLevel1BackupRetentionPeriod: 0
dataLevel1BackupTime: string
dataLevel2BackupAnotherRegionRegion: string
dataLevel2BackupAnotherRegionRetentionPeriod: 0
dataLevel2BackupPeriods:
- string
dataLevel2BackupRetentionPeriod: 0
dbClusterId: string
logBackupAnotherRegionRegion: string
logBackupAnotherRegionRetentionPeriod: 0
logBackupRetentionPeriod: 0
preferredBackupPeriods:
- string
preferredBackupTime: string
BackupPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The BackupPolicy resource accepts the following input properties:
- Db
Cluster stringId - The Id of cluster that can run database.
- Backup
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - Data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Data
Level1Backup List<string>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level1Backup intRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- Data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- Data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- Data
Level2Backup intAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Data
Level2Backup List<string>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level2Backup intRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- Log
Backup intAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- Log
Backup intRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - Preferred
Backup List<string>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- Preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- Db
Cluster stringId - The Id of cluster that can run database.
- Backup
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - Data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Data
Level1Backup []stringPeriods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level1Backup intRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- Data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- Data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- Data
Level2Backup intAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Data
Level2Backup []stringPeriods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level2Backup intRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- Log
Backup intAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- Log
Backup intRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - Preferred
Backup []stringPeriods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- Preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- db
Cluster StringId - The Id of cluster that can run database.
- backup
Frequency String - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention StringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup StringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup List<String>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup IntegerRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup StringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup StringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup IntegerAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup List<String>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup IntegerRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - log
Backup StringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup IntegerAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup IntegerRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup List<String>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup StringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- db
Cluster stringId - The Id of cluster that can run database.
- backup
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup string[]Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup numberRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup numberAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup string[]Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup numberRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup numberAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup numberRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup string[]Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- db_
cluster_ strid - The Id of cluster that can run database.
- backup_
frequency str - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup_
retention_ strperiod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup_
retention_ strpolicy_ on_ cluster_ deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data_
level1_ strbackup_ frequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data_
level1_ Sequence[str]backup_ periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data_
level1_ intbackup_ retention_ period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data_
level1_ strbackup_ time - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data_
level2_ strbackup_ another_ region_ region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data_
level2_ intbackup_ another_ region_ retention_ period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data_
level2_ Sequence[str]backup_ periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data_
level2_ intbackup_ retention_ period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - log_
backup_ stranother_ region_ region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log_
backup_ intanother_ region_ retention_ period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log_
backup_ intretention_ period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred_
backup_ Sequence[str]periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred_
backup_ strtime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- db
Cluster StringId - The Id of cluster that can run database.
- backup
Frequency String - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention StringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup StringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup List<String>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup NumberRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup StringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup StringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup NumberAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup List<String>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup NumberRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - log
Backup StringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup NumberAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup NumberRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup List<String>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup StringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupPolicy resource produces the following output properties:
- Enable
Backup intLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - Id string
- The provider-assigned unique ID for this managed resource.
- Enable
Backup intLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - Id string
- The provider-assigned unique ID for this managed resource.
- enable
Backup IntegerLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - id String
- The provider-assigned unique ID for this managed resource.
- enable
Backup numberLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - id string
- The provider-assigned unique ID for this managed resource.
- enable_
backup_ intlog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - id str
- The provider-assigned unique ID for this managed resource.
- enable
Backup NumberLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - id String
- The provider-assigned unique ID for this managed resource.
Look up Existing BackupPolicy Resource
Get an existing BackupPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BackupPolicyState, opts?: CustomResourceOptions): BackupPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_frequency: Optional[str] = None,
backup_retention_period: Optional[str] = None,
backup_retention_policy_on_cluster_deletion: Optional[str] = None,
data_level1_backup_frequency: Optional[str] = None,
data_level1_backup_periods: Optional[Sequence[str]] = None,
data_level1_backup_retention_period: Optional[int] = None,
data_level1_backup_time: Optional[str] = None,
data_level2_backup_another_region_region: Optional[str] = None,
data_level2_backup_another_region_retention_period: Optional[int] = None,
data_level2_backup_periods: Optional[Sequence[str]] = None,
data_level2_backup_retention_period: Optional[int] = None,
db_cluster_id: Optional[str] = None,
enable_backup_log: Optional[int] = None,
log_backup_another_region_region: Optional[str] = None,
log_backup_another_region_retention_period: Optional[int] = None,
log_backup_retention_period: Optional[int] = None,
preferred_backup_periods: Optional[Sequence[str]] = None,
preferred_backup_time: Optional[str] = None) -> BackupPolicy
func GetBackupPolicy(ctx *Context, name string, id IDInput, state *BackupPolicyState, opts ...ResourceOption) (*BackupPolicy, error)
public static BackupPolicy Get(string name, Input<string> id, BackupPolicyState? state, CustomResourceOptions? opts = null)
public static BackupPolicy get(String name, Output<String> id, BackupPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - Data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Data
Level1Backup List<string>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level1Backup intRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- Data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- Data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- Data
Level2Backup intAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Data
Level2Backup List<string>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level2Backup intRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Db
Cluster stringId - The Id of cluster that can run database.
- Enable
Backup intLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - Log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- Log
Backup intAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- Log
Backup intRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - Preferred
Backup List<string>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- Preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- Backup
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - Data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - Data
Level1Backup []stringPeriods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level1Backup intRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- Data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- Data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- Data
Level2Backup intAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Data
Level2Backup []stringPeriods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- Data
Level2Backup intRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - Db
Cluster stringId - The Id of cluster that can run database.
- Enable
Backup intLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - Log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- Log
Backup intAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- Log
Backup intRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - Preferred
Backup []stringPeriods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- Preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- backup
Frequency String - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention StringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup StringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup List<String>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup IntegerRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup StringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup StringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup IntegerAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup List<String>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup IntegerRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - db
Cluster StringId - The Id of cluster that can run database.
- enable
Backup IntegerLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - log
Backup StringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup IntegerAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup IntegerRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup List<String>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup StringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- backup
Frequency string - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention stringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup stringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup string[]Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup numberRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup stringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup stringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup numberAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup string[]Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup numberRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - db
Cluster stringId - The Id of cluster that can run database.
- enable
Backup numberLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - log
Backup stringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup numberAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup numberRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup string[]Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup stringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- backup_
frequency str - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup_
retention_ strperiod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup_
retention_ strpolicy_ on_ cluster_ deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data_
level1_ strbackup_ frequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data_
level1_ Sequence[str]backup_ periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data_
level1_ intbackup_ retention_ period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data_
level1_ strbackup_ time - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data_
level2_ strbackup_ another_ region_ region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data_
level2_ intbackup_ another_ region_ retention_ period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data_
level2_ Sequence[str]backup_ periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data_
level2_ intbackup_ retention_ period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - db_
cluster_ strid - The Id of cluster that can run database.
- enable_
backup_ intlog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - log_
backup_ stranother_ region_ region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log_
backup_ intanother_ region_ retention_ period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log_
backup_ intretention_ period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred_
backup_ Sequence[str]periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred_
backup_ strtime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
- backup
Frequency String - The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- backup
Retention StringPolicy On Cluster Deletion - Specifies whether to retain backups when you delete a cluster. Valid values are
ALL
,LATEST
,NONE
. Default toNONE
. Value options can refer to the latest docs ModifyBackupPolicy - data
Level1Backup StringFrequency - The Id of cluster that can run database.The backup frequency. Valid values are
Normal
,2/24H
,3/24H
,4/24H
.Default toNormal
. - data
Level1Backup List<String>Periods PolarDB Cluster of level-1 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level1Backup NumberRetention Period - The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.
- data
Level1Backup StringTime - The time period during which automatic backup is performed. The format is HH: MMZ HH: MMZ (UTC time), and the entered value must be an hour apart, such as 14:00z-15:00z.
- data
Level2Backup StringAnother Region Region - PolarDB Cluster of level-2 backup is a cross regional backup area.
- data
Level2Backup NumberAnother Region Retention Period - PolarDB Cluster of level-2 backup cross region backup retention period. Valid values are
0
,30 to 7300
,-1
. Default to0
. - data
Level2Backup List<String>Periods PolarDB Cluster of level-2 backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"].
NOTE: Note Select at least two values. Separate multiple values with commas (,).
- data
Level2Backup NumberRetention Period - The retention period of level-2 backups. Valid values are
0
,30 to 7300
,-1
. Default to0
. - db
Cluster StringId - The Id of cluster that can run database.
- enable
Backup NumberLog - Indicates whether the log backup feature was enabled. Valid values are
0
,1
.1
By default, the log backup feature is enabled and cannot be disabled. - log
Backup StringAnother Region Region - The region in which you want to store cross-region log backups. For information about regions that support the cross-region backup feature, see Overview.
- log
Backup NumberAnother Region Retention Period The retention period of cross-region log backups. Default value: OFF. Valid values are
0
,30 to 7300
,-1
.NOTE: Note When you create a cluster, the default value of this parameter is 0.
- log
Backup NumberRetention Period - The retention period of the log backups. Valid values are
3 to 7300
,-1
. - preferred
Backup List<String>Periods - PolarDB Cluster backup period. Valid values: ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]. Default to ["Tuesday", "Thursday", "Saturday"].
- preferred
Backup StringTime - PolarDB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.