Skip to content
Closed
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
7 changes: 7 additions & 0 deletions sdk/neonpostgres/azure-mgmt-neonpostgres/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## 2.0.0 (2025-04-24)

### Breaking Changes

- Deleted or renamed client operation group `NeonPostgresMgmtClient.models`
- Deleted or renamed model `ModelsOperations`

## 1.0.0 (2025-04-21)

### Features Added
Expand Down
4 changes: 2 additions & 2 deletions sdk/neonpostgres/azure-mgmt-neonpostgres/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

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

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

### Prerequisites

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

### Install the package
Expand Down
4 changes: 2 additions & 2 deletions sdk/neonpostgres/azure-mgmt-neonpostgres/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "917ba27f78348899fba4cafb37fcf018f1987a8e",
"commit": "6e11539708b26e7e11f78e0cbabc5365773ccf68",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/liftrneon/Neon.Postgres.Management",
"@azure-tools/typespec-python": "0.42.2"
"@azure-tools/typespec-python": "0.44.1"
}
117 changes: 78 additions & 39 deletions sdk/neonpostgres/azure-mgmt-neonpostgres/apiview-properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,44 +42,83 @@
"azure.mgmt.neonpostgres.models.ResourceProvisioningState": "Azure.ResourceManager.ResourceProvisioningState",
"azure.mgmt.neonpostgres.models.SingleSignOnStates": "LiftrBase.SingleSignOnStates",
"azure.mgmt.neonpostgres.models.EndpointType": "Neon.Postgres.Models.EndpointType",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get": "Neon.Postgres.Organizations.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_update": "Neon.Postgres.Organizations.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.begin_delete": "Neon.Postgres.Organizations.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.organizations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get": "Neon.Postgres.Projects.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.begin_update": "Neon.Postgres.Projects.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.delete": "Neon.Postgres.Projects.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.list": "Neon.Postgres.Projects.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.projects.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.get": "Neon.Postgres.Branches.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.begin_update": "Neon.Postgres.Branches.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.delete": "Neon.Postgres.Branches.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.branches.list": "Neon.Postgres.Branches.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.get": "Neon.Postgres.Computes.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.begin_update": "Neon.Postgres.Computes.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.delete": "Neon.Postgres.Computes.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.computes.list": "Neon.Postgres.Computes.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.get": "Neon.Postgres.NeonDatabases.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.begin_update": "Neon.Postgres.NeonDatabases.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.delete": "Neon.Postgres.NeonDatabases.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_databases.list": "Neon.Postgres.NeonDatabases.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.get": "Neon.Postgres.NeonRoles.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.begin_update": "Neon.Postgres.NeonRoles.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.delete": "Neon.Postgres.NeonRoles.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.neon_roles.list": "Neon.Postgres.NeonRoles.list",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.get": "Neon.Postgres.Endpoints.get",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.begin_update": "Neon.Postgres.Endpoints.update",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.delete": "Neon.Postgres.Endpoints.delete",
"azure.mgmt.neonpostgres.NeonPostgresMgmtClient.endpoints.list": "Neon.Postgres.Endpoints.list"
"azure.mgmt.neonpostgres.operations.Operations.list": "Azure.ResourceManager.Operations.list",
"azure.mgmt.neonpostgres.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.get": "Neon.Postgres.Organizations.get",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.get": "Neon.Postgres.Organizations.get",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_create_or_update": "Neon.Postgres.Organizations.createOrUpdate",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_update": "Neon.Postgres.Organizations.update",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_update": "Neon.Postgres.Organizations.update",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.begin_delete": "Neon.Postgres.Organizations.delete",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.begin_delete": "Neon.Postgres.Organizations.delete",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.list_by_resource_group": "Neon.Postgres.Organizations.listByResourceGroup",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.list_by_subscription": "Neon.Postgres.Organizations.listBySubscription",
"azure.mgmt.neonpostgres.operations.OrganizationsOperations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions",
"azure.mgmt.neonpostgres.aio.operations.OrganizationsOperations.get_postgres_versions": "Neon.Postgres.Organizations.getPostgresVersions",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.get": "Neon.Postgres.Projects.get",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.get": "Neon.Postgres.Projects.get",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.begin_create_or_update": "Neon.Postgres.Projects.createOrUpdate",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.begin_update": "Neon.Postgres.Projects.update",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.begin_update": "Neon.Postgres.Projects.update",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.delete": "Neon.Postgres.Projects.delete",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.delete": "Neon.Postgres.Projects.delete",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.list": "Neon.Postgres.Projects.list",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.list": "Neon.Postgres.Projects.list",
"azure.mgmt.neonpostgres.operations.ProjectsOperations.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri",
"azure.mgmt.neonpostgres.aio.operations.ProjectsOperations.get_connection_uri": "Neon.Postgres.Projects.getConnectionUri",
"azure.mgmt.neonpostgres.operations.BranchesOperations.get": "Neon.Postgres.Branches.get",
"azure.mgmt.neonpostgres.aio.operations.BranchesOperations.get": "Neon.Postgres.Branches.get",
"azure.mgmt.neonpostgres.operations.BranchesOperations.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.BranchesOperations.begin_create_or_update": "Neon.Postgres.Branches.createOrUpdate",
"azure.mgmt.neonpostgres.operations.BranchesOperations.begin_update": "Neon.Postgres.Branches.update",
"azure.mgmt.neonpostgres.aio.operations.BranchesOperations.begin_update": "Neon.Postgres.Branches.update",
"azure.mgmt.neonpostgres.operations.BranchesOperations.delete": "Neon.Postgres.Branches.delete",
"azure.mgmt.neonpostgres.aio.operations.BranchesOperations.delete": "Neon.Postgres.Branches.delete",
"azure.mgmt.neonpostgres.operations.BranchesOperations.list": "Neon.Postgres.Branches.list",
"azure.mgmt.neonpostgres.aio.operations.BranchesOperations.list": "Neon.Postgres.Branches.list",
"azure.mgmt.neonpostgres.operations.ComputesOperations.get": "Neon.Postgres.Computes.get",
"azure.mgmt.neonpostgres.aio.operations.ComputesOperations.get": "Neon.Postgres.Computes.get",
"azure.mgmt.neonpostgres.operations.ComputesOperations.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.ComputesOperations.begin_create_or_update": "Neon.Postgres.Computes.createOrUpdate",
"azure.mgmt.neonpostgres.operations.ComputesOperations.begin_update": "Neon.Postgres.Computes.update",
"azure.mgmt.neonpostgres.aio.operations.ComputesOperations.begin_update": "Neon.Postgres.Computes.update",
"azure.mgmt.neonpostgres.operations.ComputesOperations.delete": "Neon.Postgres.Computes.delete",
"azure.mgmt.neonpostgres.aio.operations.ComputesOperations.delete": "Neon.Postgres.Computes.delete",
"azure.mgmt.neonpostgres.operations.ComputesOperations.list": "Neon.Postgres.Computes.list",
"azure.mgmt.neonpostgres.aio.operations.ComputesOperations.list": "Neon.Postgres.Computes.list",
"azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.get": "Neon.Postgres.NeonDatabases.get",
"azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.get": "Neon.Postgres.NeonDatabases.get",
"azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.begin_create_or_update": "Neon.Postgres.NeonDatabases.createOrUpdate",
"azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.begin_update": "Neon.Postgres.NeonDatabases.update",
"azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.begin_update": "Neon.Postgres.NeonDatabases.update",
"azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.delete": "Neon.Postgres.NeonDatabases.delete",
"azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.delete": "Neon.Postgres.NeonDatabases.delete",
"azure.mgmt.neonpostgres.operations.NeonDatabasesOperations.list": "Neon.Postgres.NeonDatabases.list",
"azure.mgmt.neonpostgres.aio.operations.NeonDatabasesOperations.list": "Neon.Postgres.NeonDatabases.list",
"azure.mgmt.neonpostgres.operations.NeonRolesOperations.get": "Neon.Postgres.NeonRoles.get",
"azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.get": "Neon.Postgres.NeonRoles.get",
"azure.mgmt.neonpostgres.operations.NeonRolesOperations.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.begin_create_or_update": "Neon.Postgres.NeonRoles.createOrUpdate",
"azure.mgmt.neonpostgres.operations.NeonRolesOperations.begin_update": "Neon.Postgres.NeonRoles.update",
"azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.begin_update": "Neon.Postgres.NeonRoles.update",
"azure.mgmt.neonpostgres.operations.NeonRolesOperations.delete": "Neon.Postgres.NeonRoles.delete",
"azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.delete": "Neon.Postgres.NeonRoles.delete",
"azure.mgmt.neonpostgres.operations.NeonRolesOperations.list": "Neon.Postgres.NeonRoles.list",
"azure.mgmt.neonpostgres.aio.operations.NeonRolesOperations.list": "Neon.Postgres.NeonRoles.list",
"azure.mgmt.neonpostgres.operations.EndpointsOperations.get": "Neon.Postgres.Endpoints.get",
"azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.get": "Neon.Postgres.Endpoints.get",
"azure.mgmt.neonpostgres.operations.EndpointsOperations.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate",
"azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.begin_create_or_update": "Neon.Postgres.Endpoints.createOrUpdate",
"azure.mgmt.neonpostgres.operations.EndpointsOperations.begin_update": "Neon.Postgres.Endpoints.update",
"azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.begin_update": "Neon.Postgres.Endpoints.update",
"azure.mgmt.neonpostgres.operations.EndpointsOperations.delete": "Neon.Postgres.Endpoints.delete",
"azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.delete": "Neon.Postgres.Endpoints.delete",
"azure.mgmt.neonpostgres.operations.EndpointsOperations.list": "Neon.Postgres.Endpoints.list",
"azure.mgmt.neonpostgres.aio.operations.EndpointsOperations.list": "Neon.Postgres.Endpoints.list"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,22 @@
# --------------------------------------------------------------------------

from copy import deepcopy
from typing import Any, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.rest import HttpRequest, HttpResponse
from azure.core.settings import settings
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.mgmt.core.tools import get_arm_endpoints

from ._configuration import NeonPostgresMgmtClientConfiguration
from ._serialization import Deserializer, Serializer
from ._utils.serialization import Deserializer, Serializer
from .operations import (
BranchesOperations,
ComputesOperations,
EndpointsOperations,
ModelsOperations,
NeonDatabasesOperations,
NeonRolesOperations,
Operations,
Expand All @@ -36,8 +37,6 @@
class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes
"""NeonPostgresMgmtClient.

:ivar models: ModelsOperations operations
:vartype models: azure.mgmt.neonpostgres.operations.ModelsOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.neonpostgres.operations.Operations
:ivar organizations: OrganizationsOperations operations
Expand All @@ -58,7 +57,7 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service host. Default value is "https://management.azure.com".
:param base_url: Service host. Default value is None.
:type base_url: str
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
Note that overriding this default value may result in unsupported behavior.
Expand All @@ -68,16 +67,22 @@ class NeonPostgresMgmtClient: # pylint: disable=too-many-instance-attributes
"""

def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
base_url: str = "https://management.azure.com",
**kwargs: Any
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
) -> None:
_endpoint = "{endpoint}"
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = NeonPostgresMgmtClientConfiguration(
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
credential=credential,
subscription_id=subscription_id,
base_url=cast(str, base_url),
credential_scopes=credential_scopes,
**kwargs
)

_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand All @@ -96,12 +101,11 @@ def __init__(
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)

self._serialize = Serializer()
self._deserialize = Deserializer()
self._serialize.client_side_validation = False
self.models = ModelsOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.organizations = OrganizationsOperations(self._client, self._config, self._serialize, self._deserialize)
self.projects = ProjectsOperations(self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) Python Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
Loading