ManagedInstanceArgs

data class ManagedInstanceArgs(val administratorLogin: Output<String>? = null, val administratorLoginPassword: Output<String>? = null, val administrators: Output<ManagedInstanceExternalAdministratorArgs>? = null, val authenticationMetadata: Output<Either<String, AuthMetadataLookupModes>>? = null, val collation: Output<String>? = null, val databaseFormat: Output<Either<String, ManagedInstanceDatabaseFormat>>? = null, val dnsZonePartner: Output<String>? = null, val hybridSecondaryUsage: Output<Either<String, HybridSecondaryUsage>>? = null, val identity: Output<ResourceIdentityArgs>? = null, val instancePoolId: Output<String>? = null, val isGeneralPurposeV2: Output<Boolean>? = null, val keyId: Output<String>? = null, val licenseType: Output<Either<String, ManagedInstanceLicenseType>>? = null, val location: Output<String>? = null, val maintenanceConfigurationId: Output<String>? = null, val managedInstanceCreateMode: Output<Either<String, ManagedServerCreateMode>>? = null, val managedInstanceName: Output<String>? = null, val minimalTlsVersion: Output<String>? = null, val pricingModel: Output<Either<String, PricingModel>>? = null, val primaryUserAssignedIdentityId: Output<String>? = null, val proxyOverride: Output<Either<String, ManagedInstanceProxyOverride>>? = null, val publicDataEndpointEnabled: Output<Boolean>? = null, val requestedBackupStorageRedundancy: Output<Either<String, BackupStorageRedundancy>>? = null, val resourceGroupName: Output<String>? = null, val restorePointInTime: Output<String>? = null, val servicePrincipal: Output<ServicePrincipalArgs>? = null, val sku: Output<SkuArgs>? = null, val sourceManagedInstanceId: Output<String>? = null, val storageIOps: Output<Int>? = null, val storageSizeInGB: Output<Int>? = null, val storageThroughputMBps: Output<Int>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val timezoneId: Output<String>? = null, val vCores: Output<Int>? = null, val zoneRedundant: Output<Boolean>? = null) : ConvertibleToJava<ManagedInstanceArgs>

An Azure SQL managed instance. 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: 2015-05-01-preview, 2018-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. 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/#accessing-any-api-version-via-local-packages for details.

Example Usage

Create managed instance with all properties

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedInstance = new AzureNative.Sql.ManagedInstance("managedInstance", new()
{
AdministratorLogin = "dummylogin",
AdministratorLoginPassword = "PLACEHOLDER",
Administrators = new AzureNative.Sql.Inputs.ManagedInstanceExternalAdministratorArgs
{
AzureADOnlyAuthentication = true,
Login = "bob@contoso.com",
PrincipalType = AzureNative.Sql.PrincipalType.User,
Sid = "00000011-1111-2222-2222-123456789111",
TenantId = "00000011-1111-2222-2222-123456789111",
},
AuthenticationMetadata = AzureNative.Sql.AuthMetadataLookupModes.AzureAD,
Collation = "SQL_Latin1_General_CP1_CI_AS",
DatabaseFormat = AzureNative.Sql.ManagedInstanceDatabaseFormat.AlwaysUpToDate,
DnsZonePartner = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
HybridSecondaryUsage = AzureNative.Sql.HybridSecondaryUsage.Passive,
InstancePoolId = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1",
LicenseType = AzureNative.Sql.ManagedInstanceLicenseType.LicenseIncluded,
Location = "Japan East",
MaintenanceConfigurationId = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
ManagedInstanceName = "testinstance",
MinimalTlsVersion = "1.2",
ProxyOverride = AzureNative.Sql.ManagedInstanceProxyOverride.Redirect,
PublicDataEndpointEnabled = false,
RequestedBackupStorageRedundancy = AzureNative.Sql.BackupStorageRedundancy.Geo,
ResourceGroupName = "testrg",
ServicePrincipal = new AzureNative.Sql.Inputs.ServicePrincipalArgs
{
Type = AzureNative.Sql.ServicePrincipalType.SystemAssigned,
},
Sku = new AzureNative.Sql.Inputs.SkuArgs
{
Name = "GP_Gen5",
Tier = "GeneralPurpose",
},
StorageSizeInGB = 1024,
SubnetId = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
Tags =
{
{ "tagKey1", "TagValue1" },
},
TimezoneId = "UTC",
VCores = 8,
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewManagedInstance(ctx, "managedInstance", &sql.ManagedInstanceArgs{
AdministratorLogin: pulumi.String("dummylogin"),
AdministratorLoginPassword: pulumi.String("PLACEHOLDER"),
Administrators: &sql.ManagedInstanceExternalAdministratorArgs{
AzureADOnlyAuthentication: pulumi.Bool(true),
Login: pulumi.String("bob@contoso.com"),
PrincipalType: pulumi.String(sql.PrincipalTypeUser),
Sid: pulumi.String("00000011-1111-2222-2222-123456789111"),
TenantId: pulumi.String("00000011-1111-2222-2222-123456789111"),
},
AuthenticationMetadata: pulumi.String(sql.AuthMetadataLookupModesAzureAD),
Collation: pulumi.String("SQL_Latin1_General_CP1_CI_AS"),
DatabaseFormat: pulumi.String(sql.ManagedInstanceDatabaseFormatAlwaysUpToDate),
DnsZonePartner: pulumi.String("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance"),
HybridSecondaryUsage: pulumi.String(sql.HybridSecondaryUsagePassive),
InstancePoolId: pulumi.String("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1"),
LicenseType: pulumi.String(sql.ManagedInstanceLicenseTypeLicenseIncluded),
Location: pulumi.String("Japan East"),
MaintenanceConfigurationId: pulumi.String("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"),
ManagedInstanceName: pulumi.String("testinstance"),
MinimalTlsVersion: pulumi.String("1.2"),
ProxyOverride: pulumi.String(sql.ManagedInstanceProxyOverrideRedirect),
PublicDataEndpointEnabled: pulumi.Bool(false),
RequestedBackupStorageRedundancy: pulumi.String(sql.BackupStorageRedundancyGeo),
ResourceGroupName: pulumi.String("testrg"),
ServicePrincipal: &sql.ServicePrincipalArgs{
Type: pulumi.String(sql.ServicePrincipalTypeSystemAssigned),
},
Sku: &sql.SkuArgs{
Name: pulumi.String("GP_Gen5"),
Tier: pulumi.String("GeneralPurpose"),
},
StorageSizeInGB: pulumi.Int(1024),
SubnetId: pulumi.String("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"),
Tags: pulumi.StringMap{
"tagKey1": pulumi.String("TagValue1"),
},
TimezoneId: pulumi.String("UTC"),
VCores: pulumi.Int(8),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.ManagedInstance;
import com.pulumi.azurenative.sql.ManagedInstanceArgs;
import com.pulumi.azurenative.sql.inputs.ManagedInstanceExternalAdministratorArgs;
import com.pulumi.azurenative.sql.inputs.ServicePrincipalArgs;
import com.pulumi.azurenative.sql.inputs.SkuArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var managedInstance = new ManagedInstance("managedInstance", ManagedInstanceArgs.builder()
.administratorLogin("dummylogin")
.administratorLoginPassword("PLACEHOLDER")
.administrators(ManagedInstanceExternalAdministratorArgs.builder()
.azureADOnlyAuthentication(true)
.login("bob@contoso.com")
.principalType("User")
.sid("00000011-1111-2222-2222-123456789111")
.tenantId("00000011-1111-2222-2222-123456789111")
.build())
.authenticationMetadata("AzureAD")
.collation("SQL_Latin1_General_CP1_CI_AS")
.databaseFormat("AlwaysUpToDate")
.dnsZonePartner("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance")
.hybridSecondaryUsage("Passive")
.instancePoolId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1")
.licenseType("LicenseIncluded")
.location("Japan East")
.maintenanceConfigurationId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1")
.managedInstanceName("testinstance")
.minimalTlsVersion("1.2")
.proxyOverride("Redirect")
.publicDataEndpointEnabled(false)
.requestedBackupStorageRedundancy("Geo")
.resourceGroupName("testrg")
.servicePrincipal(ServicePrincipalArgs.builder()
.type("SystemAssigned")
.build())
.sku(SkuArgs.builder()
.name("GP_Gen5")
.tier("GeneralPurpose")
.build())
.storageSizeInGB(1024)
.subnetId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
.tags(Map.of("tagKey1", "TagValue1"))
.timezoneId("UTC")
.vCores(8)
.build());
}
}

Create managed instance with minimal properties

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var managedInstance = new AzureNative.Sql.ManagedInstance("managedInstance", new()
{
AdministratorLogin = "dummylogin",
AdministratorLoginPassword = "PLACEHOLDER",
LicenseType = AzureNative.Sql.ManagedInstanceLicenseType.LicenseIncluded,
Location = "Japan East",
ManagedInstanceName = "testinstance",
ResourceGroupName = "testrg",
Sku = new AzureNative.Sql.Inputs.SkuArgs
{
Name = "GP_Gen5",
Tier = "GeneralPurpose",
},
StorageSizeInGB = 1024,
SubnetId = "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
VCores = 8,
});
});
package main
import (
sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sql.NewManagedInstance(ctx, "managedInstance", &sql.ManagedInstanceArgs{
AdministratorLogin: pulumi.String("dummylogin"),
AdministratorLoginPassword: pulumi.String("PLACEHOLDER"),
LicenseType: pulumi.String(sql.ManagedInstanceLicenseTypeLicenseIncluded),
Location: pulumi.String("Japan East"),
ManagedInstanceName: pulumi.String("testinstance"),
ResourceGroupName: pulumi.String("testrg"),
Sku: &sql.SkuArgs{
Name: pulumi.String("GP_Gen5"),
Tier: pulumi.String("GeneralPurpose"),
},
StorageSizeInGB: pulumi.Int(1024),
SubnetId: pulumi.String("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"),
VCores: pulumi.Int(8),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.sql.ManagedInstance;
import com.pulumi.azurenative.sql.ManagedInstanceArgs;
import com.pulumi.azurenative.sql.inputs.SkuArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var managedInstance = new ManagedInstance("managedInstance", ManagedInstanceArgs.builder()
.administratorLogin("dummylogin")
.administratorLoginPassword("PLACEHOLDER")
.licenseType("LicenseIncluded")
.location("Japan East")
.managedInstanceName("testinstance")
.resourceGroupName("testrg")
.sku(SkuArgs.builder()
.name("GP_Gen5")
.tier("GeneralPurpose")
.build())
.storageSizeInGB(1024)
.subnetId("/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1")
.vCores(8)
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:sql:ManagedInstance testinstance /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}

Constructors

Link copied to clipboard
constructor(administratorLogin: Output<String>? = null, administratorLoginPassword: Output<String>? = null, administrators: Output<ManagedInstanceExternalAdministratorArgs>? = null, authenticationMetadata: Output<Either<String, AuthMetadataLookupModes>>? = null, collation: Output<String>? = null, databaseFormat: Output<Either<String, ManagedInstanceDatabaseFormat>>? = null, dnsZonePartner: Output<String>? = null, hybridSecondaryUsage: Output<Either<String, HybridSecondaryUsage>>? = null, identity: Output<ResourceIdentityArgs>? = null, instancePoolId: Output<String>? = null, isGeneralPurposeV2: Output<Boolean>? = null, keyId: Output<String>? = null, licenseType: Output<Either<String, ManagedInstanceLicenseType>>? = null, location: Output<String>? = null, maintenanceConfigurationId: Output<String>? = null, managedInstanceCreateMode: Output<Either<String, ManagedServerCreateMode>>? = null, managedInstanceName: Output<String>? = null, minimalTlsVersion: Output<String>? = null, pricingModel: Output<Either<String, PricingModel>>? = null, primaryUserAssignedIdentityId: Output<String>? = null, proxyOverride: Output<Either<String, ManagedInstanceProxyOverride>>? = null, publicDataEndpointEnabled: Output<Boolean>? = null, requestedBackupStorageRedundancy: Output<Either<String, BackupStorageRedundancy>>? = null, resourceGroupName: Output<String>? = null, restorePointInTime: Output<String>? = null, servicePrincipal: Output<ServicePrincipalArgs>? = null, sku: Output<SkuArgs>? = null, sourceManagedInstanceId: Output<String>? = null, storageIOps: Output<Int>? = null, storageSizeInGB: Output<Int>? = null, storageThroughputMBps: Output<Int>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null, timezoneId: Output<String>? = null, vCores: Output<Int>? = null, zoneRedundant: Output<Boolean>? = null)

Properties

Link copied to clipboard
val administratorLogin: Output<String>? = null

Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation).

Link copied to clipboard
val administratorLoginPassword: Output<String>? = null

The administrator login password (required for managed instance creation).

Link copied to clipboard

The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used.

Link copied to clipboard

The managed instance's authentication metadata lookup mode.

Link copied to clipboard
val collation: Output<String>? = null

Collation of the managed instance.

Link copied to clipboard

Specifies the internal format of instance databases specific to the SQL engine version.

Link copied to clipboard
val dnsZonePartner: Output<String>? = null

The resource id of another managed instance whose DNS zone this managed instance will share after creation.

Link copied to clipboard
val hybridSecondaryUsage: Output<Either<String, HybridSecondaryUsage>>? = null

Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR).

Link copied to clipboard
val identity: Output<ResourceIdentityArgs>? = null

The Azure Active Directory identity of the managed instance.

Link copied to clipboard
val instancePoolId: Output<String>? = null

The Id of the instance pool this managed server belongs to.

Link copied to clipboard
val isGeneralPurposeV2: Output<Boolean>? = null

Whether or not this is a GPv2 variant of General Purpose edition.

Link copied to clipboard
val keyId: Output<String>? = null

A CMK URI of the key to use for encryption.

Link copied to clipboard
val licenseType: Output<Either<String, ManagedInstanceLicenseType>>? = null

The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses).

Link copied to clipboard
val location: Output<String>? = null

Resource location.

Link copied to clipboard
val maintenanceConfigurationId: Output<String>? = null

Specifies maintenance configuration id to apply to this managed instance.

Link copied to clipboard

Specifies the mode of database creation. Default: Regular instance creation. Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified.

Link copied to clipboard
val managedInstanceName: Output<String>? = null

The name of the managed instance.

Link copied to clipboard
val minimalTlsVersion: Output<String>? = null

Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'

Link copied to clipboard
val pricingModel: Output<Either<String, PricingModel>>? = null

Pricing model of Managed Instance.

Link copied to clipboard

The resource id of a user assigned identity to be used by default.

Link copied to clipboard
val proxyOverride: Output<Either<String, ManagedInstanceProxyOverride>>? = null

Connection type used for connecting to the instance.

Link copied to clipboard
val publicDataEndpointEnabled: Output<Boolean>? = null

Whether or not the public data endpoint is enabled.

Link copied to clipboard

The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

Link copied to clipboard
val restorePointInTime: Output<String>? = null

Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.

Link copied to clipboard

The managed instance's service principal.

Link copied to clipboard
val sku: Output<SkuArgs>? = null

Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH

Link copied to clipboard
val sourceManagedInstanceId: Output<String>? = null

The resource identifier of the source managed instance associated with create operation of this instance.

Link copied to clipboard
val storageIOps: Output<Int>? = null

Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores.

Link copied to clipboard
val storageSizeInGB: Output<Int>? = null

Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores.

Link copied to clipboard
val storageThroughputMBps: Output<Int>? = null

Storage throughput MBps parameter is not supported in the instance create/update operation.

Link copied to clipboard
val subnetId: Output<String>? = null

Subnet resource ID for the managed instance.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val timezoneId: Output<String>? = null

Id of the timezone. Allowed values are timezones supported by Windows. Windows keeps details on supported timezones, including the id, in registry under KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. List of Ids can also be obtained by executing System.TimeZoneInfo::GetSystemTimeZones() in PowerShell. An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time".

Link copied to clipboard
val vCores: Output<Int>? = null

The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80.

Link copied to clipboard
val zoneRedundant: Output<Boolean>? = null

Whether or not the multi-az is enabled.

Functions

Link copied to clipboard
open override fun toJava(): ManagedInstanceArgs