Servers - Create Or Update

Creates or updates a new server.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}?api-version=2014-04-01

URI Parameters

Name In Required Type Description
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.

serverName
path True

string

The name of the server.

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 Required Type Description
location True

string

Resource location.

properties.administratorLogin

string

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

properties.administratorLoginPassword

string

The administrator login password (required for server creation).

properties.version

ServerVersion

The version of the server.

tags

object

Resource tags.

Responses

Name Type Description
200 OK

Server

OK

201 Created

Server

Created

Examples

Create server max
Create server min

Create server max

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645?api-version=2014-04-01

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "location": "Japan East",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "version": "12.0",
    "state": "Ready"
  }
}

Sample response

{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "Japan East",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}
{
  "tags": {
    "tagKey1": "TagValue1"
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "Japan East",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}

Create server min

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645?api-version=2014-04-01

{
  "properties": {
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>"
  },
  "location": "Japan East"
}

Sample response

{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "Japan East",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}
{
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
  "name": "sqlcrudtest-4645",
  "type": "Microsoft.Sql/servers",
  "location": "Japan East",
  "kind": "v12.0",
  "properties": {
    "fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
    "administratorLogin": "dummylogin",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}

Definitions

Name Description
Server

Represents a server.

ServerState

The state of the server.

ServerVersion

The version of the server.

Server

Represents a server.

Name Type Description
id

string

Resource ID.

kind

string

Kind of sql server. This is metadata used for the Azure portal experience.

location

string

Resource location.

name

string

Resource name.

properties.administratorLogin

string

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

properties.administratorLoginPassword

string

The administrator login password (required for server creation).

properties.externalAdministratorLogin

string

The display name of the Azure Active Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators

properties.externalAdministratorSid

string

The ID of the Active Azure Directory object with admin permissions on this server. Legacy parameter, always null. To check for Active Directory admin, query .../servers/{serverName}/administrators.

properties.fullyQualifiedDomainName

string

The fully qualified domain name of the server.

properties.state

ServerState

The state of the server.

properties.version

ServerVersion

The version of the server.

tags

object

Resource tags.

type

string

Resource type.

ServerState

The state of the server.

Name Type Description
Disabled

string

Ready

string

ServerVersion

The version of the server.

Name Type Description
12.0

string

2.0

string