import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Backup Policy to back up PostgreSQL Flexible Server. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleBackupVault = new azure.dataprotection.BackupVault("example", { * name: "example-backup-vault", * resourceGroupName: example.name, * location: example.location, * datastoreType: "VaultStore", * redundancy: "LocallyRedundant", * identity: { * type: "SystemAssigned", * }, * }); * const exampleBackupPolicyPostgresqlFlexibleServer = new azure.dataprotection.BackupPolicyPostgresqlFlexibleServer("example", { * name: "example-backup-policy", * vaultId: exampleBackupVault.id, * backupRepeatingTimeIntervals: ["R/2021-05-23T02:30:00+00:00/P1W"], * timeZone: "India Standard Time", * defaultRetentionRule: { * lifeCycles: [{ * duration: "P4M", * dataStoreType: "VaultStore", * }], * }, * retentionRules: [ * { * name: "weekly", * lifeCycles: [{ * duration: "P6M", * dataStoreType: "VaultStore", * }], * priority: 20, * criteria: { * absoluteCriteria: "FirstOfWeek", * }, * }, * { * name: "thursday", * lifeCycles: [{ * duration: "P1W", * dataStoreType: "VaultStore", * }], * priority: 25, * criteria: { * daysOfWeeks: ["Thursday"], * scheduledBackupTimes: ["2021-05-23T02:30:00Z"], * }, * }, * { * name: "monthly", * lifeCycles: [{ * duration: "P1D", * dataStoreType: "VaultStore", * }], * priority: 15, * criteria: { * weeksOfMonths: [ * "First", * "Last", * ], * daysOfWeeks: ["Tuesday"], * scheduledBackupTimes: ["2021-05-23T02:30:00Z"], * }, * }, * ], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.DataProtection` - 2025-07-01 * * ## Import * * Backup Policy PostgreSQL Flexible Server's can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:dataprotection/backupPolicyPostgresqlFlexibleServer:BackupPolicyPostgresqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1 * ``` */ export declare class BackupPolicyPostgresqlFlexibleServer extends pulumi.CustomResource { /** * Get an existing BackupPolicyPostgresqlFlexibleServer resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: BackupPolicyPostgresqlFlexibleServerState, opts?: pulumi.CustomResourceOptions): BackupPolicyPostgresqlFlexibleServer; /** * Returns true if the given object is an instance of BackupPolicyPostgresqlFlexibleServer. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is BackupPolicyPostgresqlFlexibleServer; /** * Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created. */ readonly backupRepeatingTimeIntervals: pulumi.Output; /** * A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created. */ readonly defaultRetentionRule: pulumi.Output; /** * Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created. */ readonly retentionRules: pulumi.Output; /** * Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created. */ readonly timeZone: pulumi.Output; /** * The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created. */ readonly vaultId: pulumi.Output; /** * Create a BackupPolicyPostgresqlFlexibleServer resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: BackupPolicyPostgresqlFlexibleServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering BackupPolicyPostgresqlFlexibleServer resources. */ export interface BackupPolicyPostgresqlFlexibleServerState { /** * Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created. */ backupRepeatingTimeIntervals?: pulumi.Input[]>; /** * A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created. */ defaultRetentionRule?: pulumi.Input; /** * Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created. */ retentionRules?: pulumi.Input[]>; /** * Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created. */ timeZone?: pulumi.Input; /** * The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created. */ vaultId?: pulumi.Input; } /** * The set of arguments for constructing a BackupPolicyPostgresqlFlexibleServer resource. */ export interface BackupPolicyPostgresqlFlexibleServerArgs { /** * Specifies a list of repeating time interval. It supports weekly back. It should follow `ISO 8601` repeating time interval format. Changing this forces a new resource to be created. */ backupRepeatingTimeIntervals: pulumi.Input[]>; /** * A `defaultRetentionRule` block as defined below. Changing this forces a new resource to be created. */ defaultRetentionRule: pulumi.Input; /** * Specifies the name of the Backup Policy for the PostgreSQL Flexible Server. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `retentionRule` blocks as defined below. Changing this forces a new resource to be created. */ retentionRules?: pulumi.Input[]>; /** * Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new resource to be created. */ timeZone?: pulumi.Input; /** * The ID of the Backup Vault where the Backup Policy PostgreSQL Flexible Server should exist. Changing this forces a new resource to be created. */ vaultId: pulumi.Input; }