import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Manages a Microsoft SQL Virtual Machine * * ## Example Usage * * This example provisions a brief Managed Microsoft SQL Virtual Machine. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = azure.compute.getVirtualMachine({ * name: "example-vm", * resourceGroupName: "example-resources", * }); * const exampleVirtualMachine = new azure.mssql.VirtualMachine("example", { * virtualMachineId: example.then(example => example.id), * sqlLicenseType: "PAYG", * rServicesEnabled: true, * sqlConnectivityPort: 1433, * sqlConnectivityType: "PRIVATE", * sqlConnectivityUpdatePassword: "Password1234!", * sqlConnectivityUpdateUsername: "sqllogin", * autoPatching: { * dayOfWeek: "Sunday", * maintenanceWindowDurationInMinutes: 60, * maintenanceWindowStartingHour: 2, * }, * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.Compute` - 2024-03-01 * * * `Microsoft.SqlVirtualMachine` - 2023-10-01 * * ## Import * * Microsoft SQL Virtual Machines can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:mssql/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/example1 * ``` */ export declare class VirtualMachine extends pulumi.CustomResource { /** * Get an existing VirtualMachine 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?: VirtualMachineState, opts?: pulumi.CustomResourceOptions): VirtualMachine; /** * Returns true if the given object is an instance of VirtualMachine. 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 VirtualMachine; /** * An `assessment` block as defined below. */ readonly assessment: pulumi.Output; /** * An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created. */ readonly autoBackup: pulumi.Output; /** * An `autoPatching` block as defined below. */ readonly autoPatching: pulumi.Output; /** * An `keyVaultCredential` block as defined below. */ readonly keyVaultCredential: pulumi.Output; /** * Should R Services be enabled? */ readonly rServicesEnabled: pulumi.Output; /** * The SQL Server port. Defaults to `1433`. */ readonly sqlConnectivityPort: pulumi.Output; /** * The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`. */ readonly sqlConnectivityType: pulumi.Output; /** * The SQL Server sysadmin login password. */ readonly sqlConnectivityUpdatePassword: pulumi.Output; /** * The SQL Server sysadmin login to create. */ readonly sqlConnectivityUpdateUsername: pulumi.Output; /** * A `sqlInstance` block as defined below. */ readonly sqlInstance: pulumi.Output; /** * The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created. */ readonly sqlLicenseType: pulumi.Output; /** * The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to. */ readonly sqlVirtualMachineGroupId: pulumi.Output; /** * An `storageConfiguration` block as defined below. */ readonly storageConfiguration: pulumi.Output; /** * A mapping of tags to assign to the resource. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * The ID of the Virtual Machine. Changing this forces a new resource to be created. */ readonly virtualMachineId: pulumi.Output; /** * A `wsfcDomainCredential` block as defined below */ readonly wsfcDomainCredential: pulumi.Output; /** * Create a VirtualMachine 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: VirtualMachineArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VirtualMachine resources. */ export interface VirtualMachineState { /** * An `assessment` block as defined below. */ assessment?: pulumi.Input; /** * An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created. */ autoBackup?: pulumi.Input; /** * An `autoPatching` block as defined below. */ autoPatching?: pulumi.Input; /** * An `keyVaultCredential` block as defined below. */ keyVaultCredential?: pulumi.Input; /** * Should R Services be enabled? */ rServicesEnabled?: pulumi.Input; /** * The SQL Server port. Defaults to `1433`. */ sqlConnectivityPort?: pulumi.Input; /** * The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`. */ sqlConnectivityType?: pulumi.Input; /** * The SQL Server sysadmin login password. */ sqlConnectivityUpdatePassword?: pulumi.Input; /** * The SQL Server sysadmin login to create. */ sqlConnectivityUpdateUsername?: pulumi.Input; /** * A `sqlInstance` block as defined below. */ sqlInstance?: pulumi.Input; /** * The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created. */ sqlLicenseType?: pulumi.Input; /** * The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to. */ sqlVirtualMachineGroupId?: pulumi.Input; /** * An `storageConfiguration` block as defined below. */ storageConfiguration?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the Virtual Machine. Changing this forces a new resource to be created. */ virtualMachineId?: pulumi.Input; /** * A `wsfcDomainCredential` block as defined below */ wsfcDomainCredential?: pulumi.Input; } /** * The set of arguments for constructing a VirtualMachine resource. */ export interface VirtualMachineArgs { /** * An `assessment` block as defined below. */ assessment?: pulumi.Input; /** * An `autoBackup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created. */ autoBackup?: pulumi.Input; /** * An `autoPatching` block as defined below. */ autoPatching?: pulumi.Input; /** * An `keyVaultCredential` block as defined below. */ keyVaultCredential?: pulumi.Input; /** * Should R Services be enabled? */ rServicesEnabled?: pulumi.Input; /** * The SQL Server port. Defaults to `1433`. */ sqlConnectivityPort?: pulumi.Input; /** * The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`. */ sqlConnectivityType?: pulumi.Input; /** * The SQL Server sysadmin login password. */ sqlConnectivityUpdatePassword?: pulumi.Input; /** * The SQL Server sysadmin login to create. */ sqlConnectivityUpdateUsername?: pulumi.Input; /** * A `sqlInstance` block as defined below. */ sqlInstance?: pulumi.Input; /** * The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created. */ sqlLicenseType?: pulumi.Input; /** * The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to. */ sqlVirtualMachineGroupId?: pulumi.Input; /** * An `storageConfiguration` block as defined below. */ storageConfiguration?: pulumi.Input; /** * A mapping of tags to assign to the resource. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; }>; /** * The ID of the Virtual Machine. Changing this forces a new resource to be created. */ virtualMachineId: pulumi.Input; /** * A `wsfcDomainCredential` block as defined below */ wsfcDomainCredential?: pulumi.Input; }