Managed Instances - Create Or Update
Creates or updates a managed instance.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}?api-version=2021-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
managed
|
path | True |
string |
The name of the managed instance. |
resource
|
path | True |
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. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
Resource location. |
identity |
The Azure Active Directory identity of the managed instance. |
||
properties.administratorLogin |
string |
Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). |
|
properties.administratorLoginPassword |
string |
The administrator login password (required for managed instance creation). |
|
properties.administrators |
The Azure Active Directory administrator of the server. |
||
properties.collation |
string |
Collation of the managed instance. |
|
properties.dnsZonePartner |
string |
The resource id of another managed instance whose DNS zone this managed instance will share after creation. |
|
properties.instancePoolId |
string |
The Id of the instance pool this managed server belongs to. |
|
properties.keyId |
string |
A CMK URI of the key to use for encryption. |
|
properties.licenseType |
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). |
||
properties.maintenanceConfigurationId |
string |
Specifies maintenance configuration id to apply to this managed instance. |
|
properties.managedInstanceCreateMode |
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. |
||
properties.minimalTlsVersion |
string |
Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' |
|
properties.primaryUserAssignedIdentityId |
string |
The resource id of a user assigned identity to be used by default. |
|
properties.proxyOverride |
Connection type used for connecting to the instance. |
||
properties.publicDataEndpointEnabled |
boolean |
Whether or not the public data endpoint is enabled. |
|
properties.requestedBackupStorageRedundancy |
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) |
||
properties.restorePointInTime |
string |
Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. |
|
properties.servicePrincipal |
The managed instance's service principal. |
||
properties.sourceManagedInstanceId |
string |
The resource identifier of the source managed instance associated with create operation of this instance. |
|
properties.storageSizeInGB |
integer |
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. |
|
properties.subnetId |
string |
Subnet resource ID for the managed instance. |
|
properties.timezoneId |
string |
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". |
|
properties.vCores |
integer |
The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. |
|
properties.zoneRedundant |
boolean |
Whether or not the multi-az is enabled. |
|
sku |
Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully updated the managed instance. |
|
201 Created |
Successfully created the managed instance. |
|
202 Accepted |
Accepted |
|
Other Status Codes |
*** Error Responses: ***
|
Examples
Create managed instance with all properties |
Create managed instance with minimal properties |
Create managed instance with all properties
Sample request
PUT https://management.azure.com/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance?api-version=2021-11-01
{
"tags": {
"tagKey1": "TagValue1"
},
"location": "Japan East",
"sku": {
"name": "GP_Gen5",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "dummylogin",
"administratorLoginPassword": "PLACEHOLDER",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"dnsZonePartner": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
"publicDataEndpointEnabled": false,
"proxyOverride": "Redirect",
"minimalTlsVersion": "1.2",
"timezoneId": "UTC",
"instancePoolId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1",
"maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
"requestedBackupStorageRedundancy": "Geo",
"administrators": {
"principalType": "User",
"login": "[email protected]",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"servicePrincipal": {
"type": "SystemAssigned"
}
}
}
Sample response
{
"sku": {
"name": "GP_Gen5",
"tier": "GeneralPurpose",
"capacity": 8,
"family": "Gen5"
},
"properties": {
"fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
"administratorLogin": "dummylogin",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"state": "Ready",
"provisioningState": "Creating",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"publicDataEndpointEnabled": false,
"proxyOverride": "Redirect",
"minimalTlsVersion": "1.2",
"dnsZone": "1b4e2caff2530",
"timezoneId": "UTC",
"instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1",
"maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"administrators": {
"principalType": "User",
"login": "[email protected]",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"servicePrincipal": {
"principalId": "00000011-1111-2222-2222-123456789111",
"clientId": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"type": "SystemAssigned"
}
},
"location": "japaneast",
"tags": {
"tagKey1": "TagValue1"
},
"id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
"name": "testinstance",
"type": "Microsoft.Sql/managedInstances"
}
{
"sku": {
"name": "GP_Gen5",
"tier": "GeneralPurpose",
"capacity": 8,
"family": "Gen5"
},
"properties": {
"fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
"administratorLogin": "dummylogin",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"state": "Ready",
"provisioningState": "Creating",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"publicDataEndpointEnabled": false,
"proxyOverride": "Redirect",
"minimalTlsVersion": "1.2",
"dnsZone": "1b4e2caff2530",
"timezoneId": "UTC",
"instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/pool1",
"maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo",
"administrators": {
"principalType": "User",
"login": "[email protected]",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"servicePrincipal": {
"principalId": "00000011-1111-2222-2222-123456789111",
"clientId": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"type": "SystemAssigned"
}
},
"location": "japaneast",
"tags": {
"tagKey1": "TagValue1"
},
"id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
"name": "testinstance",
"type": "Microsoft.Sql/managedInstances"
}
Create managed instance with minimal properties
Sample request
PUT https://management.azure.com/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance?api-version=2021-11-01
{
"sku": {
"name": "GP_Gen4",
"tier": "GeneralPurpose"
},
"properties": {
"administratorLogin": "dummylogin",
"administratorLoginPassword": "PLACEHOLDER",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded"
},
"location": "Japan East"
}
Sample response
{
"sku": {
"name": "GP_Gen4",
"tier": "GeneralPurpose",
"capacity": 8,
"family": "Gen4"
},
"properties": {
"fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
"administratorLogin": "dummylogin",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"state": "Ready",
"provisioningState": "Creating",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"publicDataEndpointEnabled": false,
"proxyOverride": "Redirect",
"dnsZone": "1b4e2caff2530",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo"
},
"location": "japaneast",
"tags": {},
"id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
"name": "testinstance",
"type": "Microsoft.Sql/managedInstances"
}
{
"sku": {
"name": "GP_Gen4",
"tier": "GeneralPurpose",
"capacity": 8,
"family": "Gen4"
},
"properties": {
"fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
"administratorLogin": "dummylogin",
"subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
"state": "Ready",
"provisioningState": "Creating",
"vCores": 8,
"storageSizeInGB": 1024,
"licenseType": "LicenseIncluded",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"publicDataEndpointEnabled": false,
"proxyOverride": "Redirect",
"dnsZone": "1b4e2caff2530",
"currentBackupStorageRedundancy": "Geo",
"requestedBackupStorageRedundancy": "Geo"
},
"location": "japaneast",
"tags": {},
"id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
"name": "testinstance",
"type": "Microsoft.Sql/managedInstances"
}
Definitions
Name | Description |
---|---|
Administrator |
Type of the sever administrator. |
Backup |
The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) |
Identity |
The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. |
Managed |
An Azure SQL managed instance. |
Managed |
Properties of a active directory administrator. |
Managed |
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). |
Managed |
A private endpoint connection under a managed instance |
Managed |
Properties of a private endpoint connection. |
Managed |
|
Managed |
|
Managed |
Connection type used for connecting to the instance. |
Managed |
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. |
Principal |
Principal Type of the sever administrator. |
Resource |
Azure Active Directory identity configuration for a resource. |
Service |
The managed instance's service principal configuration for a resource. |
Service |
Service principal type. |
Sku |
An ARM Resource SKU. |
User |
Azure Active Directory identity configuration for a resource. |
AdministratorType
Type of the sever administrator.
Name | Type | Description |
---|---|---|
ActiveDirectory |
string |
BackupStorageRedundancy
The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage)
Name | Type | Description |
---|---|---|
Geo |
string |
|
GeoZone |
string |
|
Local |
string |
|
Zone |
string |
IdentityType
The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.
Name | Type | Description |
---|---|---|
None |
string |
|
SystemAssigned |
string |
|
SystemAssigned,UserAssigned |
string |
|
UserAssigned |
string |
ManagedInstance
An Azure SQL managed instance.
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
identity |
The Azure Active Directory identity of the managed instance. |
|
location |
string |
Resource location. |
name |
string |
Resource name. |
properties.administratorLogin |
string |
Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). |
properties.administratorLoginPassword |
string |
The administrator login password (required for managed instance creation). |
properties.administrators |
The Azure Active Directory administrator of the server. |
|
properties.collation |
string |
Collation of the managed instance. |
properties.currentBackupStorageRedundancy |
The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) |
|
properties.dnsZone |
string |
The Dns Zone that the managed instance is in. |
properties.dnsZonePartner |
string |
The resource id of another managed instance whose DNS zone this managed instance will share after creation. |
properties.fullyQualifiedDomainName |
string |
The fully qualified domain name of the managed instance. |
properties.instancePoolId |
string |
The Id of the instance pool this managed server belongs to. |
properties.keyId |
string |
A CMK URI of the key to use for encryption. |
properties.licenseType |
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). |
|
properties.maintenanceConfigurationId |
string |
Specifies maintenance configuration id to apply to this managed instance. |
properties.managedInstanceCreateMode |
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. |
|
properties.minimalTlsVersion |
string |
Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' |
properties.primaryUserAssignedIdentityId |
string |
The resource id of a user assigned identity to be used by default. |
properties.privateEndpointConnections |
List of private endpoint connections on a managed instance. |
|
properties.provisioningState |
enum:
|
|
properties.proxyOverride |
Connection type used for connecting to the instance. |
|
properties.publicDataEndpointEnabled |
boolean |
Whether or not the public data endpoint is enabled. |
properties.requestedBackupStorageRedundancy |
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) |
|
properties.restorePointInTime |
string |
Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. |
properties.servicePrincipal |
The managed instance's service principal. |
|
properties.sourceManagedInstanceId |
string |
The resource identifier of the source managed instance associated with create operation of this instance. |
properties.state |
string |
The state of the managed instance. |
properties.storageSizeInGB |
integer |
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. |
properties.subnetId |
string |
Subnet resource ID for the managed instance. |
properties.timezoneId |
string |
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". |
properties.vCores |
integer |
The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. |
properties.zoneRedundant |
boolean |
Whether or not the multi-az is enabled. |
sku |
Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH |
|
tags |
object |
Resource tags. |
type |
string |
Resource type. |
ManagedInstanceExternalAdministrator
Properties of a active directory administrator.
Name | Type | Description |
---|---|---|
administratorType |
Type of the sever administrator. |
|
azureADOnlyAuthentication |
boolean |
Azure Active Directory only Authentication enabled. |
login |
string |
Login name of the server administrator. |
principalType |
Principal Type of the sever administrator. |
|
sid |
string |
SID (object ID) of the server administrator. |
tenantId |
string |
Tenant ID of the administrator. |
ManagedInstanceLicenseType
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).
Name | Type | Description |
---|---|---|
BasePrice |
string |
|
LicenseIncluded |
string |
ManagedInstancePecProperty
A private endpoint connection under a managed instance
Name | Type | Description |
---|---|---|
id |
string |
Resource ID. |
properties |
Private endpoint connection properties |
ManagedInstancePrivateEndpointConnectionProperties
Properties of a private endpoint connection.
Name | Type | Description |
---|---|---|
privateEndpoint |
Private endpoint which the connection belongs to. |
|
privateLinkServiceConnectionState |
Connection State of the Private Endpoint Connection. |
|
provisioningState |
string |
State of the Private Endpoint Connection. |
ManagedInstancePrivateEndpointProperty
Name | Type | Description |
---|---|---|
id |
string |
Resource id of the private endpoint. |
ManagedInstancePrivateLinkServiceConnectionStateProperty
Name | Type | Description |
---|---|---|
actionsRequired |
string |
The private link service connection description. |
description |
string |
The private link service connection description. |
status |
string |
The private link service connection status. |
ManagedInstanceProxyOverride
Connection type used for connecting to the instance.
Name | Type | Description |
---|---|---|
Default |
string |
|
Proxy |
string |
|
Redirect |
string |
ManagedServerCreateMode
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.
Name | Type | Description |
---|---|---|
Default |
string |
|
PointInTimeRestore |
string |
PrincipalType
Principal Type of the sever administrator.
Name | Type | Description |
---|---|---|
Application |
string |
|
Group |
string |
|
User |
string |
ResourceIdentity
Azure Active Directory identity configuration for a resource.
Name | Type | Description |
---|---|---|
principalId |
string |
The Azure Active Directory principal id. |
tenantId |
string |
The Azure Active Directory tenant id. |
type |
The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. |
|
userAssignedIdentities |
<string,
User |
The resource ids of the user assigned identities to use |
ServicePrincipal
The managed instance's service principal configuration for a resource.
Name | Type | Description |
---|---|---|
clientId |
string |
The Azure Active Directory application client id. |
principalId |
string |
The Azure Active Directory application object id. |
tenantId |
string |
The Azure Active Directory tenant id. |
type |
Service principal type. |
ServicePrincipalType
Service principal type.
Name | Type | Description |
---|---|---|
None |
string |
|
SystemAssigned |
string |
Sku
An ARM Resource SKU.
Name | Type | Description |
---|---|---|
capacity |
integer |
Capacity of the particular SKU. |
family |
string |
If the service has different generations of hardware, for the same SKU, then that can be captured here. |
name |
string |
The name of the SKU, typically, a letter + Number code, e.g. P3. |
size |
string |
Size of the particular SKU |
tier |
string |
The tier or edition of the particular SKU, e.g. Basic, Premium. |
UserIdentity
Azure Active Directory identity configuration for a resource.
Name | Type | Description |
---|---|---|
clientId |
string |
The Azure Active Directory client id. |
principalId |
string |
The Azure Active Directory principal id. |