From c1d6214ccfe891cecbd60c77f9871f1795cb29f8 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Sun, 17 Mar 2024 22:43:39 -0400 Subject: [PATCH] [AutoRelease] t2-search-2024-02-28-86521(can only be merged by SDK owner) (#34484) * code and test * Update assets.json --------- Co-authored-by: azure-sdk Co-authored-by: ChenxiJiang333 --- sdk/search/azure-mgmt-search/CHANGELOG.md | 15 + sdk/search/azure-mgmt-search/README.md | 4 +- sdk/search/azure-mgmt-search/_meta.json | 2 +- sdk/search/azure-mgmt-search/assets.json | 2 +- .../azure/mgmt/search/_configuration.py | 6 +- .../mgmt/search/_search_management_client.py | 14 +- .../azure/mgmt/search/_version.py | 2 +- .../azure/mgmt/search/aio/_configuration.py | 6 +- .../search/aio/_search_management_client.py | 14 +- .../mgmt/search/aio/operations/__init__.py | 2 + .../aio/operations/_admin_keys_operations.py | 6 +- ...ity_perimeter_configurations_operations.py | 348 +++++ ...private_endpoint_connections_operations.py | 28 +- .../_private_link_resources_operations.py | 2 +- .../aio/operations/_query_keys_operations.py | 8 +- .../_search_management_client_operations.py | 3 +- .../aio/operations/_services_operations.py | 46 +- ...hared_private_link_resources_operations.py | 22 +- .../aio/operations/_usages_operations.py | 2 +- .../azure/mgmt/search/models/__init__.py | 40 + .../azure/mgmt/search/models/_models_py3.py | 1175 ++++++++++++++--- .../models/_search_management_client_enums.py | 124 +- .../azure/mgmt/search/operations/__init__.py | 2 + .../operations/_admin_keys_operations.py | 18 +- ...ity_perimeter_configurations_operations.py | 460 +++++++ .../mgmt/search/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 52 +- .../_private_link_resources_operations.py | 8 +- .../operations/_query_keys_operations.py | 26 +- .../_search_management_client_operations.py | 5 +- .../search/operations/_services_operations.py | 68 +- ...hared_private_link_resources_operations.py | 46 +- .../search/operations/_usages_operations.py | 4 +- ..._or_update_shared_private_link_resource.py | 2 +- .../delete_private_endpoint_connection.py | 2 +- .../delete_shared_private_link_resource.py | 2 +- .../get_private_endpoint_connection.py | 2 +- .../generated_samples/get_quota_usage.py | 2 +- .../get_quota_usages_list.py | 2 +- .../get_shared_private_link_resource.py | 2 +- ...private_endpoint_connections_by_service.py | 2 +- ...hared_private_link_resources_by_service.py | 2 +- .../list_supported_private_link_resources.py | 2 +- ...k_security_perimeter_configurations_get.py | 42 + ...erimeter_configurations_list_by_service.py | 42 + ...rity_perimeter_configurations_reconcile.py | 41 + .../search_create_or_update_service.py | 2 +- ...h_create_or_update_service_auth_options.py | 2 +- ...te_or_update_service_disable_local_auth.py | 2 +- ..._to_allow_access_from_private_endpoints.py | 2 +- ..._to_allow_access_from_public_custom_ips.py | 2 +- ...ccess_from_public_custom_ips_and_bypass.py | 55 + ..._or_update_service_with_cmk_enforcement.py | 2 +- ...r_update_service_with_data_exfiltration.py | 52 + ..._create_or_update_service_with_identity.py | 9 +- ...h_create_or_update_with_semantic_search.py | 2 +- .../search_create_query_key.py | 4 +- .../search_delete_query_key.py | 2 +- .../search_delete_service.py | 2 +- .../search_get_admin_keys.py | 2 +- .../generated_samples/search_get_service.py | 2 +- ...ions_list.py => search_list_operations.py} | 4 +- ...earch_list_query_keys_by_search_service.py | 2 +- .../search_list_services_by_resource_group.py | 2 +- .../search_list_services_by_subscription.py | 2 +- .../search_regenerate_admin_key.py | 2 +- .../search_update_service.py | 2 +- .../search_update_service_auth_options.py | 2 +- ...earch_update_service_disable_local_auth.py | 2 +- ..._to_allow_access_from_private_endpoints.py | 2 +- ..._to_allow_access_from_public_custom_ips.py | 2 +- ...ccess_from_public_custom_ips_and_bypass.py | 52 + ...earch_update_service_to_remove_identity.py | 2 +- ...rch_update_service_with_cmk_enforcement.py | 2 +- ...h_update_service_with_data_exfiltration.py | 45 + ...rch_update_service_with_semantic_search.py | 2 +- .../update_private_endpoint_connection.py | 4 +- .../azure-mgmt-search/sdk_packaging.toml | 2 +- sdk/search/azure-mgmt-search/setup.py | 7 +- 79 files changed, 2531 insertions(+), 456 deletions(-) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_network_security_perimeter_configurations_operations.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_network_security_perimeter_configurations_operations.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_get.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_list_by_service.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_reconcile.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips_and_bypass.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_data_exfiltration.py rename sdk/search/azure-mgmt-search/generated_samples/{operations_list.py => search_list_operations.py} (92%) create mode 100644 sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips_and_bypass.py create mode 100644 sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_data_exfiltration.py diff --git a/sdk/search/azure-mgmt-search/CHANGELOG.md b/sdk/search/azure-mgmt-search/CHANGELOG.md index 0dd0c51066a7..c87bae5fe659 100644 --- a/sdk/search/azure-mgmt-search/CHANGELOG.md +++ b/sdk/search/azure-mgmt-search/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 9.2.0b1 (2024-03-18) + +### Features Added + + - Added operation group NetworkSecurityPerimeterConfigurationsOperations + - Model Identity has a new parameter user_assigned_identities + - Model NetworkRuleSet has a new parameter bypass + - Model Operation has a new parameter is_data_action + - Model Operation has a new parameter origin + - Model Operation has a new parameter properties + - Model SearchService has a new parameter disabled_data_exfiltration_options + - Model SearchService has a new parameter e_tag + - Model SearchServiceUpdate has a new parameter disabled_data_exfiltration_options + - Model SearchServiceUpdate has a new parameter e_tag + ## 9.1.0 (2023-10-23) ### Features Added diff --git a/sdk/search/azure-mgmt-search/README.md b/sdk/search/azure-mgmt-search/README.md index 12a952bcba43..7bb5d136bb7a 100644 --- a/sdk/search/azure-mgmt-search/README.md +++ b/sdk/search/azure-mgmt-search/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Search Management Client Library. -This package has been tested with Python 3.7+. +This package has been tested with Python 3.8+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.7+ is required to use this package. +- Python 3.8+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/search/azure-mgmt-search/_meta.json b/sdk/search/azure-mgmt-search/_meta.json index a3d82ef711c6..8db603f71ea1 100644 --- a/sdk/search/azure-mgmt-search/_meta.json +++ b/sdk/search/azure-mgmt-search/_meta.json @@ -1,5 +1,5 @@ { - "commit": "e1017d9ab49f41296177b4f4c9ac741fb7de044d", + "commit": "77df3b1680a95566a3e6a3a2cd07c9a4960b2af3", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.7", "use": [ diff --git a/sdk/search/azure-mgmt-search/assets.json b/sdk/search/azure-mgmt-search/assets.json index af04bad0cd53..ffbd80420e45 100644 --- a/sdk/search/azure-mgmt-search/assets.json +++ b/sdk/search/azure-mgmt-search/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "python", "TagPrefix": "python/search/azure-mgmt-search", - "Tag": "python/search/azure-mgmt-search_b2ac0b29f6" + "Tag": "python/search/azure-mgmt-search_c9d8ad9153" } diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py index 694256fcb159..9c26c6880090 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py @@ -30,14 +30,14 @@ class SearchManagementClientConfiguration(Configuration): # pylint: disable=too :param subscription_id: The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(SearchManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-11-01") + api_version: str = kwargs.pop("api_version", "2024-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py index a3350dce322c..9ccfeec05e12 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py @@ -17,6 +17,7 @@ from ._serialization import Deserializer, Serializer from .operations import ( AdminKeysOperations, + NetworkSecurityPerimeterConfigurationsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -35,7 +36,7 @@ class SearchManagementClient( SearchManagementClientOperationsMixin ): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes - """Client that can be used to manage Azure Cognitive Search services and API keys. + """Client that can be used to manage Azure AI Search services and API keys. :ivar operations: Operations operations :vartype operations: azure.mgmt.search.operations.Operations @@ -55,6 +56,10 @@ class SearchManagementClient( azure.mgmt.search.operations.SharedPrivateLinkResourcesOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.search.operations.UsagesOperations + :ivar network_security_perimeter_configurations: + NetworkSecurityPerimeterConfigurationsOperations operations + :vartype network_security_perimeter_configurations: + azure.mgmt.search.operations.NetworkSecurityPerimeterConfigurationsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The unique identifier for a Microsoft Azure subscription. You can @@ -62,8 +67,8 @@ class SearchManagementClient( :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -99,6 +104,9 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py index f89ed38360ab..d0e5f2e039a0 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.2.0b1" diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py index d813b42ba7e6..48f7e11d476f 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_configuration.py @@ -30,14 +30,14 @@ class SearchManagementClientConfiguration(Configuration): # pylint: disable=too :param subscription_id: The unique identifier for a Microsoft Azure subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type subscription_id: str - :keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str """ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(SearchManagementClientConfiguration, self).__init__(**kwargs) - api_version: str = kwargs.pop("api_version", "2023-11-01") + api_version: str = kwargs.pop("api_version", "2024-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py index ea3e05ccaf32..75594148e14c 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_search_management_client.py @@ -17,6 +17,7 @@ from ._configuration import SearchManagementClientConfiguration from .operations import ( AdminKeysOperations, + NetworkSecurityPerimeterConfigurationsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -35,7 +36,7 @@ class SearchManagementClient( SearchManagementClientOperationsMixin ): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes - """Client that can be used to manage Azure Cognitive Search services and API keys. + """Client that can be used to manage Azure AI Search services and API keys. :ivar operations: Operations operations :vartype operations: azure.mgmt.search.aio.operations.Operations @@ -56,6 +57,10 @@ class SearchManagementClient( azure.mgmt.search.aio.operations.SharedPrivateLinkResourcesOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.search.aio.operations.UsagesOperations + :ivar network_security_perimeter_configurations: + NetworkSecurityPerimeterConfigurationsOperations operations + :vartype network_security_perimeter_configurations: + azure.mgmt.search.aio.operations.NetworkSecurityPerimeterConfigurationsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The unique identifier for a Microsoft Azure subscription. You can @@ -63,8 +68,8 @@ class SearchManagementClient( :type subscription_id: str :param base_url: Service URL. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2024-03-01-preview". Note that overriding + this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -100,6 +105,9 @@ def __init__( self._client, self._config, self._serialize, self._deserialize ) self.usages = UsagesOperations(self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeter_configurations = NetworkSecurityPerimeterConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize + ) def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/__init__.py index b96a319c2e09..57f8554fb6d4 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/__init__.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/__init__.py @@ -15,6 +15,7 @@ from ._shared_private_link_resources_operations import SharedPrivateLinkResourcesOperations from ._usages_operations import UsagesOperations from ._search_management_client_operations import SearchManagementClientOperationsMixin +from ._network_security_perimeter_configurations_operations import NetworkSecurityPerimeterConfigurationsOperations from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import @@ -30,6 +31,7 @@ "SharedPrivateLinkResourcesOperations", "UsagesOperations", "SearchManagementClientOperationsMixin", + "NetworkSecurityPerimeterConfigurationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py index 1ba6cc833801..20452e510bc8 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_admin_keys_operations.py @@ -59,7 +59,7 @@ async def get( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> _models.AdminKeyResult: - """Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. + """Gets the primary and secondary admin API keys for the specified Azure AI Search service. .. seealso:: - https://aka.ms/search-manage @@ -67,7 +67,7 @@ async def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -149,7 +149,7 @@ async def regenerate( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_network_security_perimeter_configurations_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_network_security_perimeter_configurations_operations.py new file mode 100644 index 000000000000..0b7ca1cc578a --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_network_security_perimeter_configurations_operations.py @@ -0,0 +1,348 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union, cast +import urllib.parse + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models +from ..._vendor import _convert_request +from ...operations._network_security_perimeter_configurations_operations import ( + build_get_request, + build_list_by_service_request, + build_reconcile_request, +) +from .._vendor import SearchManagementClientMixinABC + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class NetworkSecurityPerimeterConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.search.aio.SearchManagementClient`'s + :attr:`network_security_perimeter_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs) -> None: + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, search_service_name: str, **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityPerimeterConfiguration"]: + """Gets a list of network security perimeter configurations for a search service. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterConfiguration or the + result of cls(response) + :rtype: + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.NetworkSecurityPerimeterConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_service_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_service.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityPerimeterConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged(get_next, extract_data) + + list_by_service.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations" + } + + @distributed_trace_async + async def get( + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> _models.NetworkSecurityPerimeterConfiguration: + """Gets a network security perimeter configuration. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :param nsp_config_name: The network security configuration name. Required. + :type nsp_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeterConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.NetworkSecurityPerimeterConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkSecurityPerimeterConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}" + } + + async def _reconcile_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_reconcile_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reconcile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reconcile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile" + } + + @distributed_trace_async + async def begin_reconcile( + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> AsyncLROPoller[None]: + """Reconcile network security perimeter configuration for the Azure AI Search resource provider. + This triggers a manual resync with network security perimeter configurations by ensuring the + search service carries the latest configuration. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :param nsp_config_name: The network security configuration name. Required. + :type nsp_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = await self._reconcile_initial( # type: ignore + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: AsyncPollingMethod = cast( + AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(AsyncPollingMethod, AsyncNoPolling()) + else: + polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reconcile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile" + } diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py index bdef7873d36d..d167f02e6dfd 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_endpoint_connections_operations.py @@ -72,7 +72,7 @@ async def update( content_type: str = "application/json", **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -80,11 +80,11 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Required. @@ -113,7 +113,7 @@ async def update( content_type: str = "application/json", **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -121,11 +121,11 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Required. @@ -152,7 +152,7 @@ async def update( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -160,11 +160,11 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Is either a PrivateEndpointConnection type or a IO type. Required. @@ -263,11 +263,11 @@ async def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -348,11 +348,11 @@ async def delete( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -434,7 +434,7 @@ def list_by_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py index dd1f50169adc..6f08f230270e 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_private_link_resources_operations.py @@ -69,7 +69,7 @@ def list_supported( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py index 0f55803437d9..f84fc287932a 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_query_keys_operations.py @@ -76,7 +76,7 @@ async def create( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param name: The name of the new query API key. Required. @@ -151,7 +151,7 @@ def list_by_search_service( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> AsyncIterable["_models.QueryKey"]: - """Returns the list of query API keys for the given Azure Cognitive Search service. + """Returns the list of query API keys for the given Azure AI Search service. .. seealso:: - https://aka.ms/search-manage @@ -159,7 +159,7 @@ def list_by_search_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -267,7 +267,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param key: The query key to be deleted. Query keys are identified by value, not by name. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_search_management_client_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_search_management_client_operations.py index f29b53fc6b0d..f58e049c2e47 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_search_management_client_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_search_management_client_operations.py @@ -48,8 +48,7 @@ async def usage_by_subscription_sku( :param location: The unique location name for a Microsoft Azure geographic region. Required. :type location: str - :param sku_name: The unique search service sku name supported by Azure Cognitive Search. - Required. + :param sku_name: The unique SKU name that identifies a billable tier. Required. :type sku_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py index 950034e8b95a..9d33431937da 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_services_operations.py @@ -166,12 +166,12 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Required. :type service: ~azure.mgmt.search.models.SearchService @@ -215,12 +215,12 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Required. :type service: IO @@ -262,12 +262,12 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Is either a SearchService type or a IO type. Required. @@ -359,7 +359,7 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Required. :type service: ~azure.mgmt.search.models.SearchServiceUpdate @@ -394,7 +394,7 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Required. :type service: IO @@ -427,7 +427,7 @@ async def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Is either a SearchServiceUpdate type or a IO type. Required. @@ -523,7 +523,7 @@ async def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -603,7 +603,7 @@ async def delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py index 9e122542e18c..35bc0283e929 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_shared_private_link_resources_operations.py @@ -159,11 +159,11 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Required. @@ -209,11 +209,11 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Required. @@ -257,11 +257,11 @@ async def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Is either a SharedPrivateLinkResource type or a IO type. Required. @@ -356,11 +356,11 @@ async def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -499,11 +499,11 @@ async def begin_delete( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -584,7 +584,7 @@ def list_by_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_usages_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_usages_operations.py index aef200530ea9..aa4a43ab6824 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_usages_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_usages_operations.py @@ -60,7 +60,7 @@ def list_by_subscription( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> AsyncIterable["_models.QuotaUsageResult"]: - """Gets a list of all Search quota usages in the given subscription. + """Get a list of all Azure AI Search quota usages across the subscription. .. seealso:: - https://aka.ms/search-manage diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/__init__.py index 414aae883dd0..6a441c94798b 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/__init__.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/__init__.py @@ -17,10 +17,26 @@ from ._models_py3 import Identity from ._models_py3 import IpRule from ._models_py3 import ListQueryKeysResult +from ._models_py3 import NSPConfigAccessRule +from ._models_py3 import NSPConfigAccessRuleProperties +from ._models_py3 import NSPConfigAssociation +from ._models_py3 import NSPConfigNetworkSecurityPerimeterRule +from ._models_py3 import NSPConfigPerimeter +from ._models_py3 import NSPConfigProfile +from ._models_py3 import NSPProvisioningIssue +from ._models_py3 import NSPProvisioningIssueProperties from ._models_py3 import NetworkRuleSet +from ._models_py3 import NetworkSecurityPerimeterConfiguration +from ._models_py3 import NetworkSecurityPerimeterConfigurationListResult from ._models_py3 import Operation +from ._models_py3 import OperationAvailability from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult +from ._models_py3 import OperationLogsSpecification +from ._models_py3 import OperationMetricDimension +from ._models_py3 import OperationMetricsSpecification +from ._models_py3 import OperationProperties +from ._models_py3 import OperationServiceSpecification from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionListResult from ._models_py3 import PrivateEndpointConnectionProperties @@ -29,6 +45,7 @@ from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkResourcesResult +from ._models_py3 import ProxyResource from ._models_py3 import QueryKey from ._models_py3 import QuotaUsageResult from ._models_py3 import QuotaUsageResultName @@ -45,6 +62,7 @@ from ._models_py3 import SharedPrivateLinkResourceProperties from ._models_py3 import Sku from ._models_py3 import TrackedResource +from ._models_py3 import UserAssignedManagedIdentity from ._search_management_client_enums import AadAuthFailureMode from ._search_management_client_enums import AdminKeyKind @@ -54,6 +72,8 @@ from ._search_management_client_enums import PrivateLinkServiceConnectionStatus from ._search_management_client_enums import ProvisioningState from ._search_management_client_enums import PublicNetworkAccess +from ._search_management_client_enums import SearchBypass +from ._search_management_client_enums import SearchDisabledDataExfiltrationOption from ._search_management_client_enums import SearchEncryptionComplianceStatus from ._search_management_client_enums import SearchEncryptionWithCmk from ._search_management_client_enums import SearchSemanticSearch @@ -79,10 +99,26 @@ "Identity", "IpRule", "ListQueryKeysResult", + "NSPConfigAccessRule", + "NSPConfigAccessRuleProperties", + "NSPConfigAssociation", + "NSPConfigNetworkSecurityPerimeterRule", + "NSPConfigPerimeter", + "NSPConfigProfile", + "NSPProvisioningIssue", + "NSPProvisioningIssueProperties", "NetworkRuleSet", + "NetworkSecurityPerimeterConfiguration", + "NetworkSecurityPerimeterConfigurationListResult", "Operation", + "OperationAvailability", "OperationDisplay", "OperationListResult", + "OperationLogsSpecification", + "OperationMetricDimension", + "OperationMetricsSpecification", + "OperationProperties", + "OperationServiceSpecification", "PrivateEndpointConnection", "PrivateEndpointConnectionListResult", "PrivateEndpointConnectionProperties", @@ -91,6 +127,7 @@ "PrivateLinkResource", "PrivateLinkResourceProperties", "PrivateLinkResourcesResult", + "ProxyResource", "QueryKey", "QuotaUsageResult", "QuotaUsageResultName", @@ -107,6 +144,7 @@ "SharedPrivateLinkResourceProperties", "Sku", "TrackedResource", + "UserAssignedManagedIdentity", "AadAuthFailureMode", "AdminKeyKind", "HostingMode", @@ -115,6 +153,8 @@ "PrivateLinkServiceConnectionStatus", "ProvisioningState", "PublicNetworkAccess", + "SearchBypass", + "SearchDisabledDataExfiltrationOption", "SearchEncryptionComplianceStatus", "SearchEncryptionWithCmk", "SearchSemanticSearch", diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py index 73004cccd71c..64da0d096eb6 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py @@ -24,7 +24,7 @@ class AdminKeyResult(_serialization.Model): - """Response containing the primary and secondary admin API keys for a given Azure Cognitive Search + """Response containing the primary and secondary admin API keys for a given Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. @@ -208,10 +208,10 @@ def __init__( class DataPlaneAadOrApiKeyAuthOption(_serialization.Model): - """Indicates that either the API key or an access token from Azure Active Directory can be used - for authentication. + """Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be + used for authentication. - :ivar aad_auth_failure_mode: Describes what response the data plane API of a Search service + :ivar aad_auth_failure_mode: Describes what response the data plane API of a search service would send for requests that failed authentication. Known values are: "http403" and "http401WithBearerChallenge". :vartype aad_auth_failure_mode: str or ~azure.mgmt.search.models.AadAuthFailureMode @@ -225,7 +225,7 @@ def __init__( self, *, aad_auth_failure_mode: Optional[Union[str, "_models.AadAuthFailureMode"]] = None, **kwargs: Any ) -> None: """ - :keyword aad_auth_failure_mode: Describes what response the data plane API of a Search service + :keyword aad_auth_failure_mode: Describes what response the data plane API of a search service would send for requests that failed authentication. Known values are: "http403" and "http401WithBearerChallenge". :paramtype aad_auth_failure_mode: str or ~azure.mgmt.search.models.AadAuthFailureMode @@ -235,13 +235,13 @@ def __init__( class DataPlaneAuthOptions(_serialization.Model): - """Defines the options for how the data plane API of a Search service authenticates requests. This - cannot be set if 'disableLocalAuth' is set to true. + """Defines the options for how the search service authenticates a data plane request. This cannot + be set if 'disableLocalAuth' is set to true. - :ivar api_key_only: Indicates that only the API key needs to be used for authentication. + :ivar api_key_only: Indicates that only the API key can be used for authentication. :vartype api_key_only: JSON - :ivar aad_or_api_key: Indicates that either the API key or an access token from Azure Active - Directory can be used for authentication. + :ivar aad_or_api_key: Indicates that either the API key or an access token from a Microsoft + Entra ID tenant can be used for authentication. :vartype aad_or_api_key: ~azure.mgmt.search.models.DataPlaneAadOrApiKeyAuthOption """ @@ -258,10 +258,10 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword api_key_only: Indicates that only the API key needs to be used for authentication. + :keyword api_key_only: Indicates that only the API key can be used for authentication. :paramtype api_key_only: JSON - :keyword aad_or_api_key: Indicates that either the API key or an access token from Azure Active - Directory can be used for authentication. + :keyword aad_or_api_key: Indicates that either the API key or an access token from a Microsoft + Entra ID tenant can be used for authentication. :paramtype aad_or_api_key: ~azure.mgmt.search.models.DataPlaneAadOrApiKeyAuthOption """ super().__init__(**kwargs) @@ -271,17 +271,18 @@ def __init__( class EncryptionWithCmk(_serialization.Model): """Describes a policy that determines how resources within the search service are to be encrypted - with Customer Managed Keys. + with customer managed keys. Variables are only populated by the server, and will be ignored when sending a request. - :ivar enforcement: Describes how a search service should enforce having one or more non - customer encrypted resources. Known values are: "Disabled", "Enabled", and "Unspecified". + :ivar enforcement: Describes how a search service should enforce compliance if it finds objects + that aren't encrypted with the customer-managed key. Known values are: "Disabled", "Enabled", + and "Unspecified". :vartype enforcement: str or ~azure.mgmt.search.models.SearchEncryptionWithCmk - :ivar encryption_compliance_status: Describes whether the search service is compliant or not - with respect to having non customer encrypted resources. If a service has more than one non - customer encrypted resource and 'Enforcement' is 'enabled' then the service will be marked as - 'nonCompliant'. Known values are: "Compliant" and "NonCompliant". + :ivar encryption_compliance_status: Returns the status of search service compliance with + respect to non-CMK-encrypted objects. If a service has more than one unencrypted object, and + enforcement is enabled, the service is marked as noncompliant. Known values are: "Compliant" + and "NonCompliant". :vartype encryption_compliance_status: str or ~azure.mgmt.search.models.SearchEncryptionComplianceStatus """ @@ -299,8 +300,9 @@ def __init__( self, *, enforcement: Optional[Union[str, "_models.SearchEncryptionWithCmk"]] = None, **kwargs: Any ) -> None: """ - :keyword enforcement: Describes how a search service should enforce having one or more non - customer encrypted resources. Known values are: "Disabled", "Enabled", and "Unspecified". + :keyword enforcement: Describes how a search service should enforce compliance if it finds + objects that aren't encrypted with the customer-managed key. Known values are: "Disabled", + "Enabled", and "Unspecified". :paramtype enforcement: str or ~azure.mgmt.search.models.SearchEncryptionWithCmk """ super().__init__(**kwargs) @@ -309,7 +311,8 @@ def __init__( class Identity(_serialization.Model): - """Identity for the resource. + """Details about the search service identity. A null value indicates that the search service has + no identity assigned. Variables are only populated by the server, and will be ignored when sending a request. @@ -319,8 +322,16 @@ class Identity(_serialization.Model): :vartype principal_id: str :ivar tenant_id: The tenant ID of the system-assigned identity of the search service. :vartype tenant_id: str - :ivar type: The identity type. Required. Known values are: "None" and "SystemAssigned". + :ivar type: The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' + includes both an identity created by the system and a set of user assigned identities. The type + 'None' will remove all identities from the service. Required. Known values are: "None", + "SystemAssigned", "UserAssigned", and "SystemAssigned, UserAssigned". :vartype type: str or ~azure.mgmt.search.models.IdentityType + :ivar user_assigned_identities: The list of user identities associated with the resource. The + user identity dictionary key references will be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, + ~azure.mgmt.search.models.UserAssignedManagedIdentity] """ _validation = { @@ -333,21 +344,37 @@ class Identity(_serialization.Model): "principal_id": {"key": "principalId", "type": "str"}, "tenant_id": {"key": "tenantId", "type": "str"}, "type": {"key": "type", "type": "str"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedManagedIdentity}"}, } - def __init__(self, *, type: Union[str, "_models.IdentityType"], **kwargs: Any) -> None: + def __init__( + self, + *, + type: Union[str, "_models.IdentityType"], + user_assigned_identities: Optional[Dict[str, "_models.UserAssignedManagedIdentity"]] = None, + **kwargs: Any + ) -> None: """ - :keyword type: The identity type. Required. Known values are: "None" and "SystemAssigned". + :keyword type: The type of identity used for the resource. The type 'SystemAssigned, + UserAssigned' includes both an identity created by the system and a set of user assigned + identities. The type 'None' will remove all identities from the service. Required. Known values + are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned, UserAssigned". :paramtype type: str or ~azure.mgmt.search.models.IdentityType + :keyword user_assigned_identities: The list of user identities associated with the resource. + The user identity dictionary key references will be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, + ~azure.mgmt.search.models.UserAssignedManagedIdentity] """ super().__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type + self.user_assigned_identities = user_assigned_identities class IpRule(_serialization.Model): - """The IP restriction rule of the Azure Cognitive Search service. + """The IP restriction rule of the Azure AI Search service. :ivar value: Value corresponding to a single IPv4 address (eg., 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be allowed. @@ -369,11 +396,11 @@ def __init__(self, *, value: Optional[str] = None, **kwargs: Any) -> None: class ListQueryKeysResult(_serialization.Model): - """Response containing the query API keys for a given Azure Cognitive Search service. + """Response containing the query API keys for a given Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The query keys for the Azure Cognitive Search service. + :ivar value: The query keys for the Azure AI Search service. :vartype value: list[~azure.mgmt.search.models.QueryKey] :ivar next_link: Request URL that can be used to query next page of query keys. Returned when the total number of requested query keys exceed maximum page size. @@ -398,7 +425,7 @@ def __init__(self, **kwargs: Any) -> None: class NetworkRuleSet(_serialization.Model): - """Network specific rules that determine how the Azure Cognitive Search service may be reached. + """Network specific rules that determine how the Azure AI Search service may be reached. :ivar ip_rules: A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks @@ -407,13 +434,23 @@ class NetworkRuleSet(_serialization.Model): interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method. :vartype ip_rules: list[~azure.mgmt.search.models.IpRule] + :ivar bypass: Possible origins of inbound traffic that can bypass the rules defined in the + 'ipRules' section. Known values are: "None" and "AzurePortal". + :vartype bypass: str or ~azure.mgmt.search.models.SearchBypass """ _attribute_map = { "ip_rules": {"key": "ipRules", "type": "[IpRule]"}, + "bypass": {"key": "bypass", "type": "str"}, } - def __init__(self, *, ip_rules: Optional[List["_models.IpRule"]] = None, **kwargs: Any) -> None: + def __init__( + self, + *, + ip_rules: Optional[List["_models.IpRule"]] = None, + bypass: Optional[Union[str, "_models.SearchBypass"]] = None, + **kwargs: Any + ) -> None: """ :keyword ip_rules: A list of IP restriction rules that defines the inbound network(s) with allowing access to the search service endpoint. At the meantime, all other public IP networks @@ -422,9 +459,504 @@ def __init__(self, *, ip_rules: Optional[List["_models.IpRule"]] = None, **kwarg interface is not allowed even with any public IP rules, and private endpoint connections would be the exclusive access method. :paramtype ip_rules: list[~azure.mgmt.search.models.IpRule] + :keyword bypass: Possible origins of inbound traffic that can bypass the rules defined in the + 'ipRules' section. Known values are: "None" and "AzurePortal". + :paramtype bypass: str or ~azure.mgmt.search.models.SearchBypass """ super().__init__(**kwargs) self.ip_rules = ip_rules + self.bypass = bypass + + +class Resource(_serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have + tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + + +class NetworkSecurityPerimeterConfiguration(ProxyResource): + """Network security perimeter configuration for a server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar provisioning_state: + :vartype provisioning_state: str + :ivar network_security_perimeter: The perimeter for a network security perimeter configuration. + :vartype network_security_perimeter: ~azure.mgmt.search.models.NSPConfigPerimeter + :ivar resource_association: The resource association for the network security perimeter. + :vartype resource_association: ~azure.mgmt.search.models.NSPConfigAssociation + :ivar profile: The profile for a network security perimeter configuration. + :vartype profile: ~azure.mgmt.search.models.NSPConfigProfile + :ivar provisioning_issues: + :vartype provisioning_issues: list[~azure.mgmt.search.models.NSPProvisioningIssue] + """ + + _validation = { + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "provisioning_state": {"readonly": True}, + } + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, + "network_security_perimeter": {"key": "properties.networkSecurityPerimeter", "type": "NSPConfigPerimeter"}, + "resource_association": {"key": "properties.resourceAssociation", "type": "NSPConfigAssociation"}, + "profile": {"key": "properties.profile", "type": "NSPConfigProfile"}, + "provisioning_issues": {"key": "properties.provisioningIssues", "type": "[NSPProvisioningIssue]"}, + } + + def __init__( + self, + *, + network_security_perimeter: Optional["_models.NSPConfigPerimeter"] = None, + resource_association: Optional["_models.NSPConfigAssociation"] = None, + profile: Optional["_models.NSPConfigProfile"] = None, + provisioning_issues: Optional[List["_models.NSPProvisioningIssue"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword network_security_perimeter: The perimeter for a network security perimeter + configuration. + :paramtype network_security_perimeter: ~azure.mgmt.search.models.NSPConfigPerimeter + :keyword resource_association: The resource association for the network security perimeter. + :paramtype resource_association: ~azure.mgmt.search.models.NSPConfigAssociation + :keyword profile: The profile for a network security perimeter configuration. + :paramtype profile: ~azure.mgmt.search.models.NSPConfigProfile + :keyword provisioning_issues: + :paramtype provisioning_issues: list[~azure.mgmt.search.models.NSPProvisioningIssue] + """ + super().__init__(**kwargs) + self.provisioning_state = None + self.network_security_perimeter = network_security_perimeter + self.resource_association = resource_association + self.profile = profile + self.provisioning_issues = provisioning_issues + + +class NetworkSecurityPerimeterConfigurationListResult(_serialization.Model): + """A list of network security perimeter configurations for a server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: Array of results. + :vartype value: list[~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration] + :ivar next_link: Link to retrieve next page of results. + :vartype next_link: str + """ + + _validation = { + "value": {"readonly": True}, + "next_link": {"readonly": True}, + } + + _attribute_map = { + "value": {"key": "value", "type": "[NetworkSecurityPerimeterConfiguration]"}, + "next_link": {"key": "nextLink", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.value = None + self.next_link = None + + +class NSPConfigAccessRule(_serialization.Model): + """An access rule for a network security perimeter configuration. + + :ivar name: + :vartype name: str + :ivar properties: The properties for the access rules in a network security perimeter + configuration. + :vartype properties: ~azure.mgmt.search.models.NSPConfigAccessRuleProperties + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "NSPConfigAccessRuleProperties"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + properties: Optional["_models.NSPConfigAccessRuleProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: + :paramtype name: str + :keyword properties: The properties for the access rules in a network security perimeter + configuration. + :paramtype properties: ~azure.mgmt.search.models.NSPConfigAccessRuleProperties + """ + super().__init__(**kwargs) + self.name = name + self.properties = properties + + +class NSPConfigAccessRuleProperties(_serialization.Model): + """The properties for the access rules in a network security perimeter configuration. + + :ivar direction: + :vartype direction: str + :ivar address_prefixes: + :vartype address_prefixes: list[str] + :ivar fully_qualified_domain_names: + :vartype fully_qualified_domain_names: list[str] + :ivar subscriptions: + :vartype subscriptions: list[str] + :ivar network_security_perimeters: + :vartype network_security_perimeters: + list[~azure.mgmt.search.models.NSPConfigNetworkSecurityPerimeterRule] + """ + + _attribute_map = { + "direction": {"key": "direction", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "fully_qualified_domain_names": {"key": "fullyQualifiedDomainNames", "type": "[str]"}, + "subscriptions": {"key": "subscriptions", "type": "[str]"}, + "network_security_perimeters": { + "key": "networkSecurityPerimeters", + "type": "[NSPConfigNetworkSecurityPerimeterRule]", + }, + } + + def __init__( + self, + *, + direction: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + fully_qualified_domain_names: Optional[List[str]] = None, + subscriptions: Optional[List[str]] = None, + network_security_perimeters: Optional[List["_models.NSPConfigNetworkSecurityPerimeterRule"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword direction: + :paramtype direction: str + :keyword address_prefixes: + :paramtype address_prefixes: list[str] + :keyword fully_qualified_domain_names: + :paramtype fully_qualified_domain_names: list[str] + :keyword subscriptions: + :paramtype subscriptions: list[str] + :keyword network_security_perimeters: + :paramtype network_security_perimeters: + list[~azure.mgmt.search.models.NSPConfigNetworkSecurityPerimeterRule] + """ + super().__init__(**kwargs) + self.direction = direction + self.address_prefixes = address_prefixes + self.fully_qualified_domain_names = fully_qualified_domain_names + self.subscriptions = subscriptions + self.network_security_perimeters = network_security_perimeters + + +class NSPConfigAssociation(_serialization.Model): + """The resource association for the network security perimeter. + + :ivar name: + :vartype name: str + :ivar access_mode: + :vartype access_mode: str + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "access_mode": {"key": "accessMode", "type": "str"}, + } + + def __init__(self, *, name: Optional[str] = None, access_mode: Optional[str] = None, **kwargs: Any) -> None: + """ + :keyword name: + :paramtype name: str + :keyword access_mode: + :paramtype access_mode: str + """ + super().__init__(**kwargs) + self.name = name + self.access_mode = access_mode + + +class NSPConfigNetworkSecurityPerimeterRule(_serialization.Model): + """The network security perimeter properties present in a configuration rule. + + :ivar id: + :vartype id: str + :ivar perimeter_guid: + :vartype perimeter_guid: str + :ivar location: + :vartype location: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "perimeter_guid": {"key": "perimeterGuid", "type": "str"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + perimeter_guid: Optional[str] = None, + location: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: + :paramtype id: str + :keyword perimeter_guid: + :paramtype perimeter_guid: str + :keyword location: + :paramtype location: str + """ + super().__init__(**kwargs) + self.id = id + self.perimeter_guid = perimeter_guid + self.location = location + + +class NSPConfigPerimeter(_serialization.Model): + """The perimeter for a network security perimeter configuration. + + :ivar id: + :vartype id: str + :ivar perimeter_guid: + :vartype perimeter_guid: str + :ivar location: + :vartype location: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + "perimeter_guid": {"key": "perimeterGuid", "type": "str"}, + "location": {"key": "location", "type": "str"}, + } + + def __init__( + self, + *, + id: Optional[str] = None, # pylint: disable=redefined-builtin + perimeter_guid: Optional[str] = None, + location: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword id: + :paramtype id: str + :keyword perimeter_guid: + :paramtype perimeter_guid: str + :keyword location: + :paramtype location: str + """ + super().__init__(**kwargs) + self.id = id + self.perimeter_guid = perimeter_guid + self.location = location + + +class NSPConfigProfile(_serialization.Model): + """The profile for a network security perimeter configuration. + + :ivar name: + :vartype name: str + :ivar access_rules_version: + :vartype access_rules_version: str + :ivar access_rules: + :vartype access_rules: list[~azure.mgmt.search.models.NSPConfigAccessRule] + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "access_rules_version": {"key": "accessRulesVersion", "type": "str"}, + "access_rules": {"key": "accessRules", "type": "[NSPConfigAccessRule]"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + access_rules_version: Optional[str] = None, + access_rules: Optional[List["_models.NSPConfigAccessRule"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: + :paramtype name: str + :keyword access_rules_version: + :paramtype access_rules_version: str + :keyword access_rules: + :paramtype access_rules: list[~azure.mgmt.search.models.NSPConfigAccessRule] + """ + super().__init__(**kwargs) + self.name = name + self.access_rules_version = access_rules_version + self.access_rules = access_rules + + +class NSPProvisioningIssue(_serialization.Model): + """An object to describe any issues with provisioning network security perimeters to a search + service. + + :ivar name: + :vartype name: str + :ivar properties: The properties to describe any issues with provisioning network security + perimeters to a search service. + :vartype properties: ~azure.mgmt.search.models.NSPProvisioningIssueProperties + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "NSPProvisioningIssueProperties"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + properties: Optional["_models.NSPProvisioningIssueProperties"] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: + :paramtype name: str + :keyword properties: The properties to describe any issues with provisioning network security + perimeters to a search service. + :paramtype properties: ~azure.mgmt.search.models.NSPProvisioningIssueProperties + """ + super().__init__(**kwargs) + self.name = name + self.properties = properties + + +class NSPProvisioningIssueProperties(_serialization.Model): + """The properties to describe any issues with provisioning network security perimeters to a search + service. + + :ivar issue_type: + :vartype issue_type: str + :ivar severity: + :vartype severity: str + :ivar description: + :vartype description: str + :ivar suggested_resource_ids: + :vartype suggested_resource_ids: list[str] + :ivar suggested_access_rules: + :vartype suggested_access_rules: list[str] + """ + + _attribute_map = { + "issue_type": {"key": "issueType", "type": "str"}, + "severity": {"key": "severity", "type": "str"}, + "description": {"key": "description", "type": "str"}, + "suggested_resource_ids": {"key": "suggestedResourceIds", "type": "[str]"}, + "suggested_access_rules": {"key": "suggestedAccessRules", "type": "[str]"}, + } + + def __init__( + self, + *, + issue_type: Optional[str] = None, + severity: Optional[str] = None, + description: Optional[str] = None, + suggested_resource_ids: Optional[List[str]] = None, + suggested_access_rules: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword issue_type: + :paramtype issue_type: str + :keyword severity: + :paramtype severity: str + :keyword description: + :paramtype description: str + :keyword suggested_resource_ids: + :paramtype suggested_resource_ids: list[str] + :keyword suggested_access_rules: + :paramtype suggested_access_rules: list[str] + """ + super().__init__(**kwargs) + self.issue_type = issue_type + self.severity = severity + self.description = description + self.suggested_resource_ids = suggested_resource_ids + self.suggested_access_rules = suggested_access_rules class Operation(_serialization.Model): @@ -437,16 +969,29 @@ class Operation(_serialization.Model): :vartype name: str :ivar display: The object that describes the operation. :vartype display: ~azure.mgmt.search.models.OperationDisplay + :ivar is_data_action: Describes if the specified operation is a data plane API operation. + Operations where this value is not true are supported directly by the resource provider. + :vartype is_data_action: bool + :ivar origin: Describes which originating entities are allowed to invoke this operation. + :vartype origin: str + :ivar properties: Describes additional properties for this operation. + :vartype properties: ~azure.mgmt.search.models.OperationProperties """ _validation = { "name": {"readonly": True}, "display": {"readonly": True}, + "is_data_action": {"readonly": True}, + "origin": {"readonly": True}, + "properties": {"readonly": True}, } _attribute_map = { "name": {"key": "name", "type": "str"}, "display": {"key": "display", "type": "OperationDisplay"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "origin": {"key": "origin", "type": "str"}, + "properties": {"key": "properties", "type": "OperationProperties"}, } def __init__(self, **kwargs: Any) -> None: @@ -454,6 +999,37 @@ def __init__(self, **kwargs: Any) -> None: super().__init__(**kwargs) self.name = None self.display = None + self.is_data_action = None + self.origin = None + self.properties = None + + +class OperationAvailability(_serialization.Model): + """Describes a particular availability for the metric specification. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar time_grain: The time grain for the dimension. + :vartype time_grain: str + :ivar blob_duration: The blob duration for the dimension. + :vartype blob_duration: str + """ + + _validation = { + "time_grain": {"readonly": True}, + "blob_duration": {"readonly": True}, + } + + _attribute_map = { + "time_grain": {"key": "timeGrain", "type": "str"}, + "blob_duration": {"key": "blobDuration", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.time_grain = None + self.blob_duration = None class OperationDisplay(_serialization.Model): @@ -496,11 +1072,12 @@ def __init__(self, **kwargs: Any) -> None: class OperationListResult(_serialization.Model): """The result of the request to list REST API operations. It contains a list of operations and a - URL to get the next set of results. + URL to get the next set of results. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of operations supported by the resource provider. + :ivar value: The list of operations by Azure AI Search, some supported by the resource provider + and others by data plane APIs. :vartype value: list[~azure.mgmt.search.models.Operation] :ivar next_link: The URL to get the next set of operation list results, if any. :vartype next_link: str @@ -523,43 +1100,173 @@ def __init__(self, **kwargs: Any) -> None: self.next_link = None -class Resource(_serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. +class OperationLogsSpecification(_serialization.Model): + """Specifications of one type of log for this operation. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. + :ivar name: The name of the log specification. :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str + :ivar display_name: The display name of the log specification. + :vartype display_name: str + :ivar blob_duration: The blob duration for the log specification. + :vartype blob_duration: str """ _validation = { - "id": {"readonly": True}, "name": {"readonly": True}, - "type": {"readonly": True}, + "display_name": {"readonly": True}, + "blob_duration": {"readonly": True}, } _attribute_map = { - "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, - "type": {"key": "type", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "blob_duration": {"key": "blobDuration", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.id = None self.name = None - self.type = None + self.display_name = None + self.blob_duration = None + + +class OperationMetricDimension(_serialization.Model): + """Describes a particular dimension for the metric specification. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the dimension. + :vartype name: str + :ivar display_name: The display name of the dimension. + :vartype display_name: str + """ + + _validation = { + "name": {"readonly": True}, + "display_name": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.name = None + self.display_name = None + + +class OperationMetricsSpecification(_serialization.Model): + """Specifications of one type of metric for this operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the metric specification. + :vartype name: str + :ivar display_name: The display name of the metric specification. + :vartype display_name: str + :ivar display_description: The display description of the metric specification. + :vartype display_description: str + :ivar unit: The unit for the metric specification. + :vartype unit: str + :ivar aggregation_type: The type of aggregation for the metric specification. + :vartype aggregation_type: str + :ivar dimensions: Dimensions for the metric specification. + :vartype dimensions: list[~azure.mgmt.search.models.OperationMetricDimension] + :ivar availabilities: Availabilities for the metric specification. + :vartype availabilities: list[~azure.mgmt.search.models.OperationAvailability] + """ + + _validation = { + "name": {"readonly": True}, + "display_name": {"readonly": True}, + "display_description": {"readonly": True}, + "unit": {"readonly": True}, + "aggregation_type": {"readonly": True}, + "dimensions": {"readonly": True}, + "availabilities": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "display_name": {"key": "displayName", "type": "str"}, + "display_description": {"key": "displayDescription", "type": "str"}, + "unit": {"key": "unit", "type": "str"}, + "aggregation_type": {"key": "aggregationType", "type": "str"}, + "dimensions": {"key": "dimensions", "type": "[OperationMetricDimension]"}, + "availabilities": {"key": "availabilities", "type": "[OperationAvailability]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.name = None + self.display_name = None + self.display_description = None + self.unit = None + self.aggregation_type = None + self.dimensions = None + self.availabilities = None + + +class OperationProperties(_serialization.Model): + """Describes additional properties for this operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar service_specification: Specifications of the service for this operation. + :vartype service_specification: ~azure.mgmt.search.models.OperationServiceSpecification + """ + + _validation = { + "service_specification": {"readonly": True}, + } + + _attribute_map = { + "service_specification": {"key": "serviceSpecification", "type": "OperationServiceSpecification"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.service_specification = None + + +class OperationServiceSpecification(_serialization.Model): + """Specifications of the service for this operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar metric_specifications: Specifications of metrics for this operation. + :vartype metric_specifications: list[~azure.mgmt.search.models.OperationMetricsSpecification] + :ivar log_specifications: Specifications of logs for this operation. + :vartype log_specifications: list[~azure.mgmt.search.models.OperationLogsSpecification] + """ + + _validation = { + "metric_specifications": {"readonly": True}, + "log_specifications": {"readonly": True}, + } + + _attribute_map = { + "metric_specifications": {"key": "metricSpecifications", "type": "[OperationMetricsSpecification]"}, + "log_specifications": {"key": "logSpecifications", "type": "[OperationLogsSpecification]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.metric_specifications = None + self.log_specifications = None class PrivateEndpointConnection(Resource): - """Describes an existing Private Endpoint connection to the Azure Cognitive Search service. + """Describes an existing private endpoint connection to the Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. @@ -571,8 +1278,8 @@ class PrivateEndpointConnection(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar properties: Describes the properties of an existing Private Endpoint connection to the - Azure Cognitive Search service. + :ivar properties: Describes the properties of an existing private endpoint connection to the + Azure AI Search service. :vartype properties: ~azure.mgmt.search.models.PrivateEndpointConnectionProperties """ @@ -593,8 +1300,8 @@ def __init__( self, *, properties: Optional["_models.PrivateEndpointConnectionProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: Describes the properties of an existing Private Endpoint connection to the - Azure Cognitive Search service. + :keyword properties: Describes the properties of an existing private endpoint connection to the + Azure AI Search service. :paramtype properties: ~azure.mgmt.search.models.PrivateEndpointConnectionProperties """ super().__init__(**kwargs) @@ -602,11 +1309,11 @@ def __init__( class PrivateEndpointConnectionListResult(_serialization.Model): - """Response containing a list of Private Endpoint connections. + """Response containing a list of private endpoint connections. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of Private Endpoint connections. + :ivar value: The list of private endpoint connections. :vartype value: list[~azure.mgmt.search.models.PrivateEndpointConnection] :ivar next_link: Request URL that can be used to query next page of private endpoint connections. Returned when the total number of requested private endpoint connections exceed @@ -632,22 +1339,20 @@ def __init__(self, **kwargs: Any) -> None: class PrivateEndpointConnectionProperties(_serialization.Model): - """Describes the properties of an existing Private Endpoint connection to the Azure Cognitive - Search service. + """Describes the properties of an existing private endpoint connection to the search service. :ivar private_endpoint: The private endpoint resource from Microsoft.Network provider. :vartype private_endpoint: ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint - :ivar private_link_service_connection_state: Describes the current state of an existing Private - Link Service connection to the Azure Private Endpoint. + :ivar private_link_service_connection_state: Describes the current state of an existing Azure + Private Link service connection to the private endpoint. :vartype private_link_service_connection_state: ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState - :ivar group_id: The group id from the provider of resource the private link service connection - is for. + :ivar group_id: The group ID of the Azure resource for which the private link service is for. :vartype group_id: str - :ivar provisioning_state: The provisioning state of the private link service connection. Can be - Updating, Deleting, Failed, Succeeded, or Incomplete. Known values are: "Updating", "Deleting", - "Failed", "Succeeded", "Incomplete", and "Canceled". + :ivar provisioning_state: The provisioning state of the private link service connection. Valid + values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. Known values are: + "Updating", "Deleting", "Failed", "Succeeded", "Incomplete", and "Canceled". :vartype provisioning_state: str or ~azure.mgmt.search.models.PrivateLinkServiceConnectionProvisioningState """ @@ -678,15 +1383,15 @@ def __init__( :paramtype private_endpoint: ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint :keyword private_link_service_connection_state: Describes the current state of an existing - Private Link Service connection to the Azure Private Endpoint. + Azure Private Link service connection to the private endpoint. :paramtype private_link_service_connection_state: ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState - :keyword group_id: The group id from the provider of resource the private link service - connection is for. + :keyword group_id: The group ID of the Azure resource for which the private link service is + for. :paramtype group_id: str - :keyword provisioning_state: The provisioning state of the private link service connection. Can - be Updating, Deleting, Failed, Succeeded, or Incomplete. Known values are: "Updating", - "Deleting", "Failed", "Succeeded", "Incomplete", and "Canceled". + :keyword provisioning_state: The provisioning state of the private link service connection. + Valid values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. Known values + are: "Updating", "Deleting", "Failed", "Succeeded", "Incomplete", and "Canceled". :paramtype provisioning_state: str or ~azure.mgmt.search.models.PrivateLinkServiceConnectionProvisioningState """ @@ -700,7 +1405,7 @@ def __init__( class PrivateEndpointConnectionPropertiesPrivateEndpoint(_serialization.Model): """The private endpoint resource from Microsoft.Network provider. - :ivar id: The resource id of the private endpoint resource from Microsoft.Network provider. + :ivar id: The resource ID of the private endpoint resource from Microsoft.Network provider. :vartype id: str """ @@ -710,7 +1415,7 @@ class PrivateEndpointConnectionPropertiesPrivateEndpoint(_serialization.Model): def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin """ - :keyword id: The resource id of the private endpoint resource from Microsoft.Network provider. + :keyword id: The resource ID of the private endpoint resource from Microsoft.Network provider. :paramtype id: str """ super().__init__(**kwargs) @@ -718,11 +1423,11 @@ def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylin class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState(_serialization.Model): - """Describes the current state of an existing Private Link Service connection to the Azure Private - Endpoint. + """Describes the current state of an existing Azure Private Link service connection to the private + endpoint. - :ivar status: Status of the the private link service connection. Can be Pending, Approved, - Rejected, or Disconnected. Known values are: "Pending", "Approved", "Rejected", and + :ivar status: Status of the the private link service connection. Valid values are Pending, + Approved, Rejected, or Disconnected. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". :vartype status: str or ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus :ivar description: The description for the private link service connection state. @@ -746,8 +1451,8 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword status: Status of the the private link service connection. Can be Pending, Approved, - Rejected, or Disconnected. Known values are: "Pending", "Approved", "Rejected", and + :keyword status: Status of the the private link service connection. Valid values are Pending, + Approved, Rejected, or Disconnected. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". :paramtype status: str or ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus :keyword description: The description for the private link service connection state. @@ -762,7 +1467,7 @@ def __init__( class PrivateLinkResource(Resource): - """Describes a supported private link resource for the Azure Cognitive Search service. + """Describes a supported private link resource for the Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. @@ -775,7 +1480,7 @@ class PrivateLinkResource(Resource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar properties: Describes the properties of a supported private link resource for the Azure - Cognitive Search service. + AI Search service. :vartype properties: ~azure.mgmt.search.models.PrivateLinkResourceProperties """ @@ -800,9 +1505,9 @@ def __init__(self, **kwargs: Any) -> None: class PrivateLinkResourceProperties(_serialization.Model): - """Describes the properties of a supported private link resource for the Azure Cognitive Search - service. For a given API version, this represents the 'supported' groupIds when creating a - shared private link resource. + """Describes the properties of a supported private link resource for the Azure AI Search service. + For a given API version, this represents the 'supported' groupIds when creating a shared + private link resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -813,7 +1518,7 @@ class PrivateLinkResourceProperties(_serialization.Model): :ivar required_zone_names: The list of required DNS zone names of the private link resource. :vartype required_zone_names: list[str] :ivar shareable_private_link_resource_types: The list of resources that are onboarded to - private link service, that are supported by Azure Cognitive Search. + private link service, that are supported by Azure AI Search. :vartype shareable_private_link_resource_types: list[~azure.mgmt.search.models.ShareablePrivateLinkResourceType] """ @@ -868,12 +1573,13 @@ def __init__(self, **kwargs: Any) -> None: class QueryKey(_serialization.Model): - """Describes an API key for a given Azure Cognitive Search service that has permissions for query - operations only. + """Describes an API key for a given Azure AI Search service that conveys read-only permissions on + the docs collection of an index. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the query API key; may be empty. + :ivar name: The name of the query API key. Query names are optional, but assigning a name can + help you remember how it's used. :vartype name: str :ivar key: The value of the query API key. :vartype key: str @@ -897,19 +1603,19 @@ def __init__(self, **kwargs: Any) -> None: class QuotaUsageResult(_serialization.Model): - """Describes the quota usage for a particular sku supported by Azure Cognitive Search. + """Describes the quota usage for a particular SKU. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The resource id of the quota usage sku endpoint for Microsoft.Search provider. + :ivar id: The resource ID of the quota usage SKU endpoint for Microsoft.Search provider. :vartype id: str - :ivar unit: The unit of measurement for the search sku. + :ivar unit: The unit of measurement for the search SKU. :vartype unit: str - :ivar current_value: The currently used up value for the particular search sku. + :ivar current_value: The currently used up value for the particular search SKU. :vartype current_value: int - :ivar limit: The quota limit for the particular search sku. + :ivar limit: The quota limit for the particular search SKU. :vartype limit: int - :ivar name: The name of the sku supported by Azure Cognitive Search. + :ivar name: The name of the SKU supported by Azure AI Search. :vartype name: ~azure.mgmt.search.models.QuotaUsageResultName """ @@ -935,13 +1641,13 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword id: The resource id of the quota usage sku endpoint for Microsoft.Search provider. + :keyword id: The resource ID of the quota usage SKU endpoint for Microsoft.Search provider. :paramtype id: str - :keyword unit: The unit of measurement for the search sku. + :keyword unit: The unit of measurement for the search SKU. :paramtype unit: str - :keyword current_value: The currently used up value for the particular search sku. + :keyword current_value: The currently used up value for the particular search SKU. :paramtype current_value: int - :keyword limit: The quota limit for the particular search sku. + :keyword limit: The quota limit for the particular search SKU. :paramtype limit: int """ super().__init__(**kwargs) @@ -953,12 +1659,11 @@ def __init__( class QuotaUsageResultName(_serialization.Model): - """The name of the sku supported by Azure Cognitive Search. + """The name of the SKU supported by Azure AI Search. - :ivar value: The sku name supported by Azure Cognitive Search. + :ivar value: The SKU name supported by Azure AI Search. :vartype value: str - :ivar localized_value: The localized string value for the sku supported by Azure Cognitive - Search. + :ivar localized_value: The localized string value for the SKU name. :vartype localized_value: str """ @@ -969,10 +1674,9 @@ class QuotaUsageResultName(_serialization.Model): def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str] = None, **kwargs: Any) -> None: """ - :keyword value: The sku name supported by Azure Cognitive Search. + :keyword value: The SKU name supported by Azure AI Search. :paramtype value: str - :keyword localized_value: The localized string value for the sku supported by Azure Cognitive - Search. + :keyword localized_value: The localized string value for the SKU name. :paramtype localized_value: str """ super().__init__(**kwargs) @@ -981,12 +1685,11 @@ def __init__(self, *, value: Optional[str] = None, localized_value: Optional[str class QuotaUsagesListResult(_serialization.Model): - """Response containing the quota usage information for all the supported skus of Azure Cognitive - Search service. + """Response containing the quota usage information for all the supported SKUs of Azure AI Search. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The quota usages for the SKUs supported by Azure Cognitive Search. + :ivar value: The quota usages for the SKUs supported by Azure AI Search. :vartype value: list[~azure.mgmt.search.models.QuotaUsageResult] :ivar next_link: Request URL that can be used to query next page of quota usages. Returned when the total number of requested quota usages exceed maximum page size. @@ -1082,7 +1785,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw class SearchService(TrackedResource): # pylint: disable=too-many-instance-attributes - """Describes an Azure Cognitive Search service and its current state. + """Describes an Azure AI Search service and its current state. Variables are only populated by the server, and will be ignored when sending a request. @@ -1100,8 +1803,8 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str - :ivar sku: The SKU of the Search Service, which determines price tier and capacity limits. This - property is required when creating a new Search Service. + :ivar sku: The SKU of the search service, which determines price tier and capacity limits. This + property is required when creating a new search service. :vartype sku: ~azure.mgmt.search.models.Sku :ivar identity: The identity of the resource. :vartype identity: ~azure.mgmt.search.models.Identity @@ -1130,10 +1833,11 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error - state. If your service is in the degraded, disabled, or error states, it means the Azure - Cognitive Search team is actively investigating the underlying issue. Dedicated services in - these states are still chargeable based on the number of search units provisioned. Known values - are: "running", "provisioning", "deleting", "degraded", "disabled", and "error". + state. 'stopped': The search service is in a subscription that's disabled. If your service is + in the degraded, disabled, or error states, it means the Azure AI Search team is actively + investigating the underlying issue. Dedicated services in these states are still chargeable + based on the number of search units provisioned. Known values are: "running", "provisioning", + "deleting", "degraded", "disabled", "error", and "stopped". :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the search service status. :vartype status_details: str @@ -1147,9 +1851,15 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri uses capacity that is already set up. Known values are: "succeeded", "provisioning", and "failed". :vartype provisioning_state: str or ~azure.mgmt.search.models.ProvisioningState - :ivar network_rule_set: Network specific rules that determine how the Azure Cognitive Search - service may be reached. + :ivar network_rule_set: Network specific rules that determine how the Azure AI Search service + may be reached. :vartype network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar disabled_data_exfiltration_options: A list of data exfiltration scenarios that are + explicitly disallowed for the search service. Currently, the only supported value is 'All' to + disable all possible data export scenarios with more fine grained controls planned for the + future. + :vartype disabled_data_exfiltration_options: list[str or + ~azure.mgmt.search.models.SearchDisabledDataExfiltrationOption] :ivar encryption_with_cmk: Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. :vartype encryption_with_cmk: ~azure.mgmt.search.models.EncryptionWithCmk @@ -1160,18 +1870,21 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri :ivar auth_options: Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. :vartype auth_options: ~azure.mgmt.search.models.DataPlaneAuthOptions - :ivar private_endpoint_connections: The list of private endpoint connections to the Azure - Cognitive Search service. - :vartype private_endpoint_connections: - list[~azure.mgmt.search.models.PrivateEndpointConnection] :ivar semantic_search: Sets options that control the availability of semantic search. This - configuration is only possible for certain Azure Cognitive Search SKUs in certain locations. - Known values are: "disabled", "free", and "standard". + configuration is only possible for certain Azure AI Search SKUs in certain locations. Known + values are: "disabled", "free", and "standard". :vartype semantic_search: str or ~azure.mgmt.search.models.SearchSemanticSearch + :ivar private_endpoint_connections: The list of private endpoint connections to the Azure AI + Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] :ivar shared_private_link_resources: The list of shared private link resources managed by the - Azure Cognitive Search service. + Azure AI Search service. :vartype shared_private_link_resources: list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :ivar e_tag: A system generated property representing the service's etag that can be for + optimistic concurrency control during updates. + :vartype e_tag: str """ _validation = { @@ -1186,6 +1899,7 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri "provisioning_state": {"readonly": True}, "private_endpoint_connections": {"readonly": True}, "shared_private_link_resources": {"readonly": True}, + "e_tag": {"readonly": True}, } _attribute_map = { @@ -1204,18 +1918,20 @@ class SearchService(TrackedResource): # pylint: disable=too-many-instance-attri "status_details": {"key": "properties.statusDetails", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "network_rule_set": {"key": "properties.networkRuleSet", "type": "NetworkRuleSet"}, + "disabled_data_exfiltration_options": {"key": "properties.disabledDataExfiltrationOptions", "type": "[str]"}, "encryption_with_cmk": {"key": "properties.encryptionWithCmk", "type": "EncryptionWithCmk"}, "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, "auth_options": {"key": "properties.authOptions", "type": "DataPlaneAuthOptions"}, + "semantic_search": {"key": "properties.semanticSearch", "type": "str"}, "private_endpoint_connections": { "key": "properties.privateEndpointConnections", "type": "[PrivateEndpointConnection]", }, - "semantic_search": {"key": "properties.semanticSearch", "type": "str"}, "shared_private_link_resources": { "key": "properties.sharedPrivateLinkResources", "type": "[SharedPrivateLinkResource]", }, + "e_tag": {"key": "properties.eTag", "type": "str"}, } def __init__( @@ -1230,6 +1946,9 @@ def __init__( hosting_mode: Union[str, "_models.HostingMode"] = "default", public_network_access: Union[str, "_models.PublicNetworkAccess"] = "enabled", network_rule_set: Optional["_models.NetworkRuleSet"] = None, + disabled_data_exfiltration_options: Optional[ + List[Union[str, "_models.SearchDisabledDataExfiltrationOption"]] + ] = None, encryption_with_cmk: Optional["_models.EncryptionWithCmk"] = None, disable_local_auth: Optional[bool] = None, auth_options: Optional["_models.DataPlaneAuthOptions"] = None, @@ -1241,8 +1960,8 @@ def __init__( :paramtype tags: dict[str, str] :keyword location: The geo-location where the resource lives. Required. :paramtype location: str - :keyword sku: The SKU of the Search Service, which determines price tier and capacity limits. - This property is required when creating a new Search Service. + :keyword sku: The SKU of the search service, which determines price tier and capacity limits. + This property is required when creating a new search service. :paramtype sku: ~azure.mgmt.search.models.Sku :keyword identity: The identity of the resource. :paramtype identity: ~azure.mgmt.search.models.Identity @@ -1266,9 +1985,15 @@ def __init__( is not allowed, and private endpoint connections would be the exclusive access method. Known values are: "enabled" and "disabled". :paramtype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess - :keyword network_rule_set: Network specific rules that determine how the Azure Cognitive Search + :keyword network_rule_set: Network specific rules that determine how the Azure AI Search service may be reached. :paramtype network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :keyword disabled_data_exfiltration_options: A list of data exfiltration scenarios that are + explicitly disallowed for the search service. Currently, the only supported value is 'All' to + disable all possible data export scenarios with more fine grained controls planned for the + future. + :paramtype disabled_data_exfiltration_options: list[str or + ~azure.mgmt.search.models.SearchDisabledDataExfiltrationOption] :keyword encryption_with_cmk: Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. :paramtype encryption_with_cmk: ~azure.mgmt.search.models.EncryptionWithCmk @@ -1280,8 +2005,8 @@ def __init__( authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. :paramtype auth_options: ~azure.mgmt.search.models.DataPlaneAuthOptions :keyword semantic_search: Sets options that control the availability of semantic search. This - configuration is only possible for certain Azure Cognitive Search SKUs in certain locations. - Known values are: "disabled", "free", and "standard". + configuration is only possible for certain Azure AI Search SKUs in certain locations. Known + values are: "disabled", "free", and "standard". :paramtype semantic_search: str or ~azure.mgmt.search.models.SearchSemanticSearch """ super().__init__(tags=tags, location=location, **kwargs) @@ -1295,20 +2020,22 @@ def __init__( self.status_details = None self.provisioning_state = None self.network_rule_set = network_rule_set + self.disabled_data_exfiltration_options = disabled_data_exfiltration_options self.encryption_with_cmk = encryption_with_cmk self.disable_local_auth = disable_local_auth self.auth_options = auth_options - self.private_endpoint_connections = None self.semantic_search = semantic_search + self.private_endpoint_connections = None self.shared_private_link_resources = None + self.e_tag = None class SearchServiceListResult(_serialization.Model): - """Response containing a list of Azure Cognitive Search services. + """Response containing a list of Azure AI Search services. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of Search services. + :ivar value: The list of search services. :vartype value: list[~azure.mgmt.search.models.SearchService] :ivar next_link: Request URL that can be used to query next page of search services. Returned when the total number of requested search services exceed maximum page size. @@ -1333,7 +2060,7 @@ def __init__(self, **kwargs: Any) -> None: class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attributes - """The parameters used to update an Azure Cognitive Search service. + """The parameters used to update an Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. @@ -1345,16 +2072,17 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar sku: The SKU of the Search Service, which determines price tier and capacity limits. This - property is required when creating a new Search Service. + :ivar sku: The SKU of the search service, which determines price tier and capacity limits. This + property is required when creating a new search service. :vartype sku: ~azure.mgmt.search.models.Sku :ivar location: The geographic location of the resource. This must be one of the supported and - registered Azure Geo Regions (for example, West US, East US, Southeast Asia, and so forth). + registered Azure geo regions (for example, West US, East US, Southeast Asia, and so forth). This property is required when creating a new resource. :vartype location: str :ivar tags: Tags to help categorize the resource in the Azure portal. :vartype tags: dict[str, str] - :ivar identity: The identity of the resource. + :ivar identity: Details about the search service identity. A null value indicates that the + search service has no identity assigned. :vartype identity: ~azure.mgmt.search.models.Identity :ivar replica_count: The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic SKU. @@ -1381,10 +2109,11 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the service will reject all API requests. 'error': The search service is in an error - state. If your service is in the degraded, disabled, or error states, it means the Azure - Cognitive Search team is actively investigating the underlying issue. Dedicated services in - these states are still chargeable based on the number of search units provisioned. Known values - are: "running", "provisioning", "deleting", "degraded", "disabled", and "error". + state. 'stopped': The search service is in a subscription that's disabled. If your service is + in the degraded, disabled, or error states, it means the Azure AI Search team is actively + investigating the underlying issue. Dedicated services in these states are still chargeable + based on the number of search units provisioned. Known values are: "running", "provisioning", + "deleting", "degraded", "disabled", "error", and "stopped". :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus :ivar status_details: The details of the search service status. :vartype status_details: str @@ -1398,9 +2127,15 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib uses capacity that is already set up. Known values are: "succeeded", "provisioning", and "failed". :vartype provisioning_state: str or ~azure.mgmt.search.models.ProvisioningState - :ivar network_rule_set: Network specific rules that determine how the Azure Cognitive Search - service may be reached. + :ivar network_rule_set: Network specific rules that determine how the Azure AI Search service + may be reached. :vartype network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar disabled_data_exfiltration_options: A list of data exfiltration scenarios that are + explicitly disallowed for the search service. Currently, the only supported value is 'All' to + disable all possible data export scenarios with more fine grained controls planned for the + future. + :vartype disabled_data_exfiltration_options: list[str or + ~azure.mgmt.search.models.SearchDisabledDataExfiltrationOption] :ivar encryption_with_cmk: Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. :vartype encryption_with_cmk: ~azure.mgmt.search.models.EncryptionWithCmk @@ -1411,18 +2146,21 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib :ivar auth_options: Defines the options for how the data plane API of a search service authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. :vartype auth_options: ~azure.mgmt.search.models.DataPlaneAuthOptions - :ivar private_endpoint_connections: The list of private endpoint connections to the Azure - Cognitive Search service. - :vartype private_endpoint_connections: - list[~azure.mgmt.search.models.PrivateEndpointConnection] :ivar semantic_search: Sets options that control the availability of semantic search. This - configuration is only possible for certain Azure Cognitive Search SKUs in certain locations. - Known values are: "disabled", "free", and "standard". + configuration is only possible for certain Azure AI Search SKUs in certain locations. Known + values are: "disabled", "free", and "standard". :vartype semantic_search: str or ~azure.mgmt.search.models.SearchSemanticSearch + :ivar private_endpoint_connections: The list of private endpoint connections to the Azure AI + Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] :ivar shared_private_link_resources: The list of shared private link resources managed by the - Azure Cognitive Search service. + Azure AI Search service. :vartype shared_private_link_resources: list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :ivar e_tag: A system generated property representing the service's etag that can be for + optimistic concurrency control during updates. + :vartype e_tag: str """ _validation = { @@ -1436,6 +2174,7 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib "provisioning_state": {"readonly": True}, "private_endpoint_connections": {"readonly": True}, "shared_private_link_resources": {"readonly": True}, + "e_tag": {"readonly": True}, } _attribute_map = { @@ -1454,18 +2193,20 @@ class SearchServiceUpdate(Resource): # pylint: disable=too-many-instance-attrib "status_details": {"key": "properties.statusDetails", "type": "str"}, "provisioning_state": {"key": "properties.provisioningState", "type": "str"}, "network_rule_set": {"key": "properties.networkRuleSet", "type": "NetworkRuleSet"}, + "disabled_data_exfiltration_options": {"key": "properties.disabledDataExfiltrationOptions", "type": "[str]"}, "encryption_with_cmk": {"key": "properties.encryptionWithCmk", "type": "EncryptionWithCmk"}, "disable_local_auth": {"key": "properties.disableLocalAuth", "type": "bool"}, "auth_options": {"key": "properties.authOptions", "type": "DataPlaneAuthOptions"}, + "semantic_search": {"key": "properties.semanticSearch", "type": "str"}, "private_endpoint_connections": { "key": "properties.privateEndpointConnections", "type": "[PrivateEndpointConnection]", }, - "semantic_search": {"key": "properties.semanticSearch", "type": "str"}, "shared_private_link_resources": { "key": "properties.sharedPrivateLinkResources", "type": "[SharedPrivateLinkResource]", }, + "e_tag": {"key": "properties.eTag", "type": "str"}, } def __init__( @@ -1480,6 +2221,9 @@ def __init__( hosting_mode: Union[str, "_models.HostingMode"] = "default", public_network_access: Union[str, "_models.PublicNetworkAccess"] = "enabled", network_rule_set: Optional["_models.NetworkRuleSet"] = None, + disabled_data_exfiltration_options: Optional[ + List[Union[str, "_models.SearchDisabledDataExfiltrationOption"]] + ] = None, encryption_with_cmk: Optional["_models.EncryptionWithCmk"] = None, disable_local_auth: Optional[bool] = None, auth_options: Optional["_models.DataPlaneAuthOptions"] = None, @@ -1487,16 +2231,17 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword sku: The SKU of the Search Service, which determines price tier and capacity limits. - This property is required when creating a new Search Service. + :keyword sku: The SKU of the search service, which determines price tier and capacity limits. + This property is required when creating a new search service. :paramtype sku: ~azure.mgmt.search.models.Sku :keyword location: The geographic location of the resource. This must be one of the supported - and registered Azure Geo Regions (for example, West US, East US, Southeast Asia, and so forth). + and registered Azure geo regions (for example, West US, East US, Southeast Asia, and so forth). This property is required when creating a new resource. :paramtype location: str :keyword tags: Tags to help categorize the resource in the Azure portal. :paramtype tags: dict[str, str] - :keyword identity: The identity of the resource. + :keyword identity: Details about the search service identity. A null value indicates that the + search service has no identity assigned. :paramtype identity: ~azure.mgmt.search.models.Identity :keyword replica_count: The number of replicas in the search service. If specified, it must be a value between 1 and 12 inclusive for standard SKUs or between 1 and 3 inclusive for basic @@ -1518,9 +2263,15 @@ def __init__( is not allowed, and private endpoint connections would be the exclusive access method. Known values are: "enabled" and "disabled". :paramtype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess - :keyword network_rule_set: Network specific rules that determine how the Azure Cognitive Search + :keyword network_rule_set: Network specific rules that determine how the Azure AI Search service may be reached. :paramtype network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :keyword disabled_data_exfiltration_options: A list of data exfiltration scenarios that are + explicitly disallowed for the search service. Currently, the only supported value is 'All' to + disable all possible data export scenarios with more fine grained controls planned for the + future. + :paramtype disabled_data_exfiltration_options: list[str or + ~azure.mgmt.search.models.SearchDisabledDataExfiltrationOption] :keyword encryption_with_cmk: Specifies any policy regarding encryption of resources (such as indexes) using customer manager keys within a search service. :paramtype encryption_with_cmk: ~azure.mgmt.search.models.EncryptionWithCmk @@ -1532,8 +2283,8 @@ def __init__( authenticates requests. This cannot be set if 'disableLocalAuth' is set to true. :paramtype auth_options: ~azure.mgmt.search.models.DataPlaneAuthOptions :keyword semantic_search: Sets options that control the availability of semantic search. This - configuration is only possible for certain Azure Cognitive Search SKUs in certain locations. - Known values are: "disabled", "free", and "standard". + configuration is only possible for certain Azure AI Search SKUs in certain locations. Known + values are: "disabled", "free", and "standard". :paramtype semantic_search: str or ~azure.mgmt.search.models.SearchSemanticSearch """ super().__init__(**kwargs) @@ -1549,28 +2300,30 @@ def __init__( self.status_details = None self.provisioning_state = None self.network_rule_set = network_rule_set + self.disabled_data_exfiltration_options = disabled_data_exfiltration_options self.encryption_with_cmk = encryption_with_cmk self.disable_local_auth = disable_local_auth self.auth_options = auth_options - self.private_endpoint_connections = None self.semantic_search = semantic_search + self.private_endpoint_connections = None self.shared_private_link_resources = None + self.e_tag = None class ShareablePrivateLinkResourceProperties(_serialization.Model): """Describes the properties of a resource type that has been onboarded to private link service, - supported by Azure Cognitive Search. + supported by Azure AI Search. Variables are only populated by the server, and will be ignored when sending a request. :ivar type: The resource provider type for the resource that has been onboarded to private link - service, supported by Azure Cognitive Search. + service, supported by Azure AI Search. :vartype type: str :ivar group_id: The resource provider group id for the resource that has been onboarded to - private link service, supported by Azure Cognitive Search. + private link service, supported by Azure AI Search. :vartype group_id: str :ivar description: The description of the resource type that has been onboarded to private link - service, supported by Azure Cognitive Search. + service, supported by Azure AI Search. :vartype description: str """ @@ -1596,15 +2349,15 @@ def __init__(self, **kwargs: Any) -> None: class ShareablePrivateLinkResourceType(_serialization.Model): """Describes an resource type that has been onboarded to private link service, supported by Azure - Cognitive Search. + AI Search. Variables are only populated by the server, and will be ignored when sending a request. :ivar name: The name of the resource type that has been onboarded to private link service, - supported by Azure Cognitive Search. + supported by Azure AI Search. :vartype name: str :ivar properties: Describes the properties of a resource type that has been onboarded to - private link service, supported by Azure Cognitive Search. + private link service, supported by Azure AI Search. :vartype properties: ~azure.mgmt.search.models.ShareablePrivateLinkResourceProperties """ @@ -1626,7 +2379,7 @@ def __init__(self, **kwargs: Any) -> None: class SharedPrivateLinkResource(Resource): - """Describes a Shared Private Link Resource managed by the Azure Cognitive Search service. + """Describes a shared private link resource managed by the Azure AI Search service. Variables are only populated by the server, and will be ignored when sending a request. @@ -1638,8 +2391,8 @@ class SharedPrivateLinkResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar properties: Describes the properties of a Shared Private Link Resource managed by the - Azure Cognitive Search service. + :ivar properties: Describes the properties of a shared private link resource managed by the + Azure AI Search service. :vartype properties: ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties """ @@ -1660,8 +2413,8 @@ def __init__( self, *, properties: Optional["_models.SharedPrivateLinkResourceProperties"] = None, **kwargs: Any ) -> None: """ - :keyword properties: Describes the properties of a Shared Private Link Resource managed by the - Azure Cognitive Search service. + :keyword properties: Describes the properties of a shared private link resource managed by the + Azure AI Search service. :paramtype properties: ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties """ super().__init__(**kwargs) @@ -1669,11 +2422,11 @@ def __init__( class SharedPrivateLinkResourceListResult(_serialization.Model): - """Response containing a list of Shared Private Link Resources. + """Response containing a list of shared private link resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: The list of Shared Private Link Resources. + :ivar value: The list of shared private link resources. :vartype value: list[~azure.mgmt.search.models.SharedPrivateLinkResource] :ivar next_link: The URL to get the next set of shared private link resources, if there are any. @@ -1701,28 +2454,28 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: class SharedPrivateLinkResourceProperties(_serialization.Model): - """Describes the properties of an existing Shared Private Link Resource managed by the Azure - Cognitive Search service. + """Describes the properties of an existing shared private link resource managed by the Azure AI + Search service. - :ivar private_link_resource_id: The resource id of the resource the shared private link + :ivar private_link_resource_id: The resource ID of the resource the shared private link resource is for. :vartype private_link_resource_id: str - :ivar group_id: The group id from the provider of resource the shared private link resource is + :ivar group_id: The group ID from the provider of resource the shared private link resource is for. :vartype group_id: str - :ivar request_message: The request message for requesting approval of the shared private link - resource. + :ivar request_message: The message for requesting approval of the shared private link resource. :vartype request_message: str :ivar resource_region: Optional. Can be used to specify the Azure Resource Manager location of - the resource to which a shared private link is to be created. This is only required for those + the resource for which a shared private link is being created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). :vartype resource_region: str - :ivar status: Status of the shared private link resource. Can be Pending, Approved, Rejected or - Disconnected. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". + :ivar status: Status of the shared private link resource. Valid values are Pending, Approved, + Rejected or Disconnected. Known values are: "Pending", "Approved", "Rejected", and + "Disconnected". :vartype status: str or ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus - :ivar provisioning_state: The provisioning state of the shared private link resource. Can be - Updating, Deleting, Failed, Succeeded or Incomplete. Known values are: "Updating", "Deleting", - "Failed", "Succeeded", and "Incomplete". + :ivar provisioning_state: The provisioning state of the shared private link resource. Valid + values are Updating, Deleting, Failed, Succeeded or Incomplete. Known values are: "Updating", + "Deleting", "Failed", "Succeeded", and "Incomplete". :vartype provisioning_state: str or ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState """ @@ -1748,25 +2501,26 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword private_link_resource_id: The resource id of the resource the shared private link + :keyword private_link_resource_id: The resource ID of the resource the shared private link resource is for. :paramtype private_link_resource_id: str - :keyword group_id: The group id from the provider of resource the shared private link resource + :keyword group_id: The group ID from the provider of resource the shared private link resource is for. :paramtype group_id: str - :keyword request_message: The request message for requesting approval of the shared private - link resource. + :keyword request_message: The message for requesting approval of the shared private link + resource. :paramtype request_message: str :keyword resource_region: Optional. Can be used to specify the Azure Resource Manager location - of the resource to which a shared private link is to be created. This is only required for + of the resource for which a shared private link is being created. This is only required for those resources whose DNS configuration are regional (such as Azure Kubernetes Service). :paramtype resource_region: str - :keyword status: Status of the shared private link resource. Can be Pending, Approved, Rejected - or Disconnected. Known values are: "Pending", "Approved", "Rejected", and "Disconnected". + :keyword status: Status of the shared private link resource. Valid values are Pending, + Approved, Rejected or Disconnected. Known values are: "Pending", "Approved", "Rejected", and + "Disconnected". :paramtype status: str or ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus - :keyword provisioning_state: The provisioning state of the shared private link resource. Can be - Updating, Deleting, Failed, Succeeded or Incomplete. Known values are: "Updating", "Deleting", - "Failed", "Succeeded", and "Incomplete". + :keyword provisioning_state: The provisioning state of the shared private link resource. Valid + values are Updating, Deleting, Failed, Succeeded or Incomplete. Known values are: "Updating", + "Deleting", "Failed", "Succeeded", and "Incomplete". :paramtype provisioning_state: str or ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState """ @@ -1780,8 +2534,7 @@ def __init__( class Sku(_serialization.Model): - """Defines the SKU of an Azure Cognitive Search Service, which determines price tier and capacity - limits. + """Defines the SKU of a search service, which determines billing rate and capacity limits. :ivar name: The SKU of the search service. Valid values include: 'free': Shared service. 'basic': Dedicated service with up to 3 replicas. 'standard': Dedicated service with up to 12 @@ -1814,3 +2567,31 @@ def __init__(self, *, name: Optional[Union[str, "_models.SkuName"]] = None, **kw """ super().__init__(**kwargs) self.name = name + + +class UserAssignedManagedIdentity(_serialization.Model): + """The details of the user assigned managed identity assigned to the search service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of user assigned identity. + :vartype client_id: str + """ + + _validation = { + "principal_id": {"readonly": True}, + "client_id": {"readonly": True}, + } + + _attribute_map = { + "principal_id": {"key": "principalId", "type": "str"}, + "client_id": {"key": "clientId", "type": "str"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py index 4b592680bca0..bdf1eee720d8 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py @@ -11,7 +11,7 @@ class AadAuthFailureMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes what response the data plane API of a Search service would send for requests that + """Describes what response the data plane API of a search service would send for requests that failed authentication. """ @@ -46,15 +46,25 @@ class HostingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): class IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The identity type.""" + """The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes + both an identity created by the system and a set of user assigned identities. The type 'None' + will remove all identities from the service. + """ NONE = "None" + """Indicates that any identity associated with the search service needs to be removed.""" SYSTEM_ASSIGNED = "SystemAssigned" + """Indicates that system-assigned identity for the search service will be enabled.""" + USER_ASSIGNED = "UserAssigned" + """Indicates that one or more user assigned identities will be assigned to the search service.""" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + """Indicates that system-assigned identity for the search service will be enabled along with the + #: assignment of one or more user assigned identities.""" class PrivateLinkServiceConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the private link service connection. Can be Updating, Deleting, - Failed, Succeeded, or Incomplete. + """The provisioning state of the private link service connection. Valid values are Updating, + Deleting, Failed, Succeeded, Incomplete, or Canceled. """ UPDATING = "Updating" @@ -70,12 +80,12 @@ class PrivateLinkServiceConnectionProvisioningState(str, Enum, metaclass=CaseIns """Provisioning request for the private link service connection resource has been accepted but the #: process of creation has not commenced yet.""" CANCELED = "Canceled" - """Provisioning request for the private link service connection resource has been canceled""" + """Provisioning request for the private link service connection resource has been canceled.""" class PrivateLinkServiceConnectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the the private link service connection. Can be Pending, Approved, Rejected, or - Disconnected. + """Status of the the private link service connection. Valid values are Pending, Approved, + Rejected, or Disconnected. """ PENDING = "Pending" @@ -113,32 +123,54 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ ENABLED = "enabled" + """The search service is accessible from traffic originating from the public internet.""" DISABLED = "disabled" + """The search service is not accessible from traffic originating from the public internet. Access + #: is only permitted over approved private endpoint connections.""" + + +class SearchBypass(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Possible origins of inbound traffic that can bypass the rules defined in the 'ipRules' section.""" + + NONE = "None" + """Indicates that no origin can bypass the rules defined in the 'ipRules' section. This is the + #: default.""" + AZURE_PORTAL = "AzurePortal" + """Indicates that requests originating from the Azure portal can bypass the rules defined in the + #: 'ipRules' section.""" + + +class SearchDisabledDataExfiltrationOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """A specific data exfiltration scenario that is disabled for the service.""" + + ALL = "All" + """Indicates that all data exfiltration scenarios are disabled.""" class SearchEncryptionComplianceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes whether the search service is compliant or not with respect to having non customer - encrypted resources. If a service has more than one non customer encrypted resource and - 'Enforcement' is 'enabled' then the service will be marked as 'nonCompliant'. + """Returns the status of search service compliance with respect to non-CMK-encrypted objects. If a + service has more than one unencrypted object, and enforcement is enabled, the service is marked + as noncompliant. """ COMPLIANT = "Compliant" - """Indicates that the search service is compliant, either because number of non customer encrypted - #: resources is zero or enforcement is disabled.""" + """Indicates that the search service is compliant, either because the number of non-CMK-encrypted + #: objects is zero or enforcement is disabled.""" NON_COMPLIANT = "NonCompliant" - """Indicates that the search service has more than 1 non customer encrypted resources.""" + """Indicates that the search service has more than one non-CMK-encrypted objects.""" class SearchEncryptionWithCmk(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Describes how a search service should enforce having one or more non customer encrypted - resources. + """Describes how a search service should enforce compliance if it finds objects that aren't + encrypted with the customer-managed key. """ DISABLED = "Disabled" - """No enforcement will be made and the search service can have non customer encrypted resources.""" + """No enforcement of customer-managed key encryption will be made. Only the built-in + #: service-managed encryption is used.""" ENABLED = "Enabled" - """Search service will be marked as non-compliant if there are one or more non customer encrypted - #: resources.""" + """Search service will be marked as non-compliant if one or more objects aren't encrypted with a + #: customer-managed key.""" UNSPECIFIED = "Unspecified" """Enforcement policy is not explicitly specified, with the behavior being the same as if it were #: set to 'Disabled'.""" @@ -146,18 +178,18 @@ class SearchEncryptionWithCmk(str, Enum, metaclass=CaseInsensitiveEnumMeta): class SearchSemanticSearch(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Sets options that control the availability of semantic search. This configuration is only - possible for certain Azure Cognitive Search SKUs in certain locations. + possible for certain Azure AI Search SKUs in certain locations. """ DISABLED = "disabled" - """Indicates that semantic search is disabled for the search service.""" + """Indicates that semantic reranker is disabled for the search service. This is the default.""" FREE = "free" - """Enables semantic search on a search service and indicates that it is to be used within the - #: limits of the free tier. This would cap the volume of semantic search requests and is offered - #: at no extra charge. This is the default for newly provisioned search services.""" + """Enables semantic reranker on a search service and indicates that it is to be used within the + #: limits of the free plan. The free plan would cap the volume of semantic ranking requests and is + #: offered at no extra charge. This is the default for newly provisioned search services.""" STANDARD = "standard" - """Enables semantic search on a search service as a billable feature, with higher throughput and - #: volume of semantic search queries.""" + """Enables semantic reranker on a search service as a billable feature, with higher throughput and + #: volume of semantically reranked queries.""" class SearchServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -167,10 +199,11 @@ class SearchServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): 'degraded': The search service is degraded. This can occur when the underlying search units are not healthy. The search service is most likely operational, but performance might be slow and some requests might be dropped. 'disabled': The search service is disabled. In this state, the - service will reject all API requests. 'error': The search service is in an error state. If your - service is in the degraded, disabled, or error states, it means the Azure Cognitive Search team - is actively investigating the underlying issue. Dedicated services in these states are still - chargeable based on the number of search units provisioned. + service will reject all API requests. 'error': The search service is in an error state. + 'stopped': The search service is in a subscription that's disabled. If your service is in the + degraded, disabled, or error states, it means the Azure AI Search team is actively + investigating the underlying issue. Dedicated services in these states are still chargeable + based on the number of search units provisioned. """ RUNNING = "running" @@ -186,6 +219,8 @@ class SearchServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): ERROR = "error" """The search service is in error state, indicating either a failure to provision or to be #: deleted.""" + STOPPED = "stopped" + """The search service is in a subscription that's disabled.""" class SharedPrivateLinkResourceAsyncOperationResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -197,24 +232,37 @@ class SharedPrivateLinkResourceAsyncOperationResult(str, Enum, metaclass=CaseIns class SharedPrivateLinkResourceProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The provisioning state of the shared private link resource. Can be Updating, Deleting, Failed, - Succeeded or Incomplete. + """The provisioning state of the shared private link resource. Valid values are Updating, + Deleting, Failed, Succeeded or Incomplete. """ UPDATING = "Updating" + """The shared private link resource is in the process of being created along with other resources + #: for it to be fully functional.""" DELETING = "Deleting" + """The shared private link resource is in the process of being deleted.""" FAILED = "Failed" + """The shared private link resource has failed to be provisioned or deleted.""" SUCCEEDED = "Succeeded" + """The shared private link resource has finished provisioning and is ready for approval.""" INCOMPLETE = "Incomplete" + """Provisioning request for the shared private link resource has been accepted but the process of + #: creation has not commenced yet.""" class SharedPrivateLinkResourceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Status of the shared private link resource. Can be Pending, Approved, Rejected or Disconnected.""" + """Status of the shared private link resource. Valid values are Pending, Approved, Rejected or + Disconnected. + """ PENDING = "Pending" + """The shared private link resource has been created and is pending approval.""" APPROVED = "Approved" + """The shared private link resource is approved and is ready for use.""" REJECTED = "Rejected" + """The shared private link resource has been rejected and cannot be used.""" DISCONNECTED = "Disconnected" + """The shared private link resource has been removed from the service.""" class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -228,20 +276,20 @@ class SkuName(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ FREE = "free" - """Free tier, with no SLA guarantees and a subset of features offered to paid tiers.""" + """Free tier, with no SLA guarantees and a subset of the features offered on billable tiers.""" BASIC = "basic" - """Paid tier dedicated service with up to 3 replicas.""" + """Billable tier for a dedicated service having up to 3 replicas.""" STANDARD = "standard" - """Paid tier dedicated service with up to 12 partitions and 12 replicas.""" + """Billable tier for a dedicated service having up to 12 partitions and 12 replicas.""" STANDARD2 = "standard2" """Similar to 'standard', but with more capacity per search unit.""" STANDARD3 = "standard3" """The largest Standard offering with up to 12 partitions and 12 replicas (or up to 3 partitions #: with more indexes if you also set the hostingMode property to 'highDensity').""" STORAGE_OPTIMIZED_L1 = "storage_optimized_l1" - """Paid tier dedicated service that supports 1TB per partition, up to 12 partitions.""" + """Billable tier for a dedicated service that supports 1TB per partition, up to 12 partitions.""" STORAGE_OPTIMIZED_L2 = "storage_optimized_l2" - """Paid tier dedicated service that supports 2TB per partition, up to 12 partitions.""" + """Billable tier for a dedicated service that supports 2TB per partition, up to 12 partitions.""" class UnavailableNameReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -251,6 +299,6 @@ class UnavailableNameReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """ INVALID = "Invalid" - """The search service name does not match naming requirements.""" + """The search service name doesn't match naming requirements.""" ALREADY_EXISTS = "AlreadyExists" """The search service name is already assigned to a different search service.""" diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/__init__.py index b96a319c2e09..57f8554fb6d4 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/__init__.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/__init__.py @@ -15,6 +15,7 @@ from ._shared_private_link_resources_operations import SharedPrivateLinkResourcesOperations from ._usages_operations import UsagesOperations from ._search_management_client_operations import SearchManagementClientOperationsMixin +from ._network_security_perimeter_configurations_operations import NetworkSecurityPerimeterConfigurationsOperations from ._patch import __all__ as _patch_all from ._patch import * # pylint: disable=unused-wildcard-import @@ -30,6 +31,7 @@ "SharedPrivateLinkResourcesOperations", "UsagesOperations", "SearchManagementClientOperationsMixin", + "NetworkSecurityPerimeterConfigurationsOperations", ] __all__.extend([p for p in _patch_all if p not in __all__]) _patch_sdk() diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py index 3685b1476585..a08db5fb8054 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py @@ -45,7 +45,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -55,7 +55,9 @@ def build_get_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -84,7 +86,7 @@ def build_regenerate_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -94,7 +96,9 @@ def build_regenerate_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "keyKind": _SERIALIZER.url("key_kind", key_kind, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -139,7 +143,7 @@ def get( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> _models.AdminKeyResult: - """Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service. + """Gets the primary and secondary admin API keys for the specified Azure AI Search service. .. seealso:: - https://aka.ms/search-manage @@ -147,7 +151,7 @@ def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -229,7 +233,7 @@ def regenerate( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_network_security_perimeter_configurations_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_network_security_perimeter_configurations_operations.py new file mode 100644 index 000000000000..3ed0b191c0b9 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_network_security_perimeter_configurations_operations.py @@ -0,0 +1,460 @@ +# pylint: disable=too-many-lines +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union, cast +import urllib.parse + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + ResourceNotModifiedError, + map_error, +) +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.utils import case_insensitive_dict +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models +from .._serialization import Serializer +from .._vendor import SearchManagementClientMixinABC, _convert_request + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_by_service_request( + resource_group_name: str, search_service_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations", + ) # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_get_request( + resource_group_name: str, search_service_name: str, nsp_config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}", + ) # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), + "nspConfigName": _SERIALIZER.url( + "nsp_config_name", + nsp_config_name, + "str", + max_length=100, + min_length=38, + pattern=r"^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\.[a-z][a-z0-9]*$", + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) + + +def build_reconcile_request( + resource_group_name: str, search_service_name: str, nsp_config_name: str, subscription_id: str, **kwargs: Any +) -> HttpRequest: + _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) + accept = _headers.pop("Accept", "application/json") + + # Construct URL + _url = kwargs.pop( + "template_url", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile", + ) # pylint: disable=line-too-long + path_format_arguments = { + "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), + "nspConfigName": _SERIALIZER.url( + "nsp_config_name", + nsp_config_name, + "str", + max_length=100, + min_length=38, + pattern=r"^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}\.[a-z][a-z0-9]*$", + ), + "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), + } + + _url: str = _url.format(**path_format_arguments) # type: ignore + + # Construct parameters + _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") + + # Construct headers + _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") + + return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + + +class NetworkSecurityPerimeterConfigurationsOperations: + """ + .. warning:: + **DO NOT** instantiate this class directly. + + Instead, you should access the following operations through + :class:`~azure.mgmt.search.SearchManagementClient`'s + :attr:`network_security_perimeter_configurations` attribute. + """ + + models = _models + + def __init__(self, *args, **kwargs): + input_args = list(args) + self._client = input_args.pop(0) if input_args else kwargs.pop("client") + self._config = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + + @distributed_trace + def list_by_service( + self, resource_group_name: str, search_service_name: str, **kwargs: Any + ) -> Iterable["_models.NetworkSecurityPerimeterConfiguration"]: + """Gets a list of network security perimeter configurations for a search service. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterConfiguration or the + result of cls(response) + :rtype: + ~azure.core.paging.ItemPaged[~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.NetworkSecurityPerimeterConfigurationListResult] = kwargs.pop("cls", None) + + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + def prepare_request(next_link=None): + if not next_link: + + request = build_list_by_service_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.list_by_service.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + else: + # make call to next link with the client's api-version + _parsed_next_link = urllib.parse.urlparse(next_link) + _next_request_params = case_insensitive_dict( + { + key: [urllib.parse.quote(v) for v in value] + for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items() + } + ) + _next_request_params["api-version"] = self._config.api_version + request = HttpRequest( + "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize("NetworkSecurityPerimeterConfigurationListResult", pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) # type: ignore + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged(get_next, extract_data) + + list_by_service.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations" + } + + @distributed_trace + def get( + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> _models.NetworkSecurityPerimeterConfiguration: + """Gets a network security perimeter configuration. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :param nsp_config_name: The network security configuration name. Required. + :type nsp_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeterConfiguration or the result of cls(response) + :rtype: ~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration + :raises ~azure.core.exceptions.HttpResponseError: + """ + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[_models.NetworkSecurityPerimeterConfiguration] = kwargs.pop("cls", None) + + request = build_get_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self.get.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize("NetworkSecurityPerimeterConfiguration", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}" + } + + def _reconcile_initial( # pylint: disable=inconsistent-return-statements + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> None: + error_map = { + 401: ClientAuthenticationError, + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 304: ResourceNotModifiedError, + } + error_map.update(kwargs.pop("error_map", {}) or {}) + + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + + request = build_reconcile_request( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + subscription_id=self._config.subscription_id, + api_version=api_version, + template_url=self._reconcile_initial.metadata["url"], + headers=_headers, + params=_params, + ) + request = _convert_request(request) + request.url = self._client.format_url(request.url) + + _stream = False + pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access + request, stream=_stream, **kwargs + ) + + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers["Location"] = self._deserialize("str", response.headers.get("Location")) + + if cls: + return cls(pipeline_response, None, response_headers) + + _reconcile_initial.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile" + } + + @distributed_trace + def begin_reconcile( + self, resource_group_name: str, search_service_name: str, nsp_config_name: str, **kwargs: Any + ) -> LROPoller[None]: + """Reconcile network security perimeter configuration for the Azure AI Search resource provider. + This triggers a manual resync with network security perimeter configurations by ensuring the + search service carries the latest configuration. + + :param resource_group_name: The name of the resource group within the current subscription. You + can obtain this value from the Azure Resource Manager API or the portal. Required. + :type resource_group_name: str + :param search_service_name: The name of the Azure AI Search service associated with the + specified resource group. Required. + :type search_service_name: str + :param nsp_config_name: The network security configuration name. Required. + :type nsp_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this + operation to not poll, or pass in your own initialized polling object for a personal polling + strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + _headers = kwargs.pop("headers", {}) or {} + _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) + + api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version)) + cls: ClsType[None] = kwargs.pop("cls", None) + polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) + lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) + cont_token: Optional[str] = kwargs.pop("continuation_token", None) + if cont_token is None: + raw_result = self._reconcile_initial( # type: ignore + resource_group_name=resource_group_name, + search_service_name=search_service_name, + nsp_config_name=nsp_config_name, + api_version=api_version, + cls=lambda x, y, z: x, + headers=_headers, + params=_params, + **kwargs + ) + kwargs.pop("error_map", None) + + def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements + if cls: + return cls(pipeline_response, None, {}) + + if polling is True: + polling_method: PollingMethod = cast( + PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs) + ) + elif polling is False: + polling_method = cast(PollingMethod, NoPolling()) + else: + polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output, + ) + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) # type: ignore + + begin_reconcile.metadata = { + "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile" + } diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py index 72f79afe75d9..bd1be6013706 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py @@ -40,7 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py index ddb7dfec8c20..cd02e1b0bc6b 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py @@ -49,7 +49,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -60,7 +60,9 @@ def build_update_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "privateEndpointConnectionName": _SERIALIZER.url( "private_endpoint_connection_name", private_endpoint_connection_name, "str" ), @@ -94,7 +96,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -104,7 +106,9 @@ def build_get_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "privateEndpointConnectionName": _SERIALIZER.url( "private_endpoint_connection_name", private_endpoint_connection_name, "str" ), @@ -136,7 +140,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +150,9 @@ def build_delete_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "privateEndpointConnectionName": _SERIALIZER.url( "private_endpoint_connection_name", private_endpoint_connection_name, "str" ), @@ -177,7 +183,7 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -188,7 +194,9 @@ def build_list_by_service_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -235,7 +243,7 @@ def update( content_type: str = "application/json", **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -243,11 +251,11 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Required. @@ -276,7 +284,7 @@ def update( content_type: str = "application/json", **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -284,11 +292,11 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Required. @@ -315,7 +323,7 @@ def update( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> _models.PrivateEndpointConnection: - """Updates a Private Endpoint connection to the search service in the given resource group. + """Updates a private endpoint connection to the search service in the given resource group. .. seealso:: - https://aka.ms/search-manage @@ -323,11 +331,11 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param private_endpoint_connection: The definition of the private endpoint connection to update. Is either a PrivateEndpointConnection type or a IO type. Required. @@ -426,11 +434,11 @@ def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -511,11 +519,11 @@ def delete( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param private_endpoint_connection_name: The name of the private endpoint connection to the - Azure Cognitive Search service with the specified resource group. Required. + Azure AI Search service with the specified resource group. Required. :type private_endpoint_connection_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -597,7 +605,7 @@ def list_by_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py index 36e82e4fd989..2e9deca0e9d1 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py @@ -47,7 +47,7 @@ def build_list_supported_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -58,7 +58,9 @@ def build_list_supported_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -109,7 +111,7 @@ def list_supported( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py index 72f9c436280a..32fe6ce6fd46 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py @@ -48,7 +48,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -58,7 +58,9 @@ def build_create_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "name": _SERIALIZER.url("name", name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -87,7 +89,7 @@ def build_list_by_search_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -97,7 +99,9 @@ def build_list_by_search_service_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -126,7 +130,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +140,9 @@ def build_delete_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "key": _SERIALIZER.url("key", key, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -191,7 +197,7 @@ def create( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param name: The name of the new query API key. Required. @@ -266,7 +272,7 @@ def list_by_search_service( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> Iterable["_models.QueryKey"]: - """Returns the list of query API keys for the given Azure Cognitive Search service. + """Returns the list of query API keys for the given Azure AI Search service. .. seealso:: - https://aka.ms/search-manage @@ -274,7 +280,7 @@ def list_by_search_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -382,7 +388,7 @@ def delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param key: The query key to be deleted. Query keys are identified by value, not by name. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_search_management_client_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_search_management_client_operations.py index 79f48eba960b..8e5ee0cba7ee 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_search_management_client_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_search_management_client_operations.py @@ -40,7 +40,7 @@ def build_usage_by_subscription_sku_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -83,8 +83,7 @@ def usage_by_subscription_sku( :param location: The unique location name for a Microsoft Azure geographic region. Required. :type location: str - :param sku_name: The unique search service sku name supported by Azure Cognitive Search. - Required. + :param sku_name: The unique SKU name that identifies a billable tier. Required. :type sku_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py index 60f6fd31a764..ba47b38516e5 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py @@ -55,7 +55,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -96,7 +96,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -137,7 +137,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -147,7 +147,9 @@ def build_get_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -175,7 +177,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -185,7 +187,9 @@ def build_delete_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), } @@ -208,7 +212,7 @@ def build_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -240,7 +244,7 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -268,7 +272,7 @@ def build_check_name_availability_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") type = "searchServices" @@ -411,12 +415,12 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Required. :type service: ~azure.mgmt.search.models.SearchService @@ -460,12 +464,12 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Required. :type service: IO @@ -507,12 +511,12 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to create or update. - Search service names must only contain lowercase letters, digits or dashes, cannot use dash as - the first two or last one characters, cannot contain consecutive dashes, and must be between 2 - and 60 characters in length. Search service names must be globally unique since they are part - of the service URI (https://:code:``.search.windows.net). You cannot change the service - name after the service is created. Required. + :param search_service_name: The name of the Azure AI Search service to create or update. Search + service names must only contain lowercase letters, digits or dashes, cannot use dash as the + first two or last one characters, cannot contain consecutive dashes, and must be between 2 and + 60 characters in length. Search service names must be globally unique since they are part of + the service URI (https://:code:``.search.windows.net). You cannot change the service name + after the service is created. Required. :type search_service_name: str :param service: The definition of the search service to create or update. Is either a SearchService type or a IO type. Required. @@ -604,7 +608,7 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Required. :type service: ~azure.mgmt.search.models.SearchServiceUpdate @@ -639,7 +643,7 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Required. :type service: IO @@ -672,7 +676,7 @@ def update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service to update. Required. + :param search_service_name: The name of the Azure AI Search service to update. Required. :type search_service_name: str :param service: The definition of the search service to update. Is either a SearchServiceUpdate type or a IO type. Required. @@ -768,7 +772,7 @@ def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. @@ -848,7 +852,7 @@ def delete( # pylint: disable=inconsistent-return-statements :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py index 055cdd6ff6c6..9a2bae0297e1 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py @@ -51,7 +51,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -62,7 +62,9 @@ def build_create_or_update_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "sharedPrivateLinkResourceName": _SERIALIZER.url( "shared_private_link_resource_name", shared_private_link_resource_name, "str" ), @@ -96,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,7 +108,9 @@ def build_get_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "sharedPrivateLinkResourceName": _SERIALIZER.url( "shared_private_link_resource_name", shared_private_link_resource_name, "str" ), @@ -138,7 +142,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -148,7 +152,9 @@ def build_delete_request( ) # pylint: disable=line-too-long path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), "sharedPrivateLinkResourceName": _SERIALIZER.url( "shared_private_link_resource_name", shared_private_link_resource_name, "str" ), @@ -179,7 +185,7 @@ def build_list_by_service_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -190,7 +196,9 @@ def build_list_by_service_request( path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), - "searchServiceName": _SERIALIZER.url("search_service_name", search_service_name, "str"), + "searchServiceName": _SERIALIZER.url( + "search_service_name", search_service_name, "str", pattern=r"^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$" + ), } _url: str = _url.format(**path_format_arguments) # type: ignore @@ -322,11 +330,11 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Required. @@ -372,11 +380,11 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Required. @@ -420,11 +428,11 @@ def begin_create_or_update( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param shared_private_link_resource: The definition of the shared private link resource to create or update. Is either a SharedPrivateLinkResource type or a IO type. Required. @@ -518,11 +526,11 @@ def get( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -661,11 +669,11 @@ def begin_delete( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param shared_private_link_resource_name: The name of the shared private link resource managed - by the Azure Cognitive Search service within the specified resource group. Required. + by the Azure AI Search service within the specified resource group. Required. :type shared_private_link_resource_name: str :param search_management_request_options: Parameter group. Default value is None. :type search_management_request_options: @@ -745,7 +753,7 @@ def list_by_service( :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required. :type resource_group_name: str - :param search_service_name: The name of the Azure Cognitive Search service associated with the + :param search_service_name: The name of the Azure AI Search service associated with the specified resource group. Required. :type search_service_name: str :param search_management_request_options: Parameter group. Default value is None. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_usages_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_usages_operations.py index b0e2b806ce51..6d384d66e616 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_usages_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_usages_operations.py @@ -42,7 +42,7 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-11-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +93,7 @@ def list_by_subscription( search_management_request_options: Optional[_models.SearchManagementRequestOptions] = None, **kwargs: Any ) -> Iterable["_models.QuotaUsageResult"]: - """Gets a list of all Search quota usages in the given subscription. + """Get a list of all Azure AI Search quota usages across the subscription. .. seealso:: - https://aka.ms/search-manage diff --git a/sdk/search/azure-mgmt-search/generated_samples/create_or_update_shared_private_link_resource.py b/sdk/search/azure-mgmt-search/generated_samples/create_or_update_shared_private_link_resource.py index 7298755a0ac9..80d0c14d9541 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/create_or_update_shared_private_link_resource.py +++ b/sdk/search/azure-mgmt-search/generated_samples/create_or_update_shared_private_link_resource.py @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/CreateOrUpdateSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/CreateOrUpdateSharedPrivateLinkResource.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/delete_private_endpoint_connection.py b/sdk/search/azure-mgmt-search/generated_samples/delete_private_endpoint_connection.py index 7b6945573f10..38259fdeab6f 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/delete_private_endpoint_connection.py +++ b/sdk/search/azure-mgmt-search/generated_samples/delete_private_endpoint_connection.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/DeletePrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/DeletePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/delete_shared_private_link_resource.py b/sdk/search/azure-mgmt-search/generated_samples/delete_shared_private_link_resource.py index a1f6ab624043..ea3ae3e5974c 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/delete_shared_private_link_resource.py +++ b/sdk/search/azure-mgmt-search/generated_samples/delete_shared_private_link_resource.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/DeleteSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/DeleteSharedPrivateLinkResource.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/get_private_endpoint_connection.py b/sdk/search/azure-mgmt-search/generated_samples/get_private_endpoint_connection.py index 7cc043d22e66..7d8ce089bd0c 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/get_private_endpoint_connection.py +++ b/sdk/search/azure-mgmt-search/generated_samples/get_private_endpoint_connection.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetPrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/GetPrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/get_quota_usage.py b/sdk/search/azure-mgmt-search/generated_samples/get_quota_usage.py index 15079a96fbc8..9beee01f54e8 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/get_quota_usage.py +++ b/sdk/search/azure-mgmt-search/generated_samples/get_quota_usage.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetQuotaUsage.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/GetQuotaUsage.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/get_quota_usages_list.py b/sdk/search/azure-mgmt-search/generated_samples/get_quota_usages_list.py index badc450e1f16..c93b9c294a7c 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/get_quota_usages_list.py +++ b/sdk/search/azure-mgmt-search/generated_samples/get_quota_usages_list.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetQuotaUsagesList.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/GetQuotaUsagesList.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/get_shared_private_link_resource.py b/sdk/search/azure-mgmt-search/generated_samples/get_shared_private_link_resource.py index 8cb5e8c447f6..8a6a6925b318 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/get_shared_private_link_resource.py +++ b/sdk/search/azure-mgmt-search/generated_samples/get_shared_private_link_resource.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/GetSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/GetSharedPrivateLinkResource.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/list_private_endpoint_connections_by_service.py b/sdk/search/azure-mgmt-search/generated_samples/list_private_endpoint_connections_by_service.py index 2490eaa9fad7..45bc1d532330 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/list_private_endpoint_connections_by_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/list_private_endpoint_connections_by_service.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/ListPrivateEndpointConnectionsByService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/ListPrivateEndpointConnectionsByService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/list_shared_private_link_resources_by_service.py b/sdk/search/azure-mgmt-search/generated_samples/list_shared_private_link_resources_by_service.py index f1e4005ab2ae..96fb3ea3d667 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/list_shared_private_link_resources_by_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/list_shared_private_link_resources_by_service.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/ListSharedPrivateLinkResourcesByService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/ListSharedPrivateLinkResourcesByService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/list_supported_private_link_resources.py b/sdk/search/azure-mgmt-search/generated_samples/list_supported_private_link_resources.py index 9fb370e9bfb1..d5e43d3cb2ee 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/list_supported_private_link_resources.py +++ b/sdk/search/azure-mgmt-search/generated_samples/list_supported_private_link_resources.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/ListSupportedPrivateLinkResources.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/ListSupportedPrivateLinkResources.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_get.py b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_get.py new file mode 100644 index 000000000000..34cd7bdd9a84 --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_get.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python network_security_perimeter_configurations_get.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.network_security_perimeter_configurations.get( + resource_group_name="rg1", + search_service_name="mysearchservice", + nsp_config_name="00000001-2222-3333-4444-111144444444.assoc1", + ) + print(response) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_list_by_service.py b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_list_by_service.py new file mode 100644 index 000000000000..8ad4c4bac38a --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_list_by_service.py @@ -0,0 +1,42 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python network_security_perimeter_configurations_list_by_service.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.network_security_perimeter_configurations.list_by_service( + resource_group_name="rg1", + search_service_name="mysearchservice", + ) + for item in response: + print(item) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByService.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_reconcile.py b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_reconcile.py new file mode 100644 index 000000000000..4a569f657b7a --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/network_security_perimeter_configurations_reconcile.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python network_security_perimeter_configurations_reconcile.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + client.network_security_perimeter_configurations.begin_reconcile( + resource_group_name="rg1", + search_service_name="mysearchservice", + nsp_config_name="00000001-2222-3333-4444-111144444444.assoc1", + ).result() + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service.py index 9e075e6442cd..91f930bea962 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_auth_options.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_auth_options.py index e4ccf0282155..03ed468bf9bf 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_auth_options.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_auth_options.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceAuthOptions.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceAuthOptions.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_disable_local_auth.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_disable_local_auth.py index 501642741a82..3c1d7ef2e48c 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_disable_local_auth.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_disable_local_auth.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceDisableLocalAuth.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceDisableLocalAuth.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_private_endpoints.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_private_endpoints.py index 3d8052de2742..0f017268cd3f 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_private_endpoints.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_private_endpoints.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips.py index 2d43e1c57126..2f6946c39ff2 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips_and_bypass.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips_and_bypass.py new file mode 100644 index 000000000000..47d140b236aa --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_to_allow_access_from_public_custom_ips_and_bypass.py @@ -0,0 +1,55 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python search_create_or_update_service_to_allow_access_from_public_custom_ips_and_bypass.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.services.begin_create_or_update( + resource_group_name="rg1", + search_service_name="mysearchservice", + service={ + "location": "westus", + "properties": { + "hostingMode": "default", + "networkRuleSet": { + "bypass": "AzurePortal", + "ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}], + }, + "partitionCount": 1, + "replicaCount": 1, + }, + "sku": {"name": "standard"}, + "tags": {"app-name": "My e-commerce app"}, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_cmk_enforcement.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_cmk_enforcement.py index 683844a47c55..1b7512a9c317 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_cmk_enforcement.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_cmk_enforcement.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceWithCmkEnforcement.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceWithCmkEnforcement.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_data_exfiltration.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_data_exfiltration.py new file mode 100644 index 000000000000..89f54e111146 --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_data_exfiltration.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python search_create_or_update_service_with_data_exfiltration.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.services.begin_create_or_update( + resource_group_name="rg1", + search_service_name="mysearchservice", + service={ + "location": "westus", + "properties": { + "disabledDataExfiltrationOptions": ["All"], + "hostingMode": "default", + "partitionCount": 1, + "replicaCount": 3, + }, + "sku": {"name": "standard"}, + "tags": {"app-name": "My e-commerce app"}, + }, + ).result() + print(response) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceWithDataExfiltration.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_identity.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_identity.py index aa3ccd3bd68b..dd03d5b9659a 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_identity.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_service_with_identity.py @@ -33,7 +33,12 @@ def main(): resource_group_name="rg1", search_service_name="mysearchservice", service={ - "identity": {"type": "SystemAssigned"}, + "identity": { + "type": "SystemAssigned, UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/user-mi": {} + }, + }, "location": "westus", "properties": {"hostingMode": "default", "partitionCount": 1, "replicaCount": 3}, "sku": {"name": "standard"}, @@ -43,6 +48,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateServiceWithIdentity.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateServiceWithIdentity.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_with_semantic_search.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_with_semantic_search.py index 5cbede35b9c2..63c8366ebe5d 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_with_semantic_search.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_or_update_with_semantic_search.py @@ -42,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateOrUpdateWithSemanticSearch.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateOrUpdateWithSemanticSearch.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_create_query_key.py b/sdk/search/azure-mgmt-search/generated_samples/search_create_query_key.py index 2725bc49acbc..ad8ab8fabd44 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_create_query_key.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_create_query_key.py @@ -32,11 +32,11 @@ def main(): response = client.query_keys.create( resource_group_name="rg1", search_service_name="mysearchservice", - name="Query key for browser-based clients", + name="An API key granting read-only access to the documents collection of an index.", ) print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchCreateQueryKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchCreateQueryKey.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_delete_query_key.py b/sdk/search/azure-mgmt-search/generated_samples/search_delete_query_key.py index 4cf27d14d17f..1d4a9fd802e1 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_delete_query_key.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_delete_query_key.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchDeleteQueryKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchDeleteQueryKey.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_delete_service.py b/sdk/search/azure-mgmt-search/generated_samples/search_delete_service.py index 7dc1bbcf9101..cf682c79ed1f 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_delete_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_delete_service.py @@ -35,6 +35,6 @@ def main(): ) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchDeleteService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchDeleteService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_get_admin_keys.py b/sdk/search/azure-mgmt-search/generated_samples/search_get_admin_keys.py index d32bc1bc0a14..753d69f689cf 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_get_admin_keys.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_get_admin_keys.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchGetAdminKeys.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchGetAdminKeys.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_get_service.py b/sdk/search/azure-mgmt-search/generated_samples/search_get_service.py index 23e214d9765f..c8c24a1096a8 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_get_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_get_service.py @@ -36,6 +36,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchGetService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchGetService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/operations_list.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py similarity index 92% rename from sdk/search/azure-mgmt-search/generated_samples/operations_list.py rename to sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py index 46decc33c902..757fb6d763d4 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/operations_list.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py @@ -14,7 +14,7 @@ pip install azure-identity pip install azure-mgmt-search # USAGE - python operations_list.py + python search_list_operations.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/OperationsList.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchListOperations.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_list_query_keys_by_search_service.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_query_keys_by_search_service.py index e1f8ab277e8e..f922a17736a5 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_list_query_keys_by_search_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_list_query_keys_by_search_service.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchListQueryKeysBySearchService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchListQueryKeysBySearchService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_resource_group.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_resource_group.py index 9e8d478a3e3c..516a97585897 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_resource_group.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_resource_group.py @@ -36,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchListServicesByResourceGroup.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchListServicesByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_subscription.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_subscription.py index 858f87f49446..3ee4c3e2af05 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_subscription.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_list_services_by_subscription.py @@ -34,6 +34,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchListServicesBySubscription.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchListServicesBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_regenerate_admin_key.py b/sdk/search/azure-mgmt-search/generated_samples/search_regenerate_admin_key.py index 2fefdf1e05ac..943e673383e9 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_regenerate_admin_key.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_regenerate_admin_key.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchRegenerateAdminKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchRegenerateAdminKey.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service.py index a3d80d8a7079..67bb9060ce75 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_auth_options.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_auth_options.py index 7b8d9bdbbb9e..4620ddb504fc 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_auth_options.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_auth_options.py @@ -43,6 +43,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceAuthOptions.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceAuthOptions.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_disable_local_auth.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_disable_local_auth.py index c500cb2d3897..b857748b632d 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_disable_local_auth.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_disable_local_auth.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceDisableLocalAuth.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceDisableLocalAuth.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_private_endpoints.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_private_endpoints.py index fda3eb500b64..c3143cc08dac 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_private_endpoints.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_private_endpoints.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips.py index 7a435705ff25..6b0d10dadd6b 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips.py @@ -44,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips_and_bypass.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips_and_bypass.py new file mode 100644 index 000000000000..c1c6e8d437c0 --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_allow_access_from_public_custom_ips_and_bypass.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python search_update_service_to_allow_access_from_public_custom_ips_and_bypass.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.services.update( + resource_group_name="rg1", + search_service_name="mysearchservice", + service={ + "properties": { + "networkRuleSet": { + "bypass": "AzurePortal", + "ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}], + }, + "partitionCount": 1, + "publicNetworkAccess": "enabled", + "replicaCount": 3, + } + }, + ) + print(response) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_remove_identity.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_remove_identity.py index ed361bcfb2ff..cc678216e585 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_remove_identity.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_to_remove_identity.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceToRemoveIdentity.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceToRemoveIdentity.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_cmk_enforcement.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_cmk_enforcement.py index 708deb8c8184..19a7077a4481 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_cmk_enforcement.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_cmk_enforcement.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceWithCmkEnforcement.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceWithCmkEnforcement.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_data_exfiltration.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_data_exfiltration.py new file mode 100644 index 000000000000..09a75ba58834 --- /dev/null +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_data_exfiltration.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.identity import DefaultAzureCredential +from azure.mgmt.search import SearchManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-search +# USAGE + python search_update_service_with_data_exfiltration.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = SearchManagementClient( + credential=DefaultAzureCredential(), + subscription_id="subid", + ) + + response = client.services.update( + resource_group_name="rg1", + search_service_name="mysearchservice", + service={ + "properties": {"disabledDataExfiltrationOptions": ["All"], "replicaCount": 2}, + "tags": {"app-name": "My e-commerce app", "new-tag": "Adding a new tag"}, + }, + ) + print(response) + + +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceWithDataExfiltration.json +if __name__ == "__main__": + main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_semantic_search.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_semantic_search.py index b79877c0859a..3a3fdb2b0937 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_semantic_search.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_semantic_search.py @@ -40,6 +40,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/SearchUpdateServiceWithSemanticSearch.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/SearchUpdateServiceWithSemanticSearch.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/update_private_endpoint_connection.py b/sdk/search/azure-mgmt-search/generated_samples/update_private_endpoint_connection.py index 9e6c2b3d2585..20c492e0b147 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/update_private_endpoint_connection.py +++ b/sdk/search/azure-mgmt-search/generated_samples/update_private_endpoint_connection.py @@ -35,13 +35,13 @@ def main(): private_endpoint_connection_name="testEndpoint.50bf4fbe-d7c1-4b48-a642-4f5892642546", private_endpoint_connection={ "properties": { - "privateLinkServiceConnectionState": {"description": "Rejected for some reason", "status": "Rejected"} + "privateLinkServiceConnectionState": {"description": "Rejected for some reason.", "status": "Rejected"} } }, ) print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2023-11-01/examples/UpdatePrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2024-03-01-preview/examples/UpdatePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/sdk_packaging.toml b/sdk/search/azure-mgmt-search/sdk_packaging.toml index 3f846434060f..471215f884be 100644 --- a/sdk/search/azure-mgmt-search/sdk_packaging.toml +++ b/sdk/search/azure-mgmt-search/sdk_packaging.toml @@ -3,7 +3,7 @@ package_name = "azure-mgmt-search" package_nspkg = "azure-mgmt-nspkg" package_pprint_name = "Search Management" package_doc_id = "search" -is_stable = true +is_stable = false is_arm = true sample_link = "" title = "SearchManagementClient" diff --git a/sdk/search/azure-mgmt-search/setup.py b/sdk/search/azure-mgmt-search/setup.py index 2848f8428061..db83ace10620 100644 --- a/sdk/search/azure-mgmt-search/setup.py +++ b/sdk/search/azure-mgmt-search/setup.py @@ -49,15 +49,15 @@ url="https://github.com/Azure/azure-sdk-for-python", keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", ], zip_safe=False, @@ -77,7 +77,6 @@ "isodate<1.0.0,>=0.6.1", "azure-common~=1.1", "azure-mgmt-core>=1.3.2,<2.0.0", - "typing-extensions>=4.3.0; python_version<'3.8.0'", ], - python_requires=">=3.7", + python_requires=">=3.8", )