Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/helpIndex.latest.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
"tags": ""
},
"search": {
"summary": "Manage Search.",
"summary": "Manage Azure AI Search.",
"tags": ""
},
"security": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# --------------------------------------------------------------------------------------------


def cf_search(cli_ctx, **_):
def cf_search(cli_ctx, api_version='2026-03-01-preview', **_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azure.mgmt.search import SearchManagementClient
return get_mgmt_service_client(cli_ctx, SearchManagementClient)
return get_mgmt_service_client(cli_ctx, SearchManagementClient, api_version=api_version)


def cf_search_services(cli_ctx, _):
Expand Down
44 changes: 29 additions & 15 deletions src/azure-cli/azure/cli/command_modules/search/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,51 @@

helps['search'] = """
type: group
short-summary: Manage Azure Search services, admin keys and query keys.
short-summary: Manage Azure AI Search services, offerings, admin keys and query keys.
"""

helps['search admin-key'] = """
type: group
short-summary: Manage Azure Search admin keys.
short-summary: Manage Azure AI Search admin keys.
"""

helps['search query-key'] = """
type: group
short-summary: Manage Azure Search query keys.
short-summary: Manage Azure AI Search query keys.
"""

helps['search service'] = """
type: group
short-summary: Manage Azure Search services.
short-summary: Manage Azure AI Search services.
"""

helps['search offering'] = """
type: group
short-summary: Manage Azure AI Search offerings.
"""

helps['search offering list'] = """
type: command
short-summary: List Azure AI Search offerings by region.
examples:
- name: List Azure AI Search offerings by region.
text: >
az search offering list
"""

helps['search private-endpoint-connection'] = """
type: group
short-summary: Manage Azure Search private endpoint connections.
short-summary: Manage Azure AI Search private endpoint connections.
"""

helps['search private-link-resource'] = """
type: group
short-summary: Manage Azure Search private link resources.
short-summary: Manage Azure AI Search private link resources.
"""

helps['search shared-private-link-resource'] = """
type: group
short-summary: Manage Azure Search shared private link resources.
short-summary: Manage Azure AI Search shared private link resources.
"""

helps['search shared-private-link-resource wait'] = """
Expand Down Expand Up @@ -67,7 +81,7 @@

helps['search service query-key create'] = """
type: command
short-summary: Creates a query key for a given Azure Search service.
short-summary: Creates a query key for a given Azure AI Search service.
examples:
- name: Create a query key for a Search service.
text: >
Expand All @@ -76,7 +90,7 @@

helps['search service admin-key regenerate'] = """
type: command
short-summary: Regenerate an admin key for a given Azure Search service.
short-summary: Regenerate an admin key for a given Azure AI Search service.
examples:
- name: Regenerate the primary admin key for a Search service.
text: >
Expand All @@ -88,7 +102,7 @@

helps['search service check-name-availability'] = """
type: command
short-summary: Check the availability of a given Azure Search service name.
short-summary: Check the availability of a given Azure AI Search service name.
examples:
- name: Check if a Search service name is available.
text: >
Expand All @@ -97,7 +111,7 @@

helps['search service upgrade'] = """
type: command
short-summary: Upgrade a given Azure Search service.
short-summary: Upgrade a given Azure AI Search service.
examples:
- name: Upgrade a Search service.
text: >
Expand All @@ -106,7 +120,7 @@

helps['search service network-security-perimeter-configuration reconcile'] = """
type: command
short-summary: Reconcile network security perimeter configuration for a given Azure Search service.
short-summary: Reconcile network security perimeter configuration for a given Azure AI Search service.
examples:
- name: Reconcile network security perimeter configuration and specify a perimeter name.
text: >
Expand All @@ -115,7 +129,7 @@

helps['search service shared-private-link-resource create'] = """
type: command
short-summary: Create a shared private link resource for a given Azure Search service.
short-summary: Create a shared private link resource for a given Azure AI Search service.
examples:
- name: Create a shared private link resource for a Search service.
text: >
Expand All @@ -127,7 +141,7 @@

helps['search service shared-private-link-resource update'] = """
type: command
short-summary: Update a shared private link resource for a given Azure Search service.
short-summary: Update a shared private link resource for a given Azure AI Search service.
examples:
- name: Update the request message for a shared private link resource.
text: >
Expand All @@ -139,7 +153,7 @@

helps['search service private-endpoint-connection update'] = """
type: command
short-summary: Update a private endpoint connection for a given Azure Search service.
short-summary: Update a private endpoint connection for a given Azure AI Search service.
examples:
- name: Approve a private endpoint connection.
text: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"search",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Search
"""Manage Azure AI Search
"""
pass

Expand Down
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"]

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 *

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.
Comment thread
mattgotteiner marked this conversation as resolved.
Comment thread
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"]

Loading
Loading