@pulumi/azure-native
Version:
[](https://slack.pulumi.com) [](https://npmjs.com/package/@pulumi/azure-native) [ • 8.31 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as enums from "../types/enums";
/**
* A managed database resource.
*
* Uses Azure REST API version 2023-08-01. In version 2.x of the Azure Native provider, it used API version 2021-11-01.
*
* Other available API versions: 2017-03-01-preview, 2018-06-01-preview, 2019-06-01-preview, 2020-02-02-preview, 2020-08-01-preview, 2020-11-01-preview, 2021-02-01-preview, 2021-05-01-preview, 2021-08-01-preview, 2021-11-01, 2021-11-01-preview, 2022-02-01-preview, 2022-05-01-preview, 2022-08-01-preview, 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview, 2024-05-01-preview, 2024-11-01-preview. These can be accessed by generating a local SDK package using the CLI command `pulumi package add azure-native sql [ApiVersion]`. See the [version guide](../../../version-guide/#accessing-any-api-version-via-local-packages) for details.
*/
export declare class ManagedDatabase extends pulumi.CustomResource {
/**
* Get an existing ManagedDatabase 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): ManagedDatabase;
/**
* Returns true if the given object is an instance of ManagedDatabase. 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 ManagedDatabase;
/**
* The Azure API version of the resource.
*/
readonly azureApiVersion: pulumi.Output<string>;
/**
* Collation of the metadata catalog.
*/
readonly catalogCollation: pulumi.Output<string | undefined>;
/**
* Collation of the managed database.
*/
readonly collation: pulumi.Output<string | undefined>;
/**
* Creation date of the database.
*/
readonly creationDate: pulumi.Output<string>;
/**
* Geo paired region.
*/
readonly defaultSecondaryLocation: pulumi.Output<string>;
/**
* Earliest restore point in time for point in time restore.
*/
readonly earliestRestorePoint: pulumi.Output<string>;
/**
* Instance Failover Group resource identifier that this managed database belongs to.
*/
readonly failoverGroupId: pulumi.Output<string>;
/**
* Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.
*/
readonly isLedgerOn: pulumi.Output<boolean | undefined>;
/**
* Resource location.
*/
readonly location: pulumi.Output<string>;
/**
* Resource name.
*/
readonly name: pulumi.Output<string>;
/**
* Status of the database.
*/
readonly status: pulumi.Output<string>;
/**
* Resource tags.
*/
readonly tags: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Resource type.
*/
readonly type: pulumi.Output<string>;
/**
* Create a ManagedDatabase 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: ManagedDatabaseArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* The set of arguments for constructing a ManagedDatabase resource.
*/
export interface ManagedDatabaseArgs {
/**
* Whether to auto complete restore of this managed database.
*/
autoCompleteRestore?: pulumi.Input<boolean>;
/**
* Collation of the metadata catalog.
*/
catalogCollation?: pulumi.Input<string | enums.sql.CatalogCollationType>;
/**
* Collation of the managed database.
*/
collation?: pulumi.Input<string>;
/**
* Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required).
*/
createMode?: pulumi.Input<string | enums.sql.ManagedDatabaseCreateMode>;
/**
* The restorable cross-subscription dropped database resource id to restore when creating this database.
*/
crossSubscriptionRestorableDroppedDatabaseId?: pulumi.Input<string>;
/**
* The resource identifier of the cross-subscription source database associated with create operation of this database.
*/
crossSubscriptionSourceDatabaseId?: pulumi.Input<string>;
/**
* Target managed instance id used in cross-subscription restore.
*/
crossSubscriptionTargetManagedInstanceId?: pulumi.Input<string>;
/**
* The name of the database.
*/
databaseName?: pulumi.Input<string>;
/**
* Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created.
*/
isLedgerOn?: pulumi.Input<boolean>;
/**
* Last backup file name for restore of this managed database.
*/
lastBackupName?: pulumi.Input<string>;
/**
* Resource location.
*/
location?: pulumi.Input<string>;
/**
* The name of the Long Term Retention backup to be used for restore of this managed database.
*/
longTermRetentionBackupResourceId?: pulumi.Input<string>;
/**
* The name of the managed instance.
*/
managedInstanceName: pulumi.Input<string>;
/**
* The resource identifier of the recoverable database associated with create operation of this database.
*/
recoverableDatabaseId?: pulumi.Input<string>;
/**
* The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
resourceGroupName: pulumi.Input<string>;
/**
* The restorable dropped database resource id to restore when creating this database.
*/
restorableDroppedDatabaseId?: pulumi.Input<string>;
/**
* Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
*/
restorePointInTime?: pulumi.Input<string>;
/**
* The resource identifier of the source database associated with create operation of this database.
*/
sourceDatabaseId?: pulumi.Input<string>;
/**
* Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed.
*/
storageContainerIdentity?: pulumi.Input<string>;
/**
* Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token.
*/
storageContainerSasToken?: pulumi.Input<string>;
/**
* Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored.
*/
storageContainerUri?: pulumi.Input<string>;
/**
* Resource tags.
*/
tags?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}