Skip to content

Commit d891747

Browse files
authored
code and test (Azure#40209)
Co-authored-by: azure-sdk <PythonSdkPipelines>
1 parent f34be7a commit d891747

File tree

138 files changed

+237
-2297
lines changed

Some content is hidden

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

138 files changed

+237
-2297
lines changed

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

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

3+
## 1.1.0 (2025-03-24)
4+
5+
### Features Added
6+
7+
- Enum `IdentityType` added member `SYSTEM_ASSIGNED`
8+
- Enum `IdentityType` added member `SYSTEM_ASSIGNED_USER_ASSIGNED`
9+
- Model `UserAssignedIdentity` added property `principal_id`
10+
311
## 1.1.0b2 (2024-12-16)
412

513
### Features Added
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "f3245a566562790a4a0229cb53761fd1c4125e33",
2+
"commit": "3e3c5985e6790e1ecbd3bd056663b753267d58c6",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.26.4",
6+
"@autorest/python@6.27.4",
77
"@autorest/[email protected]"
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-11-01-preview --use=@autorest/python@6.26.4 --use=@autorest/[email protected] --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-2024-08-01 --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --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-11-01-preview". Note that overriding
31-
this default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
31+
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-11-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2024-08-01")
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: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@
3737
PrivateEndpointConnectionOperations,
3838
PrivateEndpointConnectionsOperations,
3939
PrivateLinkResourcesOperations,
40-
QuotaUsagesOperations,
4140
ReplicasOperations,
4241
ServerCapabilitiesOperations,
4342
ServerThreatProtectionSettingsOperations,
4443
ServersOperations,
45-
TuningOptionsOperations,
4644
VirtualEndpointsOperations,
4745
VirtualNetworkSubnetUsageOperations,
4846
)
@@ -108,18 +106,13 @@ class PostgreSQLManagementClient(
108106
:ivar private_link_resources: PrivateLinkResourcesOperations operations
109107
:vartype private_link_resources:
110108
azure.mgmt.postgresqlflexibleservers.operations.PrivateLinkResourcesOperations
111-
:ivar quota_usages: QuotaUsagesOperations operations
112-
:vartype quota_usages: azure.mgmt.postgresqlflexibleservers.operations.QuotaUsagesOperations
113109
:ivar replicas: ReplicasOperations operations
114110
:vartype replicas: azure.mgmt.postgresqlflexibleservers.operations.ReplicasOperations
115111
:ivar log_files: LogFilesOperations operations
116112
:vartype log_files: azure.mgmt.postgresqlflexibleservers.operations.LogFilesOperations
117113
:ivar server_threat_protection_settings: ServerThreatProtectionSettingsOperations operations
118114
:vartype server_threat_protection_settings:
119115
azure.mgmt.postgresqlflexibleservers.operations.ServerThreatProtectionSettingsOperations
120-
:ivar tuning_options: TuningOptionsOperations operations
121-
:vartype tuning_options:
122-
azure.mgmt.postgresqlflexibleservers.operations.TuningOptionsOperations
123116
:ivar virtual_endpoints: VirtualEndpointsOperations operations
124117
:vartype virtual_endpoints:
125118
azure.mgmt.postgresqlflexibleservers.operations.VirtualEndpointsOperations
@@ -132,8 +125,8 @@ class PostgreSQLManagementClient(
132125
:type subscription_id: str
133126
:param base_url: Service URL. Default value is "https://management.azure.com".
134127
:type base_url: str
135-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
136-
this default value may result in unsupported behavior.
128+
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
129+
default value may result in unsupported behavior.
137130
:paramtype api_version: str
138131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
139132
Retry-After header is present.
@@ -209,13 +202,11 @@ def __init__(
209202
self.private_link_resources = PrivateLinkResourcesOperations(
210203
self._client, self._config, self._serialize, self._deserialize
211204
)
212-
self.quota_usages = QuotaUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
213205
self.replicas = ReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
214206
self.log_files = LogFilesOperations(self._client, self._config, self._serialize, self._deserialize)
215207
self.server_threat_protection_settings = ServerThreatProtectionSettingsOperations(
216208
self._client, self._config, self._serialize, self._deserialize
217209
)
218-
self.tuning_options = TuningOptionsOperations(self._client, self._config, self._serialize, self._deserialize)
219210
self.virtual_endpoints = VirtualEndpointsOperations(
220211
self._client, self._config, self._serialize, self._deserialize
221212
)

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
310310
return ET.Element(tag)
311311

312312

313-
class Model(object):
313+
class Model:
314314
"""Mixin for all client request body/response body models to support
315315
serialization and deserialization.
316316
"""
@@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
563563
return key.replace("\\.", ".")
564564

565565

566-
class Serializer(object): # pylint: disable=too-many-public-methods
566+
class Serializer: # pylint: disable=too-many-public-methods
567567
"""Request object model serializer."""
568568

569569
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14411441
return children[0]
14421442

14431443

1444-
class Deserializer(object):
1444+
class Deserializer:
14451445
"""Response object model deserializer.
14461446
14471447
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16831683
subtype = getattr(response, "_subtype_map", {})
16841684
try:
16851685
readonly = [
1686-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1686+
k
1687+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1688+
if v.get("readonly")
16871689
]
16881690
const = [
1689-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1691+
k
1692+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1693+
if v.get("constant")
16901694
]
16911695
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16921696
response_obj = response(**kwargs)
16931697
for attr in readonly:
16941698
setattr(response_obj, attr, attrs.get(attr))
16951699
if additional_properties:
1696-
response_obj.additional_properties = additional_properties
1700+
response_obj.additional_properties = additional_properties # type: ignore
16971701
return response_obj
16981702
except TypeError as err:
16991703
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.1.0b2"
9+
VERSION = "1.1.0"

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/_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_async.AsyncTokenCredential
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-11-01-preview". Note that overriding
31-
this default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
31+
default value may result in unsupported behavior.
3232
:paramtype api_version: str
3333
"""
3434

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

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

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@
3737
PrivateEndpointConnectionOperations,
3838
PrivateEndpointConnectionsOperations,
3939
PrivateLinkResourcesOperations,
40-
QuotaUsagesOperations,
4140
ReplicasOperations,
4241
ServerCapabilitiesOperations,
4342
ServerThreatProtectionSettingsOperations,
4443
ServersOperations,
45-
TuningOptionsOperations,
4644
VirtualEndpointsOperations,
4745
VirtualNetworkSubnetUsageOperations,
4846
)
@@ -108,19 +106,13 @@ class PostgreSQLManagementClient(
108106
:ivar private_link_resources: PrivateLinkResourcesOperations operations
109107
:vartype private_link_resources:
110108
azure.mgmt.postgresqlflexibleservers.aio.operations.PrivateLinkResourcesOperations
111-
:ivar quota_usages: QuotaUsagesOperations operations
112-
:vartype quota_usages:
113-
azure.mgmt.postgresqlflexibleservers.aio.operations.QuotaUsagesOperations
114109
:ivar replicas: ReplicasOperations operations
115110
:vartype replicas: azure.mgmt.postgresqlflexibleservers.aio.operations.ReplicasOperations
116111
:ivar log_files: LogFilesOperations operations
117112
:vartype log_files: azure.mgmt.postgresqlflexibleservers.aio.operations.LogFilesOperations
118113
:ivar server_threat_protection_settings: ServerThreatProtectionSettingsOperations operations
119114
:vartype server_threat_protection_settings:
120115
azure.mgmt.postgresqlflexibleservers.aio.operations.ServerThreatProtectionSettingsOperations
121-
:ivar tuning_options: TuningOptionsOperations operations
122-
:vartype tuning_options:
123-
azure.mgmt.postgresqlflexibleservers.aio.operations.TuningOptionsOperations
124116
:ivar virtual_endpoints: VirtualEndpointsOperations operations
125117
:vartype virtual_endpoints:
126118
azure.mgmt.postgresqlflexibleservers.aio.operations.VirtualEndpointsOperations
@@ -133,8 +125,8 @@ class PostgreSQLManagementClient(
133125
:type subscription_id: str
134126
:param base_url: Service URL. Default value is "https://management.azure.com".
135127
:type base_url: str
136-
:keyword api_version: Api Version. Default value is "2024-11-01-preview". Note that overriding
137-
this default value may result in unsupported behavior.
128+
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
129+
default value may result in unsupported behavior.
138130
:paramtype api_version: str
139131
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
140132
Retry-After header is present.
@@ -210,13 +202,11 @@ def __init__(
210202
self.private_link_resources = PrivateLinkResourcesOperations(
211203
self._client, self._config, self._serialize, self._deserialize
212204
)
213-
self.quota_usages = QuotaUsagesOperations(self._client, self._config, self._serialize, self._deserialize)
214205
self.replicas = ReplicasOperations(self._client, self._config, self._serialize, self._deserialize)
215206
self.log_files = LogFilesOperations(self._client, self._config, self._serialize, self._deserialize)
216207
self.server_threat_protection_settings = ServerThreatProtectionSettingsOperations(
217208
self._client, self._config, self._serialize, self._deserialize
218209
)
219-
self.tuning_options = TuningOptionsOperations(self._client, self._config, self._serialize, self._deserialize)
220210
self.virtual_endpoints = VirtualEndpointsOperations(
221211
self._client, self._config, self._serialize, self._deserialize
222212
)

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131
from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations # type: ignore
3232
from ._private_endpoint_connection_operations import PrivateEndpointConnectionOperations # type: ignore
3333
from ._private_link_resources_operations import PrivateLinkResourcesOperations # type: ignore
34-
from ._quota_usages_operations import QuotaUsagesOperations # type: ignore
3534
from ._replicas_operations import ReplicasOperations # type: ignore
3635
from ._log_files_operations import LogFilesOperations # type: ignore
3736
from ._server_threat_protection_settings_operations import ServerThreatProtectionSettingsOperations # type: ignore
38-
from ._tuning_options_operations import TuningOptionsOperations # type: ignore
3937
from ._virtual_endpoints_operations import VirtualEndpointsOperations # type: ignore
4038
from ._virtual_network_subnet_usage_operations import VirtualNetworkSubnetUsageOperations # type: ignore
4139

@@ -63,11 +61,9 @@
6361
"PrivateEndpointConnectionsOperations",
6462
"PrivateEndpointConnectionOperations",
6563
"PrivateLinkResourcesOperations",
66-
"QuotaUsagesOperations",
6764
"ReplicasOperations",
6865
"LogFilesOperations",
6966
"ServerThreatProtectionSettingsOperations",
70-
"TuningOptionsOperations",
7167
"VirtualEndpointsOperations",
7268
"VirtualNetworkSubnetUsageOperations",
7369
]

sdk/postgresqlflexibleservers/azure-mgmt-postgresqlflexibleservers/azure/mgmt/postgresqlflexibleservers/aio/operations/_quota_usages_operations.py

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)