Describe the bug
Enabling/disabling the Avanced Thread Protection Setting on a MySQL flexible server results in an error.
Related command
az mysql flexible-server advanced-threat-protection-setting update --state
Errors
(InvalidParameterValue) Invalid value given for parameter Properties. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Properties. Specify a valid parameter value.
Issue script & Debug output
RESOURCE_GROUP_NAME="rg-mysql-bats-${RANDOM}"
SERVER_NAME="mysql-bats-${RANDOM}"
LOCATION="westeurope"
ADMIN_LOGIN="mysqladmin"
ADMIN_PASSWORD="P@ssw0rd2024!"
az group create --name "$RESOURCE_GROUP_NAME" --location "$LOCATION"
az mysql flexible-server create \
--name "$SERVER_NAME" \
--resource-group "$RESOURCE_GROUP_NAME" \
--location "$LOCATION" \
--admin-user "$ADMIN_LOGIN" \
--admin-password "$ADMIN_PASSWORD" \
--sku-name "Standard_B1ms" \
--tier "Burstable" \
--version "8.0.21" \
--storage-size "32" \
--public-access "Enabled"
az mysql flexible-server advanced-threat-protection-setting update --resource-group "$RESOURCE_GROUP_NAME" --name "$SERVER_NAME" --state Enabled --debug
cli.knack.cli: Command arguments: ['mysql', 'flexible-server', 'advanced-threat-protection-setting', 'update', '--resource-group', 'rg-mysql-bats-4263', '--name', 'mysql-bats-17206', '--state', 'Enabled', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7a8e9c4a6da0>, <function OutputProducer.on_global_arguments at 0x7a8e9c3cc0f0>, <function CLIQuery.on_global_arguments at 0x7a8e9c3fe820>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Using packaged command index for profile 'latest'.
cli.azure.cli.core: Found installed extension 'aks-preview' (azext_aks_preview).
cli.azure.cli.core: Blending packaged core index with local extension index.
cli.azure.cli.core: Modules found from index for 'mysql': ['azure.cli.command_modules.mysql', 'azure.cli.command_modules.rdbms']
cli.azure.cli.core: Loading command modules...
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: mysql 0.240 17 59
cli.azure.cli.core: rdbms 0.036 22 90
cli.azure.cli.core: Loaded command modules:
cli.azure.cli.core: Total (2) 0.277 39 149
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 38 groups, 149 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : mysql flexible-server advanced-threat-protection-setting update
cli.azure.cli.core: Command table: mysql flexible-server advanced-threat-protection-setting update
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7a8e9c1e0040>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/.../.azure/commands/2026-08-04.08-58-57.mysql_flexible-server_advanced-threat-protection-setting_update.63707.log'.
az_command_data_logger: command args: mysql flexible-server advanced-threat-protection-setting update --resource-group {} --name {} --state {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7a8e9c1fd900>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7a8e9c1fd9b0>, <function register_global_policy_argument.<locals>.add_global_policy_argument at 0x7a8e9bfd8bf0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7a8e9bfd8ca0>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7a8e9bfd8d50>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7a8e9c3cc1a0>, <function CLIQuery.handle_query_parameter at 0x7a8e9c3fe8d0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7a8e9bfd8b40>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=MySQLManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/.../.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/.../.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.application: Broker enabled? None
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token_info: scopes=('https://management.core.windows.net//.default',), options={}
cli.azure.cli.core.auth.msal_credentials: UserCredential.acquire_token: scopes=['https://management.core.windows.net//.default'], claims_challenge=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: c34ba57f-6d92-4351-adc1-1cbc331c434f
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/.../resourceGroups/rg-mysql-bats-4263/providers/Microsoft.DBforMySQL/flexibleServers/mysql-bats-17206/advancedThreatProtectionSettings/Default?api-version=2025-06-01-preview'
cli.azure.cli.core.sdk.policies: Request method: 'PATCH'
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': '20'
cli.azure.cli.core.sdk.policies: 'Accept': 'application/json'
cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'f65d1fba-8fd1-11f1-8000-44fa6657c1c3'
cli.azure.cli.core.sdk.policies: 'CommandName': 'mysql flexible-server advanced-threat-protection-setting update'
cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --name --state --debug'
cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.89.0 (DEB) azsdk-python-core/1.39.0 Python/3.14.6 (Linux-6.17.0-41-generic-x86_64-with-glibc2.42)'
cli.azure.cli.core.sdk.policies: 'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"state": "Enabled"}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PATCH /subscriptions/.../resourceGroups/rg-mysql-bats-4263/providers/Microsoft.DBforMySQL/flexibleServers/mysql-bats-17206/advancedThreatProtectionSettings/Default?api-version=2025-06-01-preview HTTP/1.1" 400 133
cli.azure.cli.core.sdk.policies: Response status: 400
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': '133'
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-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'f486f753-5ab5-4609-aa99-8c8b4b297455'
cli.azure.cli.core.sdk.policies: 'x-ms-operation-identifier': 'tenantId=24083153-e8cb-43bf-a098-be24dc3668f7,objectId=93d12842-7e4c-4c1a-8c40-567d2bc69a61/westeurope/75f70525-ea53-4283-8fa6-51de172ec307'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '199'
cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-global-writes': '2999'
cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '31534a55-e3ef-44e5-a9e0-4a4532c57d30'
cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTEUROPE:20260804T085858Z:31534a55-e3ef-44e5-a9e0-4a4532c57d30'
cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: CD770C675D8041ACA9269292A36E4E36 Ref B: VIEAA3060308029 Ref C: 2026-08-04T08:58:57Z'
cli.azure.cli.core.sdk.policies: 'Date': 'Tue, 04 Aug 2026 08:58:58 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: Body is streamable
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/opt/az/lib/python3.14/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.14/site-packages/azure/cli/core/commands/__init__.py", line 677, in execute
raise ex
File "/opt/az/lib/python3.14/site-packages/azure/cli/core/commands/__init__.py", line 820, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.14/site-packages/azure/cli/core/commands/__init__.py", line 789, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.14/site-packages/azure/cli/core/commands/__init__.py", line 335, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.14/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/opt/az/lib/python3.14/site-packages/azure/cli/command_modules/mysql/custom.py", line 52, in flexible_server_advanced_threat_protection_update
return client.begin_update(resource_group_name, server_name, models.AdvancedThreatProtectionName.DEFAULT.value, parameters)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/az/lib/python3.14/site-packages/azure/core/tracing/decorator.py", line 119, in wrapper_use_tracer
return func(*args, **kwargs)
File "/opt/az/lib/python3.14/site-packages/azure/mgmt/mysqlflexibleservers/operations/_operations.py", line 9080, in begin_update
raw_result = self._update_initial(
resource_group_name=resource_group_name,
...<7 lines>...
**kwargs
)
File "/opt/az/lib/python3.14/site-packages/azure/mgmt/mysqlflexibleservers/operations/_operations.py", line 8923, in _update_initial
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (InvalidParameterValue) Invalid value given for parameter Properties. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Properties. Specify a valid parameter value.
cli.azure.cli.core.azclierror: (InvalidParameterValue) Invalid value given for parameter Properties. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Properties. Specify a valid parameter value.
az_command_data_logger: (InvalidParameterValue) Invalid value given for parameter Properties. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Properties. Specify a valid parameter value.
Expected behavior
No error. This used to work correctly in the previous version.
Environment Summary
azure-cli 2.89.0
core 2.89.0
telemetry 1.1.0
Extensions:
aks-preview 21.0.0b13
application-insights 1.2.3
cdn 1.0.0b2
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/opt/az/bin/python3'
Config directory '/home/.../.azure'
Extensions directory '/home/.../.azure/cliextensions'
Python (Linux) 3.14.6 (main, Jul 28 2026, 12:34:03) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response
Describe the bug
Enabling/disabling the Avanced Thread Protection Setting on a MySQL flexible server results in an error.
Related command
az mysql flexible-server advanced-threat-protection-setting update --state
Errors
(InvalidParameterValue) Invalid value given for parameter Properties. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Properties. Specify a valid parameter value.
Issue script & Debug output
Expected behavior
No error. This used to work correctly in the previous version.
Environment Summary
azure-cli 2.89.0
core 2.89.0
telemetry 1.1.0
Extensions:
aks-preview 21.0.0b13
application-insights 1.2.3
cdn 1.0.0b2
Dependencies:
msal 1.36.0
azure-mgmt-resource 24.0.0
Python location '/opt/az/bin/python3'
Config directory '/home/.../.azure'
Extensions directory '/home/.../.azure/cliextensions'
Python (Linux) 3.14.6 (main, Jul 28 2026, 12:34:03) [GCC 13.3.0]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
Additional context
No response