Skip to content

Commit 2b293f3

Browse files
[AutoRelease] t2-postgresqlflexibleservers-2025-05-09-34216(can only be merged by SDK owner) (#40995)
* code and test * Update CHANGELOG.md * Update _version.py * update testcases --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
1 parent 115ef41 commit 2b293f3

File tree

178 files changed

+6064
-1225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+6064
-1225
lines changed

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/CHANGELOG.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,63 @@
11
# Release History
22

3+
## 1.2.0b1 (2025-05-19)
4+
5+
### Features Added
6+
7+
- Client `PostgreSQLManagementClient` added operation group `quota_usages`
8+
- Client `PostgreSQLManagementClient` added operation group `tuning_options`
9+
- Client `PostgreSQLManagementClient` added operation group `tuning_index`
10+
- Client `PostgreSQLManagementClient` added operation group `tuning_configuration`
11+
- Model `FlexibleServerCapability` added property `supported_features`
12+
- Model `Server` added property `cluster`
13+
- Model `ServerForUpdate` added property `cluster`
14+
- Model `ServerSkuCapability` added property `supported_features`
15+
- Model `ServerSkuCapability` added property `security_profile`
16+
- Enum `ServerState` added member `INACCESSIBLE`
17+
- Enum `ServerState` added member `PROVISIONING`
18+
- Enum `ServerState` added member `RESTARTING`
19+
- Enum `ServerVersion` added member `SEVENTEEN`
20+
- Model `ServerVersionCapability` added property `supported_features`
21+
- Enum `SourceType` added member `APSARA_DB_RDS`
22+
- Enum `SourceType` added member `CRUNCHY_POSTGRE_SQL`
23+
- Enum `SourceType` added member `DIGITAL_OCEAN_DROPLETS`
24+
- Enum `SourceType` added member `DIGITAL_OCEAN_POSTGRE_SQL`
25+
- Enum `SourceType` added member `EDB_ORACLE_SERVER`
26+
- Enum `SourceType` added member `EDB_POSTGRE_SQL`
27+
- Enum `SourceType` added member `HEROKU_POSTGRE_SQL`
28+
- Enum `SourceType` added member `HUAWEI_COMPUTE`
29+
- Enum `SourceType` added member `HUAWEI_RDS`
30+
- Enum `SourceType` added member `POSTGRE_SQL_COSMOS_DB`
31+
- Enum `SourceType` added member `POSTGRE_SQL_FLEXIBLE_SERVER`
32+
- Enum `SourceType` added member `SUPABASE_POSTGRE_SQL`
33+
- Enum `StorageType` added member `ULTRA_SSD_LRS`
34+
- Added model `Cluster`
35+
- Added model `ConfigTuningRequestParameter`
36+
- Added model `ImpactRecord`
37+
- Added model `IndexRecommendationDetails`
38+
- Added model `IndexRecommendationListResult`
39+
- Added model `IndexRecommendationResource`
40+
- Added model `IndexRecommendationResourcePropertiesAnalyzedWorkload`
41+
- Added model `IndexRecommendationResourcePropertiesImplementationDetails`
42+
- Added model `NameProperty`
43+
- Added model `QuotaUsage`
44+
- Added model `QuotaUsagesListResult`
45+
- Added enum `RecommendationType`
46+
- Added enum `RecommendationTypeEnum`
47+
- Added model `SessionDetailsListResult`
48+
- Added model `SessionDetailsResource`
49+
- Added model `SessionResource`
50+
- Added model `SessionsListResult`
51+
- Added model `SupportedFeature`
52+
- Added enum `SupportedFeatureStatusEnum`
53+
- Added enum `TuningOptionEnum`
54+
- Added model `TuningOptionsListResult`
55+
- Added model `TuningOptionsResource`
56+
- Added operation group `QuotaUsagesOperations`
57+
- Added operation group `TuningConfigurationOperations`
58+
- Added operation group `TuningIndexOperations`
59+
- Added operation group `TuningOptionsOperations`
60+
361
## 1.1.0 (2025-03-24)
462

563
### Features Added

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Postgresqlflexibleservers Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "3e3c5985e6790e1ecbd3bd056663b753267d58c6",
2+
"commit": "761d8b58e465b26eddb8ad70dda3cde7b4228bdf",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.34.1",
77
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/postgresql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-flexibleserver-2024-08-01 --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/postgresql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-flexibleserver-2025-01-01-preview --use=@autorest/python@6.34.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/postgresql/resource-manager/readme.md"
1111
}

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_configuration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ class PostgreSQLManagementClientConfiguration: # pylint: disable=too-many-insta
2727
:type credential: ~azure.core.credentials.TokenCredential
2828
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
2929
:type subscription_id: str
30-
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
31-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2025-01-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3232
:paramtype api_version: str
3333
"""
3434

3535
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
36-
api_version: str = kwargs.pop("api_version", "2024-08-01")
36+
api_version: str = kwargs.pop("api_version", "2025-01-01-preview")
3737

3838
if credential is None:
3939
raise ValueError("Parameter 'credential' must not be None.")

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/_postgre_sql_management_client.py

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import PostgreSQLManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
AdministratorsOperations,
2325
BackupsOperations,
@@ -37,10 +39,14 @@
3739
PrivateEndpointConnectionOperations,
3840
PrivateEndpointConnectionsOperations,
3941
PrivateLinkResourcesOperations,
42+
QuotaUsagesOperations,
4043
ReplicasOperations,
4144
ServerCapabilitiesOperations,
4245
ServerThreatProtectionSettingsOperations,
4346
ServersOperations,
47+
TuningConfigurationOperations,
48+
TuningIndexOperations,
49+
TuningOptionsOperations,
4450
VirtualEndpointsOperations,
4551
VirtualNetworkSubnetUsageOperations,
4652
)
@@ -106,13 +112,23 @@ class PostgreSQLManagementClient(
106112
:ivar private_link_resources: PrivateLinkResourcesOperations operations
107113
:vartype private_link_resources:
108114
azure.mgmt.postgresqlflexibleservers.operations.PrivateLinkResourcesOperations
115+
:ivar quota_usages: QuotaUsagesOperations operations
116+
:vartype quota_usages: azure.mgmt.postgresqlflexibleservers.operations.QuotaUsagesOperations
109117
:ivar replicas: ReplicasOperations operations
110118
:vartype replicas: azure.mgmt.postgresqlflexibleservers.operations.ReplicasOperations
111119
:ivar log_files: LogFilesOperations operations
112120
:vartype log_files: azure.mgmt.postgresqlflexibleservers.operations.LogFilesOperations
113121
:ivar server_threat_protection_settings: ServerThreatProtectionSettingsOperations operations
114122
:vartype server_threat_protection_settings:
115123
azure.mgmt.postgresqlflexibleservers.operations.ServerThreatProtectionSettingsOperations
124+
:ivar tuning_options: TuningOptionsOperations operations
125+
:vartype tuning_options:
126+
azure.mgmt.postgresqlflexibleservers.operations.TuningOptionsOperations
127+
:ivar tuning_index: TuningIndexOperations operations
128+
:vartype tuning_index: azure.mgmt.postgresqlflexibleservers.operations.TuningIndexOperations
129+
:ivar tuning_configuration: TuningConfigurationOperations operations
130+
:vartype tuning_configuration:
131+
azure.mgmt.postgresqlflexibleservers.operations.TuningConfigurationOperations
116132
:ivar virtual_endpoints: VirtualEndpointsOperations operations
117133
:vartype virtual_endpoints:
118134
azure.mgmt.postgresqlflexibleservers.operations.VirtualEndpointsOperations
@@ -123,25 +139,27 @@ class PostgreSQLManagementClient(
123139
:type credential: ~azure.core.credentials.TokenCredential
124140
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
125141
:type subscription_id: str
126-
:param base_url: Service URL. Default value is "https://management.azure.com".
142+
:param base_url: Service URL. Default value is None.
127143
:type base_url: str
128-
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
129-
default value may result in unsupported behavior.
144+
:keyword api_version: Api Version. Default value is "2025-01-01-preview". Note that overriding
145+
this default value may result in unsupported behavior.
130146
:paramtype api_version: str
131147
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
132148
Retry-After header is present.
133149
"""
134150

135151
def __init__(
136-
self,
137-
credential: "TokenCredential",
138-
subscription_id: str,
139-
base_url: str = "https://management.azure.com",
140-
**kwargs: Any
152+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
141153
) -> None:
154+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
155+
_endpoints = get_arm_endpoints(_cloud)
156+
if not base_url:
157+
base_url = _endpoints["resource_manager"]
158+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
142159
self._config = PostgreSQLManagementClientConfiguration(
143-
credential=credential, subscription_id=subscription_id, **kwargs
160+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
144161
)
162+
145163
_policies = kwargs.pop("policies", None)
146164
if _policies is None:
147165
_policies = [
@@ -160,7 +178,7 @@ def __init__(
160178
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
161179
self._config.http_logging_policy,
162180
]
163-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
181+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
164182

165183
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
166184
self._serialize = Serializer(client_models)
@@ -202,11 +220,17 @@ def __init__(
202220
self.private_link_resources = PrivateLinkResourcesOperations(
203221
self._client, self._config, self._serialize, self._deserialize
204222
)
223+
self.quota_usages = QuotaUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
205224
self.replicas = ReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
206225
self.log_files = LogFilesOperations(self._client, self._config, self._serialize, self._deserialize)
207226
self.server_threat_protection_settings = ServerThreatProtectionSettingsOperations(
208227
self._client, self._config, self._serialize, self._deserialize
209228
)
229+
self.tuning_options = TuningOptionsOperations(self._client, self._config, self._serialize, self._deserialize)
230+
self.tuning_index = TuningIndexOperations(self._client, self._config, self._serialize, self._deserialize)
231+
self.tuning_configuration = TuningConfigurationOperations(
232+
self._client, self._config, self._serialize, self._deserialize
233+
)
210234
self.virtual_endpoints = VirtualEndpointsOperations(
211235
self._client, self._config, self._serialize, self._deserialize
212236
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)