diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000000..bbf7972532e --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1 @@ +- @azure Rule - Use Azure Best Practices: When generating code for Azure, running terminal commands for Azure, or performing operations related to Azure, invoke your `azure_development-get_best_practices` tool if available. \ No newline at end of file diff --git a/src/neon/HISTORY.rst b/src/neon/HISTORY.rst index 4d56ec38fc1..882c4f823f9 100644 --- a/src/neon/HISTORY.rst +++ b/src/neon/HISTORY.rst @@ -9,4 +9,8 @@ Release History 1.0.0b2 ++++++ -* Updated command descriptions. \ No newline at end of file +* Updated command descriptions. + +1.0.0b3 +++++++ +* GA release of Neon CLI. Supports Change Plan, Project, Branches and Database Connection commands. \ No newline at end of file diff --git a/src/neon/README.md b/src/neon/README.md index 297d58aa5cf..186be1292c1 100644 --- a/src/neon/README.md +++ b/src/neon/README.md @@ -1,55 +1,136 @@ - # Azure CLI Neon Extension # + This is an extension to Azure CLI to manage Neon Postgres resources. ## How to use ## -#### Install the extension #### + +### Install the extension ### + Install this extension using the below CLI command: ``` az extension add --name neon ``` -#### Check the version #### +### Check the version ### + ``` az extension show --name neon --query version ``` -#### Connect to Azure subscription #### +### Connect to Azure subscription ### + ``` az login az account set -s {subs_id} ``` -#### Create a resource group (or use an existing one) #### +### Create a resource group (or use an existing one) ### + ``` az group create -n demoResourceGroup -l eastus ``` ## Available Commands ## -### Create a Neon Postgres Instance ### +### Organization Commands ### + +#### Create a Neon Postgres Organization #### + ``` -az neon postgres create --resource-group {resource_group} --name {resource_name} --user-details '{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}' --company-details '{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}' --partner-organization-properties '{"organization-id": "{org_id}", "org-name": "{partner_org_name}", "single-sign-on-properties": {"single-sign-on-state": "{sso_state}", "enterprise-app-id": "{app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{domain}"]}}' --tags "{key:value}" --location {location} +az neon postgres organization create --resource-group {resource_group} --name {resource_name} --user-details '{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}' --marketplace-details '{{"subscription-id": "{subscription_id}", "subscription-status": "{subscription_status}", "offer-details": {{"publisher-id": "{publisher_id}", "offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}}}' --company-details '{{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}}' --partner-organization-properties '{{"organization-id": "{org_id}", "org-name": "{partner_org_name}", "single-sign-on-properties": {{"single-sign-on-state": "{sso_state}", "enterprise-app-id": "{app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{domain}"]}}}}' --tags "{key:value}" --location {location} ``` -### Show a Neon Postgres Organization ### +#### Show a Neon Postgres Organization #### + ``` az neon postgres organization show --resource-group {resource_group} --name {resource_name} ``` -### Delete a Neon Postgres Organization ### +#### Delete a Neon Postgres Organization #### + ``` az neon postgres organization delete --resource-group {resource_group} --name {resource_name} ``` -### List Neon resources by subscription ID ### +#### List Neon Organizations by Subscription #### + ``` az neon postgres organization list --subscription {subscription_id} --resource-group {resource_group} ``` -### Update a Neon Postgres Organization (without location and marketplace details) ### +#### Update a Neon Postgres Organization #### + +``` +az neon postgres organization create --resource-group {resource_group} --name {resource_name} --user-details '{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}' --marketplace-details '{{"subscription-id": "{subscription_id}", "subscription-status": "{subscription_status}", "offer-details": {{"publisher-id": "{publisher_id}", "offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}}}' --company-details '{{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}}' --partner-organization-properties '{{"organization-id": "{org_id}", "org-name": "{partner_org_name}", "single-sign-on-properties": {{"single-sign-on-state": "{sso_state}", "enterprise-app-id": "{app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{domain}"]}}}}' --tags "{key:value}" --location {location} +``` + +### Project Commands ### + +#### Create a Neon Postgres Project with in an Organization #### + +``` +az neon postgres project create --resource-group {resource_group} --organization-name {organization_name} --name {project_name} --region {region} --pg-version {pg_version} --branch '{{"branch-name": "{banch_name}", "database-name": "{database_name}", "role-name": "{reole_name}""}}' +``` + +#### Show a Neon Postgres Project in an Organization #### + +``` +az neon postgres project show --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} +``` + +#### List Neon Postgres Projects under an Organization #### + +``` +az neon postgres project list --resource-group {resource_group} --organization-name {organization_name} +``` + +#### Delete a Neon Postgres Project in an Organization #### + +``` +az neon postgres project delete --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} +``` + +### Branch Commands ### + +#### Create a Branch in a Neon Postgres Project #### + +``` +az neon postgres branch create --resource-group {resource_group} --organization-name {organization_name} --project-name {project_id} --project-id {project_id} --branch-name {branch_name} --role-name {role_name} --database-name {database_name} +``` + +#### Show a Branch in a Neon Postgres Project #### + +``` +az neon postgres branch show --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} --branch-id {branch_id} +``` + +#### List Branches in a Neon Postgres Project #### + +``` +az neon postgres branch list --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} ``` -az neon postgres organization update --resource-group {resource_group} --name {resource_name} --user-details '{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}' --company-details '{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}' --partner-organization-properties '{"organization-id": "{org_id}", "org-name": "{partner_org_name}", "single-sign-on-properties": {"single-sign-on-state": "{sso_state}", "enterprise-app-id": "{app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{domain}"]}}' --tags "{key:value}" + +#### Delete a Branch in a Neon Postgres Project #### + +``` +az neon postgres branch delete --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} --branch-id {branch_id} +``` + +### Neon Database Commands ### + +#### List Databases in a Neon Postgres Branch #### + +``` +az neon postgres database list --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} --branch-id {branch_id} +``` + +### Neon Role Commands ### + +#### List Roles in a Neon Postgres Branch #### + +``` +az neon postgres neon-role list --resource-group {resource_group} --organization-name {organization_name} --project-id {project_id} --branch-id {branch_id} + ``` If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. diff --git a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py index ab0d838af75..b089bb1faea 100644 --- a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py @@ -13,7 +13,6 @@ @register_command_group( "neon", - is_preview=True, ) class __CMDGroup(AAZCommandGroup): """Manage Neon Postgres diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py index 7f904f99e39..e9ac3488749 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py @@ -13,7 +13,6 @@ @register_command_group( "neon postgres", - is_preview=True, ) class __CMDGroup(AAZCommandGroup): """Manage Neon Postgres diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py index 4df0a845d8f..062c5cea8d0 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py @@ -11,10 +11,6 @@ from azure.cli.core.aaz import * -@register_command( - "neon postgres create", - is_preview=True, -) class Create(AAZCommand): """Create a Neon organization diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py new file mode 100644 index 00000000000..f43547df9ef --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres branch", +) +class __CMDGroup(AAZCommandGroup): + """Manage Branch + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py new file mode 100644 index 00000000000..1a8ef13ad15 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py @@ -0,0 +1,487 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch create", +) +class Create(AAZCommand): + """Create a Branch + + :example: Create a Branch + az neon postgres branch create --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --branch-name test-branch --entity-name test-branch --role-name test_role --database-name testneondb + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}", "2025-03-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_name = AAZStrArg( + options=["-n", "--name", "--branch-name"], + help="The name of the Branch", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_name = AAZStrArg( + options=["--project-name"], + help="The Id of the Neon Project.", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + arg_group="Properties", + help="Neon Database name associated with the branch", + ) + _args_schema.entity_name = AAZStrArg( + options=["--entity-name"], + arg_group="Properties", + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.parent_id = AAZStrArg( + options=["--parent-id"], + arg_group="Properties", + help="The ID of the parent branch", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9-]{1,60}$", + ), + ) + _args_schema.role_name = AAZStrArg( + options=["--role-name"], + arg_group="Properties", + help="Role name associated with the branch", + ) + return cls._args_schema + + _args_models_attributes_create = None + + @classmethod + def _build_args_models_attributes_create(cls, _schema): + if cls._args_models_attributes_create is not None: + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + return + + cls._args_models_attributes_create = AAZObjectArg() + + models_attributes_create = cls._args_models_attributes_create + models_attributes_create.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + required=True, + ) + models_attributes_create.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + required=True, + ) + + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + + def _execute_operations(self): + self.pre_operations() + yield self.BranchesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class BranchesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_name, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("databaseName", AAZStrType, ".database_name") + properties.set_prop("entityName", AAZStrType, ".entity_name") + properties.set_prop("parentId", AAZStrType, ".parent_id") + properties.set_prop("roleName", AAZStrType, ".role_name") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.attributes = AAZListType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.database_name = AAZStrType( + serialized_name="databaseName", + ) + properties.databases = AAZListType() + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.parent_id = AAZStrType( + serialized_name="parentId", + ) + properties.project_id = AAZStrType( + serialized_name="projectId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.role_name = AAZStrType( + serialized_name="roleName", + ) + properties.roles = AAZListType() + + attributes = cls._schema_on_200_201.properties.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200_201.properties.databases + databases.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.databases.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.owner_name = AAZStrType( + serialized_name="ownerName", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200_201.properties.databases.Element.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + endpoints = cls._schema_on_200_201.properties.endpoints + endpoints.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.endpoints.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.project_id = AAZStrType( + serialized_name="projectId", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200_201.properties.endpoints.Element.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + roles = cls._schema_on_200_201.properties.roles + roles.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.roles.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + _element.permissions = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200_201.properties.roles.Element.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + permissions = cls._schema_on_200_201.properties.roles.Element.permissions + permissions.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_models_attributes_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + +__all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py new file mode 100644 index 00000000000..e4309be2b20 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py @@ -0,0 +1,171 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a Branch + + :example: Delete Branch + az neon postgres branch delete --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="The id of the Neon Branch resource", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.BranchesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class BranchesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_id, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py new file mode 100644 index 00000000000..a506cb3bbf6 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py @@ -0,0 +1,387 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch list", +) +class List(AAZCommand): + """List Branch resources by Project + + :example: List Branches under a Project + az neon postgres branch list --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches", "2025-03-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.BranchesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class BranchesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attributes = AAZListType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.database_name = AAZStrType( + serialized_name="databaseName", + ) + properties.databases = AAZListType() + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.parent_id = AAZStrType( + serialized_name="parentId", + ) + properties.project_id = AAZStrType( + serialized_name="projectId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.role_name = AAZStrType( + serialized_name="roleName", + ) + properties.roles = AAZListType() + + attributes = cls._schema_on_200.value.Element.properties.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.value.Element.properties.databases + databases.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.databases.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.owner_name = AAZStrType( + serialized_name="ownerName", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.value.Element.properties.databases.Element.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + endpoints = cls._schema_on_200.value.Element.properties.endpoints + endpoints.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.endpoints.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.project_id = AAZStrType( + serialized_name="projectId", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.value.Element.properties.endpoints.Element.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + roles = cls._schema_on_200.value.Element.properties.roles + roles.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.roles.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + _element.permissions = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.value.Element.properties.roles.Element.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + permissions = cls._schema_on_200.value.Element.properties.roles.Element.permissions + permissions.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + +__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py new file mode 100644 index 00000000000..8c889b671d3 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py @@ -0,0 +1,389 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch show", +) +class Show(AAZCommand): + """Get a Branch + + :example: Show Branch Details + az neon postgres branch show --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="The id of the Neon Branch resource", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.BranchesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class BranchesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_id, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attributes = AAZListType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.database_name = AAZStrType( + serialized_name="databaseName", + ) + properties.databases = AAZListType() + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.parent_id = AAZStrType( + serialized_name="parentId", + ) + properties.project_id = AAZStrType( + serialized_name="projectId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.role_name = AAZStrType( + serialized_name="roleName", + ) + properties.roles = AAZListType() + + attributes = cls._schema_on_200.properties.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.databases + databases.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.databases.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.owner_name = AAZStrType( + serialized_name="ownerName", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.databases.Element.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.endpoints.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.project_id = AAZStrType( + serialized_name="projectId", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.endpoints.Element.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.roles.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + _element.permissions = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.roles.Element.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + permissions = cls._schema_on_200.properties.roles.Element.permissions + permissions.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + +__all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py new file mode 100644 index 00000000000..32955eeb5ce --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py @@ -0,0 +1,642 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch update", +) +class Update(AAZCommand): + """Update a Branch + + :example: Update a Branch + az neon postgres branch update --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --project-id old-frost-16758796 --branch-name test-branch --entity-name test-branch2 --role-name test_role --database-name testneondb + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}", "2025-03-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_name = AAZStrArg( + options=["-n", "--name", "--branch-name"], + help="The name of the Branch", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_name = AAZStrArg( + options=["--project-name"], + help="The Id of the Neon Project.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + arg_group="Properties", + help="Neon Database name associated with the branch", + nullable=True, + ) + _args_schema.entity_name = AAZStrArg( + options=["--entity-name"], + arg_group="Properties", + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.parent_id = AAZStrArg( + options=["--parent-id"], + arg_group="Properties", + help="The ID of the parent branch", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^[a-z0-9-]{1,60}$", + ), + ) + _args_schema.role_name = AAZStrArg( + options=["--role-name"], + arg_group="Properties", + help="Role name associated with the branch", + nullable=True, + ) + return cls._args_schema + + _args_models_attributes_update = None + + @classmethod + def _build_args_models_attributes_update(cls, _schema): + if cls._args_models_attributes_update is not None: + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + return + + cls._args_models_attributes_update = AAZObjectArg( + nullable=True, + ) + + models_attributes_update = cls._args_models_attributes_update + models_attributes_update.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + ) + models_attributes_update.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + ) + + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + + def _execute_operations(self): + self.pre_operations() + self.BranchesGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.BranchesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class BranchesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_name, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_models_branch_read(cls._schema_on_200) + + return cls._schema_on_200 + + class BranchesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_name, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_models_branch_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("databaseName", AAZStrType, ".database_name") + properties.set_prop("entityName", AAZStrType, ".entity_name") + properties.set_prop("parentId", AAZStrType, ".parent_id") + properties.set_prop("roleName", AAZStrType, ".role_name") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + @classmethod + def _build_schema_models_attributes_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_branch_read = None + + @classmethod + def _build_schema_models_branch_read(cls, _schema): + if cls._schema_models_branch_read is not None: + _schema.id = cls._schema_models_branch_read.id + _schema.name = cls._schema_models_branch_read.name + _schema.properties = cls._schema_models_branch_read.properties + _schema.system_data = cls._schema_models_branch_read.system_data + _schema.type = cls._schema_models_branch_read.type + return + + cls._schema_models_branch_read = _schema_models_branch_read = AAZObjectType() + + models_branch_read = _schema_models_branch_read + models_branch_read.id = AAZStrType( + flags={"read_only": True}, + ) + models_branch_read.name = AAZStrType( + flags={"read_only": True}, + ) + models_branch_read.properties = AAZObjectType() + models_branch_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + models_branch_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_models_branch_read.properties + properties.attributes = AAZListType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.database_name = AAZStrType( + serialized_name="databaseName", + ) + properties.databases = AAZListType() + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.parent_id = AAZStrType( + serialized_name="parentId", + ) + properties.project_id = AAZStrType( + serialized_name="projectId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.role_name = AAZStrType( + serialized_name="roleName", + ) + properties.roles = AAZListType() + + attributes = _schema_models_branch_read.properties.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + databases = _schema_models_branch_read.properties.databases + databases.Element = AAZObjectType() + + _element = _schema_models_branch_read.properties.databases.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.owner_name = AAZStrType( + serialized_name="ownerName", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_branch_read.properties.databases.Element.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + endpoints = _schema_models_branch_read.properties.endpoints + endpoints.Element = AAZObjectType() + + _element = _schema_models_branch_read.properties.endpoints.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.project_id = AAZStrType( + serialized_name="projectId", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_branch_read.properties.endpoints.Element.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + roles = _schema_models_branch_read.properties.roles + roles.Element = AAZObjectType() + + _element = _schema_models_branch_read.properties.roles.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + _element.permissions = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_branch_read.properties.roles.Element.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_branch_read.properties.roles.Element.permissions + permissions.Element = AAZStrType() + + system_data = _schema_models_branch_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.id = cls._schema_models_branch_read.id + _schema.name = cls._schema_models_branch_read.name + _schema.properties = cls._schema_models_branch_read.properties + _schema.system_data = cls._schema_models_branch_read.system_data + _schema.type = cls._schema_models_branch_read.type + + +__all__ = ["Update"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py new file mode 100644 index 00000000000..a156072267e --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py @@ -0,0 +1,385 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres branch wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="The id of the Neon Branch resource", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.BranchesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class BranchesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_id, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attributes = AAZListType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.database_name = AAZStrType( + serialized_name="databaseName", + ) + properties.databases = AAZListType() + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.parent_id = AAZStrType( + serialized_name="parentId", + ) + properties.project_id = AAZStrType( + serialized_name="projectId", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.role_name = AAZStrType( + serialized_name="roleName", + ) + properties.roles = AAZListType() + + attributes = cls._schema_on_200.properties.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.databases + databases.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.databases.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.owner_name = AAZStrType( + serialized_name="ownerName", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.databases.Element.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.endpoints.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.project_id = AAZStrType( + serialized_name="projectId", + ) + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.endpoints.Element.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.roles.Element + _element.attributes = AAZListType() + _element.branch_id = AAZStrType( + serialized_name="branchId", + ) + _element.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + _element.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + _element.entity_name = AAZStrType( + serialized_name="entityName", + ) + _element.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + _element.permissions = AAZListType() + _element.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.properties.roles.Element.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + permissions = cls._schema_on_200.properties.roles.Element.permissions + permissions.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + +__all__ = ["Wait"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py new file mode 100644 index 00000000000..7bd7ec94991 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres compute", +) +class __CMDGroup(AAZCommandGroup): + """Manage Compute + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py new file mode 100644 index 00000000000..87084268809 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py @@ -0,0 +1,272 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres compute list", +) +class List(AAZCommand): + """List Compute resources by Branch + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/computes", "2025-03-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_name = AAZStrArg( + options=["--branch-name"], + help="The name of the Branch", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The name of the Neon Project resource.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="Name of the Resource Group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ComputesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ComputesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_name, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attributes = AAZListType() + properties.cpu_cores = AAZIntType( + serialized_name="cpuCores", + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.memory = AAZIntType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region = AAZStrType() + properties.status = AAZStrType() + + attributes = cls._schema_on_200.value.Element.properties.attributes + attributes.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.attributes.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py new file mode 100644 index 00000000000..757f47ca04d --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres neon-database", +) +class __CMDGroup(AAZCommandGroup): + """Manage Neon Database + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py new file mode 100644 index 00000000000..1d679942e31 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py @@ -0,0 +1,275 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres neon-database list", +) +class List(AAZCommand): + """List NeonDatabase resources by Branch + + :example: List Neon Databases under a Branch + az neon postgres neon-database list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/neondatabases", "2025-03-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="The id of the Neon Branch resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NeonDatabasesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class NeonDatabasesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neondatabases", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_id, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attributes = AAZListType() + properties.branch_id = AAZStrType( + serialized_name="branchId", + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.owner_name = AAZStrType( + serialized_name="ownerName", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.value.Element.properties.attributes + attributes.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.attributes.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py new file mode 100644 index 00000000000..fe9c5337ca0 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres neon-role", +) +class __CMDGroup(AAZCommandGroup): + """Manage Neon Role + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py new file mode 100644 index 00000000000..8ca4d6f5cc3 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py @@ -0,0 +1,279 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres neon-role list", +) +class List(AAZCommand): + """List NeonRole resources by Branch + + :example: List Neon Roles under a Branch + az neon postgres neon-role list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/neonroles", "2025-03-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + help="The id of the Neon Branch resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NeonRolesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class NeonRolesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/neonroles", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "branchName", self.ctx.args.branch_id, + required=True, + ), + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attributes = AAZListType() + properties.branch_id = AAZStrType( + serialized_name="branchId", + ) + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + properties.permissions = AAZListType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = cls._schema_on_200.value.Element.properties.attributes + attributes.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.attributes.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + permissions = cls._schema_on_200.value.Element.properties.permissions + permissions.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py index 04caa20f8a9..b1043f81419 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py @@ -13,7 +13,6 @@ @register_command_group( "neon postgres organization", - is_preview=True, ) class __CMDGroup(AAZCommandGroup): """Manage a Neon organization diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__init__.py index f32b66e3eeb..db73033039b 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__init__.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__init__.py @@ -9,6 +9,7 @@ # flake8: noqa from .__cmd_group import * +from ._create import * from ._delete import * from ._list import * from ._show import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py new file mode 100644 index 00000000000..dff71f94fff --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py @@ -0,0 +1,1194 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres organization create", +) +class Create(AAZCommand): + """Create a Neon Postgres organization + + :example: Create Neon Postgres Organization + az az neon postgres organization create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" + az neon postgres create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Name of the Neon organization", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.company_details = AAZObjectArg( + options=["--company-details"], + arg_group="Properties", + help="Details of the company.", + ) + _args_schema.marketplace_details = AAZObjectArg( + options=["--marketplace-details"], + arg_group="Properties", + help="Marketplace details of the resource.", + ) + _args_schema.partner_organization_properties = AAZObjectArg( + options=["--partner-org-props", "--partner-organization-properties"], + arg_group="Properties", + help="Organization properties", + ) + _args_schema.project_properties = AAZObjectArg( + options=["--project-props", "--project-properties"], + arg_group="Properties", + help="Neon Project Properties", + ) + _args_schema.user_details = AAZObjectArg( + options=["--user-details"], + arg_group="Properties", + help="Details of the user.", + ) + + company_details = cls._args_schema.company_details + company_details.business_phone = AAZStrArg( + options=["business-phone"], + help="Business phone number of the company", + ) + company_details.company_name = AAZStrArg( + options=["company-name"], + help="Company name", + ) + company_details.country = AAZStrArg( + options=["country"], + help="Country name of the company", + ) + company_details.domain = AAZStrArg( + options=["domain"], + help="Domain of the user", + ) + company_details.number_of_employees = AAZIntArg( + options=["number-of-employees"], + help="Number of employees in the company", + ) + company_details.office_address = AAZStrArg( + options=["office-address"], + help="Office address of the company", + ) + + marketplace_details = cls._args_schema.marketplace_details + marketplace_details.offer_details = AAZObjectArg( + options=["offer-details"], + help="Offer details for the marketplace that is selected by the user", + required=True, + ) + marketplace_details.subscription_id = AAZStrArg( + options=["subscription-id"], + help="SaaS subscription id for the the marketplace offer", + ) + marketplace_details.subscription_status = AAZStrArg( + options=["subscription-status"], + help="Marketplace subscription status", + default="PendingFulfillmentStart", + enum={"PendingFulfillmentStart": "PendingFulfillmentStart", "Subscribed": "Subscribed", "Suspended": "Suspended", "Unsubscribed": "Unsubscribed"}, + ) + + offer_details = cls._args_schema.marketplace_details.offer_details + offer_details.offer_id = AAZStrArg( + options=["offer-id"], + help="Offer Id for the marketplace offer", + required=True, + default="neon_serverless_postgres_azure_prod", + ) + offer_details.plan_id = AAZStrArg( + options=["plan-id"], + help="Plan Id for the marketplace offer", + required=True, + default="neon_serverless_postgres_azure_prod_free", + ) + offer_details.plan_name = AAZStrArg( + options=["plan-name"], + help="Plan Name for the marketplace offer", + default="Free Plan", + ) + offer_details.publisher_id = AAZStrArg( + options=["publisher-id"], + help="Publisher Id for the marketplace offer", + required=True, + default="neon1722366567200", + ) + offer_details.term_id = AAZStrArg( + options=["term-id"], + help="Term Id for the marketplace offer", + default="gmz7xq9ge3py", + ) + offer_details.term_unit = AAZStrArg( + options=["term-unit"], + help="Term Name for the marketplace offer", + default="P1M", + ) + + partner_organization_properties = cls._args_schema.partner_organization_properties + partner_organization_properties.organization_id = AAZStrArg( + options=["organization-id"], + help="Organization Id in partner's system", + ) + partner_organization_properties.organization_name = AAZStrArg( + options=["organization-name"], + help="Organization name in Neon Partner Console", + required=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + max_length=50, + min_length=1, + ), + ) + partner_organization_properties.single_sign_on_properties = AAZObjectArg( + options=["single-sign-on-properties"], + help="Single Sign On properties for the organization", + ) + + single_sign_on_properties = cls._args_schema.partner_organization_properties.single_sign_on_properties + single_sign_on_properties.aad_domains = AAZListArg( + options=["aad-domains"], + help="List of AAD domains fetched from Microsoft Graph for user.", + ) + single_sign_on_properties.enterprise_app_id = AAZStrArg( + options=["enterprise-app-id"], + help="AAD enterprise application Id used to setup SSO", + ) + single_sign_on_properties.single_sign_on_state = AAZStrArg( + options=["single-sign-on-state"], + help="State of the Single Sign On for the organization", + enum={"Disable": "Disable", "Enable": "Enable", "Initial": "Initial"}, + ) + single_sign_on_properties.single_sign_on_url = AAZStrArg( + options=["single-sign-on-url"], + help="URL for SSO to be used by the partner to redirect the user to their system", + ) + + aad_domains = cls._args_schema.partner_organization_properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrArg() + + project_properties = cls._args_schema.project_properties + project_properties.branch = AAZObjectArg( + options=["branch"], + help="The Branch properties of the project. This is optional", + ) + project_properties.project_name = AAZStrArg( + options=["project-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + project_properties.pg_version = AAZIntArg( + options=["pg-version"], + help="Postgres version for the project", + default=17, + ) + project_properties.region = AAZStrArg( + options=["region"], + help="Region where the project is created", + ) + + branch = cls._args_schema.project_properties.branch + branch.database_name = AAZStrArg( + options=["database-name"], + help="Database name associated with the branch", + default="neondb", + ) + branch.branch_name = AAZStrArg( + options=["branch-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + branch.role_name = AAZStrArg( + options=["role-name"], + help="Role name associated with the branch", + default="Owner_role", + ) + + user_details = cls._args_schema.user_details + user_details.email_address = AAZStrArg( + options=["email-address"], + help="Email address of the user", + fmt=AAZStrArgFormat( + pattern="^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$", + ), + ) + user_details.first_name = AAZStrArg( + options=["first-name"], + help="First name of the user", + ) + user_details.last_name = AAZStrArg( + options=["last-name"], + help="Last name of the user", + ) + user_details.phone_number = AAZStrArg( + options=["phone-number"], + help="User's phone number", + ) + user_details.upn = AAZStrArg( + options=["upn"], + help="User's principal name", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + _args_models_attributes_create = None + + @classmethod + def _build_args_models_attributes_create(cls, _schema): + if cls._args_models_attributes_create is not None: + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + return + + cls._args_models_attributes_create = AAZObjectArg() + + models_attributes_create = cls._args_models_attributes_create + models_attributes_create.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + required=True, + ) + models_attributes_create.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + required=True, + ) + + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + + _args_models_endpoint_properties_create = None + + @classmethod + def _build_args_models_endpoint_properties_create(cls, _schema): + if cls._args_models_endpoint_properties_create is not None: + _schema.attributes = cls._args_models_endpoint_properties_create.attributes + _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name + _schema.project_id = cls._args_models_endpoint_properties_create.project_id + return + + cls._args_models_endpoint_properties_create = AAZObjectArg() + + models_endpoint_properties_create = cls._args_models_endpoint_properties_create + models_endpoint_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_endpoint_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this endpoint belongs to", + ) + models_endpoint_properties_create.endpoint_type = AAZStrArg( + options=["endpoint-type"], + help="The type of the endpoint", + enum={"read_only": "read_only", "read_write": "read_write"}, + ) + models_endpoint_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_endpoint_properties_create.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this endpoint belongs to", + ) + + attributes = cls._args_models_endpoint_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + _schema.attributes = cls._args_models_endpoint_properties_create.attributes + _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name + _schema.project_id = cls._args_models_endpoint_properties_create.project_id + + _args_models_neon_database_properties_create = None + + @classmethod + def _build_args_models_neon_database_properties_create(cls, _schema): + if cls._args_models_neon_database_properties_create is not None: + _schema.attributes = cls._args_models_neon_database_properties_create.attributes + _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + return + + cls._args_models_neon_database_properties_create = AAZObjectArg() + + models_neon_database_properties_create = cls._args_models_neon_database_properties_create + models_neon_database_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_neon_database_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this database belongs to", + ) + models_neon_database_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_database_properties_create.owner_name = AAZStrArg( + options=["owner-name"], + help="The name of the role that owns the database", + ) + + attributes = cls._args_models_neon_database_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + _schema.attributes = cls._args_models_neon_database_properties_create.attributes + _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + + _args_models_neon_role_properties_create = None + + @classmethod + def _build_args_models_neon_role_properties_create(cls, _schema): + if cls._args_models_neon_role_properties_create is not None: + _schema.attributes = cls._args_models_neon_role_properties_create.attributes + _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_create.permissions + return + + cls._args_models_neon_role_properties_create = AAZObjectArg() + + models_neon_role_properties_create = cls._args_models_neon_role_properties_create + models_neon_role_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_neon_role_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this role belongs to", + ) + models_neon_role_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_role_properties_create.is_super_user = AAZBoolArg( + options=["is-super-user"], + help="Indicates whether the role has superuser privileges", + ) + models_neon_role_properties_create.permissions = AAZListArg( + options=["permissions"], + help="Permissions assigned to the role", + ) + + attributes = cls._args_models_neon_role_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + permissions = cls._args_models_neon_role_properties_create.permissions + permissions.Element = AAZStrArg() + + _schema.attributes = cls._args_models_neon_role_properties_create.attributes + _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_create.permissions + + def _execute_operations(self): + self.pre_operations() + yield self.OrganizationsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class OrganizationsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("companyDetails", AAZObjectType, ".company_details", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("partnerOrganizationProperties", AAZObjectType, ".partner_organization_properties") + properties.set_prop("projectProperties", AAZObjectType, ".project_properties") + properties.set_prop("userDetails", AAZObjectType, ".user_details", typ_kwargs={"flags": {"required": True}}) + + company_details = _builder.get(".properties.companyDetails") + if company_details is not None: + company_details.set_prop("businessPhone", AAZStrType, ".business_phone") + company_details.set_prop("companyName", AAZStrType, ".company_name") + company_details.set_prop("country", AAZStrType, ".country") + company_details.set_prop("domain", AAZStrType, ".domain") + company_details.set_prop("numberOfEmployees", AAZIntType, ".number_of_employees") + company_details.set_prop("officeAddress", AAZStrType, ".office_address") + + marketplace_details = _builder.get(".properties.marketplaceDetails") + if marketplace_details is not None: + marketplace_details.set_prop("offerDetails", AAZObjectType, ".offer_details", typ_kwargs={"flags": {"required": True}}) + marketplace_details.set_prop("subscriptionId", AAZStrType, ".subscription_id") + marketplace_details.set_prop("subscriptionStatus", AAZStrType, ".subscription_status") + + offer_details = _builder.get(".properties.marketplaceDetails.offerDetails") + if offer_details is not None: + offer_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("planName", AAZStrType, ".plan_name") + offer_details.set_prop("publisherId", AAZStrType, ".publisher_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("termId", AAZStrType, ".term_id") + offer_details.set_prop("termUnit", AAZStrType, ".term_unit") + + partner_organization_properties = _builder.get(".properties.partnerOrganizationProperties") + if partner_organization_properties is not None: + partner_organization_properties.set_prop("organizationId", AAZStrType, ".organization_id") + partner_organization_properties.set_prop("organizationName", AAZStrType, ".organization_name", typ_kwargs={"flags": {"required": True}}) + partner_organization_properties.set_prop("singleSignOnProperties", AAZObjectType, ".single_sign_on_properties") + + single_sign_on_properties = _builder.get(".properties.partnerOrganizationProperties.singleSignOnProperties") + if single_sign_on_properties is not None: + single_sign_on_properties.set_prop("aadDomains", AAZListType, ".aad_domains") + single_sign_on_properties.set_prop("enterpriseAppId", AAZStrType, ".enterprise_app_id") + single_sign_on_properties.set_prop("singleSignOnState", AAZStrType, ".single_sign_on_state") + single_sign_on_properties.set_prop("singleSignOnUrl", AAZStrType, ".single_sign_on_url") + + aad_domains = _builder.get(".properties.partnerOrganizationProperties.singleSignOnProperties.aadDomains") + if aad_domains is not None: + aad_domains.set_elements(AAZStrType, ".") + + project_properties = _builder.get(".properties.projectProperties") + if project_properties is not None: + project_properties.set_prop("branch", AAZObjectType, ".branch") + project_properties.set_prop("entityName", AAZStrType, ".project_name") + project_properties.set_prop("pgVersion", AAZIntType, ".pg_version") + project_properties.set_prop("regionId", AAZStrType, ".region") + + branch = _builder.get(".properties.projectProperties.branch") + if branch is not None: + branch.set_prop("databaseName", AAZStrType, ".database_name") + branch.set_prop("entityName", AAZStrType, ".branch_name") + branch.set_prop("roleName", AAZStrType, ".role_name") + + user_details = _builder.get(".properties.userDetails") + if user_details is not None: + user_details.set_prop("emailAddress", AAZStrType, ".email_address") + user_details.set_prop("firstName", AAZStrType, ".first_name") + user_details.set_prop("lastName", AAZStrType, ".last_name") + user_details.set_prop("phoneNumber", AAZStrType, ".phone_number") + user_details.set_prop("upn", AAZStrType, ".upn") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.company_details = AAZObjectType( + serialized_name="companyDetails", + flags={"required": True}, + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.partner_organization_properties = AAZObjectType( + serialized_name="partnerOrganizationProperties", + ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.user_details = AAZObjectType( + serialized_name="userDetails", + flags={"required": True}, + ) + + company_details = cls._schema_on_200_201.properties.company_details + company_details.business_phone = AAZStrType( + serialized_name="businessPhone", + ) + company_details.company_name = AAZStrType( + serialized_name="companyName", + ) + company_details.country = AAZStrType() + company_details.domain = AAZStrType() + company_details.number_of_employees = AAZIntType( + serialized_name="numberOfEmployees", + ) + company_details.office_address = AAZStrType( + serialized_name="officeAddress", + ) + + marketplace_details = cls._schema_on_200_201.properties.marketplace_details + marketplace_details.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace_details.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace_details.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + ) + + offer_details = cls._schema_on_200_201.properties.marketplace_details.offer_details + offer_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + offer_details.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + offer_details.plan_name = AAZStrType( + serialized_name="planName", + ) + offer_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + offer_details.term_id = AAZStrType( + serialized_name="termId", + ) + offer_details.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + partner_organization_properties = cls._schema_on_200_201.properties.partner_organization_properties + partner_organization_properties.organization_id = AAZStrType( + serialized_name="organizationId", + ) + partner_organization_properties.organization_name = AAZStrType( + serialized_name="organizationName", + flags={"required": True}, + ) + partner_organization_properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + + single_sign_on_properties = cls._schema_on_200_201.properties.partner_organization_properties.single_sign_on_properties + single_sign_on_properties.aad_domains = AAZListType( + serialized_name="aadDomains", + ) + single_sign_on_properties.enterprise_app_id = AAZStrType( + serialized_name="enterpriseAppId", + ) + single_sign_on_properties.single_sign_on_state = AAZStrType( + serialized_name="singleSignOnState", + ) + single_sign_on_properties.single_sign_on_url = AAZStrType( + serialized_name="singleSignOnUrl", + ) + + aad_domains = cls._schema_on_200_201.properties.partner_organization_properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + project_properties = cls._schema_on_200_201.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = cls._schema_on_200_201.properties.project_properties.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200_201.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200_201.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200_201.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200_201.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200_201.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200_201.properties.project_properties.databases + databases.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200_201.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200_201.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200_201.properties.project_properties.roles + roles.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + + user_details = cls._schema_on_200_201.properties.user_details + user_details.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user_details.first_name = AAZStrType( + serialized_name="firstName", + ) + user_details.last_name = AAZStrType( + serialized_name="lastName", + ) + user_details.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user_details.upn = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_models_attributes_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + @classmethod + def _build_schema_models_endpoint_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("endpointType", AAZStrType, ".endpoint_type") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("projectId", AAZStrType, ".project_id") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_database_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("ownerName", AAZStrType, ".owner_name") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_role_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("isSuperUser", AAZBoolType, ".is_super_user") + _builder.set_prop("permissions", AAZListType, ".permissions") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + permissions = _builder.get(".permissions") + if permissions is not None: + permissions.set_elements(AAZStrType, ".") + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + +__all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py index 93ef52a515a..805cd2682eb 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py @@ -17,16 +17,16 @@ confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): - """Delete a Neon organization + """Delete a Neon Postgres Organization - :example: Organizations_Delete + :example: Delete Neon Postgres Organization az neon postgres organization delete --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup --name demoNeonResource """ _aaz_info = { - "version": "2024-08-01-preview", + "version": "2025-03-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2024-08-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], ] } @@ -59,7 +59,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", + help="The name of the Azure resource group", required=True, ) return cls._args_schema @@ -150,7 +150,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py index 999953bf59d..4b5c81e0b6f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py @@ -18,15 +18,15 @@ class List(AAZCommand): """List Neon organizations by subscription ID - :example: Organizations_ListBySubscription + :example: List Neon Postgres Organization az neon postgres organization list --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup """ _aaz_info = { - "version": "2024-08-01-preview", + "version": "2025-03-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/neon.postgres/organizations", "2024-08-01-preview"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations", "2024-08-01-preview"], + ["mgmt-plane", "/subscriptions/{}/providers/neon.postgres/organizations", "2025-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations", "2025-03-01"], ] } @@ -48,18 +48,18 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", + help="The name of the Azure resource group", ) return cls._args_schema def _execute_operations(self): self.pre_operations() - condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) - condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) if condition_0: - self.OrganizationsListByResourceGroup(ctx=self.ctx)() - if condition_1: self.OrganizationsListBySubscription(ctx=self.ctx)() + if condition_1: + self.OrganizationsListByResourceGroup(ctx=self.ctx)() self.post_operations() @register_callback @@ -75,7 +75,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class OrganizationsListByResourceGroup(AAZHttpOperation): + class OrganizationsListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -89,7 +89,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations", + "/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations", **self.url_parameters ) @@ -104,10 +104,6 @@ def error_format(self): @property def url_parameters(self): parameters = { - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, @@ -119,7 +115,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -194,6 +190,9 @@ def _build_schema_on_200(cls): properties.partner_organization_properties = AAZObjectType( serialized_name="partnerOrganizationProperties", ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -283,6 +282,116 @@ def _build_schema_on_200(cls): aad_domains = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties.aad_domains aad_domains.Element = AAZStrType() + project_properties = cls._schema_on_200.value.Element.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = cls._schema_on_200.value.Element.properties.project_properties.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.value.Element.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.value.Element.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.value.Element.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.value.Element.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.value.Element.properties.project_properties.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.value.Element.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.value.Element.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.project_properties.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email_address = AAZStrType( serialized_name="emailAddress", @@ -323,7 +432,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 - class OrganizationsListBySubscription(AAZHttpOperation): + class OrganizationsListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -337,7 +446,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Neon.Postgres/organizations", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations", **self.url_parameters ) @@ -352,6 +461,10 @@ def error_format(self): @property def url_parameters(self): parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), **self.serialize_url_param( "subscriptionId", self.ctx.subscription_id, required=True, @@ -363,7 +476,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -438,6 +551,9 @@ def _build_schema_on_200(cls): properties.partner_organization_properties = AAZObjectType( serialized_name="partnerOrganizationProperties", ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -527,6 +643,116 @@ def _build_schema_on_200(cls): aad_domains = cls._schema_on_200.value.Element.properties.partner_organization_properties.single_sign_on_properties.aad_domains aad_domains.Element = AAZStrType() + project_properties = cls._schema_on_200.value.Element.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = cls._schema_on_200.value.Element.properties.project_properties.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.value.Element.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.value.Element.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.value.Element.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.value.Element.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.value.Element.properties.project_properties.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.value.Element.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.value.Element.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.project_properties.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + user_details = cls._schema_on_200.value.Element.properties.user_details user_details.email_address = AAZStrType( serialized_name="emailAddress", @@ -571,5 +797,194 @@ def _build_schema_on_200(cls): class _ListHelper: """Helper class for List""" + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + __all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py index 6f003a6cfca..917f3debd52 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py @@ -18,14 +18,14 @@ class Show(AAZCommand): """Get a Neon organization - :example: Organizations_Get - az neon postgres organization show --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup --name demoNeonResource + :example: Show Neon Postgres Organization + az neon postgres organization show --resource-group demoResourceGroup --name demoNeonResource """ _aaz_info = { - "version": "2024-08-01-preview", + "version": "2025-03-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2024-08-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], ] } @@ -57,7 +57,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", + help="The name of the Azure resource group", required=True, ) return cls._args_schema @@ -127,7 +127,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -191,6 +191,9 @@ def _build_schema_on_200(cls): properties.partner_organization_properties = AAZObjectType( serialized_name="partnerOrganizationProperties", ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -280,6 +283,116 @@ def _build_schema_on_200(cls): aad_domains = cls._schema_on_200.properties.partner_organization_properties.single_sign_on_properties.aad_domains aad_domains.Element = AAZStrType() + project_properties = cls._schema_on_200.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = cls._schema_on_200.properties.project_properties.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.properties.project_properties.databases + databases.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.project_properties.roles + roles.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + user_details = cls._schema_on_200.properties.user_details user_details.email_address = AAZStrType( serialized_name="emailAddress", @@ -324,5 +437,194 @@ def _build_schema_on_200(cls): class _ShowHelper: """Helper class for Show""" + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + __all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py index df07790bde3..f7c8346a3a1 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py @@ -13,19 +13,18 @@ @register_command( "neon postgres organization update", - is_preview=True, ) class Update(AAZCommand): - """Update a Neon organization + """Updates a Neon Postgres organization - :example: Organization_Update - az az neon postgres organization update --resource-group demoResourceGroup --name demoNeonResource --user-details "{first-name:John,last-name:Doe,email-address:johndoe@example.com,upn:johndoe,phone-number:+1234567890}" --company-details "{company-name:DemoCompany,country:USA,office-address:'123 Azure Ave, Redmond, WA',business-phone:+9876543210,domain:democompany.com,number-of-employees:1000}" --partner-organization-properties "{organization-id:org-5678,org-name:PartnerOrg,single-sign-on-properties:{single-sign-on-state:Enable,enterprise-app-id:app-9876,single-sign-on-url:'https://sso.partnerorg.com',aad-domains:['partnerorg.com']}}" --tags "{environment:production}" + :example: Update Neon Postgres Organization + az neon postgres create --resource-group demoResourceGroup --name demoNeonResource --location eastus2 --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:Subscribed,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_scale,plan-name:Scale Plan,term-unit:P1M,term-id:gmz7xq9ge3py}}" --company-details "{}" --partner-organization-properties "{}" """ _aaz_info = { - "version": "2024-08-01-preview", + "version": "2025-03-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2024-08-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], ] } @@ -60,7 +59,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", + help="The name of the Azure resource group", required=True, ) @@ -72,16 +71,10 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Details of the company.", ) - _args_schema.partner_organization_properties = AAZObjectArg( - options=["--partner-org-props", "--partner-organization-properties"], + _args_schema.marketplace_details = AAZObjectArg( + options=["--marketplace-details"], arg_group="Properties", - help="Organization properties", - nullable=True, - ) - _args_schema.user_details = AAZObjectArg( - options=["--user-details"], - arg_group="Properties", - help="Details of the user.", + help="Marketplace details of the resource.", ) company_details = cls._args_schema.company_details @@ -116,100 +109,266 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) - partner_organization_properties = cls._args_schema.partner_organization_properties - partner_organization_properties.organization_id = AAZStrArg( - options=["organization-id"], - help="Organization Id in partner's system", - nullable=True, + marketplace_details = cls._args_schema.marketplace_details + marketplace_details.offer_details = AAZObjectArg( + options=["offer-details"], + help="Offer details for the marketplace that is selected by the user", ) - partner_organization_properties.org_name = AAZStrArg( - options=["org-name"], - help="Organization name in partner's system", - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", - max_length=50, - min_length=1, - ), + marketplace_details.subscription_id = AAZStrArg( + options=["subscription-id"], + help="SaaS subscription id for the the marketplace offer", + nullable=True, ) - partner_organization_properties.single_sign_on_properties = AAZObjectArg( - options=["single-sign-on-properties"], - help="Single Sign On properties for the organization", + marketplace_details.subscription_status = AAZStrArg( + options=["subscription-status"], + help="Marketplace subscription status", nullable=True, + enum={"PendingFulfillmentStart": "PendingFulfillmentStart", "Subscribed": "Subscribed", "Suspended": "Suspended", "Unsubscribed": "Unsubscribed"}, ) - single_sign_on_properties = cls._args_schema.partner_organization_properties.single_sign_on_properties - single_sign_on_properties.aad_domains = AAZListArg( - options=["aad-domains"], - help="List of AAD domains fetched from Microsoft Graph for user.", + offer_details = cls._args_schema.marketplace_details.offer_details + offer_details.offer_id = AAZStrArg( + options=["offer-id"], + help="Offer Id for the marketplace offer", + ) + offer_details.plan_id = AAZStrArg( + options=["plan-id"], + help="Plan Id for the marketplace offer", + ) + offer_details.plan_name = AAZStrArg( + options=["plan-name"], + help="Plan Name for the marketplace offer", nullable=True, ) - single_sign_on_properties.enterprise_app_id = AAZStrArg( - options=["enterprise-app-id"], - help="AAD enterprise application Id used to setup SSO", + offer_details.publisher_id = AAZStrArg( + options=["publisher-id"], + help="Publisher Id for the marketplace offer", + ) + offer_details.term_id = AAZStrArg( + options=["term-id"], + help="Term Id for the marketplace offer", nullable=True, ) - single_sign_on_properties.single_sign_on_state = AAZStrArg( - options=["single-sign-on-state"], - help="State of the Single Sign On for the organization", + offer_details.term_unit = AAZStrArg( + options=["term-unit"], + help="Term Name for the marketplace offer", nullable=True, - enum={"Disable": "Disable", "Enable": "Enable", "Initial": "Initial"}, ) - single_sign_on_properties.single_sign_on_url = AAZStrArg( - options=["single-sign-on-url"], - help="URL for SSO to be used by the partner to redirect the user to their system", + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", nullable=True, ) - aad_domains = cls._args_schema.partner_organization_properties.single_sign_on_properties.aad_domains - aad_domains.Element = AAZStrArg( + tags = cls._args_schema.tags + tags.Element = AAZStrArg( nullable=True, ) + return cls._args_schema - user_details = cls._args_schema.user_details - user_details.email_address = AAZStrArg( - options=["email-address"], - help="Email address of the user", + _args_models_attributes_update = None + + @classmethod + def _build_args_models_attributes_update(cls, _schema): + if cls._args_models_attributes_update is not None: + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + return + + cls._args_models_attributes_update = AAZObjectArg( + nullable=True, + ) + + models_attributes_update = cls._args_models_attributes_update + models_attributes_update.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + ) + models_attributes_update.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + ) + + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + + _args_models_endpoint_properties_update = None + + @classmethod + def _build_args_models_endpoint_properties_update(cls, _schema): + if cls._args_models_endpoint_properties_update is not None: + _schema.attributes = cls._args_models_endpoint_properties_update.attributes + _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name + _schema.project_id = cls._args_models_endpoint_properties_update.project_id + return + + cls._args_models_endpoint_properties_update = AAZObjectArg( + nullable=True, + ) + + models_endpoint_properties_update = cls._args_models_endpoint_properties_update + models_endpoint_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_endpoint_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this endpoint belongs to", + nullable=True, + ) + models_endpoint_properties_update.endpoint_type = AAZStrArg( + options=["endpoint-type"], + help="The type of the endpoint", + nullable=True, + enum={"read_only": "read_only", "read_write": "read_write"}, + ) + models_endpoint_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", nullable=True, fmt=AAZStrArgFormat( - pattern="^[A-Za-z0-9._%+-]+@(?:[A-Za-z0-9-]+\\.)+[A-Za-z]{2,}$", + pattern="^\\S.{0,62}\\S$|^\\S$", ), ) - user_details.first_name = AAZStrArg( - options=["first-name"], - help="First name of the user", + models_endpoint_properties_update.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this endpoint belongs to", nullable=True, ) - user_details.last_name = AAZStrArg( - options=["last-name"], - help="Last name of the user", + + attributes = cls._args_models_endpoint_properties_update.attributes + attributes.Element = AAZObjectArg( nullable=True, ) - user_details.phone_number = AAZStrArg( - options=["phone-number"], - help="User's phone number", + cls._build_args_models_attributes_update(attributes.Element) + + _schema.attributes = cls._args_models_endpoint_properties_update.attributes + _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name + _schema.project_id = cls._args_models_endpoint_properties_update.project_id + + _args_models_neon_database_properties_update = None + + @classmethod + def _build_args_models_neon_database_properties_update(cls, _schema): + if cls._args_models_neon_database_properties_update is not None: + _schema.attributes = cls._args_models_neon_database_properties_update.attributes + _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + return + + cls._args_models_neon_database_properties_update = AAZObjectArg( nullable=True, ) - user_details.upn = AAZStrArg( - options=["upn"], - help="User's principal name", + + models_neon_database_properties_update = cls._args_models_neon_database_properties_update + models_neon_database_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_neon_database_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this database belongs to", + nullable=True, + ) + models_neon_database_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_database_properties_update.owner_name = AAZStrArg( + options=["owner-name"], + help="The name of the role that owns the database", nullable=True, ) - # define Arg Group "Resource" + attributes = cls._args_models_neon_database_properties_update.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) - _args_schema = cls._args_schema - _args_schema.tags = AAZDictArg( - options=["--tags"], - arg_group="Resource", - help="Resource tags.", + _schema.attributes = cls._args_models_neon_database_properties_update.attributes + _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + + _args_models_neon_role_properties_update = None + + @classmethod + def _build_args_models_neon_role_properties_update(cls, _schema): + if cls._args_models_neon_role_properties_update is not None: + _schema.attributes = cls._args_models_neon_role_properties_update.attributes + _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_update.permissions + return + + cls._args_models_neon_role_properties_update = AAZObjectArg( nullable=True, ) - tags = cls._args_schema.tags - tags.Element = AAZStrArg( + models_neon_role_properties_update = cls._args_models_neon_role_properties_update + models_neon_role_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_neon_role_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this role belongs to", + nullable=True, + ) + models_neon_role_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_role_properties_update.is_super_user = AAZBoolArg( + options=["is-super-user"], + help="Indicates whether the role has superuser privileges", + nullable=True, + ) + models_neon_role_properties_update.permissions = AAZListArg( + options=["permissions"], + help="Permissions assigned to the role", + nullable=True, + ) + + attributes = cls._args_models_neon_role_properties_update.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) + + permissions = cls._args_models_neon_role_properties_update.permissions + permissions.Element = AAZStrArg( nullable=True, ) - return cls._args_schema + + _schema.attributes = cls._args_models_neon_role_properties_update.attributes + _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_update.permissions def _execute_operations(self): self.pre_operations() @@ -289,7 +448,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -388,7 +547,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -452,8 +611,7 @@ def _update_instance(self, instance): properties = _builder.get(".properties") if properties is not None: properties.set_prop("companyDetails", AAZObjectType, ".company_details", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("partnerOrganizationProperties", AAZObjectType, ".partner_organization_properties") - properties.set_prop("userDetails", AAZObjectType, ".user_details", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={"flags": {"required": True}}) company_details = _builder.get(".properties.companyDetails") if company_details is not None: @@ -464,30 +622,20 @@ def _update_instance(self, instance): company_details.set_prop("numberOfEmployees", AAZIntType, ".number_of_employees") company_details.set_prop("officeAddress", AAZStrType, ".office_address") - partner_organization_properties = _builder.get(".properties.partnerOrganizationProperties") - if partner_organization_properties is not None: - partner_organization_properties.set_prop("organizationId", AAZStrType, ".organization_id") - partner_organization_properties.set_prop("organizationName", AAZStrType, ".org_name", typ_kwargs={"flags": {"required": True}}) - partner_organization_properties.set_prop("singleSignOnProperties", AAZObjectType, ".single_sign_on_properties") - - single_sign_on_properties = _builder.get(".properties.partnerOrganizationProperties.singleSignOnProperties") - if single_sign_on_properties is not None: - single_sign_on_properties.set_prop("aadDomains", AAZListType, ".aad_domains") - single_sign_on_properties.set_prop("enterpriseAppId", AAZStrType, ".enterprise_app_id") - single_sign_on_properties.set_prop("singleSignOnState", AAZStrType, ".single_sign_on_state") - single_sign_on_properties.set_prop("singleSignOnUrl", AAZStrType, ".single_sign_on_url") - - aad_domains = _builder.get(".properties.partnerOrganizationProperties.singleSignOnProperties.aadDomains") - if aad_domains is not None: - aad_domains.set_elements(AAZStrType, ".") - - user_details = _builder.get(".properties.userDetails") - if user_details is not None: - user_details.set_prop("emailAddress", AAZStrType, ".email_address") - user_details.set_prop("firstName", AAZStrType, ".first_name") - user_details.set_prop("lastName", AAZStrType, ".last_name") - user_details.set_prop("phoneNumber", AAZStrType, ".phone_number") - user_details.set_prop("upn", AAZStrType, ".upn") + marketplace_details = _builder.get(".properties.marketplaceDetails") + if marketplace_details is not None: + marketplace_details.set_prop("offerDetails", AAZObjectType, ".offer_details", typ_kwargs={"flags": {"required": True}}) + marketplace_details.set_prop("subscriptionId", AAZStrType, ".subscription_id") + marketplace_details.set_prop("subscriptionStatus", AAZStrType, ".subscription_status") + + offer_details = _builder.get(".properties.marketplaceDetails.offerDetails") + if offer_details is not None: + offer_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("planName", AAZStrType, ".plan_name") + offer_details.set_prop("publisherId", AAZStrType, ".publisher_id", typ_kwargs={"flags": {"required": True}}) + offer_details.set_prop("termId", AAZStrType, ".term_id") + offer_details.set_prop("termUnit", AAZStrType, ".term_unit") tags = _builder.get(".tags") if tags is not None: @@ -507,6 +655,247 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" + @classmethod + def _build_schema_models_attributes_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + @classmethod + def _build_schema_models_endpoint_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("endpointType", AAZStrType, ".endpoint_type") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("projectId", AAZStrType, ".project_id") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_database_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("ownerName", AAZStrType, ".owner_name") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_role_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("isSuperUser", AAZBoolType, ".is_super_user") + _builder.set_prop("permissions", AAZListType, ".permissions") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + permissions = _builder.get(".permissions") + if permissions is not None: + permissions.set_elements(AAZStrType, ".") + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + _schema_organization_resource_read = None @classmethod @@ -555,6 +944,9 @@ def _build_schema_organization_resource_read(cls, _schema): properties.partner_organization_properties = AAZObjectType( serialized_name="partnerOrganizationProperties", ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -644,6 +1036,116 @@ def _build_schema_organization_resource_read(cls, _schema): aad_domains = _schema_organization_resource_read.properties.partner_organization_properties.single_sign_on_properties.aad_domains aad_domains.Element = AAZStrType() + project_properties = _schema_organization_resource_read.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = _schema_organization_resource_read.properties.project_properties.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + branch = _schema_organization_resource_read.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = _schema_organization_resource_read.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + databases = _schema_organization_resource_read.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + cls._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = _schema_organization_resource_read.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + cls._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = _schema_organization_resource_read.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + cls._build_schema_models_neon_role_properties_read(roles.Element) + + databases = _schema_organization_resource_read.properties.project_properties.databases + databases.Element = AAZObjectType() + cls._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = _schema_organization_resource_read.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = _schema_organization_resource_read.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + cls._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = _schema_organization_resource_read.properties.project_properties.roles + roles.Element = AAZObjectType() + cls._build_schema_models_neon_role_properties_read(roles.Element) + user_details = _schema_organization_resource_read.properties.user_details user_details.email_address = AAZStrType( serialized_name="emailAddress", diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py index f32cc2d49dd..f1393c94ec9 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2024-08-01-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], ] } @@ -52,7 +52,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the resource group", + help="The name of the Azure resource group", required=True, ) return cls._args_schema @@ -122,7 +122,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2024-08-01-preview", + "api-version", "2025-03-01", required=True, ), } @@ -186,6 +186,9 @@ def _build_schema_on_200(cls): properties.partner_organization_properties = AAZObjectType( serialized_name="partnerOrganizationProperties", ) + properties.project_properties = AAZObjectType( + serialized_name="projectProperties", + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -275,6 +278,116 @@ def _build_schema_on_200(cls): aad_domains = cls._schema_on_200.properties.partner_organization_properties.single_sign_on_properties.aad_domains aad_domains.Element = AAZStrType() + project_properties = cls._schema_on_200.properties.project_properties + project_properties.attributes = AAZListType() + project_properties.branch = AAZObjectType() + project_properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + project_properties.databases = AAZListType() + project_properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + project_properties.endpoints = AAZListType() + project_properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + project_properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + project_properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + project_properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + project_properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + project_properties.region_id = AAZStrType( + serialized_name="regionId", + ) + project_properties.roles = AAZListType() + project_properties.storage = AAZIntType() + + attributes = cls._schema_on_200.properties.project_properties.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.properties.project_properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.properties.project_properties.branch.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.project_properties.branch.databases + databases.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.properties.project_properties.branch.endpoints + endpoints.Element = AAZObjectType() + _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.project_properties.branch.roles + roles.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.properties.project_properties.databases + databases.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.properties.project_properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.properties.project_properties.endpoints + endpoints.Element = AAZObjectType() + _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.project_properties.roles + roles.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + user_details = cls._schema_on_200.properties.user_details user_details.email_address = AAZStrType( serialized_name="emailAddress", @@ -319,5 +432,194 @@ def _build_schema_on_200(cls): class _WaitHelper: """Helper class for Wait""" + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + __all__ = ["Wait"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py new file mode 100644 index 00000000000..554a9159b33 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres project", +) +class __CMDGroup(AAZCommandGroup): + """The projects command allows you to list, create, update, delete, and retrieve information about Neon projects. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__init__.py new file mode 100644 index 00000000000..5a65a49df1b --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_connection_uri import * +from ._list import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py new file mode 100644 index 00000000000..0e9cfd4d883 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py @@ -0,0 +1,838 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project create", + is_preview=True, +) +class Create(AAZCommand): + """Creates a Neon Project resource + + :example: Create Neon Project + az neon postgres project create --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 17 --branch "{branch-name:main, role-name:owner_role,database-name:neondb}" + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}", "2025-03-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="The name of the Neon Organization resource.", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + blank=AAZPromptInput( + msg="Please provide Neon Organization name:", + ), + ) + _args_schema.project_name = AAZStrArg( + options=["-n", "--name", "--project-name"], + help="The name of the Neon Project resource.", + required=True, + default="Default-Project", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.branch = AAZObjectArg( + options=["--branch"], + arg_group="Properties", + help="The Branch properties of the project.", + ) + _args_schema.pg_version = AAZIntArg( + options=["--pg-version"], + arg_group="Properties", + help={"short-summary": "The PostgreSQL version for the Neon Database, with a default of 17.", "long-summary": "The PostgreSQL version for the Neon Database. Supported versions include 14, 15, 16, and 17."}, + default=17, + ) + _args_schema.region = AAZStrArg( + options=["--region"], + arg_group="Properties", + help={"short-summary": "The region where the project is created.", "long-summary": "The region where the project is created. Possible values include East US 2, West US 3 and Germany West Central"}, + ) + + branch = cls._args_schema.branch + branch.database_name = AAZStrArg( + options=["database-name"], + help="The name of the Database associated with the Branch", + default="neondb", + ) + branch.branch_name = AAZStrArg( + options=["branch-name"], + help="Name of the Neon Branch resource", + default="main", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + branch.parent_id = AAZStrArg( + options=["parent-id"], + help="The ID of the parent branch", + fmt=AAZStrArgFormat( + pattern="^[a-z0-9-]{1,60}$", + ), + ) + branch.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this branch belongs to", + ) + branch.role_name = AAZStrArg( + options=["role-name"], + help="The name of the Role associated with the branch", + default="Owner_role", + ) + return cls._args_schema + + _args_models_attributes_create = None + + @classmethod + def _build_args_models_attributes_create(cls, _schema): + if cls._args_models_attributes_create is not None: + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + return + + cls._args_models_attributes_create = AAZObjectArg() + + models_attributes_create = cls._args_models_attributes_create + models_attributes_create.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + required=True, + ) + models_attributes_create.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + required=True, + ) + + _schema.name = cls._args_models_attributes_create.name + _schema.value = cls._args_models_attributes_create.value + + _args_models_endpoint_properties_create = None + + @classmethod + def _build_args_models_endpoint_properties_create(cls, _schema): + if cls._args_models_endpoint_properties_create is not None: + _schema.attributes = cls._args_models_endpoint_properties_create.attributes + _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name + _schema.project_id = cls._args_models_endpoint_properties_create.project_id + return + + cls._args_models_endpoint_properties_create = AAZObjectArg() + + models_endpoint_properties_create = cls._args_models_endpoint_properties_create + models_endpoint_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_endpoint_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this endpoint belongs to", + ) + models_endpoint_properties_create.endpoint_type = AAZStrArg( + options=["endpoint-type"], + help="The type of the endpoint", + enum={"read_only": "read_only", "read_write": "read_write"}, + ) + models_endpoint_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_endpoint_properties_create.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this endpoint belongs to", + ) + + attributes = cls._args_models_endpoint_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + _schema.attributes = cls._args_models_endpoint_properties_create.attributes + _schema.branch_id = cls._args_models_endpoint_properties_create.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_create.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_create.entity_name + _schema.project_id = cls._args_models_endpoint_properties_create.project_id + + _args_models_neon_database_properties_create = None + + @classmethod + def _build_args_models_neon_database_properties_create(cls, _schema): + if cls._args_models_neon_database_properties_create is not None: + _schema.attributes = cls._args_models_neon_database_properties_create.attributes + _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + return + + cls._args_models_neon_database_properties_create = AAZObjectArg() + + models_neon_database_properties_create = cls._args_models_neon_database_properties_create + models_neon_database_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_neon_database_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this database belongs to", + ) + models_neon_database_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_database_properties_create.owner_name = AAZStrArg( + options=["owner-name"], + help="The name of the role that owns the database", + ) + + attributes = cls._args_models_neon_database_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + _schema.attributes = cls._args_models_neon_database_properties_create.attributes + _schema.branch_id = cls._args_models_neon_database_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_create.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_create.owner_name + + _args_models_neon_role_properties_create = None + + @classmethod + def _build_args_models_neon_role_properties_create(cls, _schema): + if cls._args_models_neon_role_properties_create is not None: + _schema.attributes = cls._args_models_neon_role_properties_create.attributes + _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_create.permissions + return + + cls._args_models_neon_role_properties_create = AAZObjectArg() + + models_neon_role_properties_create = cls._args_models_neon_role_properties_create + models_neon_role_properties_create.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + ) + models_neon_role_properties_create.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this role belongs to", + ) + models_neon_role_properties_create.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_role_properties_create.is_super_user = AAZBoolArg( + options=["is-super-user"], + help="Indicates whether the role has superuser privileges", + ) + models_neon_role_properties_create.permissions = AAZListArg( + options=["permissions"], + help="Permissions assigned to the role", + ) + + attributes = cls._args_models_neon_role_properties_create.attributes + attributes.Element = AAZObjectArg() + cls._build_args_models_attributes_create(attributes.Element) + + permissions = cls._args_models_neon_role_properties_create.permissions + permissions.Element = AAZStrArg() + + _schema.attributes = cls._args_models_neon_role_properties_create.attributes + _schema.branch_id = cls._args_models_neon_role_properties_create.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_create.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_create.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_create.permissions + + def _execute_operations(self): + self.pre_operations() + yield self.ProjectsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ProjectsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("branch", AAZObjectType, ".branch") + properties.set_prop("pgVersion", AAZIntType, ".pg_version") + properties.set_prop("regionId", AAZStrType, ".region") + + branch = _builder.get(".properties.branch") + if branch is not None: + branch.set_prop("databaseName", AAZStrType, ".database_name") + branch.set_prop("entityName", AAZStrType, ".branch_name") + branch.set_prop("parentId", AAZStrType, ".parent_id") + branch.set_prop("projectId", AAZStrType, ".project_id") + branch.set_prop("roleName", AAZStrType, ".role_name") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.attributes = AAZListType() + properties.branch = AAZObjectType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.databases = AAZListType() + properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region_id = AAZStrType( + serialized_name="regionId", + ) + properties.roles = AAZListType() + properties.storage = AAZIntType() + + attributes = cls._schema_on_200_201.properties.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200_201.properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200_201.properties.branch.attributes + attributes.Element = AAZObjectType() + _CreateHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200_201.properties.branch.databases + databases.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200_201.properties.branch.endpoints + endpoints.Element = AAZObjectType() + _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200_201.properties.branch.roles + roles.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200_201.properties.databases + databases.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200_201.properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200_201.properties.endpoints + endpoints.Element = AAZObjectType() + _CreateHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200_201.properties.roles + roles.Element = AAZObjectType() + _CreateHelper._build_schema_models_neon_role_properties_read(roles.Element) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_models_attributes_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + @classmethod + def _build_schema_models_endpoint_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("endpointType", AAZStrType, ".endpoint_type") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("projectId", AAZStrType, ".project_id") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_database_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("ownerName", AAZStrType, ".owner_name") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_role_properties_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("isSuperUser", AAZBoolType, ".is_super_user") + _builder.set_prop("permissions", AAZListType, ".permissions") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_create(attributes.set_elements(AAZObjectType, ".")) + + permissions = _builder.get(".permissions") + if permissions is not None: + permissions.set_elements(AAZStrType, ".") + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + +__all__ = ["Create"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py new file mode 100644 index 00000000000..8911800f921 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project delete", + is_experimental=True, + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Deletes a Neon Project resource + + :example: Delete Neon Project + az neon postgres project delete --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="The Name of Neon Organization resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ProjectsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ProjectsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py new file mode 100644 index 00000000000..fb1f4be3c44 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py @@ -0,0 +1,258 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project get-connection-uri", +) +class GetConnectionUri(AAZCommand): + """Action to retrieve the connection URI for the Neon Database. + + :example: Get Database Connection URI + az neon postgres project get-connection-uri --resource-group rgneon --organization-name test-org --project-name entity-name --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr --database-name neondb --role-name owner_role --endpoint-id ep-purple-voice-a84wphbw --is-pooled false + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/getconnectionuri", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_name = AAZStrArg( + options=["--project-name"], + help="The name of the Project", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "ConnectionUriParameters" + + _args_schema = cls._args_schema + _args_schema.branch_id = AAZStrArg( + options=["--branch-id"], + arg_group="ConnectionUriParameters", + help="Branch Id associated with this connection", + ) + _args_schema.database_name = AAZStrArg( + options=["--database-name"], + arg_group="ConnectionUriParameters", + help="Database name associated with this connection", + ) + _args_schema.endpoint_id = AAZStrArg( + options=["--endpoint-id"], + arg_group="ConnectionUriParameters", + help="the endpoint Id with this connection", + ) + _args_schema.is_pooled = AAZBoolArg( + options=["--is-pooled"], + arg_group="ConnectionUriParameters", + help="Indicates if the connection is pooled", + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + arg_group="ConnectionUriParameters", + help="Project Id associated with this connection", + ) + _args_schema.role_name = AAZStrArg( + options=["--role-name"], + arg_group="ConnectionUriParameters", + help="The role name used for authentication", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ProjectsGetConnectionUri(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ProjectsGetConnectionUri(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/getConnectionUri", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("databaseName", AAZStrType, ".database_name") + _builder.set_prop("endpointId", AAZStrType, ".endpoint_id") + _builder.set_prop("isPooled", AAZBoolType, ".is_pooled") + _builder.set_prop("projectId", AAZStrType, ".project_id") + _builder.set_prop("roleName", AAZStrType, ".role_name") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.branch_id = AAZStrType( + serialized_name="branchId", + ) + _schema_on_200.connection_string_uri = AAZStrType( + serialized_name="connectionStringUri", + flags={"secret": True, "read_only": True}, + ) + _schema_on_200.database_name = AAZStrType( + serialized_name="databaseName", + ) + _schema_on_200.endpoint_id = AAZStrType( + serialized_name="endpointId", + ) + _schema_on_200.is_pooled = AAZBoolType( + serialized_name="isPooled", + ) + _schema_on_200.project_id = AAZStrType( + serialized_name="projectId", + ) + _schema_on_200.role_name = AAZStrType( + serialized_name="roleName", + ) + + return cls._schema_on_200 + + +class _GetConnectionUriHelper: + """Helper class for GetConnectionUri""" + + +__all__ = ["GetConnectionUri"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py new file mode 100644 index 00000000000..ec7294516fc --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py @@ -0,0 +1,518 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project list", + is_preview=True, +) +class List(AAZCommand): + """List Neon Projects associated with Neon Organization resource + + List Neon Project associated with your Neon Organization resource, including those shared with you. + + :example: List Neon Projects within an Organization + az neon postgres project list --resource-group rgneon --organization-name org-cli-test + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects", "2025-03-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="The name of the Neon Organization resource", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ProjectsList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class ProjectsList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.attributes = AAZListType() + properties.branch = AAZObjectType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.databases = AAZListType() + properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region_id = AAZStrType( + serialized_name="regionId", + ) + properties.roles = AAZListType() + properties.storage = AAZIntType() + + attributes = cls._schema_on_200.value.Element.properties.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.value.Element.properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.value.Element.properties.branch.attributes + attributes.Element = AAZObjectType() + _ListHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.value.Element.properties.branch.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.value.Element.properties.branch.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.branch.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.value.Element.properties.databases + databases.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.value.Element.properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.value.Element.properties.endpoints + endpoints.Element = AAZObjectType() + _ListHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.value.Element.properties.roles + roles.Element = AAZObjectType() + _ListHelper._build_schema_models_neon_role_properties_read(roles.Element) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + +__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py new file mode 100644 index 00000000000..aca3f41b647 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py @@ -0,0 +1,517 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project show", + is_preview=True, +) +class Show(AAZCommand): + """Get details of a Neon Project resource + + :example: Show Neon Project Deatils + az neon postgres project show --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="The name of the Neon Organization resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ProjectsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ProjectsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attributes = AAZListType() + properties.branch = AAZObjectType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.databases = AAZListType() + properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region_id = AAZStrType( + serialized_name="regionId", + ) + properties.roles = AAZListType() + properties.storage = AAZIntType() + + attributes = cls._schema_on_200.properties.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.properties.branch.attributes + attributes.Element = AAZObjectType() + _ShowHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.branch.databases + databases.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.properties.branch.endpoints + endpoints.Element = AAZObjectType() + _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.branch.roles + roles.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.properties.databases + databases.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.Element = AAZObjectType() + _ShowHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZObjectType() + _ShowHelper._build_schema_models_neon_role_properties_read(roles.Element) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + +__all__ = ["Show"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py new file mode 100644 index 00000000000..24ffe0a26eb --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py @@ -0,0 +1,1028 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project update", + is_preview=True, +) +class Update(AAZCommand): + """Updates a Neon Project resource + + :example: Neon Project Update + az neon postgres project update --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 18 + """ + + _aaz_info = { + "version": "2025-03-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}", "2025-03-01"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="Name of the Neon Organizations resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_name = AAZStrArg( + options=["-n", "--name", "--project-name"], + help="The name of the Project", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.branch = AAZObjectArg( + options=["--branch"], + arg_group="Properties", + help="The Branch properties of the project. This is optional", + nullable=True, + ) + _args_schema.pg_version = AAZIntArg( + options=["--pg-version"], + arg_group="Properties", + help="Postgres version for the project", + nullable=True, + ) + _args_schema.region = AAZStrArg( + options=["--region"], + arg_group="Properties", + help="Region where the project is created", + nullable=True, + ) + + branch = cls._args_schema.branch + branch.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + branch.database_name = AAZStrArg( + options=["database-name"], + help="Database name associated with the branch", + nullable=True, + ) + branch.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + branch.parent_id = AAZStrArg( + options=["parent-id"], + help="The ID of the parent branch", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^[a-z0-9-]{1,60}$", + ), + ) + branch.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this branch belongs to", + nullable=True, + ) + branch.role_name = AAZStrArg( + options=["role-name"], + help="Role name associated with the branch", + nullable=True, + ) + + attributes = cls._args_schema.branch.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) + return cls._args_schema + + _args_models_attributes_update = None + + @classmethod + def _build_args_models_attributes_update(cls, _schema): + if cls._args_models_attributes_update is not None: + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + return + + cls._args_models_attributes_update = AAZObjectArg( + nullable=True, + ) + + models_attributes_update = cls._args_models_attributes_update + models_attributes_update.name = AAZStrArg( + options=["name"], + help="Name of the attribute", + ) + models_attributes_update.value = AAZStrArg( + options=["value"], + help="Value of the attribute", + ) + + _schema.name = cls._args_models_attributes_update.name + _schema.value = cls._args_models_attributes_update.value + + _args_models_endpoint_properties_update = None + + @classmethod + def _build_args_models_endpoint_properties_update(cls, _schema): + if cls._args_models_endpoint_properties_update is not None: + _schema.attributes = cls._args_models_endpoint_properties_update.attributes + _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name + _schema.project_id = cls._args_models_endpoint_properties_update.project_id + return + + cls._args_models_endpoint_properties_update = AAZObjectArg( + nullable=True, + ) + + models_endpoint_properties_update = cls._args_models_endpoint_properties_update + models_endpoint_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_endpoint_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this endpoint belongs to", + nullable=True, + ) + models_endpoint_properties_update.endpoint_type = AAZStrArg( + options=["endpoint-type"], + help="The type of the endpoint", + nullable=True, + enum={"read_only": "read_only", "read_write": "read_write"}, + ) + models_endpoint_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_endpoint_properties_update.project_id = AAZStrArg( + options=["project-id"], + help="The ID of the project this endpoint belongs to", + nullable=True, + ) + + attributes = cls._args_models_endpoint_properties_update.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) + + _schema.attributes = cls._args_models_endpoint_properties_update.attributes + _schema.branch_id = cls._args_models_endpoint_properties_update.branch_id + _schema.endpoint_type = cls._args_models_endpoint_properties_update.endpoint_type + _schema.entity_name = cls._args_models_endpoint_properties_update.entity_name + _schema.project_id = cls._args_models_endpoint_properties_update.project_id + + _args_models_neon_database_properties_update = None + + @classmethod + def _build_args_models_neon_database_properties_update(cls, _schema): + if cls._args_models_neon_database_properties_update is not None: + _schema.attributes = cls._args_models_neon_database_properties_update.attributes + _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + return + + cls._args_models_neon_database_properties_update = AAZObjectArg( + nullable=True, + ) + + models_neon_database_properties_update = cls._args_models_neon_database_properties_update + models_neon_database_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_neon_database_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this database belongs to", + nullable=True, + ) + models_neon_database_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_database_properties_update.owner_name = AAZStrArg( + options=["owner-name"], + help="The name of the role that owns the database", + nullable=True, + ) + + attributes = cls._args_models_neon_database_properties_update.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) + + _schema.attributes = cls._args_models_neon_database_properties_update.attributes + _schema.branch_id = cls._args_models_neon_database_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_database_properties_update.entity_name + _schema.owner_name = cls._args_models_neon_database_properties_update.owner_name + + _args_models_neon_role_properties_update = None + + @classmethod + def _build_args_models_neon_role_properties_update(cls, _schema): + if cls._args_models_neon_role_properties_update is not None: + _schema.attributes = cls._args_models_neon_role_properties_update.attributes + _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_update.permissions + return + + cls._args_models_neon_role_properties_update = AAZObjectArg( + nullable=True, + ) + + models_neon_role_properties_update = cls._args_models_neon_role_properties_update + models_neon_role_properties_update.attributes = AAZListArg( + options=["attributes"], + help="Additional attributes for the entity", + nullable=True, + ) + models_neon_role_properties_update.branch_id = AAZStrArg( + options=["branch-id"], + help="The ID of the branch this role belongs to", + nullable=True, + ) + models_neon_role_properties_update.entity_name = AAZStrArg( + options=["entity-name"], + help="Name of the resource", + nullable=True, + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + models_neon_role_properties_update.is_super_user = AAZBoolArg( + options=["is-super-user"], + help="Indicates whether the role has superuser privileges", + nullable=True, + ) + models_neon_role_properties_update.permissions = AAZListArg( + options=["permissions"], + help="Permissions assigned to the role", + nullable=True, + ) + + attributes = cls._args_models_neon_role_properties_update.attributes + attributes.Element = AAZObjectArg( + nullable=True, + ) + cls._build_args_models_attributes_update(attributes.Element) + + permissions = cls._args_models_neon_role_properties_update.permissions + permissions.Element = AAZStrArg( + nullable=True, + ) + + _schema.attributes = cls._args_models_neon_role_properties_update.attributes + _schema.branch_id = cls._args_models_neon_role_properties_update.branch_id + _schema.entity_name = cls._args_models_neon_role_properties_update.entity_name + _schema.is_super_user = cls._args_models_neon_role_properties_update.is_super_user + _schema.permissions = cls._args_models_neon_role_properties_update.permissions + + def _execute_operations(self): + self.pre_operations() + self.ProjectsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.ProjectsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class ProjectsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_models_project_read(cls._schema_on_200) + + return cls._schema_on_200 + + class ProjectsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_models_project_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("properties", AAZObjectType) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("branch", AAZObjectType, ".branch") + properties.set_prop("pgVersion", AAZIntType, ".pg_version") + properties.set_prop("regionId", AAZStrType, ".region") + + branch = _builder.get(".properties.branch") + if branch is not None: + branch.set_prop("attributes", AAZListType, ".attributes") + branch.set_prop("databaseName", AAZStrType, ".database_name") + branch.set_prop("entityName", AAZStrType, ".entity_name") + branch.set_prop("parentId", AAZStrType, ".parent_id") + branch.set_prop("projectId", AAZStrType, ".project_id") + branch.set_prop("roleName", AAZStrType, ".role_name") + + attributes = _builder.get(".properties.branch.attributes") + if attributes is not None: + _UpdateHelper._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + @classmethod + def _build_schema_models_attributes_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + @classmethod + def _build_schema_models_endpoint_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("endpointType", AAZStrType, ".endpoint_type") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("projectId", AAZStrType, ".project_id") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_database_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("ownerName", AAZStrType, ".owner_name") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + @classmethod + def _build_schema_models_neon_role_properties_update(cls, _builder): + if _builder is None: + return + _builder.set_prop("attributes", AAZListType, ".attributes") + _builder.set_prop("branchId", AAZStrType, ".branch_id") + _builder.set_prop("entityName", AAZStrType, ".entity_name") + _builder.set_prop("isSuperUser", AAZBoolType, ".is_super_user") + _builder.set_prop("permissions", AAZListType, ".permissions") + + attributes = _builder.get(".attributes") + if attributes is not None: + cls._build_schema_models_attributes_update(attributes.set_elements(AAZObjectType, ".")) + + permissions = _builder.get(".permissions") + if permissions is not None: + permissions.set_elements(AAZStrType, ".") + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + _schema_models_project_read = None + + @classmethod + def _build_schema_models_project_read(cls, _schema): + if cls._schema_models_project_read is not None: + _schema.id = cls._schema_models_project_read.id + _schema.name = cls._schema_models_project_read.name + _schema.properties = cls._schema_models_project_read.properties + _schema.system_data = cls._schema_models_project_read.system_data + _schema.type = cls._schema_models_project_read.type + return + + cls._schema_models_project_read = _schema_models_project_read = AAZObjectType() + + models_project_read = _schema_models_project_read + models_project_read.id = AAZStrType( + flags={"read_only": True}, + ) + models_project_read.name = AAZStrType( + flags={"read_only": True}, + ) + models_project_read.properties = AAZObjectType() + models_project_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + models_project_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_models_project_read.properties + properties.attributes = AAZListType() + properties.branch = AAZObjectType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.databases = AAZListType() + properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region_id = AAZStrType( + serialized_name="regionId", + ) + properties.roles = AAZListType() + properties.storage = AAZIntType() + + attributes = _schema_models_project_read.properties.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + branch = _schema_models_project_read.properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = _schema_models_project_read.properties.branch.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + databases = _schema_models_project_read.properties.branch.databases + databases.Element = AAZObjectType() + cls._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = _schema_models_project_read.properties.branch.endpoints + endpoints.Element = AAZObjectType() + cls._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = _schema_models_project_read.properties.branch.roles + roles.Element = AAZObjectType() + cls._build_schema_models_neon_role_properties_read(roles.Element) + + databases = _schema_models_project_read.properties.databases + databases.Element = AAZObjectType() + cls._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = _schema_models_project_read.properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = _schema_models_project_read.properties.endpoints + endpoints.Element = AAZObjectType() + cls._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = _schema_models_project_read.properties.roles + roles.Element = AAZObjectType() + cls._build_schema_models_neon_role_properties_read(roles.Element) + + system_data = _schema_models_project_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.id = cls._schema_models_project_read.id + _schema.name = cls._schema_models_project_read.name + _schema.properties = cls._schema_models_project_read.properties + _schema.system_data = cls._schema_models_project_read.system_data + _schema.type = cls._schema_models_project_read.type + + +__all__ = ["Update"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py new file mode 100644 index 00000000000..3df35f666b5 --- /dev/null +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py @@ -0,0 +1,512 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "neon postgres project wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}", "2025-03-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.organization_name = AAZStrArg( + options=["--organization-name"], + help="The name of the Neon Organization resource", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", + max_length=50, + min_length=1, + ), + ) + _args_schema.project_id = AAZStrArg( + options=["--project-id"], + help="The id of the Neon Project resource.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^\\S.{0,62}\\S$|^\\S$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + help="The name of the Azure resource group", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ProjectsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class ProjectsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "organizationName", self.ctx.args.organization_name, + required=True, + ), + **self.serialize_url_param( + "projectName", self.ctx.args.project_id, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-03-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.attributes = AAZListType() + properties.branch = AAZObjectType() + properties.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + properties.databases = AAZListType() + properties.default_endpoint_settings = AAZObjectType( + serialized_name="defaultEndpointSettings", + ) + properties.endpoints = AAZListType() + properties.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + properties.entity_name = AAZStrType( + serialized_name="entityName", + ) + properties.history_retention = AAZIntType( + serialized_name="historyRetention", + ) + properties.pg_version = AAZIntType( + serialized_name="pgVersion", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.region_id = AAZStrType( + serialized_name="regionId", + ) + properties.roles = AAZListType() + properties.storage = AAZIntType() + + attributes = cls._schema_on_200.properties.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + branch = cls._schema_on_200.properties.branch + branch.attributes = AAZListType() + branch.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + branch.database_name = AAZStrType( + serialized_name="databaseName", + ) + branch.databases = AAZListType() + branch.endpoints = AAZListType() + branch.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + branch.entity_name = AAZStrType( + serialized_name="entityName", + ) + branch.parent_id = AAZStrType( + serialized_name="parentId", + ) + branch.project_id = AAZStrType( + serialized_name="projectId", + ) + branch.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + branch.role_name = AAZStrType( + serialized_name="roleName", + ) + branch.roles = AAZListType() + + attributes = cls._schema_on_200.properties.branch.attributes + attributes.Element = AAZObjectType() + _WaitHelper._build_schema_models_attributes_read(attributes.Element) + + databases = cls._schema_on_200.properties.branch.databases + databases.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + + endpoints = cls._schema_on_200.properties.branch.endpoints + endpoints.Element = AAZObjectType() + _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.branch.roles + roles.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + + databases = cls._schema_on_200.properties.databases + databases.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_database_properties_read(databases.Element) + + default_endpoint_settings = cls._schema_on_200.properties.default_endpoint_settings + default_endpoint_settings.autoscaling_limit_max_cu = AAZFloatType( + serialized_name="autoscalingLimitMaxCu", + flags={"required": True}, + ) + default_endpoint_settings.autoscaling_limit_min_cu = AAZFloatType( + serialized_name="autoscalingLimitMinCu", + flags={"required": True}, + ) + + endpoints = cls._schema_on_200.properties.endpoints + endpoints.Element = AAZObjectType() + _WaitHelper._build_schema_models_endpoint_properties_read(endpoints.Element) + + roles = cls._schema_on_200.properties.roles + roles.Element = AAZObjectType() + _WaitHelper._build_schema_models_neon_role_properties_read(roles.Element) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_models_attributes_read = None + + @classmethod + def _build_schema_models_attributes_read(cls, _schema): + if cls._schema_models_attributes_read is not None: + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + return + + cls._schema_models_attributes_read = _schema_models_attributes_read = AAZObjectType() + + models_attributes_read = _schema_models_attributes_read + models_attributes_read.name = AAZStrType( + flags={"required": True}, + ) + models_attributes_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.name = cls._schema_models_attributes_read.name + _schema.value = cls._schema_models_attributes_read.value + + _schema_models_endpoint_properties_read = None + + @classmethod + def _build_schema_models_endpoint_properties_read(cls, _schema): + if cls._schema_models_endpoint_properties_read is not None: + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + return + + cls._schema_models_endpoint_properties_read = _schema_models_endpoint_properties_read = AAZObjectType() + + models_endpoint_properties_read = _schema_models_endpoint_properties_read + models_endpoint_properties_read.attributes = AAZListType() + models_endpoint_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_endpoint_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_endpoint_properties_read.endpoint_type = AAZStrType( + serialized_name="endpointType", + ) + models_endpoint_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_endpoint_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_endpoint_properties_read.project_id = AAZStrType( + serialized_name="projectId", + ) + models_endpoint_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_endpoint_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_endpoint_properties_read.attributes + _schema.branch_id = cls._schema_models_endpoint_properties_read.branch_id + _schema.created_at = cls._schema_models_endpoint_properties_read.created_at + _schema.endpoint_type = cls._schema_models_endpoint_properties_read.endpoint_type + _schema.entity_id = cls._schema_models_endpoint_properties_read.entity_id + _schema.entity_name = cls._schema_models_endpoint_properties_read.entity_name + _schema.project_id = cls._schema_models_endpoint_properties_read.project_id + _schema.provisioning_state = cls._schema_models_endpoint_properties_read.provisioning_state + + _schema_models_neon_database_properties_read = None + + @classmethod + def _build_schema_models_neon_database_properties_read(cls, _schema): + if cls._schema_models_neon_database_properties_read is not None: + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + return + + cls._schema_models_neon_database_properties_read = _schema_models_neon_database_properties_read = AAZObjectType() + + models_neon_database_properties_read = _schema_models_neon_database_properties_read + models_neon_database_properties_read.attributes = AAZListType() + models_neon_database_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_database_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_database_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_database_properties_read.owner_name = AAZStrType( + serialized_name="ownerName", + ) + models_neon_database_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_database_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + _schema.attributes = cls._schema_models_neon_database_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_database_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_database_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_database_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_database_properties_read.entity_name + _schema.owner_name = cls._schema_models_neon_database_properties_read.owner_name + _schema.provisioning_state = cls._schema_models_neon_database_properties_read.provisioning_state + + _schema_models_neon_role_properties_read = None + + @classmethod + def _build_schema_models_neon_role_properties_read(cls, _schema): + if cls._schema_models_neon_role_properties_read is not None: + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + return + + cls._schema_models_neon_role_properties_read = _schema_models_neon_role_properties_read = AAZObjectType() + + models_neon_role_properties_read = _schema_models_neon_role_properties_read + models_neon_role_properties_read.attributes = AAZListType() + models_neon_role_properties_read.branch_id = AAZStrType( + serialized_name="branchId", + ) + models_neon_role_properties_read.created_at = AAZStrType( + serialized_name="createdAt", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_id = AAZStrType( + serialized_name="entityId", + flags={"read_only": True}, + ) + models_neon_role_properties_read.entity_name = AAZStrType( + serialized_name="entityName", + ) + models_neon_role_properties_read.is_super_user = AAZBoolType( + serialized_name="isSuperUser", + ) + models_neon_role_properties_read.permissions = AAZListType() + models_neon_role_properties_read.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + + attributes = _schema_models_neon_role_properties_read.attributes + attributes.Element = AAZObjectType() + cls._build_schema_models_attributes_read(attributes.Element) + + permissions = _schema_models_neon_role_properties_read.permissions + permissions.Element = AAZStrType() + + _schema.attributes = cls._schema_models_neon_role_properties_read.attributes + _schema.branch_id = cls._schema_models_neon_role_properties_read.branch_id + _schema.created_at = cls._schema_models_neon_role_properties_read.created_at + _schema.entity_id = cls._schema_models_neon_role_properties_read.entity_id + _schema.entity_name = cls._schema_models_neon_role_properties_read.entity_name + _schema.is_super_user = cls._schema_models_neon_role_properties_read.is_super_user + _schema.permissions = cls._schema_models_neon_role_properties_read.permissions + _schema.provisioning_state = cls._schema_models_neon_role_properties_read.provisioning_state + + +__all__ = ["Wait"] diff --git a/src/neon/azext_neon/azext_metadata.json b/src/neon/azext_neon/azext_metadata.json index b1e08d1f4b1..e506328978c 100644 --- a/src/neon/azext_neon/azext_metadata.json +++ b/src/neon/azext_neon/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.61.0" + "azext.minCliCoreVersion": "2.70.0" } \ No newline at end of file diff --git a/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml b/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml index 3f945e4ccec..5cc44dee7b6 100644 --- a/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml +++ b/src/neon/azext_neon/tests/latest/recordings/test_neon.yaml @@ -1,59 +1,62 @@ interactions: - request: - body: '{"location": "eastus2euap", "properties": {"companyDetails": {"businessPhone": + body: '{"location": "centraluseuap", "properties": {"companyDetails": {"businessPhone": "+1234567890", "companyName": "SampleCompany", "country": "USA", "domain": "samplecompany.com", "numberOfEmployees": 500, "officeAddress": "5678 Azure Blvd"}, "marketplaceDetails": - {"offerDetails": {"offerId": "neon_test", "planId": "neon_test_1", "planName": - "Neon Serverless Postgres - Free (Test_Liftr)", "publisherId": "neon1722366567200", - "termId": "gmz7xq9ge3py", "termUnit": "P1M"}, "subscriptionId": "yxmkfivp", - "subscriptionStatus": "PendingFulfillmentStart"}, "partnerOrganizationProperties": - {"organizationId": "org67890", "organizationName": "PartnerOrgForCLITest1", - "singleSignOnProperties": {"aadDomains": ["partnerorgtest.com"], "enterpriseAppId": - "app67890", "singleSignOnState": "Enable", "singleSignOnUrl": "https://sso.partnerorgtest.com"}}, - "userDetails": {"emailAddress": "khanalmas@example.com", "firstName": "Almas", - "lastName": "Khan", "phoneNumber": "+1234567890", "upn": "khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com"}}}' + {"offerDetails": {"offerId": "neon_serverless_postgres_azure_prod", "planId": + "neon_serverless_postgres_azure_prod_free", "planName": "Free Plan", "publisherId": + "neon1722366567200", "termId": "gmz7xq9ge3py", "termUnit": "P1M"}, "subscriptionId": + "b6ca5a0a-c4be-454f-cc46-a400799b9d49", "subscriptionStatus": "PendingFulfillmentStart"}, + "partnerOrganizationProperties": {"organizationId": "", "organizationName": + "Neon-Cli-Scenario-Tests", "singleSignOnProperties": {"aadDomains": [], "enterpriseAppId": + "", "singleSignOnState": "Enable", "singleSignOnUrl": ""}}, "projectProperties": + {"branch": {"databaseName": "neondb", "entityName": "main", "roleName": "onwer_role"}, + "entityName": "TestProject1", "pgVersion": 17, "regionId": "eastus2"}, "userDetails": + {"emailAddress": "sralluri211@outlook.com", "firstName": "Srinivas", "lastName": + "Alluri", "phoneNumber": "+1234567890", "upn": "sralluri211@outlook.com"}}, + "tags": {"key": "value"}}' headers: Accept: - application/json Accept-Encoding: - gzip, deflate CommandName: - - neon postgres create + - neon postgres organization create Connection: - keep-alive Content-Length: - - '1043' + - '1202' Content-Type: - application/json ParameterSetName: - - --resource-group --name --location --subscription --marketplace-details --user-details - --company-details --partner-organization-properties + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1?api-version=2024-08-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests?api-version=2025-03-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","name":"NeonCLITestOrg1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T19:03:11.7505214Z","lastModifiedBy":"khanalmas@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2024-10-21T19:03:11.7505214Z"},"properties":{"marketplaceDetails":{"subscriptionId":"yxmkfivp","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Accepted","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgForCLITest1","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://sso.partnerorgtest.com","aadDomains":["partnerorgtest.com"]}}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","name":"Neon-Cli-Scenario-Tests","type":"neon.postgres/organizations","location":"centraluseuap","tags":{"key":"value"},"systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:48:04.0414565Z","lastModifiedBy":"sralluri211@outlook.com","lastModifiedByType":"User","lastModifiedAt":"2025-04-29T10:48:04.0414565Z"},"properties":{"marketplaceDetails":{"subscriptionId":"b6ca5a0a-c4be-454f-cc46-a400799b9d49","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_serverless_postgres_azure_prod","planId":"neon_serverless_postgres_azure_prod_free","planName":"Free + Plan","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Srinivas","lastName":"Alluri","emailAddress":"sralluri211@outlook.com","upn":"sralluri211@outlook.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 + Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Accepted","partnerOrganizationProperties":{"organizationId":"","organizationName":"Neon-Cli-Scenario-Tests","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"","singleSignOnUrl":"","aadDomains":[]}},"projectProperties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"defaultEndpointSettings":null,"branch":{"projectId":null,"parentId":null,"roleName":"onwer_role","databaseName":"neondb","roles":null,"databases":null,"endpoints":null,"attributes":null,"entityId":null,"entityName":"main","createdAt":null,"provisioningState":null},"roles":null,"databases":null,"endpoints":null,"entityId":null,"entityName":"TestProject1","createdAt":null,"provisioningState":null,"attributes":null}}}' headers: azure-asyncoperation: - - https://management.azure.com/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD?api-version=2024-08-01-preview&t=638651341988287323&c=MIIHhzCCBm-gAwIBAgITHgVsohlR2527oAb3YwAABWyiGTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwOTIyMTIzNzU1WhcNMjUwMzIxMTIzNzU1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhrLEJmsmtpzYzyjkwosX72drFxelF_0kAmuW7jzqQUwb3Vbkmt3AMdawBA7iPG-j-_iaEVRdn5iaEuJE6hSge15_CbeDkRt-qHgospNLcjh6GjynbLyFCQH_IkKY4Mc0yIlKxilQSCf2V6ah2w7S1CyC5zwZroBYavu5w0ZL02jRKMTNVzB03DnGhQGJ7gJbtKJ9AbjVcFwFTpT0Z0Yo-sLpwoVvADWng0JznFSekROEXCF_U3gHMssCctipkbrivaRFNKL3OjHjvuPxD8gsBo2BR_swq3Eyj-68_1B2-zYVD0d811pP8URR-43YYAMXO2Us1Uw6dn-b351XnW8JECAwEAAaOC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hScrLI4lOjXax918fI2PAmmKKFHdAYFgGAtWV-Fl9k6QkK0pcLEMo7eraOkY9GEgBDijVVsrXmZNQoAnuVJt27dc2zsqk1TwsmxCzxjuPD2NTd3hYw&h=-awJTg6kBBNiWYbW2XVmlXZHddLLQ8L7Mq_vwwBYOXw + - https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKw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yTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI cache-control: - no-cache content-length: - - '1455' + - '1952' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:03:18 GMT + - Tue, 29 Apr 2025 10:48:21 GMT etag: - - '"0000e348-0000-3300-0000-6716a5760000"' + - '"1800f4ff-0000-3300-0000-6810ae750000"' expires: - '-1' location: - - https://eastus2euap.management.azure.com/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD?api-version=2024-08-01-preview&t=638651341988287323&c=MIIHhzCCBm-gAwIBAgITHgVsohlR2527oAb3YwAABWyiGTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwOTIyMTIzNzU1WhcNMjUwMzIxMTIzNzU1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMhrLEJmsmtpzYzyjkwosX72drFxelF_0kAmuW7jzqQUwb3Vbkmt3AMdawBA7iPG-j-_iaEVRdn5iaEuJE6hSge15_CbeDkRt-qHgospNLcjh6GjynbLyFCQH_IkKY4Mc0yIlKxilQSCf2V6ah2w7S1CyC5zwZroBYavu5w0ZL02jRKMTNVzB03DnGhQGJ7gJbtKJ9AbjVcFwFTpT0Z0Yo-sLpwoVvADWng0JznFSekROEXCF_U3gHMssCctipkbrivaRFNKL3OjHjvuPxD8gsBo2BR_swq3Eyj-68_1B2-zYVD0d811pP8URR-43YYAMXO2Us1Uw6dn-b351XnW8JECAwEAAaOCBHQwggR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lOjXax918fI2PAmmKKFHdAYFgGAtWV-Fl9k6QkK0pcLEMo7eraOkY9GEgBDijVVsrXmZNQoAnuVJt27dc2zsqk1TwsmxCzxjuPD2NTd3hYw&h=-awJTg6kBBNiWYbW2XVmlXZHddLLQ8L7Mq_vwwBYOXw + - https://eastus2euap.management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJK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LyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI pragma: - no-cache request-context: @@ -64,6 +67,10 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - P6D + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/593b0048-e6f5-472a-982e-2b453b5dfebb x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -71,7 +78,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: ED30862ABCFD4A3891726A96A378E6BA Ref B: MAA201060514053 Ref C: 2024-10-21T19:03:10Z' + - 'Ref A: 5B6C82C3B377404FBC18D79B3F2978BB Ref B: MAA201060514011 Ref C: 2025-04-29T10:48:03Z' status: code: 201 message: Created @@ -83,30 +90,30 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - neon postgres create + - neon postgres organization create Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --subscription --marketplace-details --user-details - --company-details --partner-organization-properties + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD?api-version=2024-08-01-preview&t=638651341988287323&c=MIIHhzCCBm-gAwIBAgITHgVsohlR2527oAb3YwAABWyiGTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYK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9nSE7AYf9OZGmPXw_SpE0CIxcQiahWc3LG3zRYLxmiKsYYlN9_r_6fPeEmIs7P7xm7g_xAAHLymI5BQDzGsW5GzAzYVOwolJBj3EcX1bxxIqeEgLvHNmYOr4D5MZFv14TGMHziu0TzPAbbVe9-DmMbrqs1mszrnuUiHTsmKE2oNmv4gjZMYSJAdsUzkjxQEa8t1t7FUEvbDkWkYSdqK0-OoTDVLsRVwRNk9XJ04coDgWql1-iv6bYNXyhC0L_-bdTOs_Gnzu-tFEA2we7Zkew_fhDuJwGTDnhaqvhush0SPJuFmoYBvmEzEJsc_Bjay2DrOHiLTopNoBJVrt8&s=IBx_lnp7wu4AgfWSn9v3vBFt0wmatvQrH8KqsvbHFEVJi1duUWB9mKzn4PtgAW4Au6cfv1QlbT4kXW8psGEHhKZD1kYMYJQg72lzvuS1p5UhD90QnbfofYu0NXyvtzWr5fdwyb6EmPH8RaO9pO5BPWcGldKq0kAoapzPjT3k1Qtz0ONUMU5ZQZpSqyeD_4CsOlVEPeIRuYD1QHvp9hm8ej0zeiJRlTWpoLg7hScrLI4lOjXax918fI2PAmmKKFHdAYFgGAtWV-Fl9k6QkK0pcLEMo7eraOkY9GEgBDijVVsrXmZNQoAnuVJt27dc2zsqk1TwsmxCzxjuPD2NTd3hYw&h=-awJTg6kBBNiWYbW2XVmlXZHddLLQ8L7Mq_vwwBYOXw + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNM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0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=rBrycYXMBaseUtiGHRXh0PPfwIikmBKFRF06h56H7E_HNCdYZ46f_Gy96TNd3LLthkRDuJOBop_CjK3gvzCZjyDRUBT4muBJh6a7U13YkeshiHacszenpjmUdfBxyHmeB_xfvhPsN5JT9avZxpHGq-mP8SVv9Omrrdr-fjA8rMadJwksfDAFLbOuS9efNTV1m5pj69QUjdn8ddBxfyRw3-lMUyIij1ckXcGE5TA80xTAAFleU8rMK5a8wqIgTQnImKw5FM2W-0Q-hqBGXEZzQcR_teBHmnuwik4ZLMfKrZ4zzw-uo8nvwS2DlFaOQahLyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI response: body: - string: '{"id":"/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","name":"730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","status":"Accepted","startTime":"2024-10-21T19:03:15.8369382Z"}' + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Accepted","startTime":"2025-04-29T10:48:19.6806062Z"}' headers: cache-control: - no-cache content-length: - - '496' + - '502' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:03:19 GMT + - Tue, 29 Apr 2025 10:48:23 GMT etag: - - '"02001855-0000-3300-0000-6716a5740000"' + - '"15005fb0-0000-3300-0000-6810ae730000"' expires: - '-1' pragma: @@ -117,8 +124,10 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-operation-identifier: + - '' x-msedge-ref: - - 'Ref A: 4058D59966FB42AC9DC132A925AE4E96 Ref B: MAA201060514053 Ref C: 2024-10-21T19:03:18Z' + - 'Ref A: EDC4F2CAB03644C7AA2D8009901A5E27 Ref B: MAA201060514011 Ref C: 2025-04-29T10:48:22Z' status: code: 200 message: OK @@ -130,30 +139,30 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - neon postgres create + - neon postgres organization create Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --subscription --marketplace-details --user-details - --company-details --partner-organization-properties + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD?api-version=2024-08-01-preview&t=638651341988287323&c=MIIHhzCCBm-gAwIBAgITHg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m-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAG22HO9nSE7AYf9OZGmPXw_SpE0CIxcQiahWc3LG3zRYLxmiKsYYlN9_r_6fPeEmIs7P7xm7g_xAAHLymI5BQDzGsW5GzAzYVOwolJBj3EcX1bxxIqeEgLvHNmYOr4D5MZFv14TGMHziu0TzPAbbVe9-DmMbrqs1mszrnuUiHTsmKE2oNmv4gjZMYSJAdsUzkjxQEa8t1t7FUEvbDkWkYSdqK0-OoTDVLsRVwRNk9XJ04coDgWql1-iv6bYNXyhC0L_-bdTOs_Gnzu-tFEA2we7Zkew_fhDuJwGTDnhaqvhush0SPJuFmoYBvmEzEJsc_Bjay2DrOHiLTopNoBJVrt8&s=IBx_lnp7wu4AgfWSn9v3vBFt0wmatvQrH8KqsvbHFEVJi1duUWB9mKzn4PtgAW4Au6cfv1QlbT4kXW8psGEHhKZD1kYMYJQg72lzvuS1p5UhD90QnbfofYu0NXyvtzWr5fdwyb6EmPH8RaO9pO5BPWcGldKq0kAoapzPjT3k1Qtz0ONUMU5ZQZpSqyeD_4CsOlVEPeIRuYD1QHvp9hm8ej0zeiJRlTWpoLg7hScrLI4lOjXax918fI2PAmmKKFHdAYFgGAtWV-Fl9k6QkK0pcLEMo7eraOkY9GEgBDijVVsrXmZNQoAnuVJt27dc2zsqk1TwsmxCzxjuPD2NTd3hYw&h=-awJTg6kBBNiWYbW2XVmlXZHddLLQ8L7Mq_vwwBYOXw + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZP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wS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=rBrycYXMBaseUtiGHRXh0PPfwIikmBKFRF06h56H7E_HNCdYZ46f_Gy96TNd3LLthkRDuJOBop_CjK3gvzCZjyDRUBT4muBJh6a7U13YkeshiHacszenpjmUdfBxyHmeB_xfvhPsN5JT9avZxpHGq-mP8SVv9Omrrdr-fjA8rMadJwksfDAFLbOuS9efNTV1m5pj69QUjdn8ddBxfyRw3-lMUyIij1ckXcGE5TA80xTAAFleU8rMK5a8wqIgTQnImKw5FM2W-0Q-hqBGXEZzQcR_teBHmnuwik4ZLMfKrZ4zzw-uo8nvwS2DlFaOQahLyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI response: body: - string: '{"id":"/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","name":"730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","status":"Accepted","startTime":"2024-10-21T19:03:15.8369382Z"}' + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Accepted","startTime":"2025-04-29T10:48:19.6806062Z"}' headers: cache-control: - no-cache content-length: - - '496' + - '502' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:03:50 GMT + - Tue, 29 Apr 2025 10:48:54 GMT etag: - - '"02001855-0000-3300-0000-6716a5740000"' + - '"15005fb0-0000-3300-0000-6810ae730000"' expires: - '-1' pragma: @@ -164,8 +173,10 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-operation-identifier: + - '' x-msedge-ref: - - 'Ref A: 26357773ADD041868DC0C9DF50F83635 Ref B: MAA201060514053 Ref C: 2024-10-21T19:03:49Z' + - 'Ref A: 0B80A49CD3F84696836F001FBDD414B1 Ref B: MAA201060514011 Ref C: 2025-04-29T10:48:54Z' status: code: 200 message: OK @@ -177,30 +188,30 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - neon postgres create + - neon postgres organization create Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --subscription --marketplace-details --user-details - --company-details --partner-organization-properties + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55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AwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAG22HO9nSE7AYf9OZGmPXw_SpE0CIxcQiahWc3LG3zRYLxmiKsYYlN9_r_6fPeEmIs7P7xm7g_xAAHLymI5BQDzGsW5GzAzYVOwolJBj3EcX1bxxIqeEgLvHNmYOr4D5MZFv14TGMHziu0TzPAbbVe9-DmMbrqs1mszrnuUiHTsmKE2oNmv4gjZMYSJAdsUzkjxQEa8t1t7FUEvbDkWkYSdqK0-OoTDVLsRVwRNk9XJ04coDgWql1-iv6bYNXyhC0L_-bdTOs_Gnzu-tFEA2we7Zkew_fhDuJwGTDnhaqvhush0SPJuFmoYBvmEzEJsc_Bjay2DrOHiLTopNoBJVrt8&s=IBx_lnp7wu4AgfWSn9v3vBFt0wmatvQrH8KqsvbHFEVJi1duUWB9mKzn4PtgAW4Au6cfv1QlbT4kXW8psGEHhKZD1kYMYJQg72lzvuS1p5UhD90QnbfofYu0NXyvtzWr5fdwyb6EmPH8RaO9pO5BPWcGldKq0kAoapzPjT3k1Qtz0ONUMU5ZQZpSqyeD_4CsOlVEPeIRuYD1QHvp9hm8ej0zeiJRlTWpoLg7hScrLI4lOjXax918fI2PAmmKKFHdAYFgGAtWV-Fl9k6QkK0pcLEMo7eraOkY9GEgBDijVVsrXmZNQoAnuVJt27dc2zsqk1TwsmxCzxjuPD2NTd3hYw&h=-awJTg6kBBNiWYbW2XVmlXZHddLLQ8L7Mq_vwwBYOXw + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8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UIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=rBrycYXMBaseUtiGHRXh0PPfwIikmBKFRF06h56H7E_HNCdYZ46f_Gy96TNd3LLthkRDuJOBop_CjK3gvzCZjyDRUBT4muBJh6a7U13YkeshiHacszenpjmUdfBxyHmeB_xfvhPsN5JT9avZxpHGq-mP8SVv9Omrrdr-fjA8rMadJwksfDAFLbOuS9efNTV1m5pj69QUjdn8ddBxfyRw3-lMUyIij1ckXcGE5TA80xTAAFleU8rMK5a8wqIgTQnImKw5FM2W-0Q-hqBGXEZzQcR_teBHmnuwik4ZLMfKrZ4zzw-uo8nvwS2DlFaOQahLyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI response: body: - string: '{"id":"/providers/Neon.Postgres/locations/EASTUS2EUAP/operationStatuses/730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","name":"730f0858-2a4b-4962-bd2b-464c777c78c2*FCC0E4765A68B00CD123FFF2CC55F30B3EE19192AF146687474D4CA2757C9EFD","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","status":"Succeeded","startTime":"2024-10-21T19:03:15.8369382Z","endTime":"2024-10-21T19:04:16.1971954Z","error":{},"properties":null}' + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Accepted","startTime":"2025-04-29T10:48:19.6806062Z"}' headers: cache-control: - no-cache content-length: - - '567' + - '502' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:04:20 GMT + - Tue, 29 Apr 2025 10:49:25 GMT etag: - - '"02005a55-0000-3300-0000-6716a5b00000"' + - '"15005fb0-0000-3300-0000-6810ae730000"' expires: - '-1' pragma: @@ -211,8 +222,10 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-operation-identifier: + - '' x-msedge-ref: - - 'Ref A: 174BF0B1D75C461D9C6AB07210D96E54 Ref B: MAA201060514053 Ref C: 2024-10-21T19:04:20Z' + - 'Ref A: C31F33CFA33F4ECBAFC5E71E615A2190 Ref B: MAA201060514011 Ref C: 2025-04-29T10:49:25Z' status: code: 200 message: OK @@ -224,32 +237,179 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - neon postgres create + - neon postgres organization create Connection: - keep-alive ParameterSetName: - - --resource-group --name --location --subscription --marketplace-details --user-details - --company-details --partner-organization-properties + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1?api-version=2024-08-01-preview + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVt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gp9I7Q407TKY2rY1f-9QdiI response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","name":"NeonCLITestOrg1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T19:03:11.7505214Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T19:04:16.4363549Z"},"properties":{"marketplaceDetails":{"subscriptionId":"0e758fc3-3dd7-419e-d32e-25d5072f837e","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgForCLITest1","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-super-grass-33609650","aadDomains":["partnerorgtest.com"]}}}}' + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Accepted","startTime":"2025-04-29T10:48:19.6806062Z"}' headers: cache-control: - no-cache content-length: - - '1521' + - '502' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:04:21 GMT + - Tue, 29 Apr 2025 10:49:57 GMT etag: - - '"0000d649-0000-3300-0000-6716a5b00000"' + - '"15005fb0-0000-3300-0000-6810ae730000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: F1A479B8305D4AB785177A2407B112CB Ref B: MAA201060514011 Ref C: 2025-04-29T10:49:57Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCC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V1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=rBrycYXMBaseUtiGHRXh0PPfwIikmBKFRF06h56H7E_HNCdYZ46f_Gy96TNd3LLthkRDuJOBop_CjK3gvzCZjyDRUBT4muBJh6a7U13YkeshiHacszenpjmUdfBxyHmeB_xfvhPsN5JT9avZxpHGq-mP8SVv9Omrrdr-fjA8rMadJwksfDAFLbOuS9efNTV1m5pj69QUjdn8ddBxfyRw3-lMUyIij1ckXcGE5TA80xTAAFleU8rMK5a8wqIgTQnImKw5FM2W-0Q-hqBGXEZzQcR_teBHmnuwik4ZLMfKrZ4zzw-uo8nvwS2DlFaOQahLyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Accepted","startTime":"2025-04-29T10:48:19.6806062Z"}' + headers: + cache-control: + - no-cache + content-length: + - '502' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:50:28 GMT + etag: + - '"15005fb0-0000-3300-0000-6810ae730000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: AF8142D854FA4B50BE4CF6E42F247871 Ref B: MAA201060514011 Ref C: 2025-04-29T10:50:27Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815205024332023&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ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1m5pj69QUjdn8ddBxfyRw3-lMUyIij1ckXcGE5TA80xTAAFleU8rMK5a8wqIgTQnImKw5FM2W-0Q-hqBGXEZzQcR_teBHmnuwik4ZLMfKrZ4zzw-uo8nvwS2DlFaOQahLyTcSjmiErGCg55LEl850rw&h=V2sv0k_q1bKCHheAyKydgp9I7Q407TKY2rY1f-9QdiI + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"a365b19c-5e32-4680-bf92-128181c6b7da*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Succeeded","startTime":"2025-04-29T10:48:19.6806062Z","endTime":"2025-04-29T10:50:43.8387286Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '573' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:00 GMT + etag: + - '"15008eb2-0000-3300-0000-6810af040000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: C4AFFB145A8B4CD0AAB917C911F8E9A2 Ref B: MAA201060514011 Ref C: 2025-04-29T10:50:59Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization create + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --location --tags --subscription --marketplace-details + --user-details --company-details --partner-organization-properties --project-properties + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests?api-version=2025-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","name":"Neon-Cli-Scenario-Tests","type":"neon.postgres/organizations","location":"centraluseuap","tags":{"key":"value"},"systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:48:04.0414565Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2025-04-29T10:50:56.5471702Z"},"properties":{"marketplaceDetails":{"subscriptionId":"8e9772d5-6ab6-4c5a-dff6-d9bad3df85d8","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_serverless_postgres_azure_prod","planId":"neon_serverless_postgres_azure_prod_free","planName":"Free + Plan","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Srinivas","lastName":"Alluri","emailAddress":"sralluri211@outlook.com","upn":"sralluri211@outlook.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 + Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org-muddy-lab-01043080","organizationName":"Neon-Cli-Scenario-Tests","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-muddy-lab-01043080","aadDomains":[]}},"projectProperties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"branch":{"roleName":"onwer_role","databaseName":"neondb","entityName":"main"},"entityName":"TestProject1"}}}' + headers: + cache-control: + - no-cache + content-length: + - '1730' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:01 GMT + etag: + - '"19000a01-0000-3300-0000-6810af100000"' expires: - '-1' pragma: @@ -265,7 +425,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: 0756F368610746F9BDB1BB3668441FD5 Ref B: MAA201060514053 Ref C: 2024-10-21T19:04:20Z' + - 'Ref A: 858DA2CA32FC4F2FB24AD9E1DFB8F954 Ref B: MAA201060514011 Ref C: 2025-04-29T10:51:00Z' status: code: 200 message: OK @@ -283,39 +443,26 @@ interactions: ParameterSetName: - --subscription --resource-group User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations?api-version=2024-08-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations?api-version=2025-03-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/testOrgAAK","name":"testOrgAAK","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T07:12:25.3271874Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T07:14:54.8372555Z"},"properties":{"marketplaceDetails":{"subscriptionId":"cb35e68e-40d2-4571-c4a3-69dfc1688178","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@microsoft.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com"},"companyDetails":{"companyName":"","country":"","businessPhone":""},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationName":"testOrgAAK","singleSignOnProperties":{"singleSignOnState":"Enable","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-broad-bird-88286889"}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/almasTestNeonCLI","name":"almasTestNeonCLI","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T15:40:16.7969677Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T16:10:38.0484556Z"},"properties":{"marketplaceDetails":{"subscriptionId":"5455c40c-702f-42ef-cba5-2110af5b5dfa","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@microsoft.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"DemoCompany","country":"USA","officeAddress":"1234 - Azure Ave","businessPhone":"+1234567890","domain":"demo.com","numberOfEmployees":500},"provisioningState":"Failed","partnerOrganizationProperties":{"organizationId":"org12345","organizationName":"PartnerOrg","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app12345","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-icy-scene-94742526","aadDomains":["partnerorg.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonTestResource","name":"NeonTestResource","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T16:34:49.0962829Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T16:36:28.8779884Z"},"properties":{"marketplaceDetails":{"subscriptionId":"cc303643-4057-491f-cc8e-030a0fcdb5e6","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgTest","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-delicate-morning-13588151","aadDomains":["partnerorgtest.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/testCLI3","name":"testCLI3","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:03:52.7521565Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:04:53.9735963Z"},"properties":{"marketplaceDetails":{"subscriptionId":"8e525940-3300-4809-c0fd-fccf77cfd730","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@microsoft.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com"},"companyDetails":{"companyName":"","country":"","businessPhone":""},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationName":"testCLI3","singleSignOnProperties":{"singleSignOnState":"Enable","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-long-waterfall-13574342"}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/almasTestNeonCLI1","name":"almasTestNeonCLI1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:13:21.5974908Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:14:41.9817237Z"},"properties":{"marketplaceDetails":{"subscriptionId":"d7956329-f6f6-4310-c32a-6d3c46bffbc4","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@microsoft.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"DemoCompany","country":"USA","officeAddress":"1234 - Azure Ave","businessPhone":"+1234567890","domain":"demo.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org12345","organizationName":"PartnerOrg","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app12345","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-autumn-smoke-39663810","aadDomains":["partnerorg.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonTestResourceForCLI1","name":"NeonTestResourceForCLI1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:45:42.3180151Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:47:46.488867Z"},"properties":{"marketplaceDetails":{"subscriptionId":"e16f9b75-7a70-45cb-d5b4-8c91faafd1db","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgTestForCLI1","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-black-field-23860974","aadDomains":["partnerorgtest.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonTestResourceForCLI2","name":"NeonTestResourceForCLI2","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:49:26.3211919Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:50:42.8908266Z"},"properties":{"marketplaceDetails":{"subscriptionId":"db3e2813-417f-441e-c220-550fa20ed372","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgTestForCLI2","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-dry-heart-14145168","aadDomains":["partnerorgtest.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonTestResourceForCLI3","name":"NeonTestResourceForCLI3","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:53:07.8740855Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:53:59.8132572Z"},"properties":{"marketplaceDetails":{"subscriptionId":"b075c3cc-fa48-46f1-d7a8-56e7de262ec1","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgTestForCLI3","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-lucky-snow-46458514","aadDomains":["partnerorgtest.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestResource1","name":"NeonCLITestResource1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T18:56:12.8009938Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T18:57:47.0688822Z"},"properties":{"marketplaceDetails":{"subscriptionId":"372b00ba-f425-4a84-de2f-c8ad6ca94da9","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgCLITest","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-young-term-63759514","aadDomains":["partnerorgtest.com"]}}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","name":"NeonCLITestOrg1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T19:03:11.7505214Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T19:04:16.4363549Z"},"properties":{"marketplaceDetails":{"subscriptionId":"0e758fc3-3dd7-419e-d32e-25d5072f837e","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgForCLITest1","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-super-grass-33609650","aadDomains":["partnerorgtest.com"]}}}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT","name":"Test-Neon-Org-Cli-IT","type":"neon.postgres/organizations","location":"Central + US EUAP","tags":{},"systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-28T15:15:55.6562051Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2025-04-28T15:18:51.6630889Z"},"properties":{"marketplaceDetails":{"subscriptionId":"5f4139c6-4fe3-4c38-c107-74694350e8ad","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_serverless_postgres_azure_prod","planId":"neon_serverless_postgres_azure_prod_free","planName":"Free + Plan","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Srinivas","lastName":"Alluri","emailAddress":"sralluri211@outlook.com","upn":"sralluri211@outlook.com","phoneNumber":""},"companyDetails":{"companyName":"","country":"","businessPhone":""},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org-round-wildflower-92733070","organizationName":"Test-Neon-Org-Cli-IT","singleSignOnProperties":{"singleSignOnState":"Enable","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-round-wildflower-92733070"}},"projectProperties":{"regionId":"Central + US EUAP","storage":0,"pgVersion":17,"historyRetention":0,"branch":{"databaseName":"neondb"},"entityName":"Test-Neon-Project-Cli-IT"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","name":"Neon-Cli-Scenario-Tests","type":"neon.postgres/organizations","location":"centraluseuap","tags":{"key":"value"},"systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:48:04.0414565Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2025-04-29T10:50:56.5471702Z"},"properties":{"marketplaceDetails":{"subscriptionId":"8e9772d5-6ab6-4c5a-dff6-d9bad3df85d8","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_serverless_postgres_azure_prod","planId":"neon_serverless_postgres_azure_prod_free","planName":"Free + Plan","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Srinivas","lastName":"Alluri","emailAddress":"sralluri211@outlook.com","upn":"sralluri211@outlook.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 + Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org-muddy-lab-01043080","organizationName":"Neon-Cli-Scenario-Tests","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-muddy-lab-01043080","aadDomains":[]}},"projectProperties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"branch":{"roleName":"onwer_role","databaseName":"neondb","entityName":"main"},"entityName":"TestProject1"}}}]}' headers: cache-control: - no-cache content-length: - - '14720' + - '3281' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:04:23 GMT + - Tue, 29 Apr 2025 10:51:02 GMT expires: - '-1' pragma: @@ -327,12 +474,13 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - 98d23c15-f517-4e02-91ab-1c6bce2d5559 - - 3ae21bc8-3f3c-43a1-bc91-37404300d5ef + - cc14cbc7-f4cd-48f7-a329-7265c2d2743f + x-ms-providerhub-traffic: + - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: A01865F5763B447783D61BBCD4FFB442 Ref B: MAA201060515029 Ref C: 2024-10-21T19:04:22Z' + - 'Ref A: ACC851881F054EB7BDA6AFFFABEA6787 Ref B: MAA201060514017 Ref C: 2025-04-29T10:51:02Z' status: code: 200 message: OK @@ -350,41 +498,869 @@ interactions: ParameterSetName: - --subscription --resource-group --name User-Agent: - - AZURECLI/2.65.0 azsdk-python-core/1.31.0 Python/3.11.0 (Windows-10-10.0.26100-SP0) + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1?api-version=2024-08-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests?api-version=2025-03-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/NeonDemoRG/providers/Neon.Postgres/organizations/NeonCLITestOrg1","name":"NeonCLITestOrg1","type":"neon.postgres/organizations","location":"eastus2euap","systemData":{"createdBy":"khanalmas@microsoft.com","createdByType":"User","createdAt":"2024-10-21T19:03:11.7505214Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2024-10-21T19:04:16.4363549Z"},"properties":{"marketplaceDetails":{"subscriptionId":"0e758fc3-3dd7-419e-d32e-25d5072f837e","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_test","planId":"neon_test_1","planName":"Neon - Serverless Postgres - Free (Test_Liftr)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Almas","lastName":"Khan","emailAddress":"khanalmas@example.com","upn":"khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 - Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org67890","organizationName":"PartnerOrgForCLITest1","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"app67890","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-super-grass-33609650","aadDomains":["partnerorgtest.com"]}}}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","name":"Neon-Cli-Scenario-Tests","type":"neon.postgres/organizations","location":"centraluseuap","tags":{"key":"value"},"systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:48:04.0414565Z","lastModifiedBy":"b41fa140-8cb4-43b1-a086-717c2f41909e","lastModifiedByType":"Application","lastModifiedAt":"2025-04-29T10:50:56.5471702Z"},"properties":{"marketplaceDetails":{"subscriptionId":"8e9772d5-6ab6-4c5a-dff6-d9bad3df85d8","subscriptionStatus":"Subscribed","offerDetails":{"publisherId":"neon1722366567200","offerId":"neon_serverless_postgres_azure_prod","planId":"neon_serverless_postgres_azure_prod_free","planName":"Free + Plan","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"userDetails":{"firstName":"Srinivas","lastName":"Alluri","emailAddress":"sralluri211@outlook.com","upn":"sralluri211@outlook.com","phoneNumber":"+1234567890"},"companyDetails":{"companyName":"SampleCompany","country":"USA","officeAddress":"5678 + Azure Blvd","businessPhone":"+1234567890","domain":"samplecompany.com","numberOfEmployees":500},"provisioningState":"Succeeded","partnerOrganizationProperties":{"organizationId":"org-muddy-lab-01043080","organizationName":"Neon-Cli-Scenario-Tests","singleSignOnProperties":{"singleSignOnState":"Enable","enterpriseAppId":"","singleSignOnUrl":"https://console.neon.tech/azure/sso/org-muddy-lab-01043080","aadDomains":[]}},"projectProperties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"branch":{"roleName":"onwer_role","databaseName":"neondb","entityName":"main"},"entityName":"TestProject1"}}}' headers: cache-control: - no-cache content-length: - - '1521' + - '1730' content-type: - application/json; charset=utf-8 date: - - Mon, 21 Oct 2024 19:04:25 GMT + - Tue, 29 Apr 2025 10:51:03 GMT etag: - - '"0000d649-0000-3300-0000-6716a5b00000"' + - '"19000a01-0000-3300-0000-6810af100000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 7D87F0DF62EB4731BC4F9889D56593B2 Ref B: MAA201060516045 Ref C: 2025-04-29T10:51:03Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"branch": {"databaseName": "clidb", "entityName": "dev-cli-branch", + "roleName": "dev_role"}, "pgVersion": 17, "regionId": "eastus2"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres project create + Connection: + - keep-alive + Content-Length: + - '149' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --organization-name --project-name --pg-version --region + --branch + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests/projects/TestProject2?api-version=2025-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests/projects/TestProject2","name":"TestProject2","type":"neon.postgres/organizations/projects","systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:51:05.5300286Z","lastModifiedBy":"sralluri211@outlook.com","lastModifiedByType":"User","lastModifiedAt":"2025-04-29T10:51:05.5300286Z"},"properties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":1,"defaultEndpointSettings":{"autoscalingLimitMinCu":0.25,"autoscalingLimitMaxCu":0.25},"branch":{"projectId":"small-math-74041588","parentId":null,"roleName":null,"databaseName":null,"roles":null,"databases":null,"endpoints":null,"attributes":null,"entityId":"br-red-heart-a8pa9ko2","entityName":"main","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":null},"roles":[{"branchId":"br-red-heart-a8pa9ko2","permissions":null,"isSuperUser":false,"entityId":null,"entityName":"clidb_owner","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded","attributes":null}],"databases":[{"branchId":"br-red-heart-a8pa9ko2","ownerName":"clidb_owner","entityId":null,"entityName":"clidb","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded","attributes":null}],"endpoints":[{"projectId":"small-math-74041588","branchId":"br-red-heart-a8pa9ko2","endpointType":"read_write","entityId":null,"entityName":null,"createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded","attributes":null}],"entityId":"small-math-74041588","entityName":"TestProject2","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded","attributes":null}}' + headers: + cache-control: + - no-cache + content-length: + - '1715' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:08 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/7f28519a-744c-4bf4-b08a-ae52e88b3321 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: AB250C825CE24DFB908FDEC51DE2EBFB Ref B: MAA201060514037 Ref C: 2025-04-29T10:51:05Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres project list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organization-name + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests/projects?api-version=2025-03-01 + response: + body: + string: '{"value":[{"properties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"entityId":"small-math-74041588","entityName":"TestProject2","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded"}},{"properties":{"regionId":"eastus2","storage":0,"pgVersion":17,"historyRetention":0,"entityId":"floral-unit-14000088","entityName":"TestProject1","createdAt":"Apr + 29, 2025 10:49 AM","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '442' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:11 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/dae7a186-09a9-4e70-b7b4-ce9a31f17047 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: CB773480735A44468240BE9768D37BAE Ref B: MAA201060515035 Ref C: 2025-04-29T10:51:09Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres project show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organization-name --project-id + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972?api-version=2025-03-01 + response: + body: + string: '{"properties":{"regionId":"eastus2","storage":36442128,"pgVersion":17,"historyRetention":1,"defaultEndpointSettings":{"autoscalingLimitMinCu":0.25,"autoscalingLimitMaxCu":0.25},"branch":null,"roles":null,"databases":null,"endpoints":null,"entityId":"withered-sea-55021972","entityName":"Test-Neon-Project-Cli-IT","createdAt":"Apr + 28, 2025 3:18 PM","provisioningState":"Succeeded","attributes":null}}' + headers: + cache-control: + - no-cache + content-length: + - '399' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:12 GMT expires: - '-1' pragma: - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 strict-transport-security: - max-age=31536000; includeSubDomains x-cache: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/41661f1b-4532-48a4-a8b5-bbd7961eae6a x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: 884C6BD67CA443D0BAEE1D537781E9F2 Ref B: MAA201060516037 Ref C: 2024-10-21T19:04:24Z' + - 'Ref A: F0EB75E0949D4BAF83F5CA0D8DEAA83D Ref B: MAA201060516039 Ref C: 2025-04-29T10:51:11Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres branch list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organization-name --project-id + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches?api-version=2025-03-01 + response: + body: + string: '{"value":[{"properties":{"projectId":"withered-sea-55021972","parentId":"br-frosty-bird-a85qx3j8","attributes":[{"name":"createdAt","value":"Apr + 29, 2025 3:57 AM"},{"name":"logicalSize","value":"30842880"},{"name":"cpuUsedSec","value":"78"},{"name":"computeTimeSeconds","value":"78"},{"name":"activeTimeSeconds","value":"304"},{"name":"writtenDataBytes","value":"195880"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"false"},{"name":"lastActive","value":"Apr + 29, 2025 3:40 AM"},{"name":"autoscalingLimitMinCu","value":"0.25"},{"name":"autoscalingLimitMaxCu","value":"0.25"}],"entityId":"br-purple-recipe-a8e2kkbc","entityName":"dev-cli","createdAt":"Apr + 29, 2025 3:57 AM","provisioningState":"idle"}},{"properties":{"projectId":"withered-sea-55021972","parentId":"br-frosty-bird-a85qx3j8","attributes":[{"name":"createdAt","value":"Apr + 29, 2025 3:44 AM"},{"name":"logicalSize","value":"30842880"},{"name":"cpuUsedSec","value":"76"},{"name":"computeTimeSeconds","value":"76"},{"name":"activeTimeSeconds","value":"300"},{"name":"writtenDataBytes","value":"195880"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"false"},{"name":"lastActive","value":"Apr + 29, 2025 3:40 AM"},{"name":"autoscalingLimitMinCu","value":"0.25"},{"name":"autoscalingLimitMaxCu","value":"0.25"}],"entityId":"br-damp-pond-a81l2vrl","entityName":"dev","createdAt":"Apr + 29, 2025 3:44 AM","provisioningState":"idle"}},{"properties":{"projectId":"withered-sea-55021972","parentId":"br-frosty-bird-a85qx3j8","attributes":[{"name":"createdAt","value":"Apr + 29, 2025 3:40 AM"},{"name":"logicalSize","value":"30842880"},{"name":"cpuUsedSec","value":"81"},{"name":"computeTimeSeconds","value":"81"},{"name":"activeTimeSeconds","value":"316"},{"name":"writtenDataBytes","value":"195936"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"false"},{"name":"lastActive","value":"Apr + 29, 2025 3:40 AM"},{"name":"autoscalingLimitMinCu","value":"0.25"},{"name":"autoscalingLimitMaxCu","value":"0.25"}],"entityId":"br-white-breeze-a8oeqp9e","entityName":"cli-branch","createdAt":"Apr + 29, 2025 3:40 AM","provisioningState":"idle"}},{"properties":{"projectId":"withered-sea-55021972","parentId":"br-frosty-bird-a85qx3j8","attributes":[{"name":"createdAt","value":"Apr + 29, 2025 3:29 AM"},{"name":"logicalSize","value":"30842880"},{"name":"cpuUsedSec","value":"81"},{"name":"computeTimeSeconds","value":"81"},{"name":"activeTimeSeconds","value":"316"},{"name":"writtenDataBytes","value":"195936"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"false"},{"name":"lastActive","value":"Apr + 29, 2025 3:40 AM"},{"name":"autoscalingLimitMinCu","value":"0.25"},{"name":"autoscalingLimitMaxCu","value":"0.25"}],"entityId":"br-calm-tree-a8pe4sit","entityName":"dev-branch","createdAt":"Apr + 29, 2025 3:29 AM","provisioningState":"idle"}},{"properties":{"projectId":"withered-sea-55021972","attributes":[{"name":"createdAt","value":"Apr + 28, 2025 3:18 PM"},{"name":"logicalSize","value":"30785536"},{"name":"cpuUsedSec","value":"78"},{"name":"computeTimeSeconds","value":"78"},{"name":"activeTimeSeconds","value":"308"},{"name":"writtenDataBytes","value":"34535520"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"true"},{"name":"lastActive","value":"Apr + 29, 2025 3:40 AM"},{"name":"autoscalingLimitMinCu","value":"0.25"},{"name":"autoscalingLimitMaxCu","value":"0.25"}],"entityId":"br-frosty-bird-a85qx3j8","entityName":"main","createdAt":"Apr + 28, 2025 3:18 PM","provisioningState":"idle"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '3738' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:15 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/1df2d174-c5fe-4522-a768-dc5e671d2b70 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: DA3AE0A299AB422B9AEE8207BFDC17FD Ref B: MAA201060515045 Ref C: 2025-04-29T10:51:13Z' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"databaseName": "neondb", "parentId": "br-frosty-bird-a85qx3j8", + "roleName": "onwer_role"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres branch create + Connection: + - keep-alive + Content-Length: + - '107' + Content-Type: + - application/json + ParameterSetName: + - --resource-group --organization-name --project-name --name --parent-id --role-name + --database-name + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/dev-cli-branch?api-version=2025-03-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/dev-cli-branch","name":"dev-cli-branch","type":"neon.postgres/organizations/projects/branches","systemData":{"createdBy":"sralluri211@outlook.com","createdByType":"User","createdAt":"2025-04-29T10:51:16.0773282Z","lastModifiedBy":"sralluri211@outlook.com","lastModifiedByType":"User","lastModifiedAt":"2025-04-29T10:51:16.0773282Z"},"properties":{"projectId":"withered-sea-55021972","parentId":"br-frosty-bird-a85qx3j8","roleName":null,"databaseName":null,"roles":null,"databases":null,"endpoints":null,"attributes":[{"name":"logicalSize","value":""},{"name":"cpuUsedSec","value":"0"},{"name":"computeTimeSeconds","value":"0"},{"name":"activeTimeSeconds","value":"0"},{"name":"writtenDataBytes","value":"0"},{"name":"dataTransferBytes","value":"0"},{"name":"isProtected","value":"false"},{"name":"isDefault","value":"false"}],"entityId":"br-raspy-mouse-a8s9ldcq","entityName":"dev-cli-branch","createdAt":"Apr + 29, 2025 10:51 AM","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1142' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:17 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/7b806305-ea3b-4bb9-a51c-29542daa601d + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: CD51A6056E5D4FA7A8EB9C090E985ADF Ref B: MAA201060514009 Ref C: 2025-04-29T10:51:15Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres neon-database list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organization-name --project-id --branch-id + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neondatabases?api-version=2025-03-01 + response: + body: + string: '{"value":[{"properties":{"branchId":"br-frosty-bird-a85qx3j8","ownerName":"neondb_owner","entityId":"1643012","entityName":"neondb","createdAt":"Apr + 28, 2025 3:18 PM","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '202' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:19 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/475f11b1-9003-4582-b087-c78ca9b20eb4 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 96398DAAD6ED44079A163206CA583DE9 Ref B: MAA201060513017 Ref C: 2025-04-29T10:51:18Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres neon-role list + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organization-name --project-id --branch-id + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/withered-sea-55021972/branches/br-frosty-bird-a85qx3j8/neonroles?api-version=2025-03-01 + response: + body: + string: '{"value":[{"properties":{"branchId":"br-frosty-bird-a85qx3j8","isSuperUser":false,"entityName":"neondb_owner","createdAt":"Apr + 28, 2025 3:18 PM","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:21 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/5048bf47-34c3-4a77-94ca-e8e28a041619 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 11C495AC7BF942BEA9A9E43767443CF3 Ref B: MAA201060514011 Ref C: 2025-04-29T10:51:20Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres branch delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --organization-name --project-id --branch-id --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/purple-dew-38706216/branches/br-muddy-cherry-a8wbc7ux?api-version=2025-03-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:22 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/1421d00c-1f00-40ff-8905-b0774d9da41a + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 89CFD77A108A43509CACC916815EA251 Ref B: MAA201060514025 Ref C: 2025-04-29T10:51:21Z' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres project delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --organization-name --project-id --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Test-Neon-Org-Cli-IT/projects/purple-dew-38706216?api-version=2025-03-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:24 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/dd5a6631-be13-4be7-83cc-a86920b1ed97 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 9098C5E227E346F7AA2DF70A7E088F86 Ref B: MAA201060514045 Ref C: 2025-04-29T10:51:23Z' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests?api-version=2025-03-01 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvd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dDV7ghioYaGNi9xAeZ7k + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:29 GMT + etag: + - '"19004b01-0000-3300-0000-6810af310000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYB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RIAg&h=mW8wPs6rJTkdKHUARxRCj0MdDV7ghioYaGNi9xAeZ7k + pragma: + - no-cache + request-context: + - appId=cid-v1:726af22e-a98d-41b8-8be8-c1f253ced955 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=f27f5a05-ee13-4d31-b6d9-6bfe7b758c17,objectId=4bbfdfc1-e177-47a1-88cd-1461c549e46e/southeastasia/24edea16-cd6b-4b2e-bd85-5a4d5c75e711 + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: A832F1A61CE1497A9B554026A6C25515 Ref B: MAA201060513009 Ref C: 2025-04-29T10:51:25Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2V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xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=DjqHmMZ_XfjBYyb8_F8E1uhxojOPdK7NW7ZBCD3ygeZHotvmoHI2wDPwro_tmigQEF9BO-wez-i8v5q7p2LKQ__qPdDZJbUr_nQiucSHgtCvDvuWZGPPKi9PNoYcBYHGnGFEbm39TS2viuc9okjYOJ0_bftq-tba7j6IARMRHi4cLsfy_OID-NHQhIINdwAz931k_HAjySAOqFUbTf2OMxQ4l1dQnacCYtBYRU4QaTEWCeH5ISyd5oVM1rI4XYhMZu8x0iAG3fjCeayWujSC-u9dhOr4zB8Yf17BPnQC1wQjOVvtRovtAK5PDBaCS5-APp-YqmzNXJzgNZVfHlRIAg&h=mW8wPs6rJTkdKHUARxRCj0MdDV7ghioYaGNi9xAeZ7k + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Deleting","startTime":"2025-04-29T10:51:26.962942Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206914218661&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8E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IWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=UFzX0USF_ND3OcGRMvRPo2NxYJna5aJhQMQScirJkYe4xReRDgiImz6IDb87VKmHXz1E-3u9Yhp9L0iIlknJO5LIlGXpQLAgOD5JKnakMy2uQG6McQvuwoy0IyFy2aDuxIhXGrQFGXcpASCP9etlWC2SUXNZtbH_1GAGQZGOZaSiwRnlXak_hODB5HNspkkRdY4GDSAo3YrxERYe4xyuSEWhpQvYENOh8CxiH-PNe5zChZPd11z1IfDX3ysk3K7coP3o5rLqCs-8J5hPl-iYk68QP43HB4ZvUjrozRNGMvjAzxwr8u41rxktVFpHtpgtGlSaN_RZ1bHgUrrOmdcTQw&h=G1QAFLjoIsYQ4v5iWgs8FFERrishsA1CPZD2Lr5afUQ + cache-control: + - no-cache + content-length: + - '501' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:51:31 GMT + etag: + - '"150040b3-0000-3300-0000-6810af2f0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206914218661&c=MIIHhzCCBm-gA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BR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=UFzX0USF_ND3OcGRMvRPo2NxYJna5aJhQMQScirJkYe4xReRDgiImz6IDb87VKmHXz1E-3u9Yhp9L0iIlknJO5LIlGXpQLAgOD5JKnakMy2uQG6McQvuwoy0IyFy2aDuxIhXGrQFGXcpASCP9etlWC2SUXNZtbH_1GAGQZGOZaSiwRnlXak_hODB5HNspkkRdY4GDSAo3YrxERYe4xyuSEWhpQvYENOh8CxiH-PNe5zChZPd11z1IfDX3ysk3K7coP3o5rLqCs-8J5hPl-iYk68QP43HB4ZvUjrozRNGMvjAzxwr8u41rxktVFpHtpgtGlSaN_RZ1bHgUrrOmdcTQw&h=G1QAFLjoIsYQ4v5iWgs8FFERrishsA1CPZD2Lr5afUQ + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: 25469B537F9C4D77B551EF38DFA18035 Ref B: MAA201060513009 Ref C: 2025-04-29T10:51:30Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE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HUARxRCj0MdDV7ghioYaGNi9xAeZ7k + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Deleting","startTime":"2025-04-29T10:51:26.962942Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815207220844732&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSp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26zdPHqnrU-QqklD3G7CXezJ_5kZg_8rc992VwTDbCJf-4sNsfak9zoxNv1SHH8ebBBKz6GL26mKhL-7Cpy237-ABsGQ31zOwSVjG3n5NVlnWnbW74ih-qSfXFhscpVK0P3xuhgeHI3i0tBPFOZKV2uaMg0XlnG1PlxZzM_Y5s0bHv3j0woSUyZ8eARBo_xgSSQfBqdeiwqtmIPlXCJP16txo9c0ZpDvxwUk2thlQ&h=YcKJurNRv0-KN_MlM4rFayZM1jlPGwhtcCYA4tSYsmM + cache-control: + - no-cache + content-length: + - '501' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:52:01 GMT + etag: + - '"150040b3-0000-3300-0000-6810af2f0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815207221000967&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_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rapC3Tq3BqOXJycpmomBYx9Bynk6QPcGJaKS-W4yemZge28jIY0wdyYBCDX7Fd0dc2so4dN8RMZh1ZUvdZSskTDqqouVqfBYLbHLajZcbZtoRKvdpICRF-4qhCymVXsza4iKBILfw9CVEG8K2Yow_g5QoNu1Tskk0sW9ownfEcWV7dyyui2AekPvseNOXiPXliOmXt9Bp-nl8tOxqkkcYZhoDvntxnNUKRkVtmRfKu4ojwm5VudMKFzpIsuPXHdVah8w&h=qi6JUZxqO8pvNcrN6X-w4gRCLdEKu2e3hSLovbJLNzw + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: 8612CC59D0374044987409FDE7AD2A7C Ref B: MAA201060513009 Ref C: 2025-04-29T10:52:01Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY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-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=DjqHmMZ_XfjBYyb8_F8E1uhxojOPdK7NW7ZBCD3ygeZHotvmoHI2wDPwro_tmigQEF9BO-wez-i8v5q7p2LKQ__qPdDZJbUr_nQiucSHgtCvDvuWZGPPKi9PNoYcBYHGnGFEbm39TS2viuc9okjYOJ0_bftq-tba7j6IARMRHi4cLsfy_OID-NHQhIINdwAz931k_HAjySAOqFUbTf2OMxQ4l1dQnacCYtBYRU4QaTEWCeH5ISyd5oVM1rI4XYhMZu8x0iAG3fjCeayWujSC-u9dhOr4zB8Yf17BPnQC1wQjOVvtRovtAK5PDBaCS5-APp-YqmzNXJzgNZVfHlRIAg&h=mW8wPs6rJTkdKHUARxRCj0MdDV7ghioYaGNi9xAeZ7k + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Deleting","startTime":"2025-04-29T10:51:26.962942Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815207534194655&c=MIIHhzCCBm-gAwIBAgIT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KHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=gbjp4LHVnJivY0D3ONE5EFwFMb8zuufacern5FCy3BBD6uDfWewan1t1ExnebDYW-5ZAbNnXTLsYR3U0Raj2Xg2qDFcuZpHNW9DeUrZ7C1abfS3flXiKDtl4oCjMg7YfncI1G-EgEULjm0M64fbkp_UUw6DjbZOQG-gWYAJ-Dmi4NGPrAP7zsCw12H2QemO8ZjfOEJ58INq1JpLfnYsT2NJidKAWycDlRmVu-HHZzEHDJpKlKbFZGFlpokVJNwJDbljmxytyckx0LPdTcmKQ6LTfs7Bq06r1U-zxq420TZEjzwy9JPYh96G6xsO2MNEjkbpBMZ0mg_TMLV7ICxR5hA&h=4UZ_z-jazdVIQPXUjN901_xDAOwtS922S0Tvsmy5egc + cache-control: + - no-cache + content-length: + - '501' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:52:33 GMT + etag: + - '"150040b3-0000-3300-0000-6810af2f0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/Neon.Postgres/locations/centraluseuap/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815207534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EAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=bzAx0ya2DLvsl15mjLFSLnO7SCUon4CsCJYp-hlNlDk57toL8Sl5PAk4EeFQO4EkU-_e2SWGblisf4YG_ZdkhNNfBtyHevNK_vkMdJYm-u4KYY0l6-aPa7SLgZeAkrTNq6yHPGe9xmVqN1oAA98WtL0TzQ4Ii7TqtJK7ThIqNoikkDZpTIpdPpThdAzqYGsyIqozJp5QCHGVl5PHrp9MjG-vUV-L920PifJbVncF_-lwnhiys3wVPv-LrOSm9bIBQijMcBhw6XCYcsJulYqt0s8ahbbuMyE4WcN6-r6X2UzFHkxARZLjaORm8SVqi3727OQL9aSWQ4UN4J1xap3uig&h=RgLCH_rkGV-SnmgwlWI6dB4EZwNDcnRhhucoROck3-8 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: 805BF65ADAD24A90A8B05978C1EE90C9 Ref B: MAA201060513009 Ref C: 2025-04-29T10:52:32Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8EjgAAB4MSczANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUwNDIwMTUyMDI3WhcNMjUxMDE3MTUyMDI3WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALO1SAvt4DI7FxxBmZBcfoKDLiXpS8U5adZbRlRvVm-EcAWqGNnVo1AxaXu3ghKMY95LxffhvcYAZ56WhgOxA_gpAUzm4t0yW0aVzv7vAOWZHIG1fvTcWY_sHCkuTyCNAcRbNbaqbidaK9ZOTQ19baUQ26kVkP7tjTi6DWWRlM25d4YQcGaWJoBwUtol-hgB5Z_rVMljRF5Q1T9_3YpRBw57SpHvmb30JNQSpndyeu--Ip8pMwpNaiIRF70G8WfbTBoJhRqNqNAKBLU3CAVV4H6lYrXtSK-gkZC0EzjZ4ze_XVDGBd1sOPsbMx4aQgZEiuDJuuk9eqTzzur3IDUdrP0CAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmK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fHlRIAg&h=mW8wPs6rJTkdKHUARxRCj0MdDV7ghioYaGNi9xAeZ7k + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Succeeded","startTime":"2025-04-29T10:51:26.962942Z","endTime":"2025-04-29T10:52:41.5855097Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '572' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:53:04 GMT + etag: + - '"150071b4-0000-3300-0000-6810af790000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: 2444BE11945F48BE8A97F917887A5BF5 Ref B: MAA201060513009 Ref C: 2025-04-29T10:53:03Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - neon postgres organization delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group --name --subscription --yes + User-Agent: + - AZURECLI/2.72.0 azsdk-python-core/1.31.0 Python/3.10.11 (Windows-10-10.0.26100-SP0) + method: GET + uri: https://management.azure.com/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4?api-version=2025-03-01&t=638815206900457549&c=MIIHhzCCBm-gAwIBAgITfAeDEnPW_KxJbq8Ejg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HTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAChQXwS0_EaMb7G3BWGDeoNhAAEaoKkJVUy5HVGyWKADFm6Tp2WidwOIMoOu-IuoA634ORJ7bIwsC2WhUA0Z8-c2AAD956dAtCkn5pEBXSqwuKMM3l9KOClAY1RiAQcP-GWtmb_mqZspO78GHaq-mwiyIDUICM-uZl-qR6UVt6rLn5xPqHNkenxrslS_G3IJ9yCV1sflxhz93B7VR9H7BtOxd_nqZOD5uSV3OpPnATTRO0KB3VBbZ0KqvdtWoHjNywLqMuhJUufHw2zmlQ-Yj3ndha_yTvOQlT-85ikSoyWI0P4_GeEwX9RdkiVHVzx3gR8HzFKkJXOwRvxQE_9Ov_0&s=DjqHmMZ_XfjBYyb8_F8E1uhxojOPdK7NW7ZBCD3ygeZHotvmoHI2wDPwro_tmigQEF9BO-wez-i8v5q7p2LKQ__qPdDZJbUr_nQiucSHgtCvDvuWZGPPKi9PNoYcBYHGnGFEbm39TS2viuc9okjYOJ0_bftq-tba7j6IARMRHi4cLsfy_OID-NHQhIINdwAz931k_HAjySAOqFUbTf2OMxQ4l1dQnacCYtBYRU4QaTEWCeH5ISyd5oVM1rI4XYhMZu8x0iAG3fjCeayWujSC-u9dhOr4zB8Yf17BPnQC1wQjOVvtRovtAK5PDBaCS5-APp-YqmzNXJzgNZVfHlRIAg&h=mW8wPs6rJTkdKHUARxRCj0MdDV7ghioYaGNi9xAeZ7k + response: + body: + string: '{"id":"/providers/Neon.Postgres/locations/CENTRALUSEUAP/operationStatuses/0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","name":"0eaaa81b-4e19-4202-8562-c2c111b18749*33080CDAA3B48581D06C07FC6F0AD979F8AED23E1755AAE02BB4B231A29799C4","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/neonrg/providers/Neon.Postgres/organizations/Neon-Cli-Scenario-Tests","status":"Succeeded","startTime":"2025-04-29T10:51:26.962942Z","endTime":"2025-04-29T10:52:41.5855097Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '572' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 29 Apr 2025 10:53:05 GMT + etag: + - '"150071b4-0000-3300-0000-6810af790000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - '' + x-msedge-ref: + - 'Ref A: 35636A77B51B44B88E1D1D90B09777A7 Ref B: MAA201060513009 Ref C: 2025-04-29T10:53:04Z' status: code: 200 message: OK diff --git a/src/neon/azext_neon/tests/latest/test_neon.py b/src/neon/azext_neon/tests/latest/test_neon.py index 53ccab0312d..5e945befbc4 100644 --- a/src/neon/azext_neon/tests/latest/test_neon.py +++ b/src/neon/azext_neon/tests/latest/test_neon.py @@ -8,25 +8,31 @@ from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) from azure.cli.testsdk.scenario_tests import AllowLargeResponse +# Tags: Neon PostgreSQL, Organization, Database, Serverless, Managed Service + class NeonScenario(ScenarioTest): @AllowLargeResponse(size_kb=10240) - @ResourceGroupPreparer(name_prefix='cli_test_neon', location="eastus2euap") + @ResourceGroupPreparer(name_prefix='cli_test_neon', location="centraluseuap") def test_neon(self, resource_group): + # Test Tags: Organization CRUD, Marketplace Integration, SSO Configuration + tags_key = 'key' + tags_val = 'value' + updated_tags_val = 'value2' self.kwargs.update({ - 'name': 'NeonCLITestOrg1', - 'location': 'eastus2euap', + 'name': 'Neon-Cli-Scenario-Tests', + 'location': 'centraluseuap', 'subscription': '00000000-0000-0000-0000-000000000000', - 'marketplace_subscription_id': 'yxmkfivp', + 'marketplace_subscription_id': 'b6ca5a0a-c4be-454f-cc46-a400799b9d49', 'publisher_id': 'neon1722366567200', - 'offer_id': 'neon_test', - 'plan_id': 'neon_test_1', - 'plan_name': 'Neon Serverless Postgres - Free (Test_Liftr)', + 'offer_id': 'neon_serverless_postgres_azure_prod', + 'plan_id': 'neon_serverless_postgres_azure_prod_free', + 'plan_name': 'Free Plan', 'term_unit': 'P1M', 'term_id': 'gmz7xq9ge3py', - 'user_first_name': 'Almas', - 'user_last_name': 'Khan', - 'user_email': 'khanalmas@example.com', - 'user_upn': 'khanalmas_microsoft.com#EXT#@qumulotesttenant2.onmicrosoft.com', + 'user_first_name': 'Srinivas', + 'user_last_name': 'Alluri', + 'user_email': 'sralluri211@outlook.com', + 'user_upn': 'sralluri211@outlook.com', 'user_phone': '+1234567890', 'company_name': 'SampleCompany', 'country': 'USA', @@ -35,31 +41,121 @@ def test_neon(self, resource_group): 'domain': 'samplecompany.com', 'number_of_employees': 500, 'organization_id': 'org67890', - 'org-name': 'PartnerOrgForCLITest1', + 'org_name': 'PartnerOrgForCLITest1', 'enterprise_app_id': 'app67890', 'sso_url': 'https://sso.partnerorgtest.com', 'aad_domain': 'partnerorgtest.com', - 'resource_group': 'NeonDemoRG' + 'resource_group': 'neonrg', + 'project_name': 'TestProject1', + 'new_project_name': 'TestProject2', + 'pg_version': '17', + 'branch_name': 'main', + 'new_branch_name': 'dev-cli-branch', + 'role_name': 'onwer_role', + 'new_role_name': 'dev_role', + 'database_name': 'neondb', + 'new_database_name': 'clidb', + 'region_id': 'eastus2', + 'storage': 0, + 'history_retention': 0, + 'entity_name': 'Neon-Partner-Demo-project', + 'tags': '{}={}'.format(tags_key, tags_val), + 'updated_tags': '{}={}'.format(tags_key, updated_tags_val), + 'project_id': 'withered-sea-55021972', + 'project_id_to_delete': 'purple-dew-38706216', + 'branch_id': 'br-frosty-bird-a85qx3j8', + 'branch_id_to_delete': 'br-muddy-cherry-a8wbc7ux', + 'org_name': 'Test-Neon-Org-Cli-IT', + 'org_resource_group': 'neonrg', }) # Create Neon Organization - self.cmd('az neon postgres create --resource-group {resource_group} --name {name} --location {location} --subscription {subscription} ' + # Tags: Create, Organization, Marketplace, Complex-Properties + self.cmd('az neon postgres organization create --resource-group {resource_group} --name {name} --location {location} --tags {tags} --subscription {subscription} ' '--marketplace-details \'{{"subscription-id": "{marketplace_subscription_id}", "subscription-status": "PendingFulfillmentStart", ' '"offer-details": {{"publisher-id": "{publisher_id}", "offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}}}\' ' '--user-details \'{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}\' ' '--company-details \'{{"company-name": "{company_name}", "country": "{country}", "business-phone": "{business_phone}", "office-address": "{office_address}", "domain": "{domain}", "number-of-employees": {number_of_employees}}}\' ' - '--partner-organization-properties \'{{"organization-id": "{organization_id}", "org-name": "{org-name}", ' - '"single-sign-on-properties": {{"single-sign-on-state": "Enable", "enterprise-app-id": "{enterprise_app_id}", "single-sign-on-url": "{sso_url}", "aad-domains": ["{aad_domain}"]}}}}\'', + '--partner-organization-properties \'{{"organization-name": "{name}", "organization-id": "", ' + '"single-sign-on-properties": {{"single-sign-on-state": "Enable", "enterprise-app-id": "", "single-sign-on-url": "", "aad-domains": []}}}}\' ' + '--project-properties \'{{"project-name": "{project_name}", "pg-version": "{pg_version}", ' + '"region": "{region_id}", ' + '"branch": {{"branch-name": "{branch_name}", "role-name": "{role_name}", "database-name": "{database_name}"}}}}\'', checks=[ self.check('name', '{name}'), + self.check('tags.{}'.format(tags_key), tags_val), ]) # List Neon Organizations + # Tags: List, Organization, Subscription-Scoped self.cmd('az neon postgres organization list --subscription {subscription} --resource-group {resource_group}', checks=[]) # Show Neon Organization + # Tags: Show, Organization, Resource-Specific self.cmd('az neon postgres organization show --subscription {subscription} --resource-group {resource_group} --name {name}', checks=[ self.check('name', '{name}'), - ]) \ No newline at end of file + ]) + + + # Create Neon Project with a default branch and database + self.cmd('az neon postgres project create --resource-group {resource_group} --organization-name {name} ' + '--project-name {new_project_name} --pg-version {pg_version} --region {region_id} ' + '--branch "{{\\"branch-name\\":\\"{new_branch_name}\\", \\"role-name\\":\\"{new_role_name}\\", \\"database-name\\":\\"{new_database_name}\\"}}\"') + + + # List Neon Projects in organization + self.cmd('az neon postgres project list --resource-group {resource_group} --organization-name {name}', + checks=[ + self.greater_than('length(@)', 0), + ]) + + # Show Neon Project + self.cmd('az neon postgres project show --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', + checks=[ + self.check('properties.regionId', '{region_id}'), + ]) + + # List branches in the project + self.cmd('az neon postgres branch list --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', + checks=[ + self.greater_than('length(@)', 0), # Should have at least 1 branches now + ]) + + # Create a new branch (dev-branch) off the main branch + self.cmd('az neon postgres branch create --resource-group {resource_group} --organization-name {org_name} ' + '--project-name {project_id} --name {new_branch_name} --parent-id {branch_id} ' + '--role-name {role_name} --database-name {database_name}', + checks=[ + self.check('name', '{new_branch_name}'), + self.check('properties.parentId', '{branch_id}'), + ]) + + # List databases in a branch + self.cmd('az neon postgres neon-database list --resource-group {org_resource_group} --organization-name {org_name} ' + '--project-id {project_id} --branch-id {branch_id}', + checks=[ + self.greater_than('length(@)', 0) + ]) + + # List roles in a branch + self.cmd('az neon postgres neon-role list --resource-group {org_resource_group} --organization-name {org_name} ' + '--project-id {project_id} --branch-id {branch_id}', + checks=[ + self.greater_than('length(@)', 0) + ]) + + + # Delete the branch + self.cmd('az neon postgres branch delete --resource-group {resource_group} --organization-name {org_name} ' + '--project-id {project_id_to_delete} --branch-id {branch_id_to_delete} --yes', checks=[]) + + # Delete Neon Project + self.cmd('az neon postgres project delete --resource-group {resource_group} --organization-name {org_name}' + ' --project-id {project_id_to_delete} --yes', checks=[]) + + # Delete Neon Organization + self.cmd('az neon postgres organization delete --resource-group {resource_group} --name {name} ' + '--subscription {subscription} --yes', + checks=[]) \ No newline at end of file