Servers - Create Or Update
Creates or updates a server.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}?api-version=2025-01-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. |
| identity |
The Azure Active Directory identity of the server. |
||
| properties.administratorLogin |
string |
Administrator username for the server. Once created it cannot be changed. |
|
| properties.administratorLoginPassword |
string |
The administrator login password (required for server creation). |
|
| properties.administrators |
The Azure Active Directory administrator can be utilized during server creation and for server updates, except for the azureADOnlyAuthentication property. To update the azureADOnlyAuthentication property, individual API must be used. |
||
| properties.createMode |
Create mode for server, only valid values for this are Normal and Restore. |
||
| properties.federatedClientId |
string (uuid) |
The Client id used for cross tenant CMK scenario |
|
| properties.isIPv6Enabled |
Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' |
||
| properties.keyId |
string |
A CMK URI of the key to use for encryption. |
|
| properties.minimalTlsVersion |
Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3' |
||
| properties.primaryUserAssignedIdentityId |
string |
The resource id of a user assigned identity to be used by default. |
|
| properties.publicNetworkAccess |
Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter' |
||
| properties.restrictOutboundNetworkAccess |
Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' |
||
| properties.retentionDays |
integer (int32) |
Number of days this server will stay soft-deleted. |
|
| properties.version |
string |
The version of the server. |
|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully updated the server. |
|
| 201 Created |
Successfully created the server. |
|
| 202 Accepted |
Accepted Headers Location: string |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
Create server
Sample request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645?api-version=2025-01-01
{
"properties": {
"administratorLogin": "dummylogin",
"administratorLoginPassword": "PLACEHOLDER",
"administrators": {
"principalType": "User",
"login": "bob@contoso.com",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"createMode": "Normal",
"publicNetworkAccess": "Enabled",
"restrictOutboundNetworkAccess": "Enabled",
"isIPv6Enabled": "Enabled",
"retentionDays": 7
},
"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": "japaneast",
"kind": "v12.0",
"properties": {
"fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
"administratorLogin": "dummylogin",
"version": "12.0",
"state": "Ready",
"publicNetworkAccess": "Enabled",
"restrictOutboundNetworkAccess": "Enabled",
"isIPv6Enabled": "Enabled",
"retentionDays": 7,
"administrators": {
"principalType": "User",
"login": "bob@contoso.com",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"privateEndpointConnections": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
"properties": {
"provisioningState": "Ready",
"privateEndpoint": {
"id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
]
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645",
"name": "sqlcrudtest-4645",
"type": "Microsoft.Sql/servers",
"location": "japaneast",
"kind": "v12.0",
"properties": {
"fullyQualifiedDomainName": "sqlcrudtest-4645.database.windows.net",
"administratorLogin": "dummylogin",
"publicNetworkAccess": "Enabled",
"restrictOutboundNetworkAccess": "Enabled",
"isIPv6Enabled": "Enabled",
"retentionDays": 7,
"version": "12.0",
"state": "Ready",
"administrators": {
"principalType": "User",
"login": "bob@contoso.com",
"sid": "00000011-1111-2222-2222-123456789111",
"tenantId": "00000011-1111-2222-2222-123456789111",
"azureADOnlyAuthentication": true
},
"privateEndpointConnections": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-7398/providers/Microsoft.Sql/servers/sqlcrudtest-4645/privateEndpointConnections/private-endpoint-name-00000000-1111-2222-3333-444444444444",
"properties": {
"provisioningState": "Ready",
"privateEndpoint": {
"id": "/subscriptions/55555555-6666-7777-8888-999999999999/resourceGroups/Default-Network/providers/Microsoft.Network/privateEndpoints/private-endpoint-name"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
]
}
}
Definitions
| Name | Description |
|---|---|
|
Administrator |
Type of the sever administrator. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
External |
Status of external governance. |
|
Identity |
The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource. |
|
Minimal |
Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3' |
|
Principal |
Principal Type of the sever administrator. |
|
Private |
Properties of a private endpoint connection. |
|
Private |
|
|
Private |
State of the private endpoint connection. |
|
Private |
The actions required for private link service connection. |
|
Private |
|
|
Private |
The private link service connection status. |
|
Resource |
Azure Active Directory identity configuration for a resource. |
| Server |
An Azure SQL Database server. |
|
Server |
Create mode for server, only valid values for this are Normal and Restore. |
|
Server |
Properties of a active directory administrator. |
|
Server |
Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' |
|
Server |
A private endpoint connection under a server |
|
Server |
Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter' |
|
Server |
Whether or not existing server has a workspace created and if it allows connection from workspace |
|
User |
Azure Active Directory identity configuration for a resource. |
AdministratorType
Type of the sever administrator.
| Value | Description |
|---|---|
| ActiveDirectory |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ExternalGovernanceStatus
Status of external governance.
| Value | Description |
|---|---|
| Enabled | |
| Disabled |
IdentityType
The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an Azure Active Directory principal for the resource.
| Value | Description |
|---|---|
| None | |
| SystemAssigned | |
| UserAssigned | |
| SystemAssigned,UserAssigned |
MinimalTlsVersion
Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3'
| Value | Description |
|---|---|
| None | |
| 1.0 | |
| 1.1 | |
| 1.2 | |
| 1.3 |
PrincipalType
Principal Type of the sever administrator.
| Value | Description |
|---|---|
| User | |
| Group | |
| Application |
PrivateEndpointConnectionProperties
Properties of a private endpoint connection.
| Name | Type | Description |
|---|---|---|
| groupIds |
string[] |
Group IDs. |
| privateEndpoint |
Private endpoint which the connection belongs to. |
|
| privateLinkServiceConnectionState |
Connection state of the private endpoint connection. |
|
| provisioningState |
State of the private endpoint connection. |
PrivateEndpointProperty
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource id of the private endpoint. |
PrivateEndpointProvisioningState
State of the private endpoint connection.
| Value | Description |
|---|---|
| Approving | |
| Ready | |
| Dropping | |
| Failed | |
| Rejecting |
PrivateLinkServiceConnectionStateActionsRequire
The actions required for private link service connection.
| Value | Description |
|---|---|
| None |
PrivateLinkServiceConnectionStateProperty
| Name | Type | Description |
|---|---|---|
| actionsRequired |
The actions required for private link service connection. |
|
| description |
string |
The private link service connection description. |
| status |
The private link service connection status. |
PrivateLinkServiceConnectionStateStatus
The private link service connection status.
| Value | Description |
|---|---|
| Approved | |
| Pending | |
| Rejected | |
| Disconnected |
ResourceIdentity
Azure Active Directory identity configuration for a resource.
| Name | Type | Description |
|---|---|---|
| principalId |
string (uuid) |
The Azure Active Directory principal id. |
| tenantId |
string (uuid) |
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. |
|
| userAssignedIdentities |
<string,
User |
The resource ids of the user assigned identities to use |
Server
An Azure SQL Database server.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |
| identity |
The Azure Active Directory identity of the server. |
|
| 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. Once created it cannot be changed. |
| properties.administratorLoginPassword |
string |
The administrator login password (required for server creation). |
| properties.administrators |
The Azure Active Directory administrator can be utilized during server creation and for server updates, except for the azureADOnlyAuthentication property. To update the azureADOnlyAuthentication property, individual API must be used. |
|
| properties.createMode |
Create mode for server, only valid values for this are Normal and Restore. |
|
| properties.externalGovernanceStatus |
Status of external governance. |
|
| properties.federatedClientId |
string (uuid) |
The Client id used for cross tenant CMK scenario |
| properties.fullyQualifiedDomainName |
string |
The fully qualified domain name of the server. |
| properties.isIPv6Enabled |
Whether or not to enable IPv6 support for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' |
|
| properties.keyId |
string |
A CMK URI of the key to use for encryption. |
| properties.minimalTlsVersion |
Minimal TLS version. Allowed values: 'None', 1.0', '1.1', '1.2', '1.3' |
|
| properties.primaryUserAssignedIdentityId |
string |
The resource id of a user assigned identity to be used by default. |
| properties.privateEndpointConnections |
List of private endpoint connections on a server |
|
| properties.publicNetworkAccess |
Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter' |
|
| properties.restrictOutboundNetworkAccess |
Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' |
|
| properties.retentionDays |
integer (int32) |
Number of days this server will stay soft-deleted. |
| properties.state |
string |
The state of the server. |
| properties.version |
string |
The version of the server. |
| properties.workspaceFeature |
Whether or not existing server has a workspace created and if it allows connection from workspace |
|
| tags |
object |
Resource tags. |
| type |
string |
Resource type. |
ServerCreateMode
Create mode for server, only valid values for this are Normal and Restore.
| Value | Description |
|---|---|
| Normal | |
| Restore |
ServerExternalAdministrator
Properties of a active directory administrator.
| Name | Type | Description |
|---|---|---|
| administratorType |
Type of the sever administrator. |
|
| azureADOnlyAuthentication |
boolean |
Azure Active Directory only Authentication enabled. |
| login |
string |
Login name of the server administrator. |
| principalType |
Principal Type of the sever administrator. |
|
| sid |
string (uuid) |
SID (object ID) of the server administrator. |
| tenantId |
string (uuid) |
Tenant ID of the administrator. |
ServerNetworkAccessFlag
Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'
| Value | Description |
|---|---|
| Enabled | |
| Disabled |
ServerPrivateEndpointConnection
A private endpoint connection under a server
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |
| properties |
Private endpoint connection properties |
ServerPublicNetworkAccessFlag
Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter'
| Value | Description |
|---|---|
| Enabled | |
| Disabled | |
| SecuredByPerimeter |
ServerWorkspaceFeature
Whether or not existing server has a workspace created and if it allows connection from workspace
| Value | Description |
|---|---|
| Connected | |
| Disconnected |
UserIdentity
Azure Active Directory identity configuration for a resource.
| Name | Type | Description |
|---|---|---|
| clientId |
string (uuid) |
The Azure Active Directory client id. |
| principalId |
string (uuid) |
The Azure Active Directory principal id. |