Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 1.1.0b1 (2025-11-19)

### Features Added

- Model `HighAvailability` added property `replication_mode`
- Model `Server` added property `lower_case_table_names`
- Enum `ServerVersion` added member `EIGHT4`
- Added enum `ReplicationMode`
- Operation group `LongRunningBackupOperations` added method `begin_delete`

## 1.0.0 (2025-11-07)

### Features Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"apiVersion": "2024-12-30",
"commit": "7931e3df0b3a23b5b32db9ce3fed184de841680b",
"apiVersion": "2025-06-01-preview",
"commit": "b61ac84b569118b89c1ebce6bdb94600c58e1066",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/mysql/resource-manager/Microsoft.DBforMySQL/FlexibleServers",
"emitterVersion": "0.53.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"azure.mgmt.mysqlflexibleservers.models.StorageRedundancyEnum": null,
"azure.mgmt.mysqlflexibleservers.models.HighAvailabilityMode": null,
"azure.mgmt.mysqlflexibleservers.models.HighAvailabilityState": null,
"azure.mgmt.mysqlflexibleservers.models.ReplicationMode": null,
"azure.mgmt.mysqlflexibleservers.models.PatchStrategy": null,
"azure.mgmt.mysqlflexibleservers.models.BatchOfMaintenance": null,
"azure.mgmt.mysqlflexibleservers.models.ImportSourceStorageType": null,
Expand Down Expand Up @@ -202,6 +203,8 @@
"azure.mgmt.mysqlflexibleservers.aio.operations.LongRunningBackupsOperations.get": null,
"azure.mgmt.mysqlflexibleservers.operations.LongRunningBackupOperations.begin_create": null,
"azure.mgmt.mysqlflexibleservers.aio.operations.LongRunningBackupOperations.begin_create": null,
"azure.mgmt.mysqlflexibleservers.operations.LongRunningBackupOperations.begin_delete": null,
"azure.mgmt.mysqlflexibleservers.aio.operations.LongRunningBackupOperations.begin_delete": null,
"azure.mgmt.mysqlflexibleservers.operations.ConfigurationsOperations.list_by_server": null,
"azure.mgmt.mysqlflexibleservers.aio.operations.ConfigurationsOperations.list_by_server": null,
"azure.mgmt.mysqlflexibleservers.operations.ConfigurationsOperations.get": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class MySQLManagementClientConfiguration: # pylint: disable=too-many-instance-a
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2024-12-30". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2025-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -43,7 +43,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2024-12-30")
api_version: str = kwargs.pop("api_version", "2025-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class MySQLManagementClient: # pylint: disable=too-many-instance-attributes
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2024-12-30". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2025-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0"
VERSION = "1.1.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class MySQLManagementClientConfiguration: # pylint: disable=too-many-instance-a
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2024-12-30". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2025-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
"""

Expand All @@ -43,7 +43,7 @@ def __init__(
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2024-12-30")
api_version: str = kwargs.pop("api_version", "2025-06-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class MySQLManagementClient: # pylint: disable=too-many-instance-attributes
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2024-12-30". Note that overriding this
default value may result in unsupported behavior.
:keyword api_version: Api Version. Default value is "2025-06-01-preview". Note that overriding
this default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Retry-After header is present.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

from ... import models as _models
from ..._utils.serialization import Deserializer, Serializer
from ...operations._long_running_backup_operations import build_create_request
from ...operations._long_running_backup_operations import build_create_request, build_delete_request
from .._configuration import MySQLManagementClientConfiguration

T = TypeVar("T")
Expand Down Expand Up @@ -285,3 +285,123 @@ def get_long_running_output(pipeline_response):
return AsyncLROPoller[_models.ServerBackupV2](
self._client, raw_result, get_long_running_output, polling_method # type: ignore
)

async def _delete_initial(
self, resource_group_name: str, server_name: str, backup_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)

_request = build_delete_request(
resource_group_name=resource_group_name,
server_name=server_name,
backup_name=backup_name,
subscription_id=self._config.subscription_id,
api_version=api_version,
headers=_headers,
params=_params,
)
_request.url = self._client.format_url(_request.url)

_decompress = kwargs.pop("decompress", True)
_stream = True
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
_request, stream=_stream, **kwargs
)

response = pipeline_response.http_response

if response.status_code not in [202, 204]:
try:
await response.read() # Load the body in memory and close the socket
except (StreamConsumedError, StreamClosedError):
pass
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(
_models.ErrorResponse,
pipeline_response,
)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore

return deserialized # type: ignore

@distributed_trace_async
async def begin_delete(
self, resource_group_name: str, server_name: str, backup_name: str, **kwargs: Any
) -> AsyncLROPoller[None]:
"""Delete backup for a given server with specified backup name.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param server_name: The name of the server. Required.
:type server_name: str
:param backup_name: The name of the backup. Required.
:type backup_name: str
:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[None]
:raises ~azure.core.exceptions.HttpResponseError:
"""
_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[None] = kwargs.pop("cls", None)
polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
cont_token: Optional[str] = kwargs.pop("continuation_token", None)
if cont_token is None:
raw_result = await self._delete_initial(
resource_group_name=resource_group_name,
server_name=server_name,
backup_name=backup_name,
api_version=api_version,
cls=lambda x, y, z: x,
headers=_headers,
params=_params,
**kwargs
)
await raw_result.http_response.read() # type: ignore
kwargs.pop("error_map", None)

def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
if cls:
return cls(pipeline_response, None, {}) # type: ignore

if polling is True:
polling_method: AsyncPollingMethod = cast(
AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
)
elif polling is False:
polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
else:
polling_method = polling
if cont_token:
return AsyncLROPoller[None].from_continuation_token(
polling_method=polling_method,
continuation_token=cont_token,
client=self._client,
deserialization_callback=get_long_running_output,
)
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@
PrivateEndpointConnectionProvisioningState,
PrivateEndpointServiceConnectionStatus,
ProvisioningState,
ReplicationMode,
ReplicationRole,
ResetAllToDefault,
ServerSkuTier,
Expand Down Expand Up @@ -263,6 +264,7 @@
"PrivateEndpointConnectionProvisioningState",
"PrivateEndpointServiceConnectionStatus",
"ProvisioningState",
"ReplicationMode",
"ReplicationRole",
"ResetAllToDefault",
"ServerSkuTier",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1486,6 +1486,9 @@ class HighAvailability(_serialization.Model):
:vartype state: str or ~azure.mgmt.mysqlflexibleservers.models.HighAvailabilityState
:ivar standby_availability_zone: Availability zone of the standby server.
:vartype standby_availability_zone: str
:ivar replication_mode: HA Replication mode for a server. Known values are: "BinaryLog" and
"RedoLog".
:vartype replication_mode: str or ~azure.mgmt.mysqlflexibleservers.models.ReplicationMode
"""

_validation = {
Expand All @@ -1496,13 +1499,15 @@ class HighAvailability(_serialization.Model):
"mode": {"key": "mode", "type": "str"},
"state": {"key": "state", "type": "str"},
"standby_availability_zone": {"key": "standbyAvailabilityZone", "type": "str"},
"replication_mode": {"key": "replicationMode", "type": "str"},
}

def __init__(
self,
*,
mode: Optional[Union[str, "_models.HighAvailabilityMode"]] = None,
standby_availability_zone: Optional[str] = None,
replication_mode: Optional[Union[str, "_models.ReplicationMode"]] = None,
**kwargs: Any
) -> None:
"""
Expand All @@ -1511,11 +1516,15 @@ def __init__(
:paramtype mode: str or ~azure.mgmt.mysqlflexibleservers.models.HighAvailabilityMode
:keyword standby_availability_zone: Availability zone of the standby server.
:paramtype standby_availability_zone: str
:keyword replication_mode: HA Replication mode for a server. Known values are: "BinaryLog" and
"RedoLog".
:paramtype replication_mode: str or ~azure.mgmt.mysqlflexibleservers.models.ReplicationMode
"""
super().__init__(**kwargs)
self.mode = mode
self.state: Optional[Union[str, "_models.HighAvailabilityState"]] = None
self.standby_availability_zone = standby_availability_zone
self.replication_mode = replication_mode


class HighAvailabilityValidationEstimation(_serialization.Model):
Expand Down Expand Up @@ -2911,7 +2920,7 @@ class Server(TrackedResource):
server creation).
:vartype administrator_login_password: str
:ivar version: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL
5.7. Known values are: "5.7" and "8.0.21".
5.7. Known values are: "5.7", "8.0.21", and "8.4".
:vartype version: str or ~azure.mgmt.mysqlflexibleservers.models.ServerVersion
:ivar full_version: Major version and actual engine version.
:vartype full_version: str
Expand Down Expand Up @@ -2960,6 +2969,9 @@ class Server(TrackedResource):
:ivar import_source_properties: Source properties for import from storage.
:vartype import_source_properties:
~azure.mgmt.mysqlflexibleservers.models.ImportSourceProperties
:ivar lower_case_table_names: The mysql parameter lower_case_table_names. Can only be specified
when the server is being created. Allowed values 1 or 2.
:vartype lower_case_table_names: int
"""

_validation = {
Expand Down Expand Up @@ -3009,6 +3021,7 @@ class Server(TrackedResource):
"maintenance_policy": {"key": "properties.maintenancePolicy", "type": "MaintenancePolicy"},
"maintenance_window": {"key": "properties.maintenanceWindow", "type": "MaintenanceWindow"},
"import_source_properties": {"key": "properties.importSourceProperties", "type": "ImportSourceProperties"},
"lower_case_table_names": {"key": "properties.lowerCaseTableNames", "type": "int"},
}

def __init__( # pylint: disable=too-many-locals
Expand All @@ -3035,6 +3048,7 @@ def __init__( # pylint: disable=too-many-locals
maintenance_policy: Optional["_models.MaintenancePolicy"] = None,
maintenance_window: Optional["_models.MaintenanceWindow"] = None,
import_source_properties: Optional["_models.ImportSourceProperties"] = None,
lower_case_table_names: Optional[int] = None,
**kwargs: Any
) -> None:
"""
Expand All @@ -3053,7 +3067,7 @@ def __init__( # pylint: disable=too-many-locals
server creation).
:paramtype administrator_login_password: str
:keyword version: Major version of MySQL. 8.0.21 stands for MySQL 8.0, 5.7.44 stands for MySQL
5.7. Known values are: "5.7" and "8.0.21".
5.7. Known values are: "5.7", "8.0.21", and "8.4".
:paramtype version: str or ~azure.mgmt.mysqlflexibleservers.models.ServerVersion
:keyword availability_zone: availability Zone information of the server.
:paramtype availability_zone: str
Expand Down Expand Up @@ -3090,6 +3104,9 @@ def __init__( # pylint: disable=too-many-locals
:keyword import_source_properties: Source properties for import from storage.
:paramtype import_source_properties:
~azure.mgmt.mysqlflexibleservers.models.ImportSourceProperties
:keyword lower_case_table_names: The mysql parameter lower_case_table_names. Can only be
specified when the server is being created. Allowed values 1 or 2.
:paramtype lower_case_table_names: int
"""
super().__init__(tags=tags, location=location, **kwargs)
self.identity = identity
Expand All @@ -3116,6 +3133,7 @@ def __init__( # pylint: disable=too-many-locals
self.maintenance_policy = maintenance_policy
self.maintenance_window = maintenance_window
self.import_source_properties = import_source_properties
self.lower_case_table_names = lower_case_table_names


class ServerBackup(ProxyResource):
Expand Down Expand Up @@ -3430,7 +3448,7 @@ class ServerForUpdate(_serialization.Model):
:vartype tags: dict[str, str]
:ivar administrator_login_password: The password of the administrator login.
:vartype administrator_login_password: str
:ivar version: Server version. Known values are: "5.7" and "8.0.21".
:ivar version: Server version. Known values are: "5.7", "8.0.21", and "8.4".
:vartype version: str or ~azure.mgmt.mysqlflexibleservers.models.ServerVersion
:ivar storage: Storage related properties of a server.
:vartype storage: ~azure.mgmt.mysqlflexibleservers.models.Storage
Expand Down Expand Up @@ -3494,7 +3512,7 @@ def __init__(
:paramtype tags: dict[str, str]
:keyword administrator_login_password: The password of the administrator login.
:paramtype administrator_login_password: str
:keyword version: Server version. Known values are: "5.7" and "8.0.21".
:keyword version: Server version. Known values are: "5.7", "8.0.21", and "8.4".
:paramtype version: str or ~azure.mgmt.mysqlflexibleservers.models.ServerVersion
:keyword storage: Storage related properties of a server.
:paramtype storage: ~azure.mgmt.mysqlflexibleservers.models.Storage
Expand Down
Loading