Skapar eller uppdaterar en elastisk pool.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}?api-version=2025-01-01
URI-parametrar
| Name |
I |
Obligatorisk |
Typ |
Description |
|
elasticPoolName
|
path |
True
|
string
|
Namnet på den elastiska poolen.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
Namnet på resursgruppen. Namnet är skiftlägesokänsligt.
|
|
serverName
|
path |
True
|
string
|
Namnet på servern.
|
|
subscriptionId
|
path |
True
|
string
(uuid)
|
ID för målprenumerationen. Värdet måste vara ett UUID.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
Den API-version som ska användas för den här åtgärden.
|
Begärandetext
| Name |
Obligatorisk |
Typ |
Description |
|
location
|
True
|
string
|
Den geo-plats där resursen finns
|
|
properties.autoPauseDelay
|
|
integer
(int32)
|
Tid i minuter efter vilken den elastiska poolen pausas automatiskt. Värdet -1 innebär att automatisk paus är inaktiverad
|
|
properties.availabilityZone
|
|
AvailabilityZoneType
|
Anger tillgänglighetszonen som poolens primära replik är fäst vid.
|
|
properties.highAvailabilityReplicaCount
|
|
integer
(int32)
|
Antalet sekundära repliker som är associerade med den elastiska poolen Business Critical, Premium eller Hyperscale Edition som används för att ge hög tillgänglighet. Gäller endast för elastiska Hyperskala-pooler.
|
|
properties.licenseType
|
|
ElasticPoolLicenseType
|
Licenstypen som ska tillämpas för den här elastiska poolen.
|
|
properties.maintenanceConfigurationId
|
|
string
|
Underhållskonfigurations-ID som tilldelats den elastiska poolen. Den här konfigurationen definierar den period då underhållsuppdateringarna ska ske.
|
|
properties.maxSizeBytes
|
|
integer
(int64)
|
Lagringsgränsen för databasens elastiska pool i byte.
|
|
properties.minCapacity
|
|
number
(double)
|
Minimal kapacitet som den serverlösa poolen inte krymper under, om den inte är pausad
|
|
properties.perDatabaseSettings
|
|
ElasticPoolPerDatabaseSettings
|
Inställningarna per databas för den elastiska poolen.
|
|
properties.preferredEnclaveType
|
|
AlwaysEncryptedEnclaveType
|
Typ av enklav som begärs i den elastiska poolen.
|
|
properties.zoneRedundant
|
|
boolean
|
Om den här elastiska poolen är zonredundant, vilket innebär att replikerna i den här elastiska poolen sprids över flera tillgänglighetszoner.
|
|
sku
|
|
Sku
|
SKU:n för elastisk pool.
Listan över SKU:er kan variera beroende på region och supporterbjudande. För att bestämma vilka SKU:er (inklusive SKU-namn, nivå/utgåva, familj och kapacitet) som är tillgängliga för din prenumeration i en Azure region, använd Capabilities_ListByLocation REST API eller följande kommando:
az sql elastic-pool list-editions -l <location> -o table
|
|
tags
|
|
object
|
Resursetiketter.
|
Svar
| Name |
Typ |
Description |
|
200 OK
|
ElasticPool
|
Resursens 'ElasticPool'-uppdateringsoperation lyckades
|
|
201 Created
|
ElasticPool
|
Resursen 'ElasticPool' skapade operationen lyckades
Sidhuvuden
Azure-AsyncOperation: string
|
|
202 Accepted
|
|
Resursåtgärden har godkänts.
Sidhuvuden
- Location: string
- Retry-After: integer
|
|
Other Status Codes
|
ErrorResponse
|
Ett oväntat felsvar.
|
Säkerhet
azure_auth
Azure Active Directory OAuth2 Flow.
Typ:
oauth2
Flow:
implicit
Auktoriseringswebbadress:
https://login.microsoftonline.com/common/oauth2/authorize
Omfattningar
| Name |
Description |
|
user_impersonation
|
personifiera ditt användarkonto
|
Exempel
Create or Update an elastic pool with Availability Zone
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"availabilityZone": "1",
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
},
"zoneRedundant": true
},
"sku": {
"name": "HS_Gen5_4"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.AvailabilityZoneType;
import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/CreateElasticPoolWithAvailabilityZone.json
*/
/**
* Sample code: Create or Update an elastic pool with Availability Zone.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
createOrUpdateAnElasticPoolWithAvailabilityZone(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102",
new ElasticPoolInner().withLocation("Japan East").withSku(new Sku().withName("HS_Gen5_4"))
.withPerDatabaseSettings(
new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(2.0D))
.withZoneRedundant(true).withAvailabilityZone(AvailabilityZoneType.ONE),
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 create_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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {
"availabilityZone": "1",
"perDatabaseSettings": {"maxCapacity": 2, "minCapacity": 0.25},
"zoneRedundant": True,
},
"sku": {"name": "HS_Gen5_4"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/CreateElasticPoolWithAvailabilityZone.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/CreateElasticPoolWithAvailabilityZone.json
*/
async function createOrUpdateAnElasticPoolWithAvailabilityZone() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{
location: "Japan East",
availabilityZone: "1",
perDatabaseSettings: { maxCapacity: 2, minCapacity: 0.25 },
zoneRedundant: true,
sku: { name: "HS_Gen5_4" },
},
);
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/CreateElasticPoolWithAvailabilityZone.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("HS_Gen5_4"),
PerDatabaseSettings = new ElasticPoolPerDatabaseSettings
{
MinCapacity = 0.25,
MaxCapacity = 2,
},
IsZoneRedundant = true,
AvailabilityZone = SqlAvailabilityZoneType.One,
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
},
"state": "Ready",
"zoneRedundant": true
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
},
"state": "Ready"
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
Create or Update an elastic pool with serverless properties
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"autoPauseDelay": 60,
"minCapacity": 0.5,
"perDatabaseSettings": {
"autoPauseDelay": 80,
"maxCapacity": 2,
"minCapacity": 0
}
},
"sku": {
"name": "GP_S_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateServerlessProperties.json
*/
/**
* Sample code: Create or Update an elastic pool with serverless properties.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
createOrUpdateAnElasticPoolWithServerlessProperties(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102",
new ElasticPoolInner().withLocation("Japan East")
.withSku(new Sku().withName("GP_S_Gen5_2").withTier("GeneralPurpose").withCapacity(2))
.withMinCapacity(0.5D)
.withPerDatabaseSettings(new ElasticPoolPerDatabaseSettings().withMinCapacity(0.0D)
.withMaxCapacity(2.0D).withAutoPauseDelay(80))
.withAutoPauseDelay(60),
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_create_or_update_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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {
"autoPauseDelay": 60,
"minCapacity": 0.5,
"perDatabaseSettings": {"autoPauseDelay": 80, "maxCapacity": 2, "minCapacity": 0},
},
"sku": {"capacity": 2, "name": "GP_S_Gen5_2", "tier": "GeneralPurpose"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateServerlessProperties.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateServerlessProperties.json
*/
async function createOrUpdateAnElasticPoolWithServerlessProperties() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{
location: "Japan East",
autoPauseDelay: 60,
minCapacity: 0.5,
perDatabaseSettings: { autoPauseDelay: 80, maxCapacity: 2, minCapacity: 0 },
sku: { name: "GP_S_Gen5_2", capacity: 2, tier: "GeneralPurpose" },
},
);
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/ElasticPoolCreateOrUpdateServerlessProperties.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("GP_S_Gen5_2")
{
Tier = "GeneralPurpose",
Capacity = 2,
},
MinCapacity = 0.5,
PerDatabaseSettings = new ElasticPoolPerDatabaseSettings
{
MinCapacity = 0,
MaxCapacity = 2,
AutoPauseDelay = 80,
},
AutoPauseDelay = 60,
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"minCapacity": 0.5,
"perDatabaseSettings": {
"autoPauseDelay": 80,
"maxCapacity": 2,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "GP_S_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-05-01
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"minCapacity": 0.5,
"perDatabaseSettings": {
"autoPauseDelay": 80,
"maxCapacity": 2,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "GP_S_Gen5_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-05-01
Create or update elastic pool with all parameter
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
}
},
"sku": {
"name": "GP_Gen4_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.ElasticPoolPerDatabaseSettings;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMax.json
*/
/**
* Sample code: Create or update elastic pool with all parameter.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
createOrUpdateElasticPoolWithAllParameter(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102",
new ElasticPoolInner().withLocation("Japan East")
.withSku(new Sku().withName("GP_Gen4_2").withTier("GeneralPurpose").withCapacity(2))
.withPerDatabaseSettings(
new ElasticPoolPerDatabaseSettings().withMinCapacity(0.25D).withMaxCapacity(2.0D)),
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_create_or_update_max.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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {"perDatabaseSettings": {"maxCapacity": 2, "minCapacity": 0.25}},
"sku": {"capacity": 2, "name": "GP_Gen4_2", "tier": "GeneralPurpose"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMax.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMax.json
*/
async function createOrUpdateElasticPoolWithAllParameter() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{
location: "Japan East",
perDatabaseSettings: { maxCapacity: 2, minCapacity: 0.25 },
sku: { name: "GP_Gen4_2", capacity: 2, tier: "GeneralPurpose" },
},
);
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/ElasticPoolCreateOrUpdateMax.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("GP_Gen4_2")
{
Tier = "GeneralPurpose",
Capacity = 2,
},
PerDatabaseSettings = new ElasticPoolPerDatabaseSettings
{
MinCapacity = 0.25,
MaxCapacity = 2,
},
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 5242880000,
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
},
"state": "Ready"
},
"sku": {
"name": "GP_Gen4_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 5242880000,
"perDatabaseSettings": {
"maxCapacity": 2,
"minCapacity": 0.25
},
"state": "Ready"
},
"sku": {
"name": "GP_Gen4_2",
"capacity": 2,
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01
Create or update elastic pool with maintenance configuration parameter
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
*/
/**
* Sample code: Create or update elastic pool with maintenance configuration parameter.
*
* @param manager Entry point to SqlServerManager.
*/
public static void createOrUpdateElasticPoolWithMaintenanceConfigurationParameter(
com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102",
new ElasticPoolInner().withLocation("Japan East").withMaintenanceConfigurationId(
"/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"),
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_create_or_update_set_maintenance_configuration.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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"
},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
*/
async function createOrUpdateElasticPoolWithMaintenanceConfigurationParameter() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{
location: "Japan East",
maintenanceConfigurationId:
"/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
},
);
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/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
MaintenanceConfigurationId = new ResourceIdentifier("/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1"),
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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-02-10T01:25:25.033Z",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 100,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01
{
"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-02-10T01:25:25.033Z",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_JapanEast_1",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 100,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2020-08-01
Create or update elastic pool with minimum parameters
Exempelbegäran
PUT 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
{
"location": "Japan East"
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMin.json
*/
/**
* Sample code: Create or update elastic pool with minimum parameters.
*
* @param manager Entry point to SqlServerManager.
*/
public static void
createOrUpdateElasticPoolWithMinimumParameters(com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", new ElasticPoolInner().withLocation("Japan East"), 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_create_or_update_min.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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={"location": "Japan East"},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMin.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateOrUpdateMin.json
*/
async function createOrUpdateElasticPoolWithMinimumParameters() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{ location: "Japan East" },
);
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/ElasticPoolCreateOrUpdateMin.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"));
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 100,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01
{
"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-02-10T01:25:25.033Z",
"maxSizeBytes": 102400,
"perDatabaseSettings": {
"maxCapacity": 100,
"minCapacity": 0
},
"state": "Ready"
},
"sku": {
"name": "StandardPool",
"capacity": 100,
"tier": "Standard"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-10-01
Create or update elastic pool with preferred enclave type parameter as Default
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"preferredEnclaveType": "Default"
},
"sku": {
"name": "GP_Gen5_4"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateWithDefaultPreferredEnclaveType.json
*/
/**
* Sample code: Create or update elastic pool with preferred enclave type parameter as Default.
*
* @param manager Entry point to SqlServerManager.
*/
public static void createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault(
com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", new ElasticPoolInner().withLocation("Japan East")
.withSku(new Sku().withName("GP_Gen5_4")).withPreferredEnclaveType(AlwaysEncryptedEnclaveType.DEFAULT),
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_create_with_default_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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {"preferredEnclaveType": "Default"},
"sku": {"name": "GP_Gen5_4"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateWithDefaultPreferredEnclaveType.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateWithDefaultPreferredEnclaveType.json
*/
async function createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{ location: "Japan East", preferredEnclaveType: "Default", sku: { name: "GP_Gen5_4" } },
);
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/ElasticPoolCreateWithDefaultPreferredEnclaveType.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("GP_Gen5_4"),
PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Default,
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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",
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"maxSizeBytes": 0,
"perDatabaseSettings": {
"maxCapacity": 4,
"minCapacity": 0
},
"preferredEnclaveType": "Default",
"state": "Ready",
"zoneRedundant": false
},
"sku": {
"name": "GP_Gen5",
"capacity": 4,
"family": "Gen5",
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
{
"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",
"licenseType": "LicenseIncluded",
"maintenanceConfigurationId": "/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
"maxSizeBytes": 0,
"perDatabaseSettings": {
"maxCapacity": 4,
"minCapacity": 0
},
"preferredEnclaveType": "Default",
"state": "Ready",
"zoneRedundant": false
},
"sku": {
"name": "GP_Gen5",
"capacity": 4,
"family": "Gen5",
"tier": "GeneralPurpose"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
Create or update elastic pool with preferred enclave type parameter as VBS
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"preferredEnclaveType": "VBS"
},
"sku": {
"name": "GP_Gen5_4"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.AlwaysEncryptedEnclaveType;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/ElasticPoolCreateWithVBSPreferredEnclaveType.json
*/
/**
* Sample code: Create or update elastic pool with preferred enclave type parameter as VBS.
*
* @param manager Entry point to SqlServerManager.
*/
public static void createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS(
com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", new ElasticPoolInner().withLocation("Japan East")
.withSku(new Sku().withName("GP_Gen5_4")).withPreferredEnclaveType(AlwaysEncryptedEnclaveType.VBS),
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_create_with_vbs_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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {"preferredEnclaveType": "VBS"},
"sku": {"name": "GP_Gen5_4"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/ElasticPoolCreateWithVBSPreferredEnclaveType.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/ElasticPoolCreateWithVBSPreferredEnclaveType.json
*/
async function createOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{ location: "Japan East", preferredEnclaveType: "VBS", sku: { name: "GP_Gen5_4" } },
);
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/ElasticPoolCreateWithVBSPreferredEnclaveType.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("GP_Gen5_4"),
PreferredEnclaveType = SqlAlwaysEncryptedEnclaveType.Vbs,
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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",
"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"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
{
"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",
"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"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
Create or update Hyperscale elastic pool with high availability replica count parameter
Exempelbegäran
PUT 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
{
"location": "Japan East",
"properties": {
"highAvailabilityReplicaCount": 2
},
"sku": {
"name": "HS_Gen5_4"
}
}
import com.azure.resourcemanager.sql.fluent.models.ElasticPoolInner;
import com.azure.resourcemanager.sql.models.Sku;
/**
* Samples for ElasticPools CreateOrUpdate.
*/
public final class Main {
/*
* x-ms-original-file: 2025-01-01/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
*/
/**
* Sample code: Create or update Hyperscale elastic pool with high availability replica count parameter.
*
* @param manager Entry point to SqlServerManager.
*/
public static void createOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter(
com.azure.resourcemanager.sql.SqlServerManager manager) {
manager.serviceClient().getElasticPools().createOrUpdate("sqlcrudtest-2369", "sqlcrudtest-8069",
"sqlcrudtest-8102", new ElasticPoolInner().withLocation("Japan East")
.withSku(new Sku().withName("HS_Gen5_4")).withHighAvailabilityReplicaCount(2),
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_create_or_update_set_high_availability_replica_count.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.begin_create_or_update(
resource_group_name="sqlcrudtest-2369",
server_name="sqlcrudtest-8069",
elastic_pool_name="sqlcrudtest-8102",
parameters={
"location": "Japan East",
"properties": {"highAvailabilityReplicaCount": 2},
"sku": {"name": "HS_Gen5_4"},
},
).result()
print(response)
# x-ms-original-file: 2025-01-01/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.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 creates or updates an elastic pool.
*
* @summary creates or updates an elastic pool.
* x-ms-original-file: 2025-01-01/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
*/
async function createOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter() {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-1111-2222-3333-444444444444";
const client = new SqlManagementClient(credential, subscriptionId);
const result = await client.elasticPools.createOrUpdate(
"sqlcrudtest-2369",
"sqlcrudtest-8069",
"sqlcrudtest-8102",
{ location: "Japan East", highAvailabilityReplicaCount: 2, sku: { name: "HS_Gen5_4" } },
);
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/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json
// this example is just showing the usage of "ElasticPools_CreateOrUpdate" 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";
ElasticPoolData data = new ElasticPoolData(new AzureLocation("Japan East"))
{
Sku = new SqlSku("HS_Gen5_4"),
HighAvailabilityReplicaCount = 2,
};
ArmOperation<ElasticPoolResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, elasticPoolName, data);
ElasticPoolResource result = lro.Value;
// 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
Exempelsvar
{
"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"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-08-01
{
"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"
}
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sqlcrudtest-2369/providers/Microsoft.Sql/locations/japaneast1/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2021-08-01
Definitioner
AlwaysEncryptedEnclaveType
Uppräkning
Typ av enklav som begärs i databasen, t.ex. standard enklaver eller VBS-enklaver.
| Värde |
Description |
|
Default
|
Standardinställning
|
|
VBS
|
VBS
|
AvailabilityZoneType
Uppräkning
Anger tillgänglighetszonen som databasen är fäst på.
| Värde |
Description |
|
NoPreference
|
NoPreference
|
|
1
|
1
|
|
2
|
2
|
|
3
|
3
|
createdByType
Uppräkning
Den typ av identitet som skapade resursen.
| Värde |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
ElasticPool
Objekt
En elastisk pool.
| Name |
Typ |
Description |
|
id
|
string
(arm-id)
|
Fullständigt kvalificerat resurs-ID för resursen. T.ex. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"
|
|
kind
|
string
|
Typ av elastisk pool. Detta är metadata som används för Azure-portalupplevelsen.
|
|
location
|
string
|
Den geo-plats där resursen finns
|
|
name
|
string
|
Namnet på resursen
|
|
properties.autoPauseDelay
|
integer
(int32)
|
Tid i minuter efter vilken den elastiska poolen pausas automatiskt. Värdet -1 innebär att automatisk paus är inaktiverad
|
|
properties.availabilityZone
|
AvailabilityZoneType
|
Anger tillgänglighetszonen som poolens primära replik är fäst vid.
|
|
properties.creationDate
|
string
(date-time)
|
Skapandedatumet för den elastiska poolen (ISO8601 format).
|
|
properties.highAvailabilityReplicaCount
|
integer
(int32)
|
Antalet sekundära repliker som är associerade med den elastiska poolen Business Critical, Premium eller Hyperscale Edition som används för att ge hög tillgänglighet. Gäller endast för elastiska Hyperskala-pooler.
|
|
properties.licenseType
|
ElasticPoolLicenseType
|
Licenstypen som ska tillämpas för den här elastiska poolen.
|
|
properties.maintenanceConfigurationId
|
string
|
Underhållskonfigurations-ID som tilldelats den elastiska poolen. Den här konfigurationen definierar den period då underhållsuppdateringarna ska ske.
|
|
properties.maxSizeBytes
|
integer
(int64)
|
Lagringsgränsen för databasens elastiska pool i byte.
|
|
properties.minCapacity
|
number
(double)
|
Minimal kapacitet som den serverlösa poolen inte krymper under, om den inte är pausad
|
|
properties.perDatabaseSettings
|
ElasticPoolPerDatabaseSettings
|
Inställningarna per databas för den elastiska poolen.
|
|
properties.preferredEnclaveType
|
AlwaysEncryptedEnclaveType
|
Typ av enklav som begärs i den elastiska poolen.
|
|
properties.state
|
ElasticPoolState
|
Status för den elastiska poolen.
|
|
properties.zoneRedundant
|
boolean
|
Om den här elastiska poolen är zonredundant, vilket innebär att replikerna i den här elastiska poolen sprids över flera tillgänglighetszoner.
|
|
sku
|
Sku
|
SKU:n för elastisk pool.
Listan över SKU:er kan variera beroende på region och supporterbjudande. För att bestämma vilka SKU:er (inklusive SKU-namn, nivå/utgåva, familj och kapacitet) som är tillgängliga för din prenumeration i en Azure region, använd Capabilities_ListByLocation REST API eller följande kommando:
az sql elastic-pool list-editions -l <location> -o table
|
|
systemData
|
systemData
|
Azure Resource Manager-metadata som innehåller creationBy och modifiedBy-information.
|
|
tags
|
object
|
Resursetiketter.
|
|
type
|
string
|
Resurstypen. T.ex. "Microsoft. Compute/virtualMachines" eller "Microsoft. Storage/storageAccounts"
|
ElasticPoolLicenseType
Uppräkning
Licenstypen som ska tillämpas för den här elastiska poolen.
| Värde |
Description |
|
LicenseIncluded
|
LicensInkluderad
|
|
BasePrice
|
BasePrice
|
ElasticPoolPerDatabaseSettings
Objekt
Per databasinställningar för en elastisk pool.
| Name |
Typ |
Description |
|
autoPauseDelay
|
integer
(int32)
|
Automatisk pausfördröjning för per databas i poolen
|
|
maxCapacity
|
number
(double)
|
Den maximala kapaciteten som en databas kan använda.
|
|
minCapacity
|
number
(double)
|
Den minsta kapaciteten som alla databaser garanteras.
|
ElasticPoolState
Uppräkning
Status för den elastiska poolen.
| Värde |
Description |
|
Creating
|
Skapar
|
|
Ready
|
Redo
|
|
Disabled
|
Inaktiverad
|
ErrorAdditionalInfo
Objekt
Resurshanteringsfelet ytterligare information.
| Name |
Typ |
Description |
|
info
|
object
|
Den ytterligare informationen.
|
|
type
|
string
|
Typen av ytterligare information.
|
ErrorDetail
Objekt
Detaljerna om felet.
| Name |
Typ |
Description |
|
additionalInfo
|
ErrorAdditionalInfo[]
|
Felet ytterligare information.
|
|
code
|
string
|
Felkoden.
|
|
details
|
ErrorDetail[]
|
Felinformationen.
|
|
message
|
string
|
Felmeddelandet.
|
|
target
|
string
|
Felmålet.
|
ErrorResponse
Objekt
Felsvar
Sku
Objekt
En ARM-resurs-SKU.
| Name |
Typ |
Description |
|
capacity
|
integer
(int32)
|
Kapacitet för den specifika SKU:n.
|
|
family
|
string
|
Om tjänsten har olika generationer av maskinvara, för samma SKU, kan den samlas in här.
|
|
name
|
string
|
Namnet på SKU:n, vanligtvis en bokstav + nummerkod, t.ex. P3.
|
|
size
|
string
|
Storleken på den specifika SKU:n
|
|
tier
|
string
|
Nivån eller utgåvan av den specifika SKU:n, t.ex. Basic, Premium.
|
systemData
Objekt
Metadata som rör skapande och senaste ändring av resursen.
| Name |
Typ |
Description |
|
createdAt
|
string
(date-time)
|
Tidsstämpeln för resursskapande (UTC).
|
|
createdBy
|
string
|
Identiteten som skapade resursen.
|
|
createdByType
|
createdByType
|
Den typ av identitet som skapade resursen.
|
|
lastModifiedAt
|
string
(date-time)
|
Tidsstämpeln för senaste ändring av resurs (UTC)
|
|
lastModifiedBy
|
string
|
Identiteten som senast ändrade resursen.
|
|
lastModifiedByType
|
createdByType
|
Den typ av identitet som senast ändrade resursen.
|