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

serverName
path True
  • string

The name of the server.

api-version
query True
  • string

The API version to use for the request.

Request Body

Name Required Type Description
administratorLogin
  • string

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

administratorLoginPassword
  • string

The administrator login password (required for server creation).

location True
  • string

Resource location.

tags
  • <string, string>

Resource tags.

version

The version of the server.

Responses

Name Type Description
200 OK

OK

201 Created

Created

Examples

Create server min
Create server max

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": "Un53cuRE!"
  },
  "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": "Un53cuRE!",
    "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": "Un53cuRE!",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}

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": "Un53cuRE!",
    "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": "Un53cuRE!",
    "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": "Un53cuRE!",
    "externalAdministratorLogin": null,
    "externalAdministratorSid": null,
    "version": "12.0",
    "state": "Ready"
  }
}

Definitions

Server
ServerState

The state of the server.

ServerVersion

The version of the server.

Name Type Description
administratorLogin
  • string

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

administratorLoginPassword
  • string

The administrator login password (required for server creation).

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

externalAdministratorSid
  • string
    uuid

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.

fullyQualifiedDomainName
  • string

The fully qualified domain name of the server.

kind
  • string

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

location
  • string

Resource location.

state

The state of the server.

tags
  • <string, string>

Resource tags.

version

The version of the server.

The state of the server.

Name Description
Disabled
Ready

The version of the server.

Name Description
12.0
2.0