1. Packages
  2. Alicloud Provider
  3. API Docs
  4. adb
  5. BackupPolicy
Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi

alicloud.adb.BackupPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi

    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

    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:

    DbClusterId string
    The Id of cluster that can run database.
    PreferredBackupPeriods List<string>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    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.
    DbClusterId string
    The Id of cluster that can run database.
    PreferredBackupPeriods []string
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    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.
    dbClusterId String
    The Id of cluster that can run database.
    preferredBackupPeriods List<String>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    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.
    dbClusterId string
    The Id of cluster that can run database.
    preferredBackupPeriods string[]
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime string
    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_id str
    The Id of cluster that can run database.
    preferred_backup_periods Sequence[str]
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferred_backup_time str
    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.
    dbClusterId String
    The Id of cluster that can run database.
    preferredBackupPeriods List<String>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    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:

    BackupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    BackupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    Id string
    The provider-assigned unique ID for this managed resource.
    backupRetentionPeriod String
    Cluster backup retention days, Fixed for 7 days, not modified.
    id String
    The provider-assigned unique ID for this managed resource.
    backupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    id string
    The provider-assigned unique ID for this managed resource.
    backup_retention_period str
    Cluster backup retention days, Fixed for 7 days, not modified.
    id str
    The provider-assigned unique ID for this managed resource.
    backupRetentionPeriod String
    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.
    The following state arguments are supported:
    BackupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    DbClusterId string
    The Id of cluster that can run database.
    PreferredBackupPeriods List<string>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    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.
    BackupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    DbClusterId string
    The Id of cluster that can run database.
    PreferredBackupPeriods []string
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    PreferredBackupTime string
    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.
    backupRetentionPeriod String
    Cluster backup retention days, Fixed for 7 days, not modified.
    dbClusterId String
    The Id of cluster that can run database.
    preferredBackupPeriods List<String>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    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.
    backupRetentionPeriod string
    Cluster backup retention days, Fixed for 7 days, not modified.
    dbClusterId string
    The Id of cluster that can run database.
    preferredBackupPeriods string[]
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime string
    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_period str
    Cluster backup retention days, Fixed for 7 days, not modified.
    db_cluster_id str
    The Id of cluster that can run database.
    preferred_backup_periods Sequence[str]
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferred_backup_time str
    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.
    backupRetentionPeriod String
    Cluster backup retention days, Fixed for 7 days, not modified.
    dbClusterId String
    The Id of cluster that can run database.
    preferredBackupPeriods List<String>
    ADB Cluster backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday].
    preferredBackupTime String
    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.
    alicloud logo
    Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi