-
Notifications
You must be signed in to change notification settings - Fork 3.4k
{Search} Add 2026-03-01-preview support #33268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mattgotteiner
wants to merge
3
commits into
Azure:dev
Choose a base branch
from
mattgotteiner:search-2026-03-01-preview
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| "search", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Search | ||
| """Manage Azure AI Search | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
24 changes: 24 additions & 0 deletions
24
src/azure-cli/azure/cli/command_modules/search/aaz/latest/search/offering/__cmd_group.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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( | ||
| "search offering", | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Azure AI Search offerings | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] | ||
|
|
13 changes: 13 additions & 0 deletions
13
src/azure-cli/azure/cli/command_modules/search/aaz/latest/search/offering/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 * | ||
|
|
181 changes: 181 additions & 0 deletions
181
src/azure-cli/azure/cli/command_modules/search/aaz/latest/search/offering/_list.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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( | ||
| "search offering list", | ||
| ) | ||
| class List(AAZCommand): | ||
| """List all Azure AI Search offerings by region. | ||
|
mattgotteiner marked this conversation as resolved.
|
||
| """ | ||
|
|
||
| _aaz_info = { | ||
| "version": "2026-03-01-preview", | ||
| "resources": [ | ||
| ["mgmt-plane", "/providers/microsoft.search/offerings", "2026-03-01-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) | ||
|
|
||
| return cls._args_schema | ||
|
|
||
| def _execute_operations(self): | ||
| self.pre_operations() | ||
| self.OfferingsList(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 OfferingsList(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( | ||
| "/providers/Microsoft.Search/offerings", | ||
| ) | ||
|
|
||
| @property | ||
| def method(self): | ||
| return "GET" | ||
|
|
||
| @property | ||
| def error_format(self): | ||
| return "ODataV4Format" | ||
|
|
||
| @property | ||
| def query_parameters(self): | ||
| parameters = { | ||
| **self.serialize_query_param( | ||
| "api-version", "2026-03-01-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", | ||
| flags={"read_only": True}, | ||
| ) | ||
| _schema_on_200.value = AAZListType( | ||
| flags={"read_only": True}, | ||
| ) | ||
|
|
||
| value = cls._schema_on_200.value | ||
| value.Element = AAZObjectType() | ||
|
|
||
| _element = cls._schema_on_200.value.Element | ||
| _element.features = AAZListType() | ||
| _element.region_name = AAZStrType( | ||
| serialized_name="regionName", | ||
| ) | ||
| _element.skus = AAZListType() | ||
|
|
||
| features = cls._schema_on_200.value.Element.features | ||
| features.Element = AAZObjectType() | ||
|
|
||
| _element = cls._schema_on_200.value.Element.features.Element | ||
| _element.name = AAZStrType() | ||
|
|
||
| skus = cls._schema_on_200.value.Element.skus | ||
| skus.Element = AAZObjectType() | ||
|
|
||
| _element = cls._schema_on_200.value.Element.skus.Element | ||
| _element.limits = AAZObjectType() | ||
| _element.sku = AAZObjectType() | ||
|
|
||
| limits = cls._schema_on_200.value.Element.skus.Element.limits | ||
| limits.indexers = AAZIntType() | ||
| limits.indexes = AAZIntType() | ||
| limits.partition_storage_in_gigabytes = AAZFloatType( | ||
| serialized_name="partitionStorageInGigabytes", | ||
| ) | ||
| limits.partition_vector_storage_in_gigabytes = AAZFloatType( | ||
| serialized_name="partitionVectorStorageInGigabytes", | ||
| ) | ||
| limits.partitions = AAZIntType() | ||
| limits.replicas = AAZIntType() | ||
| limits.search_units = AAZIntType( | ||
| serialized_name="searchUnits", | ||
| ) | ||
|
|
||
| sku = cls._schema_on_200.value.Element.skus.Element.sku | ||
| sku.name = AAZStrType() | ||
|
|
||
| return cls._schema_on_200 | ||
|
|
||
|
|
||
| class _ListHelper: | ||
| """Helper class for List""" | ||
|
|
||
|
|
||
| __all__ = ["List"] | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.