alicloud.adb.BackupPolicy
Explore with Pulumi AI
Import
ADB backup policy can be imported using the id or cluster id, e.g.
$ pulumi import alicloud:adb/backupPolicy:BackupPolicy example "am-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,
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:adb: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 backupPolicyResource = new AliCloud.Adb.BackupPolicy("backupPolicyResource", new()
{
DbClusterId = "string",
PreferredBackupPeriods = new[]
{
"string",
},
PreferredBackupTime = "string",
});
example, err := adb.NewBackupPolicy(ctx, "backupPolicyResource", &adb.BackupPolicyArgs{
DbClusterId: pulumi.String("string"),
PreferredBackupPeriods: pulumi.StringArray{
pulumi.String("string"),
},
PreferredBackupTime: pulumi.String("string"),
})
var backupPolicyResource = new BackupPolicy("backupPolicyResource", BackupPolicyArgs.builder()
.dbClusterId("string")
.preferredBackupPeriods("string")
.preferredBackupTime("string")
.build());
backup_policy_resource = alicloud.adb.BackupPolicy("backupPolicyResource",
db_cluster_id="string",
preferred_backup_periods=["string"],
preferred_backup_time="string")
const backupPolicyResource = new alicloud.adb.BackupPolicy("backupPolicyResource", {
dbClusterId: "string",
preferredBackupPeriods: ["string"],
preferredBackupTime: "string",
});
type: alicloud:adb:BackupPolicy
properties:
dbClusterId: string
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
The BackupPolicy resource accepts the following input properties:
- Db
Cluster stringId - The Id of cluster that can run database.
- Preferred
Backup List<string>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- Preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- Db
Cluster stringId - The Id of cluster that can run database.
- Preferred
Backup []stringPeriods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- Preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- db
Cluster StringId - The Id of cluster that can run database.
- preferred
Backup List<String>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup StringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- db
Cluster stringId - The Id of cluster that can run database.
- preferred
Backup string[]Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- db_
cluster_ strid - The Id of cluster that can run database.
- preferred_
backup_ Sequence[str]periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred_
backup_ strtime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- db
Cluster StringId - The Id of cluster that can run database.
- preferred
Backup List<String>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup StringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. 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:
- Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Id string
- The provider-assigned unique ID for this managed resource.
- Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Id string
- The provider-assigned unique ID for this managed resource.
- backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- id String
- The provider-assigned unique ID for this managed resource.
- backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- id string
- The provider-assigned unique ID for this managed resource.
- backup_
retention_ strperiod - Cluster backup retention days, Fixed for 7 days, not modified.
- id str
- The provider-assigned unique ID for this managed resource.
- backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- 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_retention_period: Optional[str] = None,
db_cluster_id: Optional[str] = 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
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Db
Cluster stringId - The Id of cluster that can run database.
- Preferred
Backup List<string>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- Preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- Backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- Db
Cluster stringId - The Id of cluster that can run database.
- Preferred
Backup []stringPeriods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- Preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- db
Cluster StringId - The Id of cluster that can run database.
- preferred
Backup List<String>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup StringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- backup
Retention stringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- db
Cluster stringId - The Id of cluster that can run database.
- preferred
Backup string[]Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup stringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- backup_
retention_ strperiod - Cluster backup retention days, Fixed for 7 days, not modified.
- db_
cluster_ strid - The Id of cluster that can run database.
- preferred_
backup_ Sequence[str]periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred_
backup_ strtime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. China time is 8 hours behind it.
- backup
Retention StringPeriod - Cluster backup retention days, Fixed for 7 days, not modified.
- db
Cluster StringId - The Id of cluster that can run database.
- preferred
Backup List<String>Periods - ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
- preferred
Backup StringTime - ADB Cluster backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. 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.