1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. gpdb
  5. BackupPolicy
Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi

alicloud.gpdb.BackupPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi

    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:

    DbInstanceId string

    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.

    PreferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    PreferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    BackupRetentionPeriod int
    Data backup retention days.
    EnableRecoveryPoint bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    RecoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    DbInstanceId string

    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.

    PreferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    PreferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    BackupRetentionPeriod int
    Data backup retention days.
    EnableRecoveryPoint bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    RecoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    dbInstanceId String

    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.

    preferredBackupPeriod String
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime String
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    backupRetentionPeriod Integer
    Data backup retention days.
    enableRecoveryPoint Boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    recoveryPointPeriod String
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    dbInstanceId string

    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.

    preferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    backupRetentionPeriod number
    Data backup retention days.
    enableRecoveryPoint boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    recoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    db_instance_id str

    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_period str
    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_time str
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    backup_retention_period int
    Data backup retention days.
    enable_recovery_point bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    recovery_point_period str
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    dbInstanceId String

    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.

    preferredBackupPeriod String
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime String
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    backupRetentionPeriod Number
    Data backup retention days.
    enableRecoveryPoint Boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    recoveryPointPeriod String
    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.
    The following state arguments are supported:
    BackupRetentionPeriod int
    Data backup retention days.
    DbInstanceId string

    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.

    EnableRecoveryPoint bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    PreferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    PreferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    RecoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    BackupRetentionPeriod int
    Data backup retention days.
    DbInstanceId string

    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.

    EnableRecoveryPoint bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    PreferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    PreferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    RecoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    backupRetentionPeriod Integer
    Data backup retention days.
    dbInstanceId String

    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.

    enableRecoveryPoint Boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    preferredBackupPeriod String
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime String
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    recoveryPointPeriod String
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    backupRetentionPeriod number
    Data backup retention days.
    dbInstanceId string

    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.

    enableRecoveryPoint boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    preferredBackupPeriod string
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime string
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    recoveryPointPeriod string
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    backup_retention_period int
    Data backup retention days.
    db_instance_id str

    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_point bool
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    preferred_backup_period str
    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_time str
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    recovery_point_period str
    Recovery point frequency. Value Description:

    • 1: Hourly.
    • 2: Every two hours.
    • 4: Every four hours.
    • 8: Every eight hours.
    backupRetentionPeriod Number
    Data backup retention days.
    dbInstanceId String

    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.

    enableRecoveryPoint Boolean
    Whether to enable automatic recovery points. Value Description:

    • true: enabled.
    • false: Closed.
    preferredBackupPeriod String
    Data backup cycle. Separate multiple values with commas (,). Value Description:

    • Monday: Monday.
    • Tuesday: Tuesday.
    • Wednesday: Wednesday.
    • Thursday: Thursday.
    • Friday: Friday.
    • Saturday: Saturday.
    • Sunday: Sunday.
    preferredBackupTime String
    Data backup time. Format: HH:mmZ-HH:mmZ(UTC time).
    recoveryPointPeriod String
    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.
    alicloud logo
    Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi