Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

Execution of "az sql elastic-pool create" produces REST API request with incorrect property set #27455

Open SOrozco7 opened 1 year ago

SOrozco7 commented 1 year ago

Describe the bug

Based on my binary search and confirmation via experiments, starting exactly from version 2.48.0 of the Azure CLI, the command "az sql elastic-pool create" is producing a REST API request with an incorrect property being set. Interestingly, this does not happen with the "az sql elastic-pool update".

Example command:

az sql elastic-pool create -g test-rg -s test-svr --name test-pool6 --edition GeneralPurpose --family Gen5 --capacity 4 --db-min-capacity 0.5 --db-max-capacity 2 --storage 120GB
{
  "Sku": {
    "Name": "GP_Gen5",
    "Tier": "GeneralPurpose",
    "Family": "Gen5",
    "Capacity": 4
  },
  "Kind": "",
  "Properties": {
    "CreationDate": "0001-01-01T00:00:00.0000000Z",
    "MaxSizeBytes": 128849018880,
    "MinCapacity": 0.5,          <----- This property is incorrectly set
    "PerDatabaseSettings": {
      "MinCapacity": 0.5,        <----- This property is correctly set by the parameter "--db-min-capacity"
      "MaxCapacity": 2
    }
  },
  "Location": "eastus2"
}

Azure CLI version 2.48.0 (commit ID 07cce2ad65bb6f4ff1827a744f9366ccdf70cd87 ), released on 4/24/2023, is the first version with the issue.

Azure CLI version 2.47.0, released on 4/3/2023 (commit ID 90261d8f8f5747456c1aed138a964904a20d7724 ), is the last version without the issue.

Related command

az sql elastic-pool create

Errors

The command failed with an unexpected error.

az sql elastic-pool create -g test-rg -s test-svr --name test-pool6 --edition GeneralPurpose --family Gen5 --capacity 4 --db-min-capacity 0.5 --db-max-capacity 2 --storage 120GB
(ProvisioningDisabled) The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
Code: ProvisioningDisabled
Message: The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'

Issue script & Debug output

C:\Users\salvador>az sql elastic-pool create -g test-rg -s test-svr --name test-pool6 --edition GeneralPurpose --family Gen5 --capacity 4 --db-min-capacity 0.5 --db-max-capacity 2 --storage 120GB --tags CreatedBy=salvador --debug
cli.knack.cli: Command arguments: ['sql', 'elastic-pool', 'create', '-g', 'test-rg', '-s', 'test-svr', '--name', 'test-pool6', '--edition', 'GeneralPurpose', '--family', 'Gen5', '--capacity', '4', '--db-min-capacity', '0.5', '--db-max-capacity', '2', '--storage', '120GB', '--tags', 'CreatedBy=salvador', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
Enable VT mode.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x0245B4F0>, <function OutputProducer.on_global_arguments at 0x02626C88>, <function CLIQuery.on_global_arguments at 0x026478E0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'sql': ['azure.cli.command_modules.sql', 'azure.cli.command_modules.sqlvm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: sql                       0.089        55       207
cli.azure.cli.core: sqlvm                     0.279         4        20
cli.azure.cli.core: Total (2)                 0.369        59       227
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
cli.azure.cli.core: Total (0)                 0.000         0         0
cli.azure.cli.core: Loaded 58 groups, 227 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : sql elastic-pool create
cli.azure.cli.core: Command table: sql elastic-pool create
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x04847460>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\salvador\.azure\commands\2023-09-22.10-28-44.sql_elastic-pool_create.19104.log'.
az_command_data_logger: command args: sql elastic-pool create -g {} -s {} --name {} --edition {} --family {} --capacity {} --db-min-capacity {} --db-max-capacity {} --storage {} --tags {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x0486DBB0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x0489DAD8>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x0489DCD0>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x02626CD0>, <function CLIQuery.handle_query_parameter at 0x02647928>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x0489DC88>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\\Users\\salvador\\.azure\\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\salvador\.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: d1681ca9-9516-4b9f-b5ef-97bd69d622d9
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr?api-version=2022-08-01-preview'cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '7ae94b09-596d-11ee-bac6-c8d9d2225db6'
cli.azure.cli.core.sdk.policies:     'CommandName': 'sql elastic-pool create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -s --name --edition --family --capacity --db-min-capacity --db-max-capacity --storage --tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.48.0 (MSI) azsdk-python-mgmt-sql/4.0.0b10 Python/3.10.10 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr?api-version=2022-08-01-preview HTTP/1.1" 200 814
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '814'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '5a266276-d799-49c5-82f8-54978e1dfbd6'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '5755892e-a34d-4ddd-887f-0426abc9afd2'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTUS2:20230922T172845Z:5755892e-a34d-4ddd-887f-0426abc9afd2'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 030FF596B01F465989766413C4AC6C5F Ref B: CO6AA3150217039 Ref C: 2023-09-22T17:28:45Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 22 Sep 2023 17:28:45 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"kind":"v12.0","properties":{"administratorLogin":"CloudSAef71d652","version":"12.0","state":"Ready","fullyQualifiedDomainName":"test-svr.database.windows.net","privateEndpointConnections":[],"minimalTlsVersion":"1.2","publicNetworkAccess":"Disabled","administrators":{"REDACTED": "REDACTED"},"restrictOutboundNetworkAccess":"Disabled","externalGovernanceStatus":"Disabled"},"location":"eastus2","tags":{},"id":"/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr","name":"test-svr","type":"Microsoft.Sql/servers"}
cli.azure.cli.command_modules.sql.custom: _find_elastic_pool_sku_from_capabilities input: {'additional_properties': {}, 'name': None, 'tier': 'GeneralPurpose', 'size': None, 'family': 'Gen5', 'capacity': '4'}
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=SqlManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/kerberos', 'tenant_region_scope': 'WW', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: ae5b8557-087c-4529-b122-b13ad0daf22b
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Sql/locations/eastus2/capabilities?include=supportedElasticPoolEditions&api-version=2020-11-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '7ae94b09-596d-11ee-bac6-c8d9d2225db6'
cli.azure.cli.core.sdk.policies:     'CommandName': 'sql elastic-pool create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -s --name --edition --family --capacity --db-min-capacity --db-max-capacity --storage --tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.48.0 (MSI) azsdk-python-mgmt-sql/4.0.0b10 Python/3.10.10 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Sql/locations/eastus2/capabilities?include=supportedElasticPoolEditions&api-version=2020-11-01-preview HTTP/1.1" 200 570499
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '570499'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '77aedc77-b022-4505-acdb-bc0da9ffa77e'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '3f52f31d-f39f-4559-84a0-1374a484bfce'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTUS2:20230922T172845Z:3f52f31d-f39f-4559-84a0-1374a484bfce'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 7592CF4091C14D79BFCB043512CD1EE0 Ref B: CO6AA3150217031 Ref C: 2023-09-22T17:28:45Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 22 Sep 2023 17:28:45 GMT'
cli.azure.cli.core.sdk.policies: Response content:

// VERY LONG LINE WHICH I WILL PASTE SEPARATELY

cli.azure.cli.command_modules.sql.custom: _assert_capability_available: {'additional_properties': {}, 'name': 'East US 2', 'supported_server_versions': [<azure.mgmt.sql.models._models_py3.ServerVersionCapability object at 0x05978F58>], 'supported_managed_instance_versions': None, 'status': 'Available', 'reason': None}
cli.azure.cli.command_modules.sql.custom: _get_default_capability: [<azure.mgmt.sql.models._models_py3.ServerVersionCapability object at 0x05978F58>]
cli.azure.cli.command_modules.sql.custom: _get_default_capability found default: {'additional_properties': {}, 'name': '12.0', 'supported_editions': None, 'supported_elastic_pool_editions': [<azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978FB8>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978EF8>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978EE0>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05CC08B0>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05991D00>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x06002988>], 'status': 'Default', 'reason': None}
cli.azure.cli.command_modules.sql.custom: _find_edition_capability: {'additional_properties': {}, 'name': None, 'tier': 'GeneralPurpose', 'size': None, 'family': 'Gen5', 'capacity': '4'}; [<azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978FB8>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978EF8>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05978EE0>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05CC08B0>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x05991D00>, <azure.mgmt.sql.models._models_py3.ElasticPoolEditionCapability object at 0x06002988>]
cli.azure.cli.command_modules.sql.custom: _find_performance_level_capability: {'additional_properties': {}, 'name': None, 'tier': 'GeneralPurpose', 'size': None, 'family': 'Gen5', 'capacity': '4'}, [<azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05D1C088>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05D1C970>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F80370>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F80EF8>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F85C40>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F89B20>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F8CCD0>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F900D0>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F936E8>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F9A070>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05F9EC88>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05FA4BF8>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05FABE38>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05FB5418>, <azure.mgmt.sql.models._models_py3.ElasticPoolPerformanceLevelCapability object at 0x05FBD0E8>], allow_reset_family: False, compute_model: None
cli.azure.cli.command_modules.sql.custom: _find_elastic_pool_sku_from_capabilities return: {'additional_properties': {}, 'name': 'GP_Gen5', 'tier': 'GeneralPurpose', 'size': None, 'family': 'Gen5', 'capacity': 4}
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: aaadb5cf-a736-4e21-ba80-7c016bfe8167
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr/elasticPools/test-pool6?api-version=2022-08-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '276'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '7ae94b09-596d-11ee-bac6-c8d9d2225db6'
cli.azure.cli.core.sdk.policies:     'CommandName': 'sql elastic-pool create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -s --name --edition --family --capacity --db-min-capacity --db-max-capacity --storage --tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.48.0 (MSI) azsdk-python-mgmt-sql/4.0.0b10 Python/3.10.10 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"location": "eastus2", "tags": {"CreatedBy": "salvador"}, "sku": {"name": "GP_Gen5", "tier": "GeneralPurpose", "family": "Gen5", "capacity": 4}, "properties": {"maxSizeBytes": 128849018880, "minCapacity": 0.5, "perDatabaseSettings": {"minCapacity": 0.5, "maxCapacity": 2.0}}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr/elasticPools/test-pool6?api-version=2022-08-01-preview HTTP/1.1" 202 79
cli.azure.cli.core.sdk.policies: Response status: 202
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '79'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'Location': 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/locations/eastus2/elasticPoolOperationResults/690d46fc-1ea6-4e86-9420-404b004914b4?api-version=2022-08-01-preview'
cli.azure.cli.core.sdk.policies:     'Retry-After': '15'
cli.azure.cli.core.sdk.policies:     'Azure-AsyncOperation': 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/locations/eastus2/elasticPoolAzureAsyncOperation/690d46fc-1ea6-4e86-9420-404b004914b4?api-version=2022-08-01-preview'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': '690d46fc-1ea6-4e86-9420-404b004914b4'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '3c9eeacc-c326-40fb-bbf5-0ebc449e6c2c'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTUS2:20230922T172847Z:3c9eeacc-c326-40fb-bbf5-0ebc449e6c2c'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 20CE5145DE9C47ACB6F0A9BA846FDD99 Ref B: CO6AA3150219037 Ref C: 2023-09-22T17:28:46Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 22 Sep 2023 17:28:46 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"operation":"CreateLogicalElasticPool","startTime":"2023-09-22T17:28:46.977Z"}
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/locations/eastus2/elasticPoolAzureAsyncOperation/690d46fc-1ea6-4e86-9420-404b004914b4?api-version=2022-08-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'GET'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '7ae94b09-596d-11ee-bac6-c8d9d2225db6'
cli.azure.cli.core.sdk.policies:     'CommandName': 'sql elastic-pool create'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '-g -s --name --edition --family --capacity --db-min-capacity --db-max-capacity --storage --tags --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.48.0 (MSI) azsdk-python-mgmt-sql/4.0.0b10 Python/3.10.10 (Windows-10-10.0.22621-SP0)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/locations/eastus2/elasticPoolAzureAsyncOperation/690d46fc-1ea6-4e86-9420-404b004914b4?api-version=2022-08-01-preview HTTP/1.1" 200 236
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '236'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'Retry-After': '15'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'a6c35e51-85b1-4c44-a379-0319166c7e31'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-reads': '11999'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'cdb0fd66-1629-44e4-922d-4242eae3cde6'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'WESTUS2:20230922T172847Z:cdb0fd66-1629-44e4-922d-4242eae3cde6'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: F5DE78E65609461ABB44504284C143A9 Ref B: CO6AA3150219037 Ref C: 2023-09-22T17:28:47Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 22 Sep 2023 17:28:46 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"name":"690d46fc-1ea6-4e86-9420-404b004914b4","status":"Failed","startTime":"2023-09-22T17:28:46.977Z","error":{"code":"ProvisioningDisabled","message":"The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'"}}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 517, in run
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 557, in _poll
azure.core.polling.base_polling.OperationFailed: Operation failed or canceled

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 705, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/sql/_format.py", line 53, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1013, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 1000, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 255, in result
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 78, in wrapper_use_tracer
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 275, in wait
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/_poller.py", line 192, in _start
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/polling/base_polling.py", line 535, in run
azure.core.exceptions.HttpResponseError: (ProvisioningDisabled) The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
Code: ProvisioningDisabled
Message: The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'

cli.azure.cli.core.azclierror: (ProvisioningDisabled) The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
Code: ProvisioningDisabled
Message: The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
az_command_data_logger: (ProvisioningDisabled) The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
Code: ProvisioningDisabled
Message: The service level objective 'GP_Gen5_4' does not support the min capacity '0.5'
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x04847580>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 3.903 seconds (init: 0.569, invoke: 3.334)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3740 in cache
telemetry.check: Negative: The C:\Users\salvador\.azure\telemetry.txt was modified at 2023-09-22 10:28:00.274122, which in less than 600.000000 s

C:\Users\salvador>

Expected behavior

The command "az sql elastic-pool create" should succeed. The body of the resulting REST API request should only have the PerDatabaseSettings.MinCapacity property set, not the MinCapacity set (i.e., the one outside of PerDatabaseSettings should not be set).

Environment Summary

Note that the same issue is present in version 2.52 but is NOT present in versions 2.47, 2.43, 2.35 and 2.17 (as I confirmed via experiments).

PS C:\Users\saorozco.REDMOND> az --version
azure-cli                         2.48.0 *

core                              2.48.0 *
telemetry                          1.0.8 *

Extensions:
azure-devops                      0.21.0

Dependencies:
msal                              1.20.0
azure-mgmt-resource               22.0.0

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\saorozco.REDMOND\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:05:00) [MSC v.1929 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

You have 3 update(s) available. Consider updating your CLI installation with 'az upgrade'

Additional context

These are some code pointers which I think I relevant:

ElasticPoolCapabilitiesAdditionalDetails in src\azure-cli\azure\cli\command_modules\sql\custom.py self.argument_context('sql elastic-pool create') in src\azure-cli\azure\cli\command_modules\sql_params.py

azure-client-tools-bot-prd[bot] commented 1 year ago

Hi @SOrozco7,

2.48.0 is not the latest Azure CLI(2.52.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 1 year ago

Thank you for opening this issue, we will look into it.

SOrozco7 commented 1 year ago

There was a super long line that was also part of the command executed with the --debug flag but which I couldn't add because of a limit in the character count.

Here's the relevant fragment in the context of this command with the issue and the example I provided.

cli.azure.cli.core.sdk.policies:
{
    "name": "East US 2",
    "supportedServerVersions": [
        {
            "name": "12.0",
            "supportedElasticPoolEditions": [
                {
                    "name": "GeneralPurpose",
                    "supportedElasticPoolPerformanceLevels": [
                        {
                            "performanceLevel": {
                                "value": 4.0,
                                "unit": "VCores"
                            },
                            "sku": {
                                "name": "GP_Gen5",
                                "tier": "GeneralPurpose",
                                "family": "Gen5",
                                "capacity": 4
                            },
                            "supportedLicenseTypes": [
                                {
                                    "name": "LicenseIncluded",
                                    "status": "Default"
                                },
                                {
                                    "name": "BasePrice",
                                    "status": "Available"
                                }
                            ],
                            "maxDatabaseCount": 200,
                            "supportedMaxSizes": [
                                {
                                    "minValue": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 31744,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "logSize": {
                                        "limit": 30,
                                        "unit": "Percent"
                                    },
                                    "status": "Available"
                                },
                                {
                                    "minValue": {
                                        "limit": 32768,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 32768,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 0,
                                        "unit": "Megabytes"
                                    },
                                    "logSize": {
                                        "limit": 30,
                                        "unit": "Percent"
                                    },
                                    "status": "Default"
                                },
                                {
                                    "minValue": {
                                        "limit": 33792,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 774144,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "logSize": {
                                        "limit": 30,
                                        "unit": "Percent"
                                    },
                                    "status": "Available"
                                }
                            ],
                            "supportedPerDatabaseMaxSizes": [
                                {
                                    "minValue": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 31744,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "status": "Available"
                                },
                                {
                                    "minValue": {
                                        "limit": 32768,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 32768,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 0,
                                        "unit": "Megabytes"
                                    },
                                    "status": "Default"
                                },
                                {
                                    "minValue": {
                                        "limit": 33792,
                                        "unit": "Megabytes"
                                    },
                                    "maxValue": {
                                        "limit": 1048576,
                                        "unit": "Megabytes"
                                    },
                                    "scaleSize": {
                                        "limit": 1024,
                                        "unit": "Megabytes"
                                    },
                                    "status": "Available"
                                }
                            ],
                            "supportedPerDatabaseMaxPerformanceLevels": [
                                {
                                    "limit": 0.25,
                                    "unit": "VCores",
                                    "supportedPerDatabaseMinPerformanceLevels": [
                                        {
                                            "limit": 0.0,
                                            "unit": "VCores",
                                            "status": "Default"
                                        },
                                        {
                                            "limit": 0.25,
                                            "unit": "VCores",
                                            "status": "Available"
                                        }
                                    ],
                                    "status": "Available"
                                },
                                {
                                    "limit": 0.5,
                                    "unit": "VCores",
                                    "supportedPerDatabaseMinPerformanceLevels": [
                                        {
                                            "limit": 0.0,
                                            "unit": "VCores",
                                            "status": "Default"
                                        },
                                        {
                                            "limit": 0.25,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 0.5,
                                            "unit": "VCores",
                                            "status": "Available"
                                        }
                                    ],
                                    "status": "Available"
                                },
                                {
                                    "limit": 1.0,
                                    "unit": "VCores",
                                    "supportedPerDatabaseMinPerformanceLevels": [
                                        {
                                            "limit": 0.0,
                                            "unit": "VCores",
                                            "status": "Default"
                                        },
                                        {
                                            "limit": 0.25,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 0.5,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 1.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        }
                                    ],
                                    "status": "Available"
                                },
                                {
                                    "limit": 2.0,
                                    "unit": "VCores",
                                    "supportedPerDatabaseMinPerformanceLevels": [
                                        {
                                            "limit": 0.0,
                                            "unit": "VCores",
                                            "status": "Default"
                                        },
                                        {
                                            "limit": 0.25,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 0.5,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 1.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 2.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        }
                                    ],
                                    "status": "Available"
                                },
                                {
                                    "limit": 4.0,
                                    "unit": "VCores",
                                    "supportedPerDatabaseMinPerformanceLevels": [
                                        {
                                            "limit": 0.0,
                                            "unit": "VCores",
                                            "status": "Default"
                                        },
                                        {
                                            "limit": 0.25,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 0.5,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 1.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 2.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        },
                                        {
                                            "limit": 4.0,
                                            "unit": "VCores",
                                            "status": "Available"
                                        }
                                    ],
                                    "status": "Default"
                                }
                            ],
                            "zoneRedundant": true,
                            "supportedMaintenanceConfigurations": [
                                {
                                    "name": "SQL_Default",
                                    "zoneRedundant": true,
                                    "status": "Default"
                                },
                                {
                                    "name": "SQL_EastUS2_DB_1",
                                    "zoneRedundant": true,
                                    "status": "Available"
                                },
                                {
                                    "name": "SQL_EastUS2_DB_2",
                                    "zoneRedundant": true,
                                    "status": "Available"
                                }
                            ],
                            "status": "Available"
                        }
                    ]
                }
            ]
        }
    ]
}
SOrozco7 commented 1 year ago

See how the "az sql elastic-pool update" command DOES NOT have this issue (i.e., the pool-level minCapacity is not set).

C:\Users\salvador>az sql elastic-pool update -g test-rg -s test-svr --name test-pool6 --db-min-capacity 0.5
{
  "availabilityZone": "NoPreference",
  "creationDate": "2023-09-22T19:31:41.963000+00:00",
  "databaseDtuMax": null,
  "databaseDtuMin": null,
  "dtu": null,
  "edition": "GeneralPurpose",
  "highAvailabilityReplicaCount": null,
  "id": "/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/test-rg/providers/Microsoft.Sql/servers/test-svr/elasticPools/test-pool6",
  "kind": "vcore,pool",
  "licenseType": "LicenseIncluded",
  "location": "eastus2",
  "maintenanceConfigurationId": "/subscriptions/<SUBSCRIPTION_ID>/providers/Microsoft.Maintenance/publicMaintenanceConfigurations/SQL_Default",
  "maxSizeBytes": 128849018880,
  "minCapacity": null,
  "name": "test-pool6",
  "perDatabaseSettings": {
    "maxCapacity": 2.0,
    "minCapacity": 0.5
  },
  "preferredEnclaveType": null,
  "resourceGroup": "test-rg",
  "sku": {
    "capacity": 4,
    "family": "Gen5",
    "name": "GP_Gen5",
    "size": null,
    "tier": "GeneralPurpose"
  },
  "state": "Ready",
  "storageMb": 122880.0,
  "type": "Microsoft.Sql/servers/elasticPools",
  "zoneRedundant": false
}
microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @azureSQLGitHub.