Získá elastický fond.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}?api-version=2025-01-01
Parametry identifikátoru URI
| Name |
V |
Vyžadováno |
Typ |
Description |
|
elasticPoolName
|
path |
True
|
string
|
Název elastického fondu.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Název skupiny prostředků. Název nerozlišuje malá a velká písmena.
|
|
serverName
|
path |
True
|
string
|
Název serveru.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ID cílového předplatného. Hodnota musí být UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Verze rozhraní API, která se má použít pro tuto operaci.
|
Odpovědi
| Name |
Typ |
Description |
|
200 OK
|
ElasticPool
|
Operace Azure byla úspěšně dokončena.
|
|
Other Status Codes
|
ErrorResponse
|
Neočekávaná chybová odpověď
|
Zabezpečení
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Tok:
implicit
URL autorizace:
https://login.microsoftonline.com/common/oauth2/authorize
Rozsahy
| Name |
Description |
|
user_impersonation
|
zosobnění uživatelského účtu
|
Příklady
Get a Hyperscale elastic pool
Ukázkový požadavek
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102?api-version=2025-01-01
/**
* Samples for ElasticPools Get.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/HyperscaleElasticPoolGet.json
*/
/**
* Sample code: Get a Hyperscale elastic pool.
*
* @param manager Entry point to SqlServerManager.
*/
public static void getAHyperscaleElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python hyperscale_elastic_pool_get.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 = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.elastic_pools.get(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
)
print(response)
# x-ms-original-file: 2025-01-01/HyperscaleElasticPoolGet.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
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets an elastic pool.
*
* @summary gets an elastic pool.
* x-ms-original-file: 2025-01-01/HyperscaleElasticPoolGet.json
*/
async function getAHyperscaleElasticPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.get(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/examples/HyperscaleElasticPoolGet.json
// this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlServerResource created on azure
// for more information of creating SqlServerResource, please refer to the document of SqlServerResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-2369";
string serverName = "sqlcrudtest-8069";
ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId);
// get the collection of this ElasticPoolResource
ElasticPoolCollection collection = sqlServer.GetElasticPools();
// invoke the operation
string elasticPoolName = "sqlcrudtest-8102";
NullableResponse<ElasticPoolResource> response = await collection.GetIfExistsAsync(elasticPoolName);
ElasticPoolResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ElasticPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"name": "sqlcrudtest-8102",
"type": "Microsoft.Sql/servers/elasticPools",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102",
"kind": "vcore,pool",
"location": "Japan East",
"properties": {
"creationDate": "2021-08-26T03:46:20.57Z",
"highAvailabilityReplicaCount": 2,
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"maxSizeBytes": 0,
"perDatabaseSettings": {
"maxCapacity": 4,
"minCapacity": 0
},
"state": "Ready",
"zoneRedundant": false
},
"sku": {
"name": "HS_Gen5",
"capacity": 4,
"family": "Gen5",
"tier": "Hyperscale"
}
}
Get an elastic pool
Ukázkový požadavek
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102?api-version=2025-01-01
/**
* Samples for ElasticPools Get.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolGet.json
*/
/**
* Sample code: Get an elastic pool.
*
* @param manager Entry point to SqlServerManager.
*/
public static void getAnElasticPool(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python elastic_pool_get.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 = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.elastic_pools.get(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
)
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolGet.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
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets an elastic pool.
*
* @summary gets an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolGet.json
*/
async function getAnElasticPool() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.get(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/examples/ElasticPoolGet.json
// this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlServerResource created on azure
// for more information of creating SqlServerResource, please refer to the document of SqlServerResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-2369";
string serverName = "sqlcrudtest-8069";
ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId);
// get the collection of this ElasticPoolResource
ElasticPoolCollection collection = sqlServer.GetElasticPools();
// invoke the operation
string elasticPoolName = "sqlcrudtest-8102";
NullableResponse<ElasticPoolResource> response = await collection.GetIfExistsAsync(elasticPoolName);
ElasticPoolResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ElasticPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"name": "sqlcrudtest-8102",
"type": "Microsoft.Sql/servers/elasticPools",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102",
"kind": null,
"location": "Japan East",
"properties": {
"creationDate": "2017-10-10T01:25:25.033Z",
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
"maxSizeBytes": 5242880000,
"perDatabaseSettings": {
"maxCapacity": 1,
"minCapacity": 0.25
},
"state": "Ready",
"zoneRedundant": true
},
"sku": {
"name": "GP_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Get an elastic pool with Availability Zone
Ukázkový požadavek
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102?api-version=2025-01-01
/**
* Samples for ElasticPools Get.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/GetElasticPoolWithAvailabilityZone.json
*/
/**
* Sample code: Get an elastic pool with Availability Zone.
*
* @param manager Entry point to SqlServerManager.
*/
public static void getAnElasticPoolWithAvailabilityZone(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python get_elastic_pool_with_availability_zone.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 = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.elastic_pools.get(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
)
print(response)
# x-ms-original-file: 2025-01-01/GetElasticPoolWithAvailabilityZone.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
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets an elastic pool.
*
* @summary gets an elastic pool.
* x-ms-original-file: 2025-01-01/GetElasticPoolWithAvailabilityZone.json
*/
async function getAnElasticPoolWithAvailabilityZone() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.get(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/examples/GetElasticPoolWithAvailabilityZone.json
// this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlServerResource created on azure
// for more information of creating SqlServerResource, please refer to the document of SqlServerResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-2369";
string serverName = "sqlcrudtest-8069";
ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId);
// get the collection of this ElasticPoolResource
ElasticPoolCollection collection = sqlServer.GetElasticPools();
// invoke the operation
string elasticPoolName = "sqlcrudtest-8102";
NullableResponse<ElasticPoolResource> response = await collection.GetIfExistsAsync(elasticPoolName);
ElasticPoolResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ElasticPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"name": "sqlcrudtest-8102",
"type": "Microsoft.Sql/servers/elasticPools",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102",
"kind": null,
"location": "Japan East",
"properties": {
"availabilityZone": "1",
"creationDate": "2017-10-10T01:25:25.033Z",
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
"maxSizeBytes": 5242880000,
"perDatabaseSettings": {
"maxCapacity": 1,
"minCapacity": 0.25
},
"state": "Ready",
"zoneRedundant": true
},
"sku": {
"name": "GP_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Get an elastic pool with preferred enclave type parameter
Ukázkový požadavek
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102?api-version=2025-01-01
/**
* Samples for ElasticPools Get.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolGetWithPreferredEnclaveType.json
*/
/**
* Sample code: Get an elastic pool with preferred enclave type parameter.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
getAnElasticPoolWithPreferredEnclaveTypeParameter(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python elastic_pool_get_with_preferred_enclave_type.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 = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.elastic_pools.get(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
)
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolGetWithPreferredEnclaveType.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
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets an elastic pool.
*
* @summary gets an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolGetWithPreferredEnclaveType.json
*/
async function getAnElasticPoolWithPreferredEnclaveTypeParameter() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.get(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/examples/ElasticPoolGetWithPreferredEnclaveType.json
// this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlServerResource created on azure
// for more information of creating SqlServerResource, please refer to the document of SqlServerResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-2369";
string serverName = "sqlcrudtest-8069";
ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId);
// get the collection of this ElasticPoolResource
ElasticPoolCollection collection = sqlServer.GetElasticPools();
// invoke the operation
string elasticPoolName = "sqlcrudtest-8102";
NullableResponse<ElasticPoolResource> response = await collection.GetIfExistsAsync(elasticPoolName);
ElasticPoolResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ElasticPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"name": "sqlcrudtest-8102",
"type": "Microsoft.Sql/servers/elasticPools",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102",
"kind": "vcore,pool",
"location": "Japan East",
"properties": {
"creationDate": "2022-08-26T03:46:20.57Z",
"highAvailabilityReplicaCount": 2,
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"maxSizeBytes": 0,
"perDatabaseSettings": {
"maxCapacity": 4,
"minCapacity": 0
},
"preferredEnclaveType": "VBS",
"state": "Ready",
"zoneRedundant": false
},
"sku": {
"name": "GP_Gen5",
"capacity": 4,
"family": "Gen5",
"tier": "GeneralPurpose"
}
}
Get an elastic pool with serverless properties
Ukázkový požadavek
GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102?api-version=2025-01-01
/**
* Samples for ElasticPools Get.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/GetElasticPoolWithServerlessProperties.json
*/
/**
* Sample code: Get an elastic pool with serverless properties.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
getAnElasticPoolWithServerlessProperties(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().getWithResponse("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.sql import SqlManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-sql
# USAGE
python get_elastic_pool_with_serverless_properties.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 = SqlManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.elastic_pools.get(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
)
print(response)
# x-ms-original-file: 2025-01-01/GetElasticPoolWithServerlessProperties.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
const { SqlManagementClient } = require("@azure/arm-sql");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to gets an elastic pool.
*
* @summary gets an elastic pool.
* x-ms-original-file: 2025-01-01/GetElasticPoolWithServerlessProperties.json
*/
async function getAnElasticPoolWithServerlessProperties() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.get(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/SQL/stable/2025-01-01/examples/GetElasticPoolWithServerlessProperties.json
// this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlServerResource created on azure
// for more information of creating SqlServerResource, please refer to the document of SqlServerResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "sqlcrudtest-2369";
string serverName = "sqlcrudtest-8069";
ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName);
SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId);
// get the collection of this ElasticPoolResource
ElasticPoolCollection collection = sqlServer.GetElasticPools();
// invoke the operation
string elasticPoolName = "sqlcrudtest-8102";
NullableResponse<ElasticPoolResource> response = await collection.GetIfExistsAsync(elasticPoolName);
ElasticPoolResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine("Succeeded with null as result");
}
else
{
// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
ElasticPoolData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Ukázková odpověď
{
"name": "sqlcrudtest-8102",
"type": "Microsoft.Sql/servers/elasticPools",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/servers/sqlcrudtest-8069/elasticPools/sqlcrudtest-8102",
"kind": null,
"location": "Japan East",
"properties": {
"autoPauseDelay": 60,
"creationDate": "2017-10-10T01:25:25.033Z",
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
"maxSizeBytes": 5242880000,
"minCapacity": 0.5,
"perDatabaseSettings": {
"autoPauseDelay": 60,
"maxCapacity": 1,
"minCapacity": 0
},
"state": "Ready",
"zoneRedundant": true
},
"sku": {
"name": "GP_S_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Definice
AlwaysEncryptedEnclaveType
Výčet
Typ enklávy požadované v databázi, tj. výchozí enklávy nebo enklávy VBS.
| Hodnota |
Description |
|
Default
|
Výchozí
|
|
VBS
|
VBS
|
AvailabilityZoneType
Výčet
Určuje zónu dostupnosti, ke které je databáze připnutá.
| Hodnota |
Description |
|
NoPreference
|
NoPreference
|
|
1
|
1
|
|
2
|
2
|
|
3
|
3
|
createdByType
Výčet
Typ identity, která prostředek vytvořila.
| Hodnota |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ElasticPool
Objekt
Elastický fond.
| Name |
Typ |
Description |
|
id
|
string
(arm-id)
|
Plně kvalifikované ID prostředku pro prostředek. Např. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
kind
|
string
|
Druh elastického fondu. Toto jsou metadata používaná pro Azure portálový zážitek.
|
|
location
|
string
|
Geografické umístění, ve kterém se nachází zdroj
|
|
name
|
string
|
Název prostředku
|
|
properties.autoPauseDelay
|
integer
(int32)
|
Doba v minutách, po které se elastický fond automaticky pozastaví. Hodnota -1 znamená, že automatické pozastavení je zakázané.
|
|
properties.availabilityZone
|
AvailabilityZoneType
|
Určuje zónu dostupnosti, ke které je primární replika fondu připnutá.
|
|
properties.creationDate
|
string
(date-time)
|
Datum vytvoření elastického fondu (formát ISO8601).
|
|
properties.highAvailabilityReplicaCount
|
integer
(int32)
|
Počet sekundárních replik přidružených k elastickému fondu edice Pro důležité obchodní informace, Premium nebo Hyperscale, které slouží k zajištění vysoké dostupnosti. Platí pouze pro elastické fondy Hyperscale.
|
|
properties.licenseType
|
ElasticPoolLicenseType
|
Typ licence, který se má použít pro tento elastický fond.
|
|
properties.maintenanceConfigurationId
|
string
|
ID konfigurace údržby přiřazené elastickému fondu Tato konfigurace definuje období, kdy dojde k aktualizacím údržby.
|
|
properties.maxSizeBytes
|
integer
(int64)
|
Limit úložiště pro elastický fond databáze v bajtech.
|
|
properties.minCapacity
|
number
(double)
|
Minimální kapacita bezserverového fondu se nezmenší níže, pokud není pozastavena
|
|
properties.perDatabaseSettings
|
ElasticPoolPerDatabaseSettings
|
Nastavení jednotlivých databází pro elastický fond.
|
|
properties.preferredEnclaveType
|
AlwaysEncryptedEnclaveType
|
Typ enklávy požadovaný v elastickém fondu
|
|
properties.state
|
ElasticPoolState
|
Stav elastického fondu.
|
|
properties.zoneRedundant
|
boolean
|
Bez ohledu na to, jestli je tento elastický fond zónově redundantní, což znamená, že repliky tohoto elastického fondu budou rozloženy do několika zón dostupnosti.
|
|
sku
|
Sku
|
Skladová položka elastického fondu.
Seznam skladových položek se může lišit podle oblasti a nabídky podpory. Pro určení SKU (včetně názvu SKU, úrovně/edice, rodiny a kapacity), které jsou dostupné vašemu předplatnému v Azure regionu, použijte REST API Capabilities_ListByLocation nebo následující příkaz:
az sql elastic-pool list-editions -l <location> -o table
|
|
systemData
|
systemData
|
Azure Resource Manager metadata obsahující informace createdBy a modifiedBy.
|
|
tags
|
object
|
Značky prostředků
|
|
type
|
string
|
Typ prostředku. Například "Microsoft. Compute/virtualMachines" nebo "Microsoft. Úložiště/úložištěÚčty"
|
ElasticPoolLicenseType
Výčet
Typ licence, který se má použít pro tento elastický fond.
| Hodnota |
Description |
|
LicenseIncluded
|
LicenceZahrnuto
|
|
BasePrice
|
BasePrice
|
ElasticPoolPerDatabaseSettings
Objekt
Nastavení elastického fondu na databázi
| Name |
Typ |
Description |
|
autoPauseDelay
|
integer
(int32)
|
Zpoždění automatického pozastavení pro každou databázi v rámci fondu
|
|
maxCapacity
|
number
(double)
|
Maximální kapacita může spotřebovávat libovolná databáze.
|
|
minCapacity
|
number
(double)
|
Minimální kapacita je zaručená pro všechny databáze.
|
ElasticPoolState
Výčet
Stav elastického fondu.
| Hodnota |
Description |
|
Creating
|
Vytváření
|
|
Ready
|
Ready
|
|
Disabled
|
Disabled
|
ErrorAdditionalInfo
Objekt
Další informace o chybě správy prostředků
| Name |
Typ |
Description |
|
info
|
object
|
Další informace.
|
|
type
|
string
|
Další typ informací.
|
ErrorDetail
Objekt
Podrobnosti o chybě.
| Name |
Typ |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Další informace o chybě.
|
|
code
|
string
|
Kód chyby.
|
|
details
|
ErrorDetail[]
|
Podrobnosti o chybě.
|
|
message
|
string
|
Chybová zpráva.
|
|
target
|
string
|
Cíl chyby.
|
ErrorResponse
Objekt
Chybová odpověď
Sku
Objekt
Skladová položka prostředku ARM.
| Name |
Typ |
Description |
|
capacity
|
integer
(int32)
|
Kapacita konkrétní skladové položky.
|
|
family
|
string
|
Pokud má služba různé generace hardwaru, pro stejnou skladovou položku, můžete ji zde zachytit.
|
|
name
|
string
|
Název skladové položky, obvykle písmeno + číslo, např. P3.
|
|
size
|
string
|
Velikost konkrétní skladové položky
|
|
tier
|
string
|
Úroveň nebo edice konkrétní skladové položky, např. Basic, Premium.
|
systemData
Objekt
Metadata týkající se vytvoření a poslední změny prostředku.
| Name |
Typ |
Description |
|
createdAt
|
string
(date-time)
|
Časové razítko vytvoření prostředku (UTC).
|
|
createdBy
|
string
|
Identita, která prostředek vytvořila.
|
|
createdByType
|
createdByType
|
Typ identity, která prostředek vytvořila.
|
|
lastModifiedAt
|
string
(date-time)
|
Časové razítko poslední změny zdroje (UTC)
|
|
lastModifiedBy
|
string
|
Identita, která naposledy změnila prostředek.
|
|
lastModifiedByType
|
createdByType
|
Typ identity, která naposledy změnila prostředek.
|