import * as pulumi from "@pulumi/pulumi"; /** * Manages a Backup Instance to back up MySQL 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 exampleFlexibleServer = new azure.mysql.FlexibleServer("example", { * name: "example-mysqlfs", * resourceGroupName: example.name, * location: example.location, * administratorLogin: "adminTerraform", * administratorPassword: "QAZwsx123", * version: "8.0.21", * skuName: "B_Standard_B1ms", * zone: "1", * }); * const exampleBackupVault = new azure.dataprotection.BackupVault("example", { * name: "example-backupvault", * resourceGroupName: example.name, * location: example.location, * datastoreType: "VaultStore", * redundancy: "LocallyRedundant", * softDelete: "Off", * identity: { * type: "SystemAssigned", * }, * }); * const exampleAssignment = new azure.authorization.Assignment("example", { * scope: example.id, * roleDefinitionName: "Reader", * principalId: exampleBackupVault.identity.apply(identity => identity?.principalId), * }); * const example2 = new azure.authorization.Assignment("example2", { * scope: exampleFlexibleServer.id, * roleDefinitionName: "MySQL Backup And Export Operator", * principalId: exampleBackupVault.identity.apply(identity => identity?.principalId), * }); * const exampleBackupPolicyMysqlFlexibleServer = new azure.dataprotection.BackupPolicyMysqlFlexibleServer("example", { * name: "example-dp", * vaultId: exampleBackupVault.id, * backupRepeatingTimeIntervals: ["R/2021-05-23T02:30:00+00:00/P1W"], * defaultRetentionRule: { * lifeCycles: [{ * duration: "P4M", * dataStoreType: "VaultStore", * }], * }, * }, { * dependsOn: [ * exampleAssignment, * example2, * ], * }); * const exampleBackupInstanceMysqlFlexibleServer = new azure.dataprotection.BackupInstanceMysqlFlexibleServer("example", { * name: "example-dbi", * location: example.location, * vaultId: exampleBackupVault.id, * serverId: exampleFlexibleServer.id, * backupPolicyId: exampleBackupPolicyMysqlFlexibleServer.id, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.DataProtection` - 2025-07-01 * * ## Import * * Backup Instance MySQL Flexible Servers can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:dataprotection/backupInstanceMysqlFlexibleServer:BackupInstanceMysqlFlexibleServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1 * ``` */ export declare class BackupInstanceMysqlFlexibleServer extends pulumi.CustomResource { /** * Get an existing BackupInstanceMysqlFlexibleServer 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?: BackupInstanceMysqlFlexibleServerState, opts?: pulumi.CustomResourceOptions): BackupInstanceMysqlFlexibleServer; /** * Returns true if the given object is an instance of BackupInstanceMysqlFlexibleServer. 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 BackupInstanceMysqlFlexibleServer; /** * The ID of the Backup Policy. */ readonly backupPolicyId: pulumi.Output; /** * The location of the source database. Changing this forces a new resource to be created. */ readonly location: pulumi.Output; /** * Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * The protection state of the Backup Instance MySQL Flexible Server. */ readonly protectionState: pulumi.Output; /** * The ID of the source server. Changing this forces a new resource to be created. */ readonly serverId: pulumi.Output; /** * The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created. */ readonly vaultId: pulumi.Output; /** * Create a BackupInstanceMysqlFlexibleServer 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: BackupInstanceMysqlFlexibleServerArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering BackupInstanceMysqlFlexibleServer resources. */ export interface BackupInstanceMysqlFlexibleServerState { /** * The ID of the Backup Policy. */ backupPolicyId?: pulumi.Input; /** * The location of the source database. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The protection state of the Backup Instance MySQL Flexible Server. */ protectionState?: pulumi.Input; /** * The ID of the source server. Changing this forces a new resource to be created. */ serverId?: pulumi.Input; /** * The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created. */ vaultId?: pulumi.Input; } /** * The set of arguments for constructing a BackupInstanceMysqlFlexibleServer resource. */ export interface BackupInstanceMysqlFlexibleServerArgs { /** * The ID of the Backup Policy. */ backupPolicyId: pulumi.Input; /** * The location of the source database. Changing this forces a new resource to be created. */ location?: pulumi.Input; /** * Specifies the name of the Backup Instance for the MySQL Flexible Server. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * The ID of the source server. Changing this forces a new resource to be created. */ serverId: pulumi.Input; /** * The ID of the Backup Vault within which the MySQL Flexible Server Backup Instance should exist. Changing this forces a new resource to be created. */ vaultId: pulumi.Input; }