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 |
|---|---|---|---|---|
|
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. |
|
server
|
path | True |
string |
The name of the server. |
|
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. |
| 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 |
The version of the server. |
||
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| 201 Created |
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. |
|
Server |
The state of the server. |
|
Server |
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 (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. |
| properties.fullyQualifiedDomainName |
string |
The fully qualified domain name of the server. |
| properties.state |
The state of the server. |
|
| properties.version |
The version of the server. |
|
| tags |
object |
Resource tags. |
| type |
string |
Resource type. |
ServerState
The state of the server.
| Value | Description |
|---|---|
| Ready | |
| Disabled |
ServerVersion
The version of the server.
| Value | Description |
|---|---|
| 2.0 | |
| 12.0 |