Servers - Create

Creates a new server or updates an existing server. The update action will overwrite the existing server.

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

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
parameters

ServerForCreate

The required parameters for creating or updating a server.

Responses

Name Type Description
200 OK

Server

OK

201 Created

Server

Created

202 Accepted

Accepted

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Create a database as a point in time restore
Create a new server
Create a replica server
Create a server as a geo restore

Create a database as a point in time restore

Sample Request

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver?api-version=2018-06-01

{
  "location": "brazilsouth",
  "properties": {
    "restorePointInTime": "2017-12-14T00:00:37.467Z",
    "createMode": "PointInTimeRestore",
    "sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"
  },
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "tags": {
    "ElasticServer": "1"
  }
}

Sample Response

{
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  },
  "location": "brazilsouth",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers"
}
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers",
  "location": "brazilsouth",
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "tags": {
    "elasticServer": "1"
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  }
}

Create a new server

Sample Request

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/mariadbtestsvc4?api-version=2018-06-01

{
  "location": "westus",
  "properties": {
    "administratorLogin": "cloudsa",
    "administratorLoginPassword": "<administratorLoginPassword>",
    "sslEnforcement": "Enabled",
    "minimalTlsVersion": "TLS1_2",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "createMode": "Default"
  },
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "capacity": 2,
    "family": "Gen5"
  },
  "tags": {
    "ElasticServer": "1"
  }
}

Sample Response

{
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "minimalTlsVersion": "TLS1_2",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "mariadbtestsvc4.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  },
  "location": "westus",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/mariadbtestsvc4",
  "name": "mariadbtestsvc4",
  "type": "Microsoft.DBforMariaDB/servers"
}
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/mariadbtestsvc4",
  "name": "mariadbtestsvc4",
  "type": "Microsoft.DBforMariaDB/servers",
  "location": "westus",
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "tags": {
    "elasticServer": "1"
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 7,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "mariadbtestsvc4.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  }
}

Create a replica server

Sample Request

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver?api-version=2018-06-01

{
  "location": "westus",
  "properties": {
    "createMode": "Replica",
    "sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver"
  }
}

Sample Response

{
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 14,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00",
    "replicationRole": "Replica",
    "masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver",
    "replicaCapacity": 0
  },
  "location": "westus",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers"
}
{
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 14,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00",
    "replicationRole": "Replica",
    "masterServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver",
    "replicaCapacity": 0
  },
  "location": "westus",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers"
}

Create a server as a geo restore

Sample Request

PUT https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver?api-version=2018-06-01

{
  "location": "westus",
  "properties": {
    "createMode": "GeoRestore",
    "sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"
  },
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "tags": {
    "ElasticServer": "1"
  }
}

Sample Response

{
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 14,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  },
  "location": "westus",
  "tags": {
    "ElasticServer": "1"
  },
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers"
}
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver",
  "name": "targetserver",
  "type": "Microsoft.DBforMariaDB/servers",
  "location": "westus",
  "sku": {
    "name": "GP_Gen5_2",
    "tier": "GeneralPurpose",
    "family": "Gen5",
    "capacity": 2
  },
  "tags": {
    "elasticServer": "1"
  },
  "properties": {
    "administratorLogin": "cloudsa",
    "storageProfile": {
      "storageMB": 128000,
      "backupRetentionDays": 14,
      "geoRedundantBackup": "Enabled"
    },
    "version": "10.3",
    "sslEnforcement": "Enabled",
    "userVisibleState": "Ready",
    "fullyQualifiedDomainName": "targetserver.mariadb.database.azure.com",
    "earliestRestoreDate": "2018-03-14T18:02:41.577+00:00"
  }
}

Definitions

Name Description
CloudError

An error response from the Batch service.

ErrorAdditionalInfo

The resource management error additional info.

ErrorResponse

Error Response

GeoRedundantBackup

Enable Geo-redundant or not for server backup.

MinimalTlsVersionEnum

Enforce a minimal Tls version for the server.

PrivateEndpointProperty

Private endpoint which the connection belongs to.

PrivateEndpointProvisioningState

State of the private endpoint connection.

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

PrivateLinkServiceConnectionStateStatus

The private link service connection status.

PublicNetworkAccessEnum

Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

Server

Represents a server.

ServerForCreate

The required parameters for creating or updating a server.

ServerPrivateEndpointConnection

List of private endpoint connections on a server

ServerPrivateEndpointConnectionProperties

Private endpoint connection properties

ServerPrivateLinkServiceConnectionStateProperty

Connection state of the private endpoint connection.

ServerState

A state of a server that is visible to user.

ServerVersion

Server version.

Sku

The SKU (pricing tier) of the server.

SkuTier

The tier of the particular SKU, e.g. Basic.

SslEnforcementEnum

Enable ssl enforcement or not when connect to server.

StorageAutogrow

Enable Storage Auto Grow.

StorageProfile

Storage profile of a server.

CloudError

An error response from the Batch service.

Name Type Description
error

ErrorResponse

Error Response
Error message

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorResponse

Error Response

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorResponse[]

The error details.

message

string

The error message.

target

string

The error target.

GeoRedundantBackup

Enable Geo-redundant or not for server backup.

Name Type Description
Disabled

string

Enabled

string

MinimalTlsVersionEnum

Enforce a minimal Tls version for the server.

Name Type Description
TLS1_0

string

TLS1_1

string

TLS1_2

string

TLSEnforcementDisabled

string

PrivateEndpointProperty

Private endpoint which the connection belongs to.

Name Type Description
id

string

Resource id of the private endpoint.

PrivateEndpointProvisioningState

State of the private endpoint connection.

Name Type Description
Approving

string

Dropping

string

Failed

string

Ready

string

Rejecting

string

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

Name Type Description
None

string

PrivateLinkServiceConnectionStateStatus

The private link service connection status.

Name Type Description
Approved

string

Disconnected

string

Pending

string

Rejected

string

PublicNetworkAccessEnum

Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

Name Type Description
Disabled

string

Enabled

string

Server

Represents a server.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.administratorLogin

string

The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).

properties.earliestRestoreDate

string

Earliest restore point creation time (ISO8601 format)

properties.fullyQualifiedDomainName

string

The fully qualified domain name of a server.

properties.masterServerId

string

The master server id of a replica server.

properties.minimalTlsVersion

MinimalTlsVersionEnum

Enforce a minimal Tls version for the server.

properties.privateEndpointConnections

ServerPrivateEndpointConnection[]

List of private endpoint connections on a server

properties.publicNetworkAccess

PublicNetworkAccessEnum

Whether or not public network access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled'

properties.replicaCapacity

integer

The maximum number of replicas that a master server can have.

properties.replicationRole

string

The replication role of the server.

properties.sslEnforcement

SslEnforcementEnum

Enable ssl enforcement or not when connect to server.

properties.storageProfile

StorageProfile

Storage profile of a server.

properties.userVisibleState

ServerState

A state of a server that is visible to user.

properties.version

ServerVersion

Server version.

sku

Sku

The SKU (pricing tier) of the server.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ServerForCreate

The required parameters for creating or updating a server.

Name Type Description
location

string

The location the resource resides in.

properties

ServerPropertiesForCreate

Properties of the server.

sku

Sku

The SKU (pricing tier) of the server.

tags

object

Application-specific metadata in the form of key-value pairs.

ServerPrivateEndpointConnection

List of private endpoint connections on a server

Name Type Description
id

string

Resource Id of the private endpoint connection.

properties

ServerPrivateEndpointConnectionProperties

Private endpoint connection properties

ServerPrivateEndpointConnectionProperties

Private endpoint connection properties

Name Type Description
privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

privateLinkServiceConnectionState

ServerPrivateLinkServiceConnectionStateProperty

Connection state of the private endpoint connection.

provisioningState

PrivateEndpointProvisioningState

State of the private endpoint connection.

ServerPrivateLinkServiceConnectionStateProperty

Connection state of the private endpoint connection.

Name Type Description
actionsRequired

PrivateLinkServiceConnectionStateActionsRequire

The actions required for private link service connection.

description

string

The private link service connection description.

status

PrivateLinkServiceConnectionStateStatus

The private link service connection status.

ServerState

A state of a server that is visible to user.

Name Type Description
Disabled

string

Dropping

string

Ready

string

ServerVersion

Server version.

Name Type Description
10.2

string

10.3

string

Sku

The SKU (pricing tier) of the server.

Name Type Description
capacity

integer

The scale up/out capacity, representing server's compute units.

family

string

The family of hardware.

name

string

The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.

size

string

The size code, to be interpreted by resource as appropriate.

tier

SkuTier

The tier of the particular SKU, e.g. Basic.

SkuTier

The tier of the particular SKU, e.g. Basic.

Name Type Description
Basic

string

GeneralPurpose

string

MemoryOptimized

string

SslEnforcementEnum

Enable ssl enforcement or not when connect to server.

Name Type Description
Disabled

string

Enabled

string

StorageAutogrow

Enable Storage Auto Grow.

Name Type Description
Disabled

string

Enabled

string

StorageProfile

Storage profile of a server.

Name Type Description
backupRetentionDays

integer

Backup retention days for the server.

geoRedundantBackup

GeoRedundantBackup

Enable Geo-redundant or not for server backup.

storageAutogrow

StorageAutogrow

Enable Storage Auto Grow.

storageMB

integer

Max storage allowed for a server.