Managed Instances - Update

Updates a managed instance.

PATCH 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
managedInstanceName
path True

string

The name of the managed instance.

resourceGroupName
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.

subscriptionId
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 Type Description
identity

ResourceIdentity

Managed instance identity

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

ManagedInstanceExternalAdministrator

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

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).

properties.maintenanceConfigurationId

string

Specifies maintenance configuration id to apply to this managed instance.

properties.managedInstanceCreateMode

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.

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

ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

properties.publicDataEndpointEnabled

boolean

Whether or not the public data endpoint is enabled.

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

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

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

Sku

Managed instance sku

tags

object

Resource tags.

Responses

Name Type Description
200 OK

ManagedInstance

Successfully updated the managed instance.

202 Accepted

Accepted

Other Status Codes

*** Error Responses: ***

  • 400 NameAlreadyExists - The provided name already exists.

  • 400 InvalidCollation - Invalid collation.

  • 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

  • 400 RegionDoesNotAllowProvisioning - The selected location is not accepting new Windows Azure SQL Database servers. This may change at a later time.

  • 400 UnableToResolveRemoteServer - The remote partner server name could not be resolved due to an invalid server name or DNS connectivity issues.

  • 400 HkCannotSwitchToInactive - The database cannot proceed with pricing-tier update as it has memory-optimized objects. Please drop such objects and try again.

  • 400 TokenTooLong - The provided token is too long.

  • 400 CloudLifterUnsupportedFeature - The functionality is not available on the Managed Instance at this time.

  • 400 ManagedInstanceSloUpdateFailed - SLO '{0}' operation cannot succeed as the memory usage of '{1}' exceeds the quota.

  • 400 OperationCanNotStartDueToMiLink - The '{0}' operation cannot be completed as there exists a database in a process of creation through Managed Instance link. Please wait for the link creation to complete, or delete the link, and retry the operation again.

  • 400 ManagedInstanceLocalStorageUpdateSloDisabled - Update SLO for managed instances with local storage is not supported yet.

  • 400 InvalidSubnetResourceId - The provided subnet resource ID for the managed instance create or update is invalid.

  • 400 VnetInWrongRegion - Virtual network is in wrong region.

  • 400 AlterDbDeactivatedNotSupported - Database Operation failed for Server '{0}', Database '{1}' due to unexpected delay. Please try again.

  • 400 VnetAddressRangeError - Virtual network address range is invalid.

  • 400 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

  • 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.

  • 400 InstanceFailoverGroupDoesNotExist - Failover group does not exist on a server.

  • 400 ManagedInstanceClassicVnetNotSupported - Managed Instance cannot be joined to a classic virtual network.

  • 400 VnetConfigHasNsg - User tried to inject Managed Server subnet with Network Security Groups.

  • 400 VnetConfigHasNoUdr - User tried to inject Managed Server subnet without default User Defined Route Table.

  • 400 VnetConfigHasInvalidUdr - User tried to inject Managed Server subnet with invalid User Defined Route Table.

  • 400 VnetConfigHasInvalidDns - User tried to inject Managed Server subnet with invalid custom DNS.

  • 400 VnetConfigHasServiceEndpoints - User tried to inject Managed Server subnet with service endpoints.

  • 400 VnetSubnetIsInUse - User tried to inject Managed Server subnet that is not empty.

  • 400 VnetSubnetIsLocked - User tried to inject Managed Server subnet that is in locked scope.

  • 400 VnetSubnetIsGateway - User tried to inject Managed Server subnet that is Gateway subnet.

  • 400 VnetSubnetIsUnknown - User tried to inject Managed Server subnet that does not exist.

  • 400 VnetSubnetConflictWithIntendedPolicy - User tried to inject Managed Server subnet that has a conflict with IntendedPolicy.

  • 400 ManagedInstanceInvalidEditionForSku - The specified edition {0} is not consistent with the specified SKU {1}.

  • 400 ManagedInstanceInvalidLicenseType - The specified license type {0} is not valid.

  • 400 ManagedInstanceUpdateSloInProgress - "The operation could not be completed because a service tier change is in progress for managed instance '{0}.' Please wait for the operation in progress to complete and try again."

  • 400 VnetResourceNotFound - Resource not found: '{0}'.

  • 400 InstanceCollationUpdateNotSupported - User cannot change instance collation on Managed Instance.

  • 400 CreateManagedInstanceWithNonDefaultCollationNotSupported - User can create a Managed Instance only with collation 'SQL_Latin1_General_CP1_CI_AS'.

  • 400 ManagedInstanceOperationInProgress - The operation could not be completed because {0} operation is in progress. Please wait for the operation in progress to complete and try again.

  • 400 ManagedInstanceExceedMaxAzureStorage - The operation could not be completed because total allocated storage size for General Purpose instance would exceed {0}. Please reduce the number of database files and retry operation.

  • 400 ManagedInstanceHasGeoReplica - The operation could not be completed because instance has configured geo replicated secondary instance.

  • 400 InvalidDnsZone - The operation has failed because you are attempting to deploy managed instance as a geo-replication secondary to the subnet {0} in which there already exists a managed instance. Deploying managed instance as a geo-replication secondary is supported only in cases when managed instance is the first instance deployed in a subnet. Consider deploying managed instance as a geo-replication secondary to a different subnet in which there are no existing managed instances, or if deploying to a subnet with existing managed instance disable the geo-replication option.

  • 400 ManagedInstanceInvalidStorageSizeLessThenCurrentSizeUsed - Invalid storage size: Storage size limit ({0} GB) is less that current storage used ({1} GB). Please specify higher storage size limit.

  • 400 InvalidTimezone - Invalid timezone.

  • 400 InstanceTimezoneUpdateNotSupported - Instance timezone update not supported.

  • 400 CreateManagedInstanceWithNonDefaultTimezoneNotSupported - Create Managed Instance with non-default timezone not supported.

  • 400 ManagedInstanceIpAddressRangeLimit - Cannot perform creation/scaling of the managed instance as there are not enough available IP addresses in the subnet for performing the operation.

  • 400 VnetDelegationNotAllowed - User tried to inject Managed Server to subnet which is delegated.

  • 400 SubnetHasResourcesOfDifferentType - User tried to create MI in subnet that has resources of different type.

  • 400 UpdateManagedServerWithMaintenanceWindowNotAllowed - Update of Managed Instance with maintenance window settings is not allowed.

  • 400 VnetPrepareNIPFailed - User tried to prepare subnet that has a conflict with NetworkIntentPolicy.

  • 400 ManagedInstanceDeprecatedHardwareFamily - Changing the hardware generation to deprecated {0} generation is not possible.

  • 400 ManagedInstanceBackupStorageTypeNotSupported - Backup storage type parameter is not allowed in the instance update operation.

  • 400 EmptyPDCInvalidDnsZone - This managed instance cannot be deployed because its DNS-zone does not match the DNS-prefix of its intended virtual cluster for subnet {0}. Although this virtual cluster is empty, its DNS-prefix cannot be changed. Empty virtual clusters will be automatically removed after several hours. Consider waiting for this virtual cluster to expire or manually deleting this virtual cluster and then creating the managed instance.

  • 400 MissingIdentityId - No user assigned identity is provided when the identity type is set to UserAssigned

  • 400 InvalidPrimaryIdentityId - User provides a value for PrimaryUserIdentityId but the same is not listed in the IdentityId parameter

  • 400 ManagedInstanceZoneRedudantFeatureNotSupported - ZoneRedundant feature is not supported for the selected service tier. For more details visit aka.ms/sqlmi-service-tier-characteristics.

  • 400 ManagedInstanceZoneRedudantFeatureCantBeEnabled - Enabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.

  • 400 ManagedInstanceZoneRedudantFeatureCantBeDisabled - Disabling zoneRedundant feature is not possible once managed instance is created. For more details visit aka.ms/sqlmi-high-availability.

  • 400 UmiMissingAkvPermissions - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided

  • 400 MissingPrimaryIdentity - PrimaryUserAssignedIdentityId provided by user does not have access to KeyId provided

  • 400 SubnetIdCantBeUpdated - Changing managed instance subnet is not supported operation. Please remove this parameter from the request.

  • 400 MigrationToAnotherVNetNotSupported - Selected subnet is in another Virtual Network. Moving managed instance to another Virtual Network is not possible. Please provide subnet from Virtual Network {0}.

  • 400 MigrationToSubnetWithDifferentDnsZoneNotSupported - Provided subnet is having different DNS zone from the current. Changing instance DNS zone is not supported. Please provide subnet with same DNS zone, create a new subnet or provide empty one.

  • 400 MigrationToGen4SubnetNotSupported - It is not possible to update subnet while running on Gen4 hardware as it is being deprecated. Please upgrade your hardware from Gen4 to Gen5 as part of the changing managed instance subnet operation by specifying both parameters at the same time: destination subnet and hardware generation.

  • 400 PrimaryIdentityMissingPermissionForKeyId - KeyId is provided by user during create but PrimaryUserAssignedIdentityId is not provided in the API call

  • 400 InvalidIdentityTypeForKeyId - KeyId is provided by user during create but identity type is not set to 'UserAssigned'

  • 400 ServerNotFound - The requested server was not found.

  • 400 ManagedInstanceFileExceededMaxAzureStorageFileSizeLimit - The operation could not be completed because some of the database files are exceeding maximum General Purpose file size limit of {0} GB.

  • 400 ManagedInstanceStoppingOrStopped - Conflicting operation submitted while instance is in stopping/stopped state

  • 400 ManagedInstanceStarting - Conflicting operation submitted while instance is in starting state

  • 400 InstancePoolNotEnoughCapacity - An instance pool does not have enough capacity

  • 400 SourceAndTargetSubnetsMustBeVnetPeered - Subnet currently used by managed instance and provided destination subnet are part of the virtual networks that are not connected with virtual network peering, or have peering established but don't have allowed traffic. In order to move managed instance from one subnet to another, virtual network peering needs to be established from both source and target virtual network. Please configure virtual network requirements and then try the operation again. Learn more https://docs.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal#peer-virtual-networks.

  • 400 ManagedInstanceAndSubnetAreNotOnTheSameSubscription - Subnet provided for managed instance deployment is located on subscription different than the one submitted for managed instance. Managed instance and subnet used for deploying the instance must be on the same subscription. Please provide another subnet or switch to the subnet subscription and then try the operation again.

  • 400 CreateManagedInstanceInvalidSubnetSize - User attempted to create managed instance in a subnet that is smaller than the allowed minimal subnet size.

  • 400 AddressRangeOfTargetSubnetAndSubnetOfGeoDRReplicaCantOverlap - Subnet selected for managed instance migration has address range that overlaps with address range of subnet that holds geo replicated secondary instance. Please verify that your subnet is configured according to guidelines in https://aka.ms/move-managed-instance.

  • 400 TargetSubnetMustBeConfiguredToAllowGeoDRReplication - Subnet selected for managed instance migration is not configured to enable communication with a geo replicated secondary instance. Please check if all of the required ports are open. To properly configure your subnet read the guidelines in https://aka.ms/move-managed-instance.

  • 400 InvalidIdentifier - The identifier contains NULL or an invalid unicode character.

  • 400 InvalidLoginName - The provided login name is invalid.

  • 400 InvalidUsername - Supplied user name contains invalid characters.

  • 400 PasswordTooShort - The provided password is too short

  • 400 PasswordTooLong - The provided password is too long.

  • 400 PasswordNotComplex - The provided password is not complex enough.

  • 400 GatewayInvalidEdition - '{0}' is not a valid database edition in this version of SQL Server.

  • 400 InvalidLocation - An invalid location was specified.

  • 400 InvalidParameterValue - An invalid value was given to a parameter.

  • 400 InvalidServerName - Invalid server name specified.

  • 400 MiGeoRestoreWithWrongBackupStorageRedundancy - Geo-Restore is not allowed for managed instances with LRS/ZRS backup storage redundancy.

  • 400 UpdatingInstanceAndBackupRedundancy - Instance zone redundancy and backup storage redundancy cannot be updated in the same request.

  • 400 ProvisioningDisabled - Displays error message from resources operation authorizer as is, without changes

  • 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.

  • 400 ManagementServiceFeatureDisabled - User attempted to use a feature which is disabled.

  • 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

  • 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

  • 400 InvalidMinimalTlsVersion - Invalid minimal TLS version.

  • 400 InvalidResourceId - Invalid resource identifier.

  • 400 InvalidParameterValue - An invalid value was given to a parameter.

  • 400 AadOnlyAuthenticationIsEnabled - Azure Active Directory Only Authentication is enabled. Please contact your system administrator.

  • 400 InvalidExternalAdministratorLogin - Invalid or missing external administrator login name.

  • 400 InvalidExternalAdministratorSid - Invalid or missing external administrator object id.

  • 400 InvalidExternalAdministratorTenantId - Invalid or missing external administrator tenant id.

  • 400 ExternalAdministratorPrincipalType - Invalid or missing external administrator principal type. Please select from User, Application or Group.

  • 400 MissingExternalAdministratorWithAadOnlyAuth - In order to use Azure AD Only Authentication, please provide details of an external administrator.

  • 400 ExternalAdministratorLoginSameAsSqlAdmin - The names of the Azure Active Directory administrator and of the server admin account must be different. Please provide different values.

  • 400 InvalidMaintenanceWindowSettings - Invalid maintenance window settings.

  • 400 InvalidMaintenanceWindowProperty - Invalid maintenance window property was specified.

  • 400 InvalidMaintenanceWindowPropertyNull - Invalid maintenance window with required properties null.

  • 400 InvalidMaintenanceWindowTypeWithPropertySpecified - Maintenance window type must not have certain properties specified.

  • 400 UpdateOfParameterNotSupported - Update of '{0}' is not supported.

  • 404 ServerNotInSubscription - Specified server does not exist on the specified subscription.

  • 404 ManagedInstanceNotInSubscriptionResourceGroup - Specified managed instance does not exist in the specified resource group and subscription.

  • 404 SubscriptionNotFound - The requested subscription was not found.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 404 ResourceDoesNotExist - Resource with the name '{0}' does not exist. To continue, specify a valid resource name.

  • 404 InstancePoolNotFound - An instance pool cannot be found

  • 404 SubscriptionNotFound - The requested subscription was not found.

  • 404 ResourceNotFound - The requested resource was not found.

  • 405 InvalidVcoreValue - vCore value {0} is not valid. Please specify a valid vCore value.

  • 405 InvalidHardwareGenerationValue - HardwareGeneration {0} is not valid. Please specify a valid HardwareGeneration value.

  • 405 InvalidStorageSizeValue - "Invalid storage size: {0} GB. Storage size must be specified between {1} and {2} gigabytes, in increments of {3} GB.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 409 ConflictingServerOperation - An operation is currently in progress for the server.

  • 409 SubscriptionDisabled - Subscription is disabled.

  • 409 ServerOverridePreconditionFailed - Failed to apply server override on category '{0}', because physical db or instance '{1}' in server '{2}' is currently not in 'Ready' or 'Deactivated' state.

  • 409 ManagedInstanceIsBusy - The server '{0}' is currently busy. Please wait a few minutes before trying again.

  • 409 ServerAlreadyExists - Duplicate server name.

  • 409 ServerDisabled - Server is disabled.

  • 409 ServerQuotaExceeded - Server cannot be added to a subscription because it will exceed quota.

  • 409 ConflictingManagedInstanceOperation - An operation is currently in progress for the managed instance.

  • 409 BackupRedundancyUpdateAndInstanceRedundancyConflict - The instance is multi-az but backup storage is being updated from zone redundant to non-zone redundant.

  • 409 InstanceRedundancyUpdateWhileBackupRedundancyUpdateInProgress - Cannot update instance redundancy because backup storage redundancy update is in progress.

  • 409 InstanceRedundancyUpdateAndBackupRedundancyConflict - The backup storage is non-zone redundant but instance redundancy is being updated to zone redundant.

  • 409 BackupRedundancyUpdateConflict - Cannot update backup storage redundancy because a backup storage redundancy update is already in progress.

  • 409 MiDropFailedOnAuthLocks - User tried to drop last Managed Instance in subnet that has Lock applied on resource(s).

  • 409 MiCreateFailedNonDelegatedSubnet - User tried to deploy Managed Instance or Managed Instance pool in subnet that is not delegated to Microsoft.Sql/managedInstances.

  • 412 InstanceNotReadyForBackupRedundancyUpdate - Cannot update backup storage redundancy because the instance is not ready.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 429 ConflictingSubscriptionOperation - An operation is currently in progress for the subscription.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 500 GatewayInternalServerError - The server encountered an unexpected exception.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

  • 504 RequestTimeout - Service request exceeded the allowed timeout.

Examples

Remove maintenance policy from managed instance (select default maintenance policy)
Update managed instance with all properties
Update managed instance with minimal properties

Remove maintenance policy from managed instance (select default maintenance policy)

Sample request

PATCH https://management.azure.com/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance?api-version=2021-11-01

{
  "properties": {
    "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
  }
}

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",
    "vCores": 8,
    "storageSizeInGB": 1024,
    "licenseType": "LicenseIncluded",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "publicDataEndpointEnabled": false,
    "proxyOverride": "Default",
    "dnsZone": "1b4e2caff2530",
    "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1",
    "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default"
  },
  "location": "japaneast",
  "id": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
  "name": "testinstance",
  "type": "Microsoft.Sql/managedInstances"
}

Update managed instance with all properties

Sample request

PATCH 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"
  },
  "sku": {
    "name": "GP_Gen4",
    "tier": "GeneralPurpose",
    "capacity": 8
  },
  "properties": {
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "PLACEHOLDER",
    "proxyOverride": "Redirect",
    "publicDataEndpointEnabled": false,
    "minimalTlsVersion": "1.2",
    "licenseType": "BasePrice",
    "vCores": 8,
    "storageSizeInGB": 448,
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "requestedBackupStorageRedundancy": "Geo",
    "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1"
  }
}

Sample response

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
  "name": "testinstance",
  "type": "Microsoft.Sql/managedInstances",
  "location": "japaneast",
  "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",
    "vCores": 8,
    "storageSizeInGB": 448,
    "licenseType": "BasePrice",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "publicDataEndpointEnabled": false,
    "proxyOverride": "Redirect",
    "minimalTlsVersion": "1.2",
    "dnsZone": "1b4e2caff2530",
    "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1",
    "maintenanceConfigurationId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_MI_1",
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo"
  }
}

Update managed instance with minimal properties

Sample request

PATCH 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"
  }
}

Sample response

{
  "sku": {
    "name": "GP_Gen4",
    "tier": "GeneralPurpose",
    "capacity": 8,
    "family": "Gen4"
  },
  "properties": {
    "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
    "administratorLogin": "PLACEHOLDER",
    "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
    "state": "Ready",
    "vCores": 8,
    "storageSizeInGB": 1024,
    "licenseType": "LicenseIncluded",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "publicDataEndpointEnabled": false,
    "proxyOverride": "Default",
    "dnsZone": "1b4e2caff2530",
    "instancePoolId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/resourceGroups/testrg/providers/Microsoft.Sql/instancePools/instancePool1",
    "maintenanceConfigurationId": "/subscriptions/20d7082a-0fc7-4468-82bd-542694d5042b/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
    "currentBackupStorageRedundancy": "Geo",
    "requestedBackupStorageRedundancy": "Geo"
  },
  "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"
}

Definitions

Name Description
AdministratorType

Type of the sever administrator.

BackupStorageRedundancy

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

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

ManagedInstance

An Azure SQL managed instance.

ManagedInstanceExternalAdministrator

Properties of a active directory 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).

ManagedInstancePecProperty

A private endpoint connection under a managed instance

ManagedInstancePrivateEndpointConnectionProperties

Properties of a private endpoint connection.

ManagedInstancePrivateEndpointProperty
ManagedInstancePrivateLinkServiceConnectionStateProperty
ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

ManagedInstanceUpdate

An update request for an Azure SQL Database managed instance.

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.

PrincipalType

Principal Type of the sever administrator.

ResourceIdentity

Azure Active Directory identity configuration for a resource.

ServicePrincipal

The managed instance's service principal configuration for a resource.

ServicePrincipalType

Service principal type.

Sku

An ARM Resource SKU.

UserIdentity

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

ResourceIdentity

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

ManagedInstanceExternalAdministrator

The Azure Active Directory administrator of the server.

properties.collation

string

Collation of the managed instance.

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

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

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).

properties.maintenanceConfigurationId

string

Specifies maintenance configuration id to apply to this managed instance.

properties.managedInstanceCreateMode

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.

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

ManagedInstancePecProperty[]

List of private endpoint connections on a managed instance.

properties.provisioningState enum:
  • Accepted
  • Canceled
  • Created
  • Creating
  • Deleted
  • Deleting
  • Failed
  • NotSpecified
  • Registering
  • Running
  • Succeeded
  • TimedOut
  • Unknown
  • Unrecognized
  • Updating
properties.proxyOverride

ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

properties.publicDataEndpointEnabled

boolean

Whether or not the public data endpoint is enabled.

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

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

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

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

AdministratorType

Type of the sever administrator.

azureADOnlyAuthentication

boolean

Azure Active Directory only Authentication enabled.

login

string

Login name of the server administrator.

principalType

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

ManagedInstancePrivateEndpointConnectionProperties

Private endpoint connection properties

ManagedInstancePrivateEndpointConnectionProperties

Properties of a private endpoint connection.

Name Type Description
privateEndpoint

ManagedInstancePrivateEndpointProperty

Private endpoint which the connection belongs to.

privateLinkServiceConnectionState

ManagedInstancePrivateLinkServiceConnectionStateProperty

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

ManagedInstanceUpdate

An update request for an Azure SQL Database managed instance.

Name Type Description
identity

ResourceIdentity

Managed instance identity

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

ManagedInstanceExternalAdministrator

The Azure Active Directory administrator of the server.

properties.collation

string

Collation of the managed instance.

properties.currentBackupStorageRedundancy

BackupStorageRedundancy

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

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).

properties.maintenanceConfigurationId

string

Specifies maintenance configuration id to apply to this managed instance.

properties.managedInstanceCreateMode

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.

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

ManagedInstancePecProperty[]

List of private endpoint connections on a managed instance.

properties.provisioningState enum:
  • Accepted
  • Canceled
  • Created
  • Creating
  • Deleted
  • Deleting
  • Failed
  • NotSpecified
  • Registering
  • Running
  • Succeeded
  • TimedOut
  • Unknown
  • Unrecognized
  • Updating
properties.proxyOverride

ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

properties.publicDataEndpointEnabled

boolean

Whether or not the public data endpoint is enabled.

properties.requestedBackupStorageRedundancy

BackupStorageRedundancy

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

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

Sku

Managed instance sku

tags

object

Resource tags.

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

IdentityType

The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.

userAssignedIdentities

<string,  UserIdentity>

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

ServicePrincipalType

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.