Skip to content

Commit 5abcd2f

Browse files
author
SDKAuto
committed
CodeGen from PR 34043 in Azure/azure-rest-api-specs
Merge 554b588867fa12fafb2b116fd15477d9754ef4b9 into dce18ad6d9dbc9e8c9912339f2c542f168ac4cb0
1 parent a175685 commit 5abcd2f

File tree

82 files changed

+19317
-725
lines changed

Some content is hidden

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

82 files changed

+19317
-725
lines changed

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

Lines changed: 118 additions & 0 deletions
Large diffs are not rendered by default.

sdk/neonpostgres/azure-mgmt-neonpostgres/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 Neonpostgres 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "4e3820497caa29ed0efada28a38cb4292cea9d55",
2+
"commit": "f8ea4ba602e3b51eb6cc95af8803267a0c489aa0",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/liftrneon/Neon.Postgres.Management",
5-
"@azure-tools/typespec-python": "0.36.1"
5+
"@azure-tools/typespec-python": "0.43.0"
66
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"CrossLanguagePackageId": "Neon.Postgres",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.neonpostgres.models.Attributes": "Neon.Postgres.Models.Attributes",
5+
"azure.mgmt.neonpostgres.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
6+
"azure.mgmt.neonpostgres.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
7+
"azure.mgmt.neonpostgres.models.Branch": "Neon.Postgres.Branch",
8+
"azure.mgmt.neonpostgres.models.BranchProperties": "Neon.Postgres.Models.BranchProperties",
9+
"azure.mgmt.neonpostgres.models.CompanyDetails": "LiftrBase.CompanyDetails",
10+
"azure.mgmt.neonpostgres.models.Compute": "Neon.Postgres.Compute",
11+
"azure.mgmt.neonpostgres.models.ComputeProperties": "Neon.Postgres.Models.ComputeProperties",
12+
"azure.mgmt.neonpostgres.models.ConnectionUriProperties": "Neon.Postgres.Models.ConnectionUriProperties",
13+
"azure.mgmt.neonpostgres.models.DefaultEndpointSettings": "Neon.Postgres.Models.DefaultEndpointSettings",
14+
"azure.mgmt.neonpostgres.models.Endpoint": "Neon.Postgres.Endpoint",
15+
"azure.mgmt.neonpostgres.models.EndpointProperties": "Neon.Postgres.Models.EndpointProperties",
16+
"azure.mgmt.neonpostgres.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
17+
"azure.mgmt.neonpostgres.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
18+
"azure.mgmt.neonpostgres.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
19+
"azure.mgmt.neonpostgres.models.MarketplaceDetails": "LiftrBase.MarketplaceDetails",
20+
"azure.mgmt.neonpostgres.models.NeonDatabase": "Neon.Postgres.NeonDatabase",
21+
"azure.mgmt.neonpostgres.models.NeonDatabaseProperties": "Neon.Postgres.Models.NeonDatabaseProperties",
22+
"azure.mgmt.neonpostgres.models.NeonRole": "Neon.Postgres.NeonRole",
23+
"azure.mgmt.neonpostgres.models.NeonRoleProperties": "Neon.Postgres.Models.NeonRoleProperties",
24+
"azure.mgmt.neonpostgres.models.OfferDetails": "LiftrBase.OfferDetails",
25+
"azure.mgmt.neonpostgres.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
26+
"azure.mgmt.neonpostgres.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
27+
"azure.mgmt.neonpostgres.models.OrganizationProperties": "LiftrBase.Data.OrganizationProperties",
28+
"azure.mgmt.neonpostgres.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
29+
"azure.mgmt.neonpostgres.models.OrganizationResource": "Neon.Postgres.OrganizationResource",
30+
"azure.mgmt.neonpostgres.models.PartnerOrganizationProperties": "LiftrBase.Data.PartnerOrganizationProperties",
31+
"azure.mgmt.neonpostgres.models.PgVersion": "Neon.Postgres.Models.PgVersion",
32+
"azure.mgmt.neonpostgres.models.PgVersionsResult": "Neon.Postgres.Models.PgVersionsResult",
33+
"azure.mgmt.neonpostgres.models.Project": "Neon.Postgres.Project",
34+
"azure.mgmt.neonpostgres.models.ProjectProperties": "Neon.Postgres.Models.ProjectProperties",
35+
"azure.mgmt.neonpostgres.models.SingleSignOnProperties": "LiftrBase.SingleSignOnProperties",
36+
"azure.mgmt.neonpostgres.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
37+
"azure.mgmt.neonpostgres.models.UserDetails": "LiftrBase.UserDetails",
38+
"azure.mgmt.neonpostgres.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
39+
"azure.mgmt.neonpostgres.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
40+
"azure.mgmt.neonpostgres.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
41+
"azure.mgmt.neonpostgres.models.MarketplaceSubscriptionStatus": "LiftrBase.MarketplaceSubscriptionStatus",
42+
"azure.mgmt.neonpostgres.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState",
43+
"azure.mgmt.neonpostgres.models.SingleSignOnStates": "LiftrBase.SingleSignOnStates",
44+
"azure.mgmt.neonpostgres.models.EndpointType": "Neon.Postgres.Models.EndpointType",
45+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
46+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get": "Neon.Postgres.Organizations.get",
47+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate",
48+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_update": "Neon.Postgres.Organizations.update",
49+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_delete": "Neon.Postgres.Organizations.delete",
50+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup",
51+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription",
52+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions",
53+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get": "Neon.Postgres.Projects.get",
54+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate",
55+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_update": "Neon.Postgres.Projects.update",
56+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.delete": "Neon.Postgres.Projects.delete",
57+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.list": "Neon.Postgres.Projects.list",
58+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri",
59+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.get": "Neon.Postgres.Branches.get",
60+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate",
61+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_update": "Neon.Postgres.Branches.update",
62+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.delete": "Neon.Postgres.Branches.delete",
63+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.list": "Neon.Postgres.Branches.list",
64+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.get": "Neon.Postgres.Computes.get",
65+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate",
66+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_update": "Neon.Postgres.Computes.update",
67+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.delete": "Neon.Postgres.Computes.delete",
68+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.list": "Neon.Postgres.Computes.list",
69+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.get": "Neon.Postgres.NeonDatabases.get",
70+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate",
71+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_update": "Neon.Postgres.NeonDatabases.update",
72+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.delete": "Neon.Postgres.NeonDatabases.delete",
73+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.list": "Neon.Postgres.NeonDatabases.list",
74+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.get": "Neon.Postgres.NeonRoles.get",
75+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate",
76+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_update": "Neon.Postgres.NeonRoles.update",
77+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.delete": "Neon.Postgres.NeonRoles.delete",
78+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.list": "Neon.Postgres.NeonRoles.list",
79+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.get": "Neon.Postgres.Endpoints.get",
80+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate",
81+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_update": "Neon.Postgres.Endpoints.update",
82+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.delete": "Neon.Postgres.Endpoints.delete",
83+
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.list": "Neon.Postgres.Endpoints.list"
84+
}
85+
}

sdk/neonpostgres/azure-mgmt-neonpostgres/azure/mgmt/neonpostgres/_client.py

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,54 +7,85 @@
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 ._configuration import NeonPostgresMgmtClientConfiguration
1921
from ._serialization import Deserializer, Serializer
20-
from .operations import Operations, OrganizationsOperations
22+
from .operations import (
23+
BranchesOperations,
24+
ComputesOperations,
25+
EndpointsOperations,
26+
ModelsOperations,
27+
NeonDatabasesOperations,
28+
NeonRolesOperations,
29+
Operations,
30+
OrganizationsOperations,
31+
ProjectsOperations,
32+
)
2133

2234
if TYPE_CHECKING:
2335
from azure.core.credentials import TokenCredential
2436

2537

26-
class NeonPostgresMgmtClient:
38+
class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes
2739
"""NeonPostgresMgmtClient.
2840
41+
:ivar models: ModelsOperations operations
42+
:vartype models: azure.mgmt.neonpostgres.operations.ModelsOperations
2943
:ivar operations: Operations operations
3044
:vartype operations: azure.mgmt.neonpostgres.operations.Operations
3145
:ivar organizations: OrganizationsOperations operations
3246
:vartype organizations: azure.mgmt.neonpostgres.operations.OrganizationsOperations
47+
:ivar projects: ProjectsOperations operations
48+
:vartype projects: azure.mgmt.neonpostgres.operations.ProjectsOperations
49+
:ivar branches: BranchesOperations operations
50+
:vartype branches: azure.mgmt.neonpostgres.operations.BranchesOperations
51+
:ivar computes: ComputesOperations operations
52+
:vartype computes: azure.mgmt.neonpostgres.operations.ComputesOperations
53+
:ivar neon_databases: NeonDatabasesOperations operations
54+
:vartype neon_databases: azure.mgmt.neonpostgres.operations.NeonDatabasesOperations
55+
:ivar neon_roles: NeonRolesOperations operations
56+
:vartype neon_roles: azure.mgmt.neonpostgres.operations.NeonRolesOperations
57+
:ivar endpoints: EndpointsOperations operations
58+
:vartype endpoints: azure.mgmt.neonpostgres.operations.EndpointsOperations
3359
:param credential: Credential used to authenticate requests to the service. Required.
3460
:type credential: ~azure.core.credentials.TokenCredential
3561
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3662
:type subscription_id: str
37-
:param base_url: Service host. Default value is "https://management.azure.com".
63+
:param base_url: Service host. Default value is None.
3864
:type base_url: str
39-
:keyword api_version: The API version to use for this operation. Default value is
40-
"2024-08-01-preview". Note that overriding this default value may result in unsupported
41-
behavior.
65+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
66+
Note that overriding this default value may result in unsupported behavior.
4267
:paramtype api_version: str
4368
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4469
Retry-After header is present.
4570
"""
4671

4772
def __init__(
48-
self,
49-
credential: "TokenCredential",
50-
subscription_id: str,
51-
base_url: str = "https://management.azure.com",
52-
**kwargs: Any
73+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5374
) -> None:
5475
_endpoint = "{endpoint}"
76+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
77+
_endpoints = get_arm_endpoints(_cloud)
78+
if not base_url:
79+
base_url = _endpoints["resource_manager"]
80+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5581
self._config = NeonPostgresMgmtClientConfiguration(
56-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
82+
credential=credential,
83+
subscription_id=subscription_id,
84+
base_url=cast(str, base_url),
85+
credential_scopes=credential_scopes,
86+
**kwargs
5787
)
88+
5889
_policies = kwargs.pop("policies", None)
5990
if _policies is None:
6091
_policies = [
@@ -73,13 +104,20 @@ def __init__(
73104
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
74105
self._config.http_logging_policy,
75106
]
76-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
107+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
77108

78109
self._serialize = Serializer()
79110
self._deserialize = Deserializer()
80111
self._serialize.client_side_validation = False
112+
self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize)
81113
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
82114
self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize)
115+
self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize)
116+
self.branches = BranchesOperations(self._client, self._config, self._serialize, self._deserialize)
117+
self.computes = ComputesOperations(self._client, self._config, self._serialize, self._deserialize)
118+
self.neon_databases = NeonDatabasesOperations(self._client, self._config, self._serialize, self._deserialize)
119+
self.neon_roles = NeonRolesOperations(self._client, self._config, self._serialize, self._deserialize)
120+
self.endpoints = EndpointsOperations(self._client, self._config, self._serialize, self._deserialize)
83121

84122
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
85123
"""Runs the network request through the client's chained policies.

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ class NeonPostgresMgmtClientConfiguration: # pylint: disable=too-many-instance-
2929
:type subscription_id: str
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is
33-
"2024-08-01-preview". Note that overriding this default value may result in unsupported
34-
behavior.
32+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
33+
Note that overriding this default value may result in unsupported behavior.
3534
:paramtype api_version: str
3635
"""
3736

@@ -42,7 +41,7 @@ def __init__(
4241
base_url: str = "https://management.azure.com",
4342
**kwargs: Any
4443
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-08-01-preview")
44+
api_version: str = kwargs.pop("api_version", "2025-03-01")
4645

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

0 commit comments

Comments
 (0)