你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Elastic Pools - Failover
参考
服务:
SQL Database
API 版本:
2021-11-01
故障转移弹性池。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover?api-version=2021-11-01
POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/testServer/elasticPools/testElasticPool/failover?api-version=2021-11-01
/**
* Samples for ElasticPools Failover.
*/
public final class Main {
/*
* x-ms-original-file:
* specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/examples/FailoverElasticPool.json
*/
/**
* Sample code: Failover an elastic pool.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/
public static void failoverAnElasticPool(com.azure.resourcemanager.AzureResourceManager azure) {
azure.sqlServers().manager().serviceClient().getElasticPools().failover("group1", "testServer",
"testElasticPool", com.azure.core.util.Context.NONE);
}
}