alicloud.gpdb.BackupPolicy
Explore with Pulumi AI
Import
GPDB Backup Policy can be imported using the id, e.g.
$ pulumi import alicloud:gpdb/backupPolicy:BackupPolicy example <id>
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_instance_id: Optional[str] = None,
preferred_backup_period: Optional[str] = None,
preferred_backup_time: Optional[str] = None,
backup_retention_period: Optional[int] = None,
enable_recovery_point: Optional[bool] = None,
recovery_point_period: 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:gpdb: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 examplebackupPolicyResourceResourceFromGpdbbackupPolicy = new AliCloud.Gpdb.BackupPolicy("examplebackupPolicyResourceResourceFromGpdbbackupPolicy", new()
{
DbInstanceId = "string",
PreferredBackupPeriod = "string",
PreferredBackupTime = "string",
BackupRetentionPeriod = 0,
EnableRecoveryPoint = false,
RecoveryPointPeriod = "string",
});
example, err := gpdb.NewBackupPolicy(ctx, "examplebackupPolicyResourceResourceFromGpdbbackupPolicy", &gpdb.BackupPolicyArgs{
DbInstanceId: pulumi.String("string"),
PreferredBackupPeriod: pulumi.String("string"),
PreferredBackupTime: pulumi.String("string"),
BackupRetentionPeriod: pulumi.Int(0),
EnableRecoveryPoint: pulumi.Bool(false),
RecoveryPointPeriod: pulumi.String("string"),
})
var examplebackupPolicyResourceResourceFromGpdbbackupPolicy = new BackupPolicy("examplebackupPolicyResourceResourceFromGpdbbackupPolicy", BackupPolicyArgs.builder()
.dbInstanceId("string")
.preferredBackupPeriod("string")
.preferredBackupTime("string")
.backupRetentionPeriod(0)
.enableRecoveryPoint(false)
.recoveryPointPeriod("string")
.build());
examplebackup_policy_resource_resource_from_gpdbbackup_policy = alicloud.gpdb.BackupPolicy("examplebackupPolicyResourceResourceFromGpdbbackupPolicy",
db_instance_id="string",
preferred_backup_period="string",
preferred_backup_time="string",
backup_retention_period=0,
enable_recovery_point=False,
recovery_point_period="string")
const examplebackupPolicyResourceResourceFromGpdbbackupPolicy = new alicloud.gpdb.BackupPolicy("examplebackupPolicyResourceResourceFromGpdbbackupPolicy", {
dbInstanceId: "string",
preferredBackupPeriod: "string",
preferredBackupTime: "string",
backupRetentionPeriod: 0,
enableRecoveryPoint: false,
recoveryPointPeriod: "string",
});
type: alicloud:gpdb:BackupPolicy
properties:
backupRetentionPeriod: 0
dbInstanceId: string
enableRecoveryPoint: false
preferredBackupPeriod: string
preferredBackupTime: string
recoveryPointPeriod: 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
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- Preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- Preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- Backup
Retention intPeriod - Data backup retention days.
- Enable
Recovery boolPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- Recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- Db
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- Preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- Preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- Backup
Retention intPeriod - Data backup retention days.
- Enable
Recovery boolPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- Recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- db
Instance StringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- preferred
Backup StringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup StringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- backup
Retention IntegerPeriod - Data backup retention days.
- enable
Recovery BooleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- recovery
Point StringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- db
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- backup
Retention numberPeriod - Data backup retention days.
- enable
Recovery booleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- db_
instance_ strid The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- preferred_
backup_ strperiod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred_
backup_ strtime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- backup_
retention_ intperiod - Data backup retention days.
- enable_
recovery_ boolpoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- recovery_
point_ strperiod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- db
Instance StringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- preferred
Backup StringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup StringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- backup
Retention NumberPeriod - Data backup retention days.
- enable
Recovery BooleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- recovery
Point StringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupPolicy 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 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[int] = None,
db_instance_id: Optional[str] = None,
enable_recovery_point: Optional[bool] = None,
preferred_backup_period: Optional[str] = None,
preferred_backup_time: Optional[str] = None,
recovery_point_period: 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 intPeriod - Data backup retention days.
- Db
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- Enable
Recovery boolPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- Preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- Preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- Recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- Backup
Retention intPeriod - Data backup retention days.
- Db
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- Enable
Recovery boolPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- Preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- Preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- Recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- backup
Retention IntegerPeriod - Data backup retention days.
- db
Instance StringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- enable
Recovery BooleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- preferred
Backup StringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup StringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- recovery
Point StringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- backup
Retention numberPeriod - Data backup retention days.
- db
Instance stringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- enable
Recovery booleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- preferred
Backup stringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup stringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- recovery
Point stringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- backup_
retention_ intperiod - Data backup retention days.
- db_
instance_ strid The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- enable_
recovery_ boolpoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- preferred_
backup_ strperiod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred_
backup_ strtime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- recovery_
point_ strperiod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
- backup
Retention NumberPeriod - Data backup retention days.
- db
Instance StringId The instance ID.
NOTE: You can call the DescribeDBInstances operation to view the details of all AnalyticDB PostgreSQL instances in the target region, including the instance ID.
- enable
Recovery BooleanPoint - Whether to enable automatic recovery points. Value Description:
- true: enabled.
- false: Closed.
- preferred
Backup StringPeriod - Data backup cycle. Separate multiple values with commas (,). Value Description:
- Monday: Monday.
- Tuesday: Tuesday.
- Wednesday: Wednesday.
- Thursday: Thursday.
- Friday: Friday.
- Saturday: Saturday.
- Sunday: Sunday.
- preferred
Backup StringTime - Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
- recovery
Point StringPeriod - Recovery point frequency. Value Description:
- 1: Hourly.
- 2: Every two hours.
- 4: Every four hours.
- 8: Every eight hours.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.