Crea un nuevo servidor o actualiza un servidor existente. La acción de actualización sobrescribirá el servidor existente.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}?api-version=2018-06-01
Parámetros de identificador URI
Nombre |
En |
Requerido |
Tipo |
Description |
resourceGroupName
|
path |
True
|
string
|
Nombre del grupo de recursos. El nombre distingue mayúsculas de minúsculas.
|
serverName
|
path |
True
|
string
|
El nombre del servidor.
|
subscriptionId
|
path |
True
|
string
|
Identificador de la suscripción de destino.
|
api-version
|
query |
True
|
string
|
Versión de API que se usará para la operación.
|
Cuerpo de la solicitud
Nombre |
Tipo |
Description |
parameters
|
ServerForCreate
|
Los parámetros necesarios para crear o actualizar un servidor.
|
Respuestas
Nombre |
Tipo |
Description |
200 OK
|
Server
|
Aceptar
|
201 Created
|
Server
|
Creado
|
202 Accepted
|
|
Aceptado
|
Other Status Codes
|
CloudError
|
Respuesta de error que describe el motivo del error de la operación.
|
Seguridad
azure_auth
Flujo OAuth2 de Azure Active Directory
Tipo:
oauth2
Flujo:
implicit
Dirección URL de autorización:
https://login.microsoftonline.com/common/oauth2/authorize
Ámbitos
Nombre |
Description |
user_impersonation
|
suplantación de su cuenta de usuario
|
Ejemplos
Create a database as a point in time restore
Solicitud de ejemplo
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"
}
}
import com.azure.resourcemanager.mariadb.models.ServerPropertiesForRestore;
import com.azure.resourcemanager.mariadb.models.Sku;
import com.azure.resourcemanager.mariadb.models.SkuTier;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Servers Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/
* ServerCreatePointInTimeRestore.json
*/
/**
* Sample code: Create a database as a point in time restore.
*
* @param manager Entry point to MariaDBManager.
*/
public static void createADatabaseAsAPointInTimeRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) {
manager.servers().define("targetserver").withRegion("brazilsouth")
.withExistingResourceGroup("TargetResourceGroup")
.withProperties(new ServerPropertiesForRestore().withSourceServerId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver")
.withRestorePointInTime(OffsetDateTime.parse("2017-12-14T00:00:37.467Z")))
.withTags(mapOf("ElasticServer", "1"))
.withSku(
new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python server_create_point_in_time_restore.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MariaDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.servers.begin_create(
resource_group_name="TargetResourceGroup",
server_name="targetserver",
parameters={
"location": "brazilsouth",
"properties": {
"createMode": "PointInTimeRestore",
"restorePointInTime": "2017-12-14T00:00:37.467Z",
"sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver",
},
"sku": {"capacity": 2, "family": "Gen5", "name": "GP_Gen5_2", "tier": "GeneralPurpose"},
"tags": {"ElasticServer": "1"},
},
).result()
print(response)
# x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreatePointInTimeRestore.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmariadb_test
import (
"context"
"log"
"time"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreatePointInTimeRestore.json
func ExampleServersClient_BeginCreate_createADatabaseAsAPointInTimeRestore() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmariadb.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armmariadb.ServerForCreate{
Location: to.Ptr("brazilsouth"),
Properties: &armmariadb.ServerPropertiesForRestore{
CreateMode: to.Ptr(armmariadb.CreateModePointInTimeRestore),
RestorePointInTime: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2017-12-14T00:00:37.467Z"); return t }()),
SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"),
},
SKU: &armmariadb.SKU{
Name: to.Ptr("GP_Gen5_2"),
Capacity: to.Ptr[int32](2),
Family: to.Ptr("Gen5"),
Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
},
Tags: map[string]*string{
"ElasticServer": to.Ptr("1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Server = armmariadb.Server{
// Name: to.Ptr("targetserver"),
// Type: to.Ptr("Microsoft.DBforMariaDB/servers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver"),
// Location: to.Ptr("brazilsouth"),
// Tags: map[string]*string{
// "elasticServer": to.Ptr("1"),
// },
// Properties: &armmariadb.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T18:02:41.577Z"); return t}()),
// FullyQualifiedDomainName: to.Ptr("targetserver.mariadb.database.azure.com"),
// SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumEnabled),
// StorageProfile: &armmariadb.StorageProfile{
// BackupRetentionDays: to.Ptr[int32](7),
// GeoRedundantBackup: to.Ptr(armmariadb.GeoRedundantBackupEnabled),
// StorageMB: to.Ptr[int32](128000),
// },
// UserVisibleState: to.Ptr(armmariadb.ServerStateReady),
// Version: to.Ptr(armmariadb.ServerVersionTen3),
// },
// SKU: &armmariadb.SKU{
// Name: to.Ptr("GP_Gen5_2"),
// Capacity: to.Ptr[int32](2),
// Family: to.Ptr("Gen5"),
// Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MariaDBManagementClient } = require("@azure/arm-mariadb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
*
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreatePointInTimeRestore.json
*/
async function createADatabaseAsAPointInTimeRestore() {
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = "TargetResourceGroup";
const serverName = "targetserver";
const parameters = {
location: "brazilsouth",
properties: {
createMode: "PointInTimeRestore",
restorePointInTime: new Date("2017-12-14T00:00:37.467Z"),
sourceServerId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver",
},
sku: {
name: "GP_Gen5_2",
capacity: 2,
family: "Gen5",
tier: "GeneralPurpose",
},
tags: { elasticServer: "1" },
};
const credential = new DefaultAzureCredential();
const client = new MariaDBManagementClient(credential, subscriptionId);
const result = await client.servers.beginCreateAndWait(resourceGroupName, serverName, parameters);
console.log(result);
}
createADatabaseAsAPointInTimeRestore().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"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
Solicitud de ejemplo
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"
}
}
import com.azure.resourcemanager.mariadb.models.GeoRedundantBackup;
import com.azure.resourcemanager.mariadb.models.MinimalTlsVersionEnum;
import com.azure.resourcemanager.mariadb.models.ServerPropertiesForDefaultCreate;
import com.azure.resourcemanager.mariadb.models.Sku;
import com.azure.resourcemanager.mariadb.models.SkuTier;
import com.azure.resourcemanager.mariadb.models.SslEnforcementEnum;
import com.azure.resourcemanager.mariadb.models.StorageProfile;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Servers Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json
*/
/**
* Sample code: Create a new server.
*
* @param manager Entry point to MariaDBManager.
*/
public static void createANewServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) {
manager.servers().define("mariadbtestsvc4").withRegion("westus").withExistingResourceGroup("testrg")
.withProperties(new ServerPropertiesForDefaultCreate().withSslEnforcement(SslEnforcementEnum.ENABLED)
.withMinimalTlsVersion(MinimalTlsVersionEnum.TLS1_2)
.withStorageProfile(new StorageProfile().withBackupRetentionDays(7)
.withGeoRedundantBackup(GeoRedundantBackup.ENABLED).withStorageMB(128000))
.withAdministratorLogin("cloudsa").withAdministratorLoginPassword("fakeTokenPlaceholder"))
.withTags(mapOf("ElasticServer", "1"))
.withSku(
new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python server_create.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MariaDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.servers.begin_create(
resource_group_name="testrg",
server_name="mariadbtestsvc4",
parameters={
"location": "westus",
"properties": {
"administratorLogin": "cloudsa",
"administratorLoginPassword": "<administratorLoginPassword>",
"createMode": "Default",
"minimalTlsVersion": "TLS1_2",
"sslEnforcement": "Enabled",
"storageProfile": {"backupRetentionDays": 7, "geoRedundantBackup": "Enabled", "storageMB": 128000},
},
"sku": {"capacity": 2, "family": "Gen5", "name": "GP_Gen5_2", "tier": "GeneralPurpose"},
"tags": {"ElasticServer": "1"},
},
).result()
print(response)
# x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmariadb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json
func ExampleServersClient_BeginCreate_createANewServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmariadb.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "testrg", "mariadbtestsvc4", armmariadb.ServerForCreate{
Location: to.Ptr("westus"),
Properties: &armmariadb.ServerPropertiesForDefaultCreate{
CreateMode: to.Ptr(armmariadb.CreateModeDefault),
MinimalTLSVersion: to.Ptr(armmariadb.MinimalTLSVersionEnumTLS12),
SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumEnabled),
StorageProfile: &armmariadb.StorageProfile{
BackupRetentionDays: to.Ptr[int32](7),
GeoRedundantBackup: to.Ptr(armmariadb.GeoRedundantBackupEnabled),
StorageMB: to.Ptr[int32](128000),
},
AdministratorLogin: to.Ptr("cloudsa"),
AdministratorLoginPassword: to.Ptr("<administratorLoginPassword>"),
},
SKU: &armmariadb.SKU{
Name: to.Ptr("GP_Gen5_2"),
Capacity: to.Ptr[int32](2),
Family: to.Ptr("Gen5"),
Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
},
Tags: map[string]*string{
"ElasticServer": to.Ptr("1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Server = armmariadb.Server{
// Name: to.Ptr("mariadbtestsvc4"),
// Type: to.Ptr("Microsoft.DBforMariaDB/servers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/mariadbtestsvc4"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "elasticServer": to.Ptr("1"),
// },
// Properties: &armmariadb.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T18:02:41.577Z"); return t}()),
// FullyQualifiedDomainName: to.Ptr("mariadbtestsvc4.mariadb.database.azure.com"),
// SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumEnabled),
// StorageProfile: &armmariadb.StorageProfile{
// BackupRetentionDays: to.Ptr[int32](7),
// GeoRedundantBackup: to.Ptr(armmariadb.GeoRedundantBackupEnabled),
// StorageMB: to.Ptr[int32](128000),
// },
// UserVisibleState: to.Ptr(armmariadb.ServerStateReady),
// Version: to.Ptr(armmariadb.ServerVersionTen3),
// },
// SKU: &armmariadb.SKU{
// Name: to.Ptr("GP_Gen5_2"),
// Capacity: to.Ptr[int32](2),
// Family: to.Ptr("Gen5"),
// Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MariaDBManagementClient } = require("@azure/arm-mariadb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
*
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreate.json
*/
async function createANewServer() {
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = "testrg";
const serverName = "mariadbtestsvc4";
const parameters = {
location: "westus",
properties: {
administratorLogin: "cloudsa",
administratorLoginPassword: "<administratorLoginPassword>",
createMode: "Default",
minimalTlsVersion: "TLS1_2",
sslEnforcement: "Enabled",
storageProfile: {
backupRetentionDays: 7,
geoRedundantBackup: "Enabled",
storageMB: 128000,
},
},
sku: {
name: "GP_Gen5_2",
capacity: 2,
family: "Gen5",
tier: "GeneralPurpose",
},
tags: { elasticServer: "1" },
};
const credential = new DefaultAzureCredential();
const client = new MariaDBManagementClient(credential, subscriptionId);
const result = await client.servers.beginCreateAndWait(resourceGroupName, serverName, parameters);
console.log(result);
}
createANewServer().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"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
Solicitud de ejemplo
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"
}
}
import com.azure.resourcemanager.mariadb.models.ServerPropertiesForReplica;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Servers Create.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.
* json
*/
/**
* Sample code: Create a replica server.
*
* @param manager Entry point to MariaDBManager.
*/
public static void createAReplicaServer(com.azure.resourcemanager.mariadb.MariaDBManager manager) {
manager.servers().define("targetserver").withRegion("westus").withExistingResourceGroup("TargetResourceGroup")
.withProperties(new ServerPropertiesForReplica().withSourceServerId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python server_create_replica_mode.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MariaDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.servers.begin_create(
resource_group_name="TargetResourceGroup",
server_name="targetserver",
parameters={
"location": "westus",
"properties": {
"createMode": "Replica",
"sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver",
},
},
).result()
print(response)
# x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmariadb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.json
func ExampleServersClient_BeginCreate_createAReplicaServer() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmariadb.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armmariadb.ServerForCreate{
Location: to.Ptr("westus"),
Properties: &armmariadb.ServerPropertiesForReplica{
CreateMode: to.Ptr(armmariadb.CreateModeReplica),
SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Server = armmariadb.Server{
// Name: to.Ptr("targetserver"),
// Type: to.Ptr("Microsoft.DBforMariaDB/servers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TargetResourceGroup/providers/Microsoft.DBforMariaDB/servers/targetserver"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "ElasticServer": to.Ptr("1"),
// },
// Properties: &armmariadb.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T18:02:41.577Z"); return t}()),
// FullyQualifiedDomainName: to.Ptr("targetserver.mariadb.database.azure.com"),
// MasterServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver"),
// ReplicaCapacity: to.Ptr[int32](0),
// ReplicationRole: to.Ptr("Replica"),
// SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumEnabled),
// StorageProfile: &armmariadb.StorageProfile{
// BackupRetentionDays: to.Ptr[int32](14),
// GeoRedundantBackup: to.Ptr(armmariadb.GeoRedundantBackupEnabled),
// StorageMB: to.Ptr[int32](128000),
// },
// UserVisibleState: to.Ptr(armmariadb.ServerStateReady),
// Version: to.Ptr(armmariadb.ServerVersionTen3),
// },
// SKU: &armmariadb.SKU{
// Name: to.Ptr("GP_Gen5_2"),
// Capacity: to.Ptr[int32](2),
// Family: to.Ptr("Gen5"),
// Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MariaDBManagementClient } = require("@azure/arm-mariadb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
*
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateReplicaMode.json
*/
async function createAReplicaServer() {
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = "TargetResourceGroup";
const serverName = "targetserver";
const parameters = {
location: "westus",
properties: {
createMode: "Replica",
sourceServerId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/MasterResourceGroup/providers/Microsoft.DBforMariaDB/servers/masterserver",
},
};
const credential = new DefaultAzureCredential();
const client = new MariaDBManagementClient(credential, subscriptionId);
const result = await client.servers.beginCreateAndWait(resourceGroupName, serverName, parameters);
console.log(result);
}
createAReplicaServer().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"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
Solicitud de ejemplo
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"
}
}
import com.azure.resourcemanager.mariadb.models.ServerPropertiesForGeoRestore;
import com.azure.resourcemanager.mariadb.models.Sku;
import com.azure.resourcemanager.mariadb.models.SkuTier;
import java.util.HashMap;
import java.util.Map;
/**
* Samples for Servers Create.
*/
public final class Main {
/*
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/
* ServerCreateGeoRestoreMode.json
*/
/**
* Sample code: Create a server as a geo restore.
*
* @param manager Entry point to MariaDBManager.
*/
public static void createAServerAsAGeoRestore(com.azure.resourcemanager.mariadb.MariaDBManager manager) {
manager.servers().define("targetserver").withRegion("westus").withExistingResourceGroup("TargetResourceGroup")
.withProperties(new ServerPropertiesForGeoRestore().withSourceServerId(
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"))
.withTags(mapOf("ElasticServer", "1"))
.withSku(
new Sku().withName("GP_Gen5_2").withTier(SkuTier.GENERAL_PURPOSE).withCapacity(2).withFamily("Gen5"))
.create();
}
// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from typing import Any, IO, Union
from azure.identity import DefaultAzureCredential
from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-rdbms
# USAGE
python server_create_geo_restore_mode.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = MariaDBManagementClient(
credential=DefaultAzureCredential(),
subscription_id="ffffffff-ffff-ffff-ffff-ffffffffffff",
)
response = client.servers.begin_create(
resource_group_name="TargetResourceGroup",
server_name="targetserver",
parameters={
"location": "westus",
"properties": {
"createMode": "GeoRestore",
"sourceServerId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver",
},
"sku": {"capacity": 2, "family": "Gen5", "name": "GP_Gen5_2", "tier": "GeneralPurpose"},
"tags": {"ElasticServer": "1"},
},
).result()
print(response)
# x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateGeoRestoreMode.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armmariadb_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/mariadb/armmariadb"
)
// Generated from example definition: https://github.com/Azure/azure-rest-api-specs/blob/7a2ac91de424f271cf91cc8009f3fe9ee8249086/specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateGeoRestoreMode.json
func ExampleServersClient_BeginCreate_createAServerAsAGeoRestore() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armmariadb.NewClientFactory("<subscription-id>", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
poller, err := clientFactory.NewServersClient().BeginCreate(ctx, "TargetResourceGroup", "targetserver", armmariadb.ServerForCreate{
Location: to.Ptr("westus"),
Properties: &armmariadb.ServerPropertiesForGeoRestore{
CreateMode: to.Ptr(armmariadb.CreateModeGeoRestore),
SourceServerID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver"),
},
SKU: &armmariadb.SKU{
Name: to.Ptr("GP_Gen5_2"),
Capacity: to.Ptr[int32](2),
Family: to.Ptr("Gen5"),
Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
},
Tags: map[string]*string{
"ElasticServer": to.Ptr("1"),
},
}, nil)
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
res, err := poller.PollUntilDone(ctx, nil)
if err != nil {
log.Fatalf("failed to pull the result: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res.Server = armmariadb.Server{
// Name: to.Ptr("targetserver"),
// Type: to.Ptr("Microsoft.DBforMariaDB/servers"),
// ID: to.Ptr("/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforMariaDB/servers/targetserver"),
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "elasticServer": to.Ptr("1"),
// },
// Properties: &armmariadb.ServerProperties{
// AdministratorLogin: to.Ptr("cloudsa"),
// EarliestRestoreDate: to.Ptr(func() time.Time { t, _ := time.Parse(time.RFC3339Nano, "2018-03-14T18:02:41.577Z"); return t}()),
// FullyQualifiedDomainName: to.Ptr("targetserver.mariadb.database.azure.com"),
// SSLEnforcement: to.Ptr(armmariadb.SSLEnforcementEnumEnabled),
// StorageProfile: &armmariadb.StorageProfile{
// BackupRetentionDays: to.Ptr[int32](14),
// GeoRedundantBackup: to.Ptr(armmariadb.GeoRedundantBackupEnabled),
// StorageMB: to.Ptr[int32](128000),
// },
// UserVisibleState: to.Ptr(armmariadb.ServerStateReady),
// Version: to.Ptr(armmariadb.ServerVersionTen3),
// },
// SKU: &armmariadb.SKU{
// Name: to.Ptr("GP_Gen5_2"),
// Capacity: to.Ptr[int32](2),
// Family: to.Ptr("Gen5"),
// Tier: to.Ptr(armmariadb.SKUTierGeneralPurpose),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { MariaDBManagementClient } = require("@azure/arm-mariadb");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to Creates a new server or updates an existing server. The update action will overwrite the existing server.
*
* @summary Creates a new server or updates an existing server. The update action will overwrite the existing server.
* x-ms-original-file: specification/mariadb/resource-manager/Microsoft.DBforMariaDB/stable/2018-06-01/examples/ServerCreateGeoRestoreMode.json
*/
async function createAServerAsAGeoRestore() {
const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
const resourceGroupName = "TargetResourceGroup";
const serverName = "targetserver";
const parameters = {
location: "westus",
properties: {
createMode: "GeoRestore",
sourceServerId:
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/SourceResourceGroup/providers/Microsoft.DBforMariaDB/servers/sourceserver",
},
sku: {
name: "GP_Gen5_2",
capacity: 2,
family: "Gen5",
tier: "GeneralPurpose",
},
tags: { elasticServer: "1" },
};
const credential = new DefaultAzureCredential();
const client = new MariaDBManagementClient(credential, subscriptionId);
const result = await client.servers.beginCreateAndWait(resourceGroupName, serverName, parameters);
console.log(result);
}
createAServerAsAGeoRestore().catch(console.error);
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Respuesta de muestra
{
"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"
}
}
Definiciones
CloudError
Respuesta de error del servicio Batch.
Nombre |
Tipo |
Description |
error
|
ErrorResponse
|
Respuesta de error
Mensaje de error
|
ErrorAdditionalInfo
Información adicional sobre el error de administración de recursos.
Nombre |
Tipo |
Description |
info
|
object
|
Información adicional.
|
type
|
string
|
Tipo de información adicional.
|
ErrorResponse
Respuesta de error
Nombre |
Tipo |
Description |
additionalInfo
|
ErrorAdditionalInfo[]
|
Información adicional del error.
|
code
|
string
|
Código de error.
|
details
|
ErrorResponse[]
|
Los detalles del error.
|
message
|
string
|
El mensaje de error.
|
target
|
string
|
Destino del error.
|
GeoRedundantBackup
Habilite la redundancia geográfica o no para la copia de seguridad del servidor.
Nombre |
Tipo |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
MinimalTlsVersionEnum
Aplique una versión mínima de Tls para el servidor.
Nombre |
Tipo |
Description |
TLS1_0
|
string
|
|
TLS1_1
|
string
|
|
TLS1_2
|
string
|
|
TLSEnforcementDisabled
|
string
|
|
PrivateEndpointProperty
Punto de conexión privado al que pertenece la conexión.
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de recurso del punto de conexión privado.
|
PrivateEndpointProvisioningState
Estado de la conexión del punto de conexión privado.
Nombre |
Tipo |
Description |
Approving
|
string
|
|
Dropping
|
string
|
|
Failed
|
string
|
|
Ready
|
string
|
|
Rejecting
|
string
|
|
PrivateLinkServiceConnectionStateActionsRequire
Las acciones necesarias para la conexión del servicio Private Link.
Nombre |
Tipo |
Description |
None
|
string
|
|
PrivateLinkServiceConnectionStateStatus
Estado de conexión del servicio Private Link.
Nombre |
Tipo |
Description |
Approved
|
string
|
|
Disconnected
|
string
|
|
Pending
|
string
|
|
Rejected
|
string
|
|
PublicNetworkAccessEnum
Si se permite o no el acceso a la red pública para este servidor. El valor es opcional, pero si se pasa, debe ser "Habilitado" o "Deshabilitado".
Nombre |
Tipo |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
Server
Representa un servidor.
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de recurso completo del recurso. Por ejemplo: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
location
|
string
|
Ubicación geográfica donde reside el recurso
|
name
|
string
|
Nombre del recurso.
|
properties.administratorLogin
|
string
|
Nombre de inicio de sesión del administrador de un servidor. Solo se puede especificar cuando se crea el servidor (y es necesario para la creación).
|
properties.earliestRestoreDate
|
string
|
Hora de creación del punto de restauración más temprana (ISO8601 formato)
|
properties.fullyQualifiedDomainName
|
string
|
Nombre de dominio completo de un servidor.
|
properties.masterServerId
|
string
|
Identificador del servidor maestro de un servidor de réplica.
|
properties.minimalTlsVersion
|
MinimalTlsVersionEnum
|
Aplique una versión mínima de Tls para el servidor.
|
properties.privateEndpointConnections
|
ServerPrivateEndpointConnection[]
|
Lista de conexiones de punto de conexión privado en un servidor
|
properties.publicNetworkAccess
|
PublicNetworkAccessEnum
|
Si se permite o no el acceso a la red pública para este servidor. El valor es opcional, pero si se pasa, debe ser "Habilitado" o "Deshabilitado".
|
properties.replicaCapacity
|
integer
|
Número máximo de réplicas que puede tener un servidor maestro.
|
properties.replicationRole
|
string
|
Rol de replicación del servidor.
|
properties.sslEnforcement
|
SslEnforcementEnum
|
Habilite la aplicación ssl o no cuando se conecte al servidor.
|
properties.storageProfile
|
StorageProfile
|
Perfil de almacenamiento de un servidor.
|
properties.userVisibleState
|
ServerState
|
Estado de un servidor que es visible para el usuario.
|
properties.version
|
ServerVersion
|
Versión del servidor.
|
sku
|
Sku
|
SKU (plan de tarifa) del servidor.
|
tags
|
object
|
Etiquetas del recurso.
|
type
|
string
|
Tipo de recurso. Por ejemplo, "Microsoft.Compute/virtualMachines" o "Microsoft.Storage/storageAccounts"
|
ServerForCreate
Los parámetros necesarios para crear o actualizar un servidor.
Nombre |
Tipo |
Description |
location
|
string
|
Ubicación en la que reside el recurso.
|
properties
|
ServerPropertiesForCreate
|
Propiedades del servidor.
|
sku
|
Sku
|
SKU (plan de tarifa) del servidor.
|
tags
|
object
|
Metadatos específicos de la aplicación en forma de pares clave-valor.
|
ServerPrivateEndpointConnection
Lista de conexiones de punto de conexión privado en un servidor
Nombre |
Tipo |
Description |
id
|
string
|
Identificador de recurso de la conexión de punto de conexión privado.
|
properties
|
ServerPrivateEndpointConnectionProperties
|
Propiedades de conexión de punto de conexión privado
|
ServerPrivateEndpointConnectionProperties
Propiedades de conexión de punto de conexión privado
ServerPrivateLinkServiceConnectionStateProperty
Estado de conexión de la conexión del punto de conexión privado.
ServerState
Estado de un servidor que es visible para el usuario.
Nombre |
Tipo |
Description |
Disabled
|
string
|
|
Dropping
|
string
|
|
Ready
|
string
|
|
ServerVersion
Versión del servidor.
Nombre |
Tipo |
Description |
10.2
|
string
|
|
10.3
|
string
|
|
Sku
SKU (plan de tarifa) del servidor.
Nombre |
Tipo |
Description |
capacity
|
integer
|
La capacidad de escalado vertical o horizontal, que representa las unidades de proceso del servidor.
|
family
|
string
|
Familia de hardware.
|
name
|
string
|
Nombre de la SKU, normalmente, nivel + familia + núcleos, por ejemplo, B_Gen4_1, GP_Gen5_8.
|
size
|
string
|
El código de tamaño, que el recurso interpretará según corresponda.
|
tier
|
SkuTier
|
El nivel de la SKU determinada, por ejemplo, Básico.
|
SkuTier
El nivel de la SKU determinada, por ejemplo, Básico.
Nombre |
Tipo |
Description |
Basic
|
string
|
|
GeneralPurpose
|
string
|
|
MemoryOptimized
|
string
|
|
SslEnforcementEnum
Habilite la aplicación ssl o no cuando se conecte al servidor.
Nombre |
Tipo |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
StorageAutogrow
Habilite El crecimiento automático del almacenamiento.
Nombre |
Tipo |
Description |
Disabled
|
string
|
|
Enabled
|
string
|
|
StorageProfile
Perfil de almacenamiento de un servidor.
Nombre |
Tipo |
Description |
backupRetentionDays
|
integer
|
Días de retención de copia de seguridad para el servidor.
|
geoRedundantBackup
|
GeoRedundantBackup
|
Habilite la redundancia geográfica o no para la copia de seguridad del servidor.
|
storageAutogrow
|
StorageAutogrow
|
Habilite El crecimiento automático del almacenamiento.
|
storageMB
|
integer
|
Almacenamiento máximo permitido para un servidor.
|