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=2015-05-01-preview

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The subscription ID that identifies an Azure subscription.

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.

managedInstanceName
path True
  • string

The name of the managed instance.

api-version
query True
  • string

The API version to use for the request.

Request Body

Name Required Type Description
identity

The Azure Active Directory identity of the managed instance.

location True
  • string

Resource location.

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.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.licenseType
  • string

The license type. Possible values are 'LicenseIncluded' and 'BasePrice'.

properties.proxyOverride

Connection type used for connecting to the instance.

properties.publicDataEndpointEnabled
  • boolean

Whether or not the public data endpoint is enabled.

properties.storageSizeInGB
  • integer

The maximum storage size in GB.

properties.subnetId
  • string

Subnet resource ID for the managed instance.

properties.vCores
  • integer

The number of VCores.

sku

Managed instance sku

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: ***

  • 400 SubscriptionNotFound - The requested subscription was not found.

  • 400 VnetInWrongRegion - Virtual network is in wrong region.

  • 400 VnetAddressRangeError - Virtual network address range is invalid.

  • 400 VnetConfigIsNotAllowed - Virtual network configuration is not allowed.

  • 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 NameAlreadyExists - The provided name already exists.

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

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

  • 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 VnetResourceNotFound - Resource not found: '{0}'.

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

  • 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 RegionDoesNotSupportVersion - A user attempted to create a server of a specified version in a location where that server version isn't supported.

  • 400 PasswordTooLong - The provided password is too long.

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

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

  • 400 InvalidLocation - An invalid location was specified.

  • 400 InvalidServerName - Invalid server name specified.

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

  • 400 TokenTooLong - The provided token is too long.

  • 400 InvalidCollation - Collation is not recognized by the server.

  • 400 ServerNotFound - The requested server was not found.

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

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

  • 400 InvalidManagedServerDnsZonePartner - Invalid DNS zone partner resource id specified in properties.

  • 404 SubscriptionDoesNotHaveManagedInstance - The requested managed instance was not found

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

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

  • 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 ServerDisabled - Server is disabled.

  • 409 SubscriptionDisabled - Subscription is disabled.

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

  • 409 ServerAlreadyExists - Duplicate server name.

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

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=2015-05-01-preview
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "Japan East",
  "sku": {
    "name": "CLS3",
    "tier": "Standard",
    "capacity": 1
  },
  "properties": {
    "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "Un53cuRE!",
    "subnetId": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1",
    "vCores": 8,
    "storageSizeInGB": 1024,
    "licenseType": "Full",
    "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"
  }
}

Sample Response

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance1",
  "name": "testinstance1",
  "type": "Microsoft.Sql/managedInstances",
  "location": "japaneast",
  "sku": {
    "name": "CLS3",
    "tier": "Standard",
    "capacity": 1
  },
  "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",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "dnsZone": "1b4e2caff2530",
    "publicDataEndpointEnabled": false,
    "proxyOverride": "Redirect"
  }
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance2",
  "name": "testinstance2",
  "type": "Microsoft.Sql/managedInstances",
  "location": "japaneast",
  "sku": {
    "name": "CLS3",
    "tier": "Standard",
    "capacity": 1
  },
  "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",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "dnsZone": "1b4e2caff2530"
  }
}

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=2015-05-01-preview
{
  "properties": {
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "Un53cuRE!"
  },
  "location": "Japan East"
}

Sample Response

{
  "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
  "name": "testinstance",
  "type": "Microsoft.Sql/managedInstances",
  "location": "japaneast",
  "sku": {
    "name": "CLS3",
    "tier": "Standard",
    "capacity": 1
  },
  "properties": {
    "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
    "administratorLogin": "dummylogin",
    "state": "Ready",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "dnsZone": "1b4e2caff2530"
  }
}
{
  "id": "/subscriptions/20D7082A-0FC7-4468-82BD-542694D5042B/resourceGroups/testrg/providers/Microsoft.Sql/managedInstances/testinstance",
  "name": "testinstance",
  "type": "Microsoft.Sql/managedInstances",
  "location": "japaneast",
  "sku": {
    "name": "CLS3",
    "tier": "Standard",
    "capacity": 1
  },
  "properties": {
    "fullyQualifiedDomainName": "testinstance.1b4e2caff2530.database.windows.net",
    "administratorLogin": "dummylogin",
    "state": "Ready",
    "collation": "SQL_Latin1_General_CP1_CI_AS",
    "dnsZone": "1b4e2caff2530"
  }
}

Definitions

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.

ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

ResourceIdentity

Azure Active Directory identity configuration for a resource.

Sku

The resource model definition representing SKU

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
SystemAssigned
  • 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.collation
  • string

Collation of the managed instance.

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.licenseType
  • string

The license type. Possible values are 'LicenseIncluded' and 'BasePrice'.

properties.proxyOverride

Connection type used for connecting to the instance.

properties.publicDataEndpointEnabled
  • boolean

Whether or not the public data endpoint is enabled.

properties.state
  • string

The state of the managed instance.

properties.storageSizeInGB
  • integer

The maximum storage size in GB.

properties.subnetId
  • string

Subnet resource ID for the managed instance.

properties.vCores
  • integer

The number of VCores.

sku

Managed instance sku

tags
  • object

Resource tags.

type
  • string

Resource type.

ManagedInstanceProxyOverride

Connection type used for connecting to the instance.

Name Type Description
Default
  • string
Proxy
  • string
Redirect
  • 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.

Sku

The resource model definition representing SKU

Name Type Description
capacity
  • integer

If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.

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. Ex - P3. It is typically a letter+number code

size
  • string

The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.

tier
  • string

This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.