diff --git a/src/pinecone/HISTORY.rst b/src/pinecone/HISTORY.rst new file mode 100644 index 00000000000..abbff5a61a7 --- /dev/null +++ b/src/pinecone/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +1.0.0b1 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/pinecone/README.md b/src/pinecone/README.md new file mode 100644 index 00000000000..6c9c303c084 --- /dev/null +++ b/src/pinecone/README.md @@ -0,0 +1,28 @@ +# Azure CLI Pinecone Extension # +This is an extension to Azure CLI to manage Pinecone resources. + +## How to use ## +#### Install the extension #### +Install this extension using the below CLI command +``` +az extension add --name pinecone +``` +#### Check the version #### +``` +az extension show --name pinecone --query version +``` +#### Connect to Azure subscription #### +``` +az login +az account set -s {subs_id} +``` +#### List an weights-and-biases instance #### +``` +az pinecone vector-db organization show --resource-group clitest +``` +#### Get a weights-and-biases instance resource #### +``` +az pinecone vector-db organization show --resource-group clitest --organizationname test-cli-instance-4 +``` + +If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. \ No newline at end of file diff --git a/src/pinecone/azext_pinecone/__init__.py b/src/pinecone/azext_pinecone/__init__.py new file mode 100644 index 00000000000..5d95f1e1f52 --- /dev/null +++ b/src/pinecone/azext_pinecone/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_pinecone._help import helps # pylint: disable=unused-import + + +class PineconeCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_pinecone.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_pinecone.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_pinecone._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = PineconeCommandsLoader diff --git a/src/pinecone/azext_pinecone/_help.py b/src/pinecone/azext_pinecone/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/pinecone/azext_pinecone/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/pinecone/azext_pinecone/_params.py b/src/pinecone/azext_pinecone/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/pinecone/azext_pinecone/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/pinecone/azext_pinecone/aaz/__init__.py b/src/pinecone/azext_pinecone/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/pinecone/azext_pinecone/aaz/latest/__init__.py b/src/pinecone/azext_pinecone/aaz/latest/__init__.py new file mode 100644 index 00000000000..f6acc11aa4e --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/__init__.py @@ -0,0 +1,10 @@ +# -------------------------------------------------------------------------------------------- +# 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 + diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/__cmd_group.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/__cmd_group.py new file mode 100644 index 00000000000..b3af61d39d8 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/__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( + "pinecone", +) +class __CMDGroup(AAZCommandGroup): + """Manage Pinecone + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/__init__.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__cmd_group.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__cmd_group.py new file mode 100644 index 00000000000..468abfce4ab --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__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( + "pinecone vector-db", +) +class __CMDGroup(AAZCommandGroup): + """Manage Vector Db + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__init__.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# 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 * diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__cmd_group.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__cmd_group.py new file mode 100644 index 00000000000..793ea9552c9 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__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( + "pinecone vector-db organization", +) +class __CMDGroup(AAZCommandGroup): + """Manage Organization + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__init__.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 * +from ._show import * diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_list.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_list.py new file mode 100644 index 00000000000..f9700917519 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_list.py @@ -0,0 +1,586 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "pinecone vector-db organization list", +) +class List(AAZCommand): + """List OrganizationResource resources by subscription ID + + :example: Organizations_ListBySubscription_MaximumSet + az pinecone vector-db organization list --resoure-group clitest + """ + + _aaz_info = { + "version": "2024-10-22-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/pinecone.vectordb/organizations", "2024-10-22-preview"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/pinecone.vectordb/organizations", "2024-10-22-preview"], + ] + } + + 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.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + 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.OrganizationsListBySubscription(ctx=self.ctx)() + if condition_1: + self.OrganizationsListByResourceGroup(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 OrganizationsListBySubscription(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}/providers/Pinecone.VectorDb/organizations", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2024-10-22-preview", + 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.identity = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.value.Element.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.value.Element.properties.marketplace.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_properties = cls._schema_on_200.value.Element.properties.partner_properties + partner_properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.value.Element.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.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.value.Element.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.value.Element.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class OrganizationsListByResourceGroup(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/Pinecone.VectorDb/organizations", + **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( + "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", "2024-10-22-preview", + 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.identity = AAZIdentityObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.value.Element.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.value.Element.properties.marketplace.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_properties = cls._schema_on_200.value.Element.properties.partner_properties + partner_properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.value.Element.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.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.value.Element.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.value.Element.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_show.py b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_show.py new file mode 100644 index 00000000000..171d1ac9217 --- /dev/null +++ b/src/pinecone/azext_pinecone/aaz/latest/pinecone/vector_db/organization/_show.py @@ -0,0 +1,333 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "pinecone vector-db organization show", +) +class Show(AAZCommand): + """Get a OrganizationResource + + :example: Organizations_Get_MaximumSet + az pinecone vector-db organization show --resource-group clitest --organizationname test-cli-instance-4 + """ + + _aaz_info = { + "version": "2024-10-22-preview", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/pinecone.vectordb/organizations/{}", "2024-10-22-preview"], + ] + } + + 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.organizationname = AAZStrArg( + options=["-n", "--name", "--organizationname"], + help="Name of the 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.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OrganizationsGet(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 OrganizationsGet(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/Pinecone.VectorDb/organizations/{organizationname}", + **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.organizationname, + 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", "2024-10-22-preview", + 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.identity = AAZIdentityObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": 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.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType( + nullable=True, + ) + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + flags={"read_only": True}, + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.marketplace = AAZObjectType( + flags={"required": True}, + ) + properties.partner_properties = AAZObjectType( + serialized_name="partnerProperties", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.single_sign_on_properties = AAZObjectType( + serialized_name="singleSignOnProperties", + ) + properties.user = AAZObjectType( + flags={"required": True}, + ) + + marketplace = cls._schema_on_200.properties.marketplace + marketplace.offer_details = AAZObjectType( + serialized_name="offerDetails", + flags={"required": True}, + ) + marketplace.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + marketplace.subscription_status = AAZStrType( + serialized_name="subscriptionStatus", + flags={"read_only": True}, + ) + + offer_details = cls._schema_on_200.properties.marketplace.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_properties = cls._schema_on_200.properties.partner_properties + partner_properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + + single_sign_on_properties = cls._schema_on_200.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.state = AAZStrType() + single_sign_on_properties.type = AAZStrType( + flags={"required": True}, + ) + single_sign_on_properties.url = AAZStrType() + + aad_domains = cls._schema_on_200.properties.single_sign_on_properties.aad_domains + aad_domains.Element = AAZStrType() + + user = cls._schema_on_200.properties.user + user.email_address = AAZStrType( + serialized_name="emailAddress", + ) + user.first_name = AAZStrType( + serialized_name="firstName", + ) + user.last_name = AAZStrType( + serialized_name="lastName", + ) + user.phone_number = AAZStrType( + serialized_name="phoneNumber", + ) + user.upn = 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/pinecone/azext_pinecone/azext_metadata.json b/src/pinecone/azext_pinecone/azext_metadata.json new file mode 100644 index 00000000000..e506328978c --- /dev/null +++ b/src/pinecone/azext_pinecone/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.70.0" +} \ No newline at end of file diff --git a/src/pinecone/azext_pinecone/commands.py b/src/pinecone/azext_pinecone/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/pinecone/azext_pinecone/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# 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: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/pinecone/azext_pinecone/custom.py b/src/pinecone/azext_pinecone/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/pinecone/azext_pinecone/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# 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: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/pinecone/azext_pinecone/tests/__init__.py b/src/pinecone/azext_pinecone/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/pinecone/azext_pinecone/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/pinecone/azext_pinecone/tests/latest/__init__.py b/src/pinecone/azext_pinecone/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/pinecone/azext_pinecone/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/pinecone/azext_pinecone/tests/latest/recordings/test_pinecone_all.yaml b/src/pinecone/azext_pinecone/tests/latest/recordings/test_pinecone_all.yaml new file mode 100644 index 00000000000..4bb97836730 --- /dev/null +++ b/src/pinecone/azext_pinecone/tests/latest/recordings/test_pinecone_all.yaml @@ -0,0 +1,122 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - pinecone vector-db organization list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations?api-version=2024-10-22-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/testswatiagg","name":"testswatiagg","type":"pinecone.vectordb/organizations","location":"eastus","tags":{},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-25T08:19:04.3678915Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-25T08:19:04.3678915Z"},"properties":{"marketplace":{"subscriptionId":"","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"displayName":"swtaiaggtest"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/swatiaggclitest","name":"swatiaggclitest","type":"pinecone.vectordb/organizations","location":"eastus","tags":{},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-25T08:21:21.7362738Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-25T08:21:21.7362738Z"},"properties":{"marketplace":{"subscriptionId":"","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw_microsoft.com#EXT#@MicrosoftCustomerLed.onmicrosoft.com","phoneNumber":""},"partnerProperties":{"displayName":"swatiaggclitest"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/pinecone.vectordb/organizations/test-cli-instance-1","name":"test-cli-instance-1","type":"pinecone.vectordb/organizations","location":"East + US","tags":{"Test":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T08:08:34.9549427Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T14:01:00.5255958Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com","phoneNumber":""},"partnerProperties":{"displayName":"Test-CLI-Instance-1"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","aadDomains":["onmicrosoft"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/pinecone.vectordb/organizations/test-cli-instance-2","name":"test-cli-instance-2","type":"pinecone.vectordb/organizations","location":"East + US","tags":{},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T08:10:31.0741228Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T09:50:01.8754522Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com","phoneNumber":""},"partnerProperties":{"displayName":"Test-CLI-Instance-2"}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-3","name":"test-cli-instance-3","type":"pinecone.vectordb/organizations","location":"eastus","tags":{"TestName":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T08:32:11.9594692Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T08:32:11.9594692Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"User + FirstName","lastName":"User LastName","emailAddress":"xxx@exampledomain.com","upn":"xxx@exampledomain.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","aadDomains":["exapmpledomain"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-4","name":"test-cli-instance-4","type":"pinecone.vectordb/organizations","location":"eastus","tags":{"TestName":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T09:56:30.2275062Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T14:22:52.7443493Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"User + FirstName","lastName":"User LastName","emailAddress":"xxx@exampledomain.com","upn":"xxx@exampledomain.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://sso.partnerorg.com","aadDomains":["exapmpledomain"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-5","name":"test-cli-instance-5","type":"pinecone.vectordb/organizations","location":"eastus","tags":{"TestName":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T11:15:06.1605374Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T13:41:46.0863291Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"User + FirstName","lastName":"User LastName","emailAddress":"xxx@exampledomain.com","upn":"xxx@exampledomain.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://sso.partnerorg.com","aadDomains":["exapmpledomain"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/pinecone.vectordb/organizations/test-cli-instance-7","name":"test-cli-instance-7","type":"pinecone.vectordb/organizations","location":"East + US","tags":{},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T14:09:52.8990388Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T14:23:34.4733145Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com","phoneNumber":""},"partnerProperties":{"displayName":"Test-CLI-Instance-7"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","aadDomains":["onmicrosoft"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-8","name":"test-cli-instance-8","type":"pinecone.vectordb/organizations","location":"eastus","tags":{"TestName":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T14:16:02.3795279Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T14:16:02.3795279Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"","lastName":"","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://app.pinecone.io/azure-liftr?connection=xkttmdv","aadDomains":["onmicrosoft.com"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-test-1","name":"test-cli-instance-test-1","type":"pinecone.vectordb/organizations","location":"eastus","systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T14:29:35.5834377Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T15:00:07.6430971Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"Swati","lastName":"Aggarwal","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://app.pinecone.io/azure-liftr?connection=xkttmdv","aadDomains":["onmicrosoft.com"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-test-2","name":"test-cli-instance-test-2","type":"pinecone.vectordb/organizations","location":"eastus","systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T15:02:52.4237436Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T15:39:30.7936502Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"Swati","lastName":"Aggarwal","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://app.pinecone.io/azure-liftr?connection=xkttmdv","aadDomains":["onmicrosoft.com"]}}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-test-3","name":"test-cli-instance-test-3","type":"pinecone.vectordb/organizations","location":"eastus","systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T15:49:23.6353533Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-03-16T13:19:18.3868756Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"Swati","lastName":"Aggarwal","emailAddress":"aggarwalsw@microsoft.com","upn":"aggarwalsw@microsoft.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://app.pinecone.io/azure-liftr?connection=xkttmdv","aadDomains":["onmicrosoft.com"]}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '14418' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 13:54:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - 8690e848-6a82-4642-a656-ee2673d065ac + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: A6652727DCB64586AE106C7A9D52E3B8 Ref B: MAA201060516021 Ref C: 2025-03-27T13:54:33Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - pinecone vector-db organization show + Connection: + - keep-alive + ParameterSetName: + - --resource-group --organizationname + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.12.8 (Linux-6.8.0-1021-azure-x86_64-with-glibc2.36) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-4?api-version=2024-10-22-preview + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest/providers/Pinecone.VectorDb/organizations/test-cli-instance-4","name":"test-cli-instance-4","type":"pinecone.vectordb/organizations","location":"eastus","tags":{"TestName":"TestValue"},"systemData":{"createdBy":"aggarwalsw@microsoft.com","createdByType":"User","createdAt":"2025-02-27T09:56:30.2275062Z","lastModifiedBy":"aggarwalsw@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2025-02-27T14:22:52.7443493Z"},"properties":{"marketplace":{"subscriptionId":"fc35d936-3b89-41f8-8110-a24b56826c37","subscriptionStatus":"PendingFulfillmentStart","offerDetails":{"publisherId":"pineconesystemsinc1688761585469","offerId":"pineconeliftr","planId":"pinecone_liftr_preview_paygo","planName":"Pinecone + - Pay As You Go (Preview)","termUnit":"P1M","termId":"gmz7xq9ge3py"}},"provisioningState":"Failed","user":{"firstName":"User + FirstName","lastName":"User LastName","emailAddress":"xxx@exampledomain.com","upn":"xxx@exampledomain.com"},"partnerProperties":{"displayName":"Test-CLI-Instance-3"},"singleSignOnProperties":{"type":"Saml","state":"Initial","enterpriseAppId":"0b9873df-1629-4036-9360-5f2f65c0a0d3","url":"https://sso.partnerorg.com","aadDomains":["exapmpledomain"]}}}' + headers: + cache-control: + - no-cache + content-length: + - '1265' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 27 Mar 2025 13:54:37 GMT + etag: + - '"1d00f173-0000-0300-0000-67ce6f360000"' + 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: 098474BE46CB4D08827D6DEBD3BBC34C Ref B: MAA201060516009 Ref C: 2025-03-27T13:54:35Z' + status: + code: 200 + message: OK +version: 1 diff --git a/src/pinecone/azext_pinecone/tests/latest/test_pinecone.py b/src/pinecone/azext_pinecone/tests/latest/test_pinecone.py new file mode 100644 index 00000000000..bdaac7a7709 --- /dev/null +++ b/src/pinecone/azext_pinecone/tests/latest/test_pinecone.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk import * + + +class PineconeScenario(ScenarioTest): + @ResourceGroupPreparer(name_prefix='cli_test_pinecone', location="eastus") + def test_pinecone_all(self, resource_group): + self.kwargs.update({ + 'name': 'test-cli-instance-4', + 'resource_group': 'clitest' + }) + + # List WeightsAndBiases Organizations + self.cmd('az pinecone vector-db organization list --resource-group {resource_group}', + checks=[]) + + # Show WeightsAndBiases Organization + self.cmd('az pinecone vector-db organization show --resource-group {resource_group} --organizationname {name}', + checks=[ + self.check('name', '{name}'), + ]) \ No newline at end of file diff --git a/src/pinecone/setup.cfg b/src/pinecone/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/pinecone/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/pinecone/setup.py b/src/pinecone/setup.py new file mode 100644 index 00000000000..bf24bb92dcc --- /dev/null +++ b/src/pinecone/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '1.0.0b1' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='pinecone', + version=VERSION, + description='Microsoft Azure Command-Line Tools Pinecone Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/pinecone', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_pinecone': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +) diff --git a/src/service_name.json b/src/service_name.json index 4d38ced3435..dc6be1724f9 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -928,5 +928,10 @@ "Command": "az computeschedule", "AzureServiceName": "Computeschedule", "URL": "https://learn.microsoft.com/en-us/rest/api/computeschedule/" + }, + { + "Command": "az pinecone", + "AzureServiceName": "Pinecone", + "URL": "https://learn.microsoft.com/en-us/azure/partner-solutions" } ]