From eb85835fc00e1a983bb99062c94417c67e1830f9 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Sun, 27 Apr 2025 05:12:03 +0000 Subject: [PATCH 1/2] code and test --- sdk/search/azure-mgmt-search/CHANGELOG.md | 66 + sdk/search/azure-mgmt-search/README.md | 4 +- sdk/search/azure-mgmt-search/_meta.json | 6 +- .../azure/mgmt/search/_configuration.py | 6 +- .../mgmt/search/_search_management_client.py | 32 +- .../azure/mgmt/search/_utils/__init__.py | 6 + .../serialization.py} | 178 +- .../search/{_vendor.py => _utils/utils.py} | 16 +- .../azure/mgmt/search/_version.py | 2 +- .../azure/mgmt/search/aio/_configuration.py | 6 +- .../search/aio/_search_management_client.py | 34 +- .../azure/mgmt/search/aio/_vendor.py | 25 - .../mgmt/search/aio/operations/__init__.py | 3 +- .../aio/operations/_admin_keys_operations.py | 17 +- ...ity_perimeter_configurations_operations.py | 21 +- .../aio/operations/_offerings_operations.py | 128 -- .../mgmt/search/aio/operations/_operations.py | 17 +- ...private_endpoint_connections_operations.py | 17 +- .../_private_link_resources_operations.py | 17 +- .../aio/operations/_query_keys_operations.py | 17 +- .../_search_management_client_operations.py | 13 +- .../aio/operations/_services_operations.py | 35 +- ...hared_private_link_resources_operations.py | 17 +- .../aio/operations/_usages_operations.py | 17 +- .../azure/mgmt/search/models/__init__.py | 82 +- .../azure/mgmt/search/models/_models_py3.py | 1630 +++++++---------- .../models/_search_management_client_enums.py | 125 +- .../azure/mgmt/search/operations/__init__.py | 3 +- .../operations/_admin_keys_operations.py | 27 +- ...ity_perimeter_configurations_operations.py | 35 +- .../operations/_offerings_operations.py | 150 -- .../mgmt/search/operations/_operations.py | 20 +- ...private_endpoint_connections_operations.py | 35 +- .../_private_link_resources_operations.py | 23 +- .../operations/_query_keys_operations.py | 31 +- .../_search_management_client_operations.py | 18 +- .../search/operations/_services_operations.py | 66 +- ...hared_private_link_resources_operations.py | 35 +- .../search/operations/_usages_operations.py | 22 +- ..._or_update_shared_private_link_resource.py | 3 +- .../delete_private_endpoint_connection.py | 3 +- .../delete_shared_private_link_resource.py | 3 +- .../get_private_endpoint_connection.py | 3 +- .../generated_samples/get_quota_usage.py | 3 +- .../get_quota_usages_list.py | 3 +- .../get_shared_private_link_resource.py | 3 +- ...private_endpoint_connections_by_service.py | 3 +- ...hared_private_link_resources_by_service.py | 3 +- .../list_supported_private_link_resources.py | 3 +- ...k_security_perimeter_configurations_get.py | 3 +- ...erimeter_configurations_list_by_service.py | 3 +- ...rity_perimeter_configurations_reconcile.py | 3 +- .../search_create_or_update_service.py | 3 +- ...h_create_or_update_service_auth_options.py | 3 +- ...te_or_update_service_disable_local_auth.py | 3 +- ..._to_allow_access_from_private_endpoints.py | 3 +- ..._to_allow_access_from_public_custom_ips.py | 3 +- ...ccess_from_public_custom_ips_and_bypass.py | 5 +- ..._or_update_service_with_cmk_enforcement.py | 3 +- ...r_update_service_with_data_exfiltration.py | 5 +- ..._create_or_update_service_with_identity.py | 3 +- ...h_create_or_update_with_semantic_search.py | 3 +- .../search_create_query_key.py | 3 +- .../search_delete_query_key.py | 3 +- .../search_delete_service.py | 3 +- .../search_get_admin_keys.py | 3 +- .../generated_samples/search_get_service.py | 3 +- .../search_list_offerings.py | 40 - .../search_list_operations.py | 3 +- ...earch_list_query_keys_by_search_service.py | 3 +- .../search_list_services_by_resource_group.py | 3 +- .../search_list_services_by_subscription.py | 3 +- .../search_regenerate_admin_key.py | 3 +- .../search_update_service.py | 3 +- .../search_update_service_auth_options.py | 3 +- ...earch_update_service_disable_local_auth.py | 3 +- ..._to_allow_access_from_private_endpoints.py | 3 +- ..._to_allow_access_from_public_custom_ips.py | 3 +- ...ccess_from_public_custom_ips_and_bypass.py | 5 +- ...earch_update_service_to_remove_identity.py | 3 +- ...rch_update_service_with_cmk_enforcement.py | 3 +- ...h_update_service_with_data_exfiltration.py | 5 +- ...rch_update_service_with_semantic_search.py | 3 +- .../search_update_service_with_sku.py | 3 +- .../update_private_endpoint_connection.py | 3 +- ...pgrade_search_service_to_latest_version.py | 3 +- .../generated_tests/test_search_management.py | 2 +- ...search_management_admin_keys_operations.py | 4 +- ..._management_admin_keys_operations_async.py | 4 +- .../test_search_management_async.py | 2 +- ...ity_perimeter_configurations_operations.py | 6 +- ...rimeter_configurations_operations_async.py | 6 +- .../test_search_management_operations.py | 2 +- ...test_search_management_operations_async.py | 2 +- ...private_endpoint_connections_operations.py | 16 +- ...e_endpoint_connections_operations_async.py | 16 +- ...ement_private_link_resources_operations.py | 2 +- ...private_link_resources_operations_async.py | 2 +- ...search_management_query_keys_operations.py | 6 +- ..._management_query_keys_operations_async.py | 6 +- ...t_search_management_services_operations.py | 60 +- ...ch_management_services_operations_async.py | 60 +- ...hared_private_link_resources_operations.py | 16 +- ...private_link_resources_operations_async.py | 16 +- ...est_search_management_usages_operations.py | 2 +- ...arch_management_usages_operations_async.py | 2 +- .../azure-mgmt-search/sdk_packaging.toml | 2 +- sdk/search/azure-mgmt-search/setup.py | 7 +- 108 files changed, 1461 insertions(+), 1968 deletions(-) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/__init__.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/{_serialization.py => _utils/serialization.py} (94%) rename sdk/search/azure-mgmt-search/azure/mgmt/search/{_vendor.py => _utils/utils.py} (66%) delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_vendor.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_offerings_operations.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_offerings_operations.py delete mode 100644 sdk/search/azure-mgmt-search/generated_samples/search_list_offerings.py diff --git a/sdk/search/azure-mgmt-search/CHANGELOG.md b/sdk/search/azure-mgmt-search/CHANGELOG.md index bed8f6fb14bc..e6d21a2a6e1e 100644 --- a/sdk/search/azure-mgmt-search/CHANGELOG.md +++ b/sdk/search/azure-mgmt-search/CHANGELOG.md @@ -1,5 +1,71 @@ # Release History +## 9.2.0 (2025-05-19) + +### Features Added + + - Client `SearchManagementClient` added operation group `network_security_perimeter_configurations` + - Model `Identity` added property `user_assigned_identities` + - Enum `IdentityType` added member `SYSTEM_ASSIGNED_USER_ASSIGNED` + - Enum `IdentityType` added member `USER_ASSIGNED` + - Model `NetworkRuleSet` added property `bypass` + - Model `Operation` added property `is_data_action` + - Model `Operation` added property `origin` + - Model `Operation` added property `action_type` + - Model `PrivateEndpointConnection` added property `system_data` + - Model `PrivateLinkResource` added property `system_data` + - Enum `PublicNetworkAccess` added member `SECURED_BY_PERIMETER` + - Model `Resource` added property `system_data` + - Model `SearchService` added property `endpoint` + - Model `SearchService` added property `compute_type` + - Model `SearchService` added property `data_exfiltration_protections` + - Model `SearchService` added property `e_tag` + - Model `SearchService` added property `upgrade_available` + - Model `SearchService` added property `service_upgraded_at` + - Model `SearchService` added property `system_data` + - Enum `SearchServiceStatus` added member `STOPPED` + - Model `SearchServiceUpdate` added property `endpoint` + - Model `SearchServiceUpdate` added property `compute_type` + - Model `SearchServiceUpdate` added property `data_exfiltration_protections` + - Model `SearchServiceUpdate` added property `e_tag` + - Model `SearchServiceUpdate` added property `upgrade_available` + - Model `SearchServiceUpdate` added property `service_upgraded_at` + - Model `SearchServiceUpdate` added property `system_data` + - Model `SharedPrivateLinkResource` added property `system_data` + - Model `TrackedResource` added property `system_data` + - Added model `AccessRule` + - Added enum `AccessRuleDirection` + - Added model `AccessRuleProperties` + - Added model `AccessRulePropertiesSubscriptionsItem` + - Added enum `ActionType` + - Added enum `ComputeType` + - Added enum `CreatedByType` + - Added enum `IssueType` + - Added model `NetworkSecurityPerimeter` + - Added model `NetworkSecurityPerimeterConfiguration` + - Added model `NetworkSecurityPerimeterConfigurationListResult` + - Added model `NetworkSecurityPerimeterConfigurationProperties` + - Added enum `NetworkSecurityPerimeterConfigurationProvisioningState` + - Added model `NetworkSecurityProfile` + - Added enum `Origin` + - Added model `ProvisioningIssue` + - Added model `ProvisioningIssueProperties` + - Added model `ProxyResource` + - Added model `ResourceAssociation` + - Added enum `ResourceAssociationAccessMode` + - Added enum `SearchBypass` + - Added enum `SearchDataExfiltrationProtection` + - Added enum `Severity` + - Added model `SystemData` + - Added enum `UpgradeAvailable` + - Added model `UserAssignedIdentity` + - Model `ServicesOperations` added method `begin_upgrade` + - Added model `NetworkSecurityPerimeterConfigurationsOperations` + - Method `PrivateEndpointConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, search_service_name: str, private_endpoint_connection_name: str, private_endpoint_connection: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` + - Method `ServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, search_service_name: str, service: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` + - Method `ServicesOperations.update` has a new overload `def update(self: None, resource_group_name: str, search_service_name: str, service: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` + - Method `SharedPrivateLinkResourcesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, search_service_name: str, shared_private_link_resource_name: str, shared_private_link_resource: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` + ## 9.2.0b3 (2025-04-02) ### Features Added diff --git a/sdk/search/azure-mgmt-search/README.md b/sdk/search/azure-mgmt-search/README.md index dff58a7f7b70..def7357bb27c 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.8+. +This package has been tested with Python 3.9+. 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.8+ is required to use this package. +- Python 3.9+ 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 f3f8d15a74c3..11dbf77abfe8 100644 --- a/sdk/search/azure-mgmt-search/_meta.json +++ b/sdk/search/azure-mgmt-search/_meta.json @@ -1,11 +1,11 @@ { - "commit": "d19224ba51aa869cd99f981842b780d69d51c297", + "commit": "11059b2f00c7572b276dc9862c0b41db8702cc78", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.10.2", "use": [ - "@autorest/python@6.27.4", + "@autorest/python@6.34.1", "@autorest/modelerfour@4.27.0" ], - "autorest_command": "autorest specification/search/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", + "autorest_command": "autorest specification/search/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.34.1 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False", "readme": "specification/search/resource-manager/readme.md" } \ No newline at end of file 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 4209042516fe..72d2231f9c64 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py @@ -28,13 +28,13 @@ class SearchManagementClientConfiguration: # pylint: disable=too-many-instance- :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 "2025-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-05-01". 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: - api_version: str = kwargs.pop("api_version", "2025-02-01-preview") + api_version: str = kwargs.pop("api_version", "2025-05-01") 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 4f6460f0417d..ae44305e78cd 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 @@ -7,21 +7,22 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse +from azure.core.settings import settings from azure.mgmt.core import ARMPipelineClient from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from . import models as _models from ._configuration import SearchManagementClientConfiguration -from ._serialization import Deserializer, Serializer +from ._utils.serialization import Deserializer, Serializer from .operations import ( AdminKeysOperations, NetworkSecurityPerimeterConfigurationsOperations, - OfferingsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -41,8 +42,6 @@ class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: :ivar operations: Operations operations :vartype operations: azure.mgmt.search.operations.Operations - :ivar offerings: OfferingsOperations operations - :vartype offerings: azure.mgmt.search.operations.OfferingsOperations :ivar admin_keys: AdminKeysOperations operations :vartype admin_keys: azure.mgmt.search.operations.AdminKeysOperations :ivar query_keys: QueryKeysOperations operations @@ -68,25 +67,27 @@ class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: :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 - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-05-01". 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. """ def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = SearchManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -105,14 +106,13 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.offerings = OfferingsOperations(self._client, self._config, self._serialize, self._deserialize) self.admin_keys = AdminKeysOperations(self._client, self._config, self._serialize, self._deserialize) self.query_keys = QueryKeysOperations(self._client, self._config, self._serialize, self._deserialize) self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/__init__.py new file mode 100644 index 000000000000..0af9b28f6607 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/serialization.py similarity index 94% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/serialization.py index b24ab2885450..f5187701d7be 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_serialization.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/serialization.py @@ -1,28 +1,10 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines +# coding=utf-8 # -------------------------------------------------------------------------- -# # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# 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. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -48,9 +30,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +41,13 @@ import xml.etree.ElementTree as ET import isodate # type: ignore +from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +165,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset) -> None: - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +393,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -626,7 +540,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -736,8 +650,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -781,8 +695,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -805,8 +719,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -835,8 +749,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -855,9 +769,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1192,7 +1106,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1218,7 +1132,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1251,7 +1165,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1429,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1488,7 +1402,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1502,7 +1416,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1717,7 +1631,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1799,7 +1713,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1845,7 +1759,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1936,7 +1850,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1949,7 +1863,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1964,7 +1878,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1982,7 +1896,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1995,7 +1909,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2013,7 +1927,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2029,7 +1943,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2044,14 +1958,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2067,7 +1981,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2105,7 +2019,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_vendor.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/utils.py similarity index 66% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/_vendor.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/utils.py index eb208b575e0a..39b612f39a9b 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/_vendor.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_utils/utils.py @@ -6,20 +6,20 @@ # -------------------------------------------------------------------------- from abc import ABC -from typing import TYPE_CHECKING - -from ._configuration import SearchManagementClientConfiguration +from typing import Generic, TYPE_CHECKING, TypeVar if TYPE_CHECKING: - from azure.core import PipelineClient + from .serialization import Deserializer, Serializer + - from ._serialization import Deserializer, Serializer +TClient = TypeVar("TClient") +TConfig = TypeVar("TConfig") -class SearchManagementClientMixinABC(ABC): +class ClientMixinABC(ABC, Generic[TClient, TConfig]): """DO NOT use this class. It is for internal typing use only.""" - _client: "PipelineClient" - _config: SearchManagementClientConfiguration + _client: TClient + _config: TConfig _serialize: "Serializer" _deserialize: "Deserializer" 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 5ad66e5299ee..6b357123854d 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.2.0b3" +VERSION = "9.2.0" 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 0cd83d355a54..9602395c8d81 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 @@ -28,13 +28,13 @@ class SearchManagementClientConfiguration: # pylint: disable=too-many-instance- :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 "2025-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-05-01". 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: - api_version: str = kwargs.pop("api_version", "2025-02-01-preview") + api_version: str = kwargs.pop("api_version", "2025-05-01") 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 143ce6b0e801..c4cbf77deddc 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 @@ -7,21 +7,22 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.core.settings import settings from azure.mgmt.core import AsyncARMPipelineClient from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy +from azure.mgmt.core.tools import get_arm_endpoints from .. import models as _models -from .._serialization import Deserializer, Serializer +from .._utils.serialization import Deserializer, Serializer from ._configuration import SearchManagementClientConfiguration from .operations import ( AdminKeysOperations, NetworkSecurityPerimeterConfigurationsOperations, - OfferingsOperations, Operations, PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, @@ -41,8 +42,6 @@ class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: :ivar operations: Operations operations :vartype operations: azure.mgmt.search.aio.operations.Operations - :ivar offerings: OfferingsOperations operations - :vartype offerings: azure.mgmt.search.aio.operations.OfferingsOperations :ivar admin_keys: AdminKeysOperations operations :vartype admin_keys: azure.mgmt.search.aio.operations.AdminKeysOperations :ivar query_keys: QueryKeysOperations operations @@ -69,25 +68,27 @@ class SearchManagementClient(SearchManagementClientOperationsMixin): # pylint: :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 - :param base_url: Service URL. Default value is "https://management.azure.com". + :param base_url: Service URL. Default value is None. :type base_url: str - :keyword api_version: Api Version. Default value is "2025-02-01-preview". Note that overriding - this default value may result in unsupported behavior. + :keyword api_version: Api Version. Default value is "2025-05-01". 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. """ def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any + self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: + _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _endpoints = get_arm_endpoints(_cloud) + if not base_url: + base_url = _endpoints["resource_manager"] + credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"]) self._config = SearchManagementClientConfiguration( - credential=credential, subscription_id=subscription_id, **kwargs + credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs ) + _policies = kwargs.pop("policies", None) if _policies is None: _policies = [ @@ -106,14 +107,15 @@ def __init__( policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None, self._config.http_logging_policy, ] - self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=base_url, policies=_policies, **kwargs) + self._client: AsyncARMPipelineClient = AsyncARMPipelineClient( + base_url=cast(str, base_url), policies=_policies, **kwargs + ) client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) self._serialize.client_side_validation = False self.operations = Operations(self._client, self._config, self._serialize, self._deserialize) - self.offerings = OfferingsOperations(self._client, self._config, self._serialize, self._deserialize) self.admin_keys = AdminKeysOperations(self._client, self._config, self._serialize, self._deserialize) self.query_keys = QueryKeysOperations(self._client, self._config, self._serialize, self._deserialize) self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_vendor.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_vendor.py deleted file mode 100644 index 82391ad43bfe..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/_vendor.py +++ /dev/null @@ -1,25 +0,0 @@ -# -------------------------------------------------------------------------- -# 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 abc import ABC -from typing import TYPE_CHECKING - -from ._configuration import SearchManagementClientConfiguration - -if TYPE_CHECKING: - from azure.core import AsyncPipelineClient - - from .._serialization import Deserializer, Serializer - - -class SearchManagementClientMixinABC(ABC): - """DO NOT use this class. It is for internal typing use only.""" - - _client: "AsyncPipelineClient" - _config: SearchManagementClientConfiguration - _serialize: "Serializer" - _deserialize: "Deserializer" 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 db5cfc541738..209140865c02 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +14,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._offerings_operations import OfferingsOperations # type: ignore from ._admin_keys_operations import AdminKeysOperations # type: ignore from ._query_keys_operations import QueryKeysOperations # type: ignore from ._services_operations import ServicesOperations # type: ignore @@ -30,7 +30,6 @@ __all__ = [ "Operations", - "OfferingsOperations", "AdminKeysOperations", "QueryKeysOperations", "ServicesOperations", 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 27d722ba07bc..2b4fa8abe6b6 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 @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar, Union +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +24,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._admin_keys_operations import build_get_request, build_regenerate_request +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,10 +46,10 @@ class AdminKeysOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def get( 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 index 344c7c736c1a..dab6a2e554cc 100644 --- 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -30,16 +31,14 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._network_security_perimeter_configurations_operations import ( build_get_request, build_list_by_service_request, build_reconcile_request, ) +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -58,10 +57,10 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name- 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -161,7 +160,7 @@ async def get( :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. + :param nsp_config_name: The network security perimeter configuration name. Required. :type nsp_config_name: str :return: NetworkSecurityPerimeterConfiguration or the result of cls(response) :rtype: ~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration @@ -278,7 +277,7 @@ async def begin_reconcile( :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. + :param nsp_config_name: The network security perimeter configuration name. Required. :type nsp_config_name: str :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_offerings_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_offerings_operations.py deleted file mode 100644 index ecc550ea4617..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_offerings_operations.py +++ /dev/null @@ -1,128 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- -import sys -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar -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.rest import AsyncHttpResponse, 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 ... import models as _models -from ...operations._offerings_operations import build_list_request - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - - -class OfferingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.search.aio.SearchManagementClient`'s - :attr:`offerings` 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(self, **kwargs: Any) -> AsyncIterable["_models.OfferingsByRegion"]: - """Lists all of the features and SKUs offered by the Azure AI Search service in each region. - - :return: An iterator like instance of either OfferingsByRegion or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.search.models.OfferingsByRegion] - :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.OfferingsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _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.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - async def extract_data(pipeline_response): - deserialized = self._deserialize("OfferingsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return 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) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py index 548b1baef676..7c24b344f658 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/aio/operations/_operations.py @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._operations import build_list_request +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class Operations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: 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 13c1e9205b6e..b037f5715300 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 @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -27,17 +28,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._private_endpoint_connections_operations import ( build_delete_request, build_get_request, build_list_by_service_request, build_update_request, ) +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -56,10 +55,10 @@ class PrivateEndpointConnectionsOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload async def update( 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 8772e68b9a3b..b185040809e2 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._private_link_resources_operations import build_list_supported_request +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class PrivateLinkResourcesOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_supported( 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 7c6b36744dc0..fcbd946f4851 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -26,16 +27,14 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._query_keys_operations import ( build_create_request, build_delete_request, build_list_by_search_service_request, ) +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,10 +53,10 @@ class QueryKeysOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async async def create( 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 9c15fa6cfd74..1216f000f628 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import AsyncPipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,18 +25,15 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.utils import ClientMixinABC from ...operations._search_management_client_operations import build_usage_by_subscription_sku_request -from .._vendor import SearchManagementClientMixinABC +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SearchManagementClientOperationsMixin(SearchManagementClientMixinABC): +class SearchManagementClientOperationsMixin(ClientMixinABC[AsyncPipelineClient, SearchManagementClientConfiguration]): @distributed_trace_async async def usage_by_subscription_sku( 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 a56f94acd46e..e5d6ae3c0b10 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 @@ -5,8 +5,8 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import ( Any, AsyncIterable, @@ -23,6 +23,7 @@ ) import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -44,6 +45,7 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._services_operations import ( build_check_name_availability_request, build_create_or_update_request, @@ -54,11 +56,8 @@ build_update_request, build_upgrade_request, ) +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -77,10 +76,10 @@ class ServicesOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_or_update_initial( self, @@ -176,9 +175,9 @@ async def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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 @@ -217,9 +216,9 @@ async def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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[bytes] @@ -256,9 +255,9 @@ async def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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[bytes] type. Required. 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 26f389a78177..ce0fd528e5d0 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 @@ -5,11 +5,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -31,17 +32,15 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._shared_private_link_resources_operations import ( build_create_or_update_request, build_delete_request, build_get_request, build_list_by_service_request, ) +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -60,10 +59,10 @@ class SharedPrivateLinkResourcesOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") async def _create_or_update_initial( self, 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 6ba2b2239ff9..9ceefa32c836 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -25,12 +26,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models +from ..._utils.serialization import Deserializer, Serializer from ...operations._usages_operations import build_list_by_subscription_request +from .._configuration import SearchManagementClientConfiguration -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,10 +48,10 @@ class UsagesOperations: 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") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_subscription( 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 7a08476f9e51..646e55d99331 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 @@ -14,6 +14,9 @@ from ._models_py3 import ( # type: ignore + AccessRule, + AccessRuleProperties, + AccessRulePropertiesSubscriptionsItem, AdminKeyResult, AsyncOperationResult, CheckNameAvailabilityInput, @@ -22,32 +25,18 @@ DataPlaneAadOrApiKeyAuthOption, DataPlaneAuthOptions, EncryptionWithCmk, - FeatureOffering, Identity, IpRule, ListQueryKeysResult, - NSPConfigAccessRule, - NSPConfigAccessRuleProperties, - NSPConfigAssociation, - NSPConfigNetworkSecurityPerimeterRule, - NSPConfigPerimeter, - NSPConfigProfile, - NSPProvisioningIssue, - NSPProvisioningIssueProperties, NetworkRuleSet, + NetworkSecurityPerimeter, NetworkSecurityPerimeterConfiguration, NetworkSecurityPerimeterConfigurationListResult, - OfferingsByRegion, - OfferingsListResult, + NetworkSecurityPerimeterConfigurationProperties, + NetworkSecurityProfile, Operation, - OperationAvailability, OperationDisplay, OperationListResult, - OperationLogsSpecification, - OperationMetricDimension, - OperationMetricsSpecification, - OperationProperties, - OperationServiceSpecification, PrivateEndpointConnection, PrivateEndpointConnectionListResult, PrivateEndpointConnectionProperties, @@ -56,12 +45,15 @@ PrivateLinkResource, PrivateLinkResourceProperties, PrivateLinkResourcesResult, + ProvisioningIssue, + ProvisioningIssueProperties, ProxyResource, QueryKey, QuotaUsageResult, QuotaUsageResultName, QuotaUsagesListResult, Resource, + ResourceAssociation, SearchManagementRequestOptions, SearchService, SearchServiceListResult, @@ -72,42 +64,50 @@ SharedPrivateLinkResourceListResult, SharedPrivateLinkResourceProperties, Sku, - SkuOffering, - SkuOfferingLimits, SystemData, TrackedResource, - UserAssignedManagedIdentity, + UserAssignedIdentity, ) from ._search_management_client_enums import ( # type: ignore AadAuthFailureMode, + AccessRuleDirection, + ActionType, AdminKeyKind, ComputeType, CreatedByType, - FeatureName, HostingMode, IdentityType, + IssueType, + NetworkSecurityPerimeterConfigurationProvisioningState, + Origin, PrivateLinkServiceConnectionProvisioningState, PrivateLinkServiceConnectionStatus, ProvisioningState, PublicNetworkAccess, + ResourceAssociationAccessMode, SearchBypass, - SearchDisabledDataExfiltrationOption, + SearchDataExfiltrationProtection, SearchEncryptionComplianceStatus, SearchEncryptionWithCmk, SearchSemanticSearch, SearchServiceStatus, + Severity, SharedPrivateLinkResourceAsyncOperationResult, SharedPrivateLinkResourceProvisioningState, SharedPrivateLinkResourceStatus, SkuName, UnavailableNameReason, + UpgradeAvailable, ) from ._patch import __all__ as _patch_all from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ + "AccessRule", + "AccessRuleProperties", + "AccessRulePropertiesSubscriptionsItem", "AdminKeyResult", "AsyncOperationResult", "CheckNameAvailabilityInput", @@ -116,32 +116,18 @@ "DataPlaneAadOrApiKeyAuthOption", "DataPlaneAuthOptions", "EncryptionWithCmk", - "FeatureOffering", "Identity", "IpRule", "ListQueryKeysResult", - "NSPConfigAccessRule", - "NSPConfigAccessRuleProperties", - "NSPConfigAssociation", - "NSPConfigNetworkSecurityPerimeterRule", - "NSPConfigPerimeter", - "NSPConfigProfile", - "NSPProvisioningIssue", - "NSPProvisioningIssueProperties", "NetworkRuleSet", + "NetworkSecurityPerimeter", "NetworkSecurityPerimeterConfiguration", "NetworkSecurityPerimeterConfigurationListResult", - "OfferingsByRegion", - "OfferingsListResult", + "NetworkSecurityPerimeterConfigurationProperties", + "NetworkSecurityProfile", "Operation", - "OperationAvailability", "OperationDisplay", "OperationListResult", - "OperationLogsSpecification", - "OperationMetricDimension", - "OperationMetricsSpecification", - "OperationProperties", - "OperationServiceSpecification", "PrivateEndpointConnection", "PrivateEndpointConnectionListResult", "PrivateEndpointConnectionProperties", @@ -150,12 +136,15 @@ "PrivateLinkResource", "PrivateLinkResourceProperties", "PrivateLinkResourcesResult", + "ProvisioningIssue", + "ProvisioningIssueProperties", "ProxyResource", "QueryKey", "QuotaUsageResult", "QuotaUsageResultName", "QuotaUsagesListResult", "Resource", + "ResourceAssociation", "SearchManagementRequestOptions", "SearchService", "SearchServiceListResult", @@ -166,33 +155,38 @@ "SharedPrivateLinkResourceListResult", "SharedPrivateLinkResourceProperties", "Sku", - "SkuOffering", - "SkuOfferingLimits", "SystemData", "TrackedResource", - "UserAssignedManagedIdentity", + "UserAssignedIdentity", "AadAuthFailureMode", + "AccessRuleDirection", + "ActionType", "AdminKeyKind", "ComputeType", "CreatedByType", - "FeatureName", "HostingMode", "IdentityType", + "IssueType", + "NetworkSecurityPerimeterConfigurationProvisioningState", + "Origin", "PrivateLinkServiceConnectionProvisioningState", "PrivateLinkServiceConnectionStatus", "ProvisioningState", "PublicNetworkAccess", + "ResourceAssociationAccessMode", "SearchBypass", - "SearchDisabledDataExfiltrationOption", + "SearchDataExfiltrationProtection", "SearchEncryptionComplianceStatus", "SearchEncryptionWithCmk", "SearchSemanticSearch", "SearchServiceStatus", + "Severity", "SharedPrivateLinkResourceAsyncOperationResult", "SharedPrivateLinkResourceProvisioningState", "SharedPrivateLinkResourceStatus", "SkuName", "UnavailableNameReason", + "UpgradeAvailable", ] __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() 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 e7ed90d54091..b3ad67e748b3 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 @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -7,20 +7,133 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping import datetime -import sys from typing import Any, Dict, List, Optional, TYPE_CHECKING, Union -from .. import _serialization - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore +from .._utils import serialization as _serialization if TYPE_CHECKING: from .. import models as _models -JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object +JSON = MutableMapping[str, Any] + + +class AccessRule(_serialization.Model): + """Access rule in a network security perimeter configuration profile. + + :ivar name: Name of the access rule. + :vartype name: str + :ivar properties: Properties of Access Rule. + :vartype properties: ~azure.mgmt.search.models.AccessRuleProperties + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "AccessRuleProperties"}, + } + + def __init__( + self, *, name: Optional[str] = None, properties: Optional["_models.AccessRuleProperties"] = None, **kwargs: Any + ) -> None: + """ + :keyword name: Name of the access rule. + :paramtype name: str + :keyword properties: Properties of Access Rule. + :paramtype properties: ~azure.mgmt.search.models.AccessRuleProperties + """ + super().__init__(**kwargs) + self.name = name + self.properties = properties + + +class AccessRuleProperties(_serialization.Model): + """Properties of Access Rule. + + :ivar direction: Direction of Access Rule. Known values are: "Inbound" and "Outbound". + :vartype direction: str or ~azure.mgmt.search.models.AccessRuleDirection + :ivar address_prefixes: Address prefixes in the CIDR format for inbound rules. + :vartype address_prefixes: list[str] + :ivar subscriptions: Subscriptions for inbound rules. + :vartype subscriptions: list[~azure.mgmt.search.models.AccessRulePropertiesSubscriptionsItem] + :ivar network_security_perimeters: Network security perimeters for inbound rules. + :vartype network_security_perimeters: list[~azure.mgmt.search.models.NetworkSecurityPerimeter] + :ivar fully_qualified_domain_names: Fully qualified domain names (FQDN) for outbound rules. + :vartype fully_qualified_domain_names: list[str] + :ivar email_addresses: Email addresses for outbound rules. + :vartype email_addresses: list[str] + :ivar phone_numbers: Phone numbers for outbound rules. + :vartype phone_numbers: list[str] + """ + + _attribute_map = { + "direction": {"key": "direction", "type": "str"}, + "address_prefixes": {"key": "addressPrefixes", "type": "[str]"}, + "subscriptions": {"key": "subscriptions", "type": "[AccessRulePropertiesSubscriptionsItem]"}, + "network_security_perimeters": {"key": "networkSecurityPerimeters", "type": "[NetworkSecurityPerimeter]"}, + "fully_qualified_domain_names": {"key": "fullyQualifiedDomainNames", "type": "[str]"}, + "email_addresses": {"key": "emailAddresses", "type": "[str]"}, + "phone_numbers": {"key": "phoneNumbers", "type": "[str]"}, + } + + def __init__( + self, + *, + direction: Optional[Union[str, "_models.AccessRuleDirection"]] = None, + address_prefixes: Optional[List[str]] = None, + subscriptions: Optional[List["_models.AccessRulePropertiesSubscriptionsItem"]] = None, + network_security_perimeters: Optional[List["_models.NetworkSecurityPerimeter"]] = None, + fully_qualified_domain_names: Optional[List[str]] = None, + email_addresses: Optional[List[str]] = None, + phone_numbers: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword direction: Direction of Access Rule. Known values are: "Inbound" and "Outbound". + :paramtype direction: str or ~azure.mgmt.search.models.AccessRuleDirection + :keyword address_prefixes: Address prefixes in the CIDR format for inbound rules. + :paramtype address_prefixes: list[str] + :keyword subscriptions: Subscriptions for inbound rules. + :paramtype subscriptions: list[~azure.mgmt.search.models.AccessRulePropertiesSubscriptionsItem] + :keyword network_security_perimeters: Network security perimeters for inbound rules. + :paramtype network_security_perimeters: + list[~azure.mgmt.search.models.NetworkSecurityPerimeter] + :keyword fully_qualified_domain_names: Fully qualified domain names (FQDN) for outbound rules. + :paramtype fully_qualified_domain_names: list[str] + :keyword email_addresses: Email addresses for outbound rules. + :paramtype email_addresses: list[str] + :keyword phone_numbers: Phone numbers for outbound rules. + :paramtype phone_numbers: list[str] + """ + super().__init__(**kwargs) + self.direction = direction + self.address_prefixes = address_prefixes + self.subscriptions = subscriptions + self.network_security_perimeters = network_security_perimeters + self.fully_qualified_domain_names = fully_qualified_domain_names + self.email_addresses = email_addresses + self.phone_numbers = phone_numbers + + +class AccessRulePropertiesSubscriptionsItem(_serialization.Model): + """Subscription identifiers. + + :ivar id: The fully qualified Azure resource ID of the subscription e.g. + ('/subscriptions/00000000-0000-0000-0000-000000000000'). + :vartype id: str + """ + + _attribute_map = { + "id": {"key": "id", "type": "str"}, + } + + def __init__(self, *, id: Optional[str] = None, **kwargs: Any) -> None: # pylint: disable=redefined-builtin + """ + :keyword id: The fully qualified Azure resource ID of the subscription e.g. + ('/subscriptions/00000000-0000-0000-0000-000000000000'). + :paramtype id: str + """ + super().__init__(**kwargs) + self.id = id class AdminKeyResult(_serialization.Model): @@ -48,8 +161,8 @@ class AdminKeyResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.primary_key = None - self.secondary_key = None + self.primary_key: Optional[str] = None + self.secondary_key: Optional[str] = None class AsyncOperationResult(_serialization.Model): @@ -151,9 +264,9 @@ class CheckNameAvailabilityOutput(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.is_name_available = None - self.reason = None - self.message = None + self.is_name_available: Optional[bool] = None + self.reason: Optional[Union[str, "_models.UnavailableNameReason"]] = None + self.message: Optional[str] = None class CloudErrorBody(_serialization.Model): @@ -307,31 +420,7 @@ def __init__( """ super().__init__(**kwargs) self.enforcement = enforcement - self.encryption_compliance_status = None - - -class FeatureOffering(_serialization.Model): - """FeatureOffering. - - :ivar name: The name of the feature offered in this region. Known values are: "Grok", - "ImageVectorization", "DocumentIntelligence", "QueryRewrite", "S3", "StorageOptimized", - "SemanticSearch", "MegaStore", and "AvailabilityZones". - :vartype name: str or ~azure.mgmt.search.models.FeatureName - """ - - _attribute_map = { - "name": {"key": "name", "type": "str"}, - } - - def __init__(self, *, name: Optional[Union[str, "_models.FeatureName"]] = None, **kwargs: Any) -> None: - """ - :keyword name: The name of the feature offered in this region. Known values are: "Grok", - "ImageVectorization", "DocumentIntelligence", "QueryRewrite", "S3", "StorageOptimized", - "SemanticSearch", "MegaStore", and "AvailabilityZones". - :paramtype name: str or ~azure.mgmt.search.models.FeatureName - """ - super().__init__(**kwargs) - self.name = name + self.encryption_compliance_status: Optional[Union[str, "_models.SearchEncryptionComplianceStatus"]] = None class Identity(_serialization.Model): @@ -353,9 +442,8 @@ class Identity(_serialization.Model): :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}'. # pylint: disable=line-too-long - :vartype user_assigned_identities: dict[str, - ~azure.mgmt.search.models.UserAssignedManagedIdentity] + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :vartype user_assigned_identities: dict[str, ~azure.mgmt.search.models.UserAssignedIdentity] """ _validation = { @@ -368,14 +456,14 @@ 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}"}, + "user_assigned_identities": {"key": "userAssignedIdentities", "type": "{UserAssignedIdentity}"}, } def __init__( self, *, type: Union[str, "_models.IdentityType"], - user_assigned_identities: Optional[Dict[str, "_models.UserAssignedManagedIdentity"]] = None, + user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, **kwargs: Any ) -> None: """ @@ -386,13 +474,12 @@ def __init__( :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}'. # pylint: disable=line-too-long - :paramtype user_assigned_identities: dict[str, - ~azure.mgmt.search.models.UserAssignedManagedIdentity] + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :paramtype user_assigned_identities: dict[str, ~azure.mgmt.search.models.UserAssignedIdentity] """ super().__init__(**kwargs) - self.principal_id = None - self.tenant_id = None + self.principal_id: Optional[str] = None + self.tenant_id: Optional[str] = None self.type = type self.user_assigned_identities = user_assigned_identities @@ -444,8 +531,8 @@ class ListQueryKeysResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.QueryKey"]] = None + self.next_link: Optional[str] = None class NetworkRuleSet(_serialization.Model): @@ -459,7 +546,7 @@ class NetworkRuleSet(_serialization.Model): 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", "AzurePortal", and "AzureServices". + 'ipRules' section. Known values are: "None" and "AzureServices". :vartype bypass: str or ~azure.mgmt.search.models.SearchBypass """ @@ -484,7 +571,7 @@ def __init__( 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", "AzurePortal", and "AzureServices". + 'ipRules' section. Known values are: "None" and "AzureServices". :paramtype bypass: str or ~azure.mgmt.search.models.SearchBypass """ super().__init__(**kwargs) @@ -492,283 +579,14 @@ def __init__( 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}. # pylint: disable=line-too-long - :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}. # pylint: disable=line-too-long - :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 - """ - - -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}. # pylint: disable=line-too-long - :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): # pylint: disable=name-too-long - """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 NetworkSecurityPerimeter(_serialization.Model): + """Information about a network security perimeter (NSP). -class NSPConfigNetworkSecurityPerimeterRule(_serialization.Model): - """The network security perimeter properties present in a configuration rule. - - :ivar id: + :ivar id: Fully qualified Azure resource ID of the NSP resource. :vartype id: str - :ivar perimeter_guid: + :ivar perimeter_guid: Universal unique ID (UUID) of the network security perimeter. :vartype perimeter_guid: str - :ivar location: + :ivar location: Location of the network security perimeter. :vartype location: str """ @@ -787,11 +605,11 @@ def __init__( **kwargs: Any ) -> None: """ - :keyword id: + :keyword id: Fully qualified Azure resource ID of the NSP resource. :paramtype id: str - :keyword perimeter_guid: + :keyword perimeter_guid: Universal unique ID (UUID) of the network security perimeter. :paramtype perimeter_guid: str - :keyword location: + :keyword location: Location of the network security perimeter. :paramtype location: str """ super().__init__(**kwargs) @@ -800,546 +618,378 @@ def __init__( 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 OfferingsByRegion(_serialization.Model): - """OfferingsByRegion. - - :ivar region_name: The name of the region. - :vartype region_name: str - :ivar features: The list of features offered in this region. - :vartype features: list[~azure.mgmt.search.models.FeatureOffering] - :ivar skus: The list of SKUs offered in this region. - :vartype skus: list[~azure.mgmt.search.models.SkuOffering] - """ - - _attribute_map = { - "region_name": {"key": "regionName", "type": "str"}, - "features": {"key": "features", "type": "[FeatureOffering]"}, - "skus": {"key": "skus", "type": "[SkuOffering]"}, - } - - def __init__( - self, - *, - region_name: Optional[str] = None, - features: Optional[List["_models.FeatureOffering"]] = None, - skus: Optional[List["_models.SkuOffering"]] = None, - **kwargs: Any - ) -> None: - """ - :keyword region_name: The name of the region. - :paramtype region_name: str - :keyword features: The list of features offered in this region. - :paramtype features: list[~azure.mgmt.search.models.FeatureOffering] - :keyword skus: The list of SKUs offered in this region. - :paramtype skus: list[~azure.mgmt.search.models.SkuOffering] - """ - super().__init__(**kwargs) - self.region_name = region_name - self.features = features - self.skus = skus - - -class OfferingsListResult(_serialization.Model): - """The response containing a list of features and SKUs offered in various regions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: The list of regions with their respective features and SKUs offered. - :vartype value: list[~azure.mgmt.search.models.OfferingsByRegion] - :ivar next_link: The URL to get the next set of offerings, if any. - :vartype next_link: str - """ - - _validation = { - "next_link": {"readonly": True}, - } - - _attribute_map = { - "value": {"key": "value", "type": "[OfferingsByRegion]"}, - "next_link": {"key": "nextLink", "type": "str"}, - } - - def __init__(self, *, value: Optional[List["_models.OfferingsByRegion"]] = None, **kwargs: Any) -> None: - """ - :keyword value: The list of regions with their respective features and SKUs offered. - :paramtype value: list[~azure.mgmt.search.models.OfferingsByRegion] - """ - super().__init__(**kwargs) - self.value = value - self.next_link = None - - -class Operation(_serialization.Model): - """Describes a REST API operation. +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 name: The name of the operation. This name is of the form - {provider}/{resource}/{operation}. + :ivar id: Fully qualified resource ID for the resource. E.g. + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + :vartype id: str + :ivar name: The name of the resource. :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 + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData """ _validation = { + "id": {"readonly": True}, "name": {"readonly": True}, - "display": {"readonly": True}, - "is_data_action": {"readonly": True}, - "origin": {"readonly": True}, - "properties": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { + "id": {"key": "id", "type": "str"}, "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"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, } 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 + self.id: Optional[str] = None + self.name: Optional[str] = None + self.type: Optional[str] = None + self.system_data: Optional["_models.SystemData"] = None -class OperationAvailability(_serialization.Model): - """Describes a particular availability for the metric specification. +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 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 + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData """ - _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): - """The object that describes the operation. +class NetworkSecurityPerimeterConfiguration(ProxyResource): + """Network security perimeter (NSP) configuration resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The friendly name of the resource provider. - :vartype provider: str - :ivar operation: The operation type: read, write, delete, listKeys/action, etc. - :vartype operation: str - :ivar resource: The resource type on which the operation is performed. - :vartype resource: str - :ivar description: The friendly name of the operation. - :vartype description: str + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData + :ivar properties: Network security configuration properties. + :vartype properties: ~azure.mgmt.search.models.NetworkSecurityPerimeterConfigurationProperties """ _validation = { - "provider": {"readonly": True}, - "operation": {"readonly": True}, - "resource": {"readonly": True}, - "description": {"readonly": True}, + "id": {"readonly": True}, + "name": {"readonly": True}, + "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { - "provider": {"key": "provider", "type": "str"}, - "operation": {"key": "operation", "type": "str"}, - "resource": {"key": "resource", "type": "str"}, - "description": {"key": "description", "type": "str"}, + "id": {"key": "id", "type": "str"}, + "name": {"key": "name", "type": "str"}, + "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, + "properties": {"key": "properties", "type": "NetworkSecurityPerimeterConfigurationProperties"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__( + self, *, properties: Optional["_models.NetworkSecurityPerimeterConfigurationProperties"] = None, **kwargs: Any + ) -> None: + """ + :keyword properties: Network security configuration properties. + :paramtype properties: + ~azure.mgmt.search.models.NetworkSecurityPerimeterConfigurationProperties + """ super().__init__(**kwargs) - self.provider = None - self.operation = None - self.resource = None - self.description = None - + self.properties = properties -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. - Variables are only populated by the server, and will be ignored when sending a request. +class NetworkSecurityPerimeterConfigurationListResult(_serialization.Model): # pylint: disable=name-too-long + """Result of a list NSP (network security perimeter) configurations request. - :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. + :ivar value: Array of network security perimeter results. + :vartype value: list[~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration] + :ivar next_link: The link used to get the next page of results. :vartype next_link: str """ - _validation = { - "value": {"readonly": True}, - "next_link": {"readonly": True}, - } - _attribute_map = { - "value": {"key": "value", "type": "[Operation]"}, + "value": {"key": "value", "type": "[NetworkSecurityPerimeterConfiguration]"}, "next_link": {"key": "nextLink", "type": "str"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__( + self, + *, + value: Optional[List["_models.NetworkSecurityPerimeterConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs: Any + ) -> None: + """ + :keyword value: Array of network security perimeter results. + :paramtype value: list[~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration] + :keyword next_link: The link used to get the next page of results. + :paramtype next_link: str + """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value = value + self.next_link = next_link -class OperationLogsSpecification(_serialization.Model): - """Specifications of one type of log for this operation. +class NetworkSecurityPerimeterConfigurationProperties(_serialization.Model): # pylint: disable=name-too-long + """Network security configuration properties. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the log specification. - :vartype name: 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 + :ivar provisioning_state: Provisioning state of a network security perimeter configuration that + is being created or updated. Known values are: "Succeeded", "Creating", "Updating", "Deleting", + "Accepted", "Failed", and "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.search.models.NetworkSecurityPerimeterConfigurationProvisioningState + :ivar provisioning_issues: List of provisioning issues, if any. + :vartype provisioning_issues: list[~azure.mgmt.search.models.ProvisioningIssue] + :ivar network_security_perimeter: Information about a network security perimeter (NSP). + :vartype network_security_perimeter: ~azure.mgmt.search.models.NetworkSecurityPerimeter + :ivar resource_association: Information about resource association. + :vartype resource_association: ~azure.mgmt.search.models.ResourceAssociation + :ivar profile: Network security perimeter configuration profile. + :vartype profile: ~azure.mgmt.search.models.NetworkSecurityProfile """ _validation = { - "name": {"readonly": True}, - "display_name": {"readonly": True}, - "blob_duration": {"readonly": True}, + "provisioning_state": {"readonly": True}, + "provisioning_issues": {"readonly": True}, } _attribute_map = { - "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, - "blob_duration": {"key": "blobDuration", "type": "str"}, + "provisioning_state": {"key": "provisioningState", "type": "str"}, + "provisioning_issues": {"key": "provisioningIssues", "type": "[ProvisioningIssue]"}, + "network_security_perimeter": {"key": "networkSecurityPerimeter", "type": "NetworkSecurityPerimeter"}, + "resource_association": {"key": "resourceAssociation", "type": "ResourceAssociation"}, + "profile": {"key": "profile", "type": "NetworkSecurityProfile"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__( + self, + *, + network_security_perimeter: Optional["_models.NetworkSecurityPerimeter"] = None, + resource_association: Optional["_models.ResourceAssociation"] = None, + profile: Optional["_models.NetworkSecurityProfile"] = None, + **kwargs: Any + ) -> None: + """ + :keyword network_security_perimeter: Information about a network security perimeter (NSP). + :paramtype network_security_perimeter: ~azure.mgmt.search.models.NetworkSecurityPerimeter + :keyword resource_association: Information about resource association. + :paramtype resource_association: ~azure.mgmt.search.models.ResourceAssociation + :keyword profile: Network security perimeter configuration profile. + :paramtype profile: ~azure.mgmt.search.models.NetworkSecurityProfile + """ super().__init__(**kwargs) - self.name = None - self.display_name = None - self.blob_duration = None - + self.provisioning_state: Optional[ + Union[str, "_models.NetworkSecurityPerimeterConfigurationProvisioningState"] + ] = None + self.provisioning_issues: Optional[List["_models.ProvisioningIssue"]] = None + self.network_security_perimeter = network_security_perimeter + self.resource_association = resource_association + self.profile = profile -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. +class NetworkSecurityProfile(_serialization.Model): + """Network security perimeter configuration profile. - :ivar name: The name of the dimension. + :ivar name: Name of the profile. :vartype name: str - :ivar display_name: The display name of the dimension. - :vartype display_name: str + :ivar access_rules_version: Current access rules version. + :vartype access_rules_version: int + :ivar access_rules: List of Access Rules. + :vartype access_rules: list[~azure.mgmt.search.models.AccessRule] + :ivar diagnostic_settings_version: Current diagnostic settings version. + :vartype diagnostic_settings_version: int + :ivar enabled_log_categories: List of log categories that are enabled. + :vartype enabled_log_categories: list[str] """ - _validation = { - "name": {"readonly": True}, - "display_name": {"readonly": True}, - } - _attribute_map = { "name": {"key": "name", "type": "str"}, - "display_name": {"key": "displayName", "type": "str"}, + "access_rules_version": {"key": "accessRulesVersion", "type": "int"}, + "access_rules": {"key": "accessRules", "type": "[AccessRule]"}, + "diagnostic_settings_version": {"key": "diagnosticSettingsVersion", "type": "int"}, + "enabled_log_categories": {"key": "enabledLogCategories", "type": "[str]"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__( + self, + *, + name: Optional[str] = None, + access_rules_version: Optional[int] = None, + access_rules: Optional[List["_models.AccessRule"]] = None, + diagnostic_settings_version: Optional[int] = None, + enabled_log_categories: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: Name of the profile. + :paramtype name: str + :keyword access_rules_version: Current access rules version. + :paramtype access_rules_version: int + :keyword access_rules: List of Access Rules. + :paramtype access_rules: list[~azure.mgmt.search.models.AccessRule] + :keyword diagnostic_settings_version: Current diagnostic settings version. + :paramtype diagnostic_settings_version: int + :keyword enabled_log_categories: List of log categories that are enabled. + :paramtype enabled_log_categories: list[str] + """ super().__init__(**kwargs) - self.name = None - self.display_name = None + self.name = name + self.access_rules_version = access_rules_version + self.access_rules = access_rules + self.diagnostic_settings_version = diagnostic_settings_version + self.enabled_log_categories = enabled_log_categories -class OperationMetricsSpecification(_serialization.Model): - """Specifications of one type of metric for this operation. +class Operation(_serialization.Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the metric specification. + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :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] + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for ARM/control-plane operations. + :vartype is_data_action: bool + :ivar display: Localized display information for this particular operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", + and "user,system". + :vartype origin: str or ~azure.mgmt.search.models.Origin + :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for + internal only APIs. "Internal" + :vartype action_type: str or ~azure.mgmt.search.models.ActionType """ _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}, + "is_data_action": {"readonly": True}, + "origin": {"readonly": True}, + "action_type": {"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]"}, + "is_data_action": {"key": "isDataAction", "type": "bool"}, + "display": {"key": "display", "type": "OperationDisplay"}, + "origin": {"key": "origin", "type": "str"}, + "action_type": {"key": "actionType", "type": "str"}, } - def __init__(self, **kwargs: Any) -> None: - """ """ + def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: + """ + :keyword display: Localized display information for this particular operation. + :paramtype display: ~azure.mgmt.search.models.OperationDisplay + """ 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 + self.name: Optional[str] = None + self.is_data_action: Optional[bool] = None + self.display = display + self.origin: Optional[Union[str, "_models.Origin"]] = None + self.action_type: Optional[Union[str, "_models.ActionType"]] = None -class OperationProperties(_serialization.Model): - """Describes additional properties for this operation. +class OperationDisplay(_serialization.Model): + """Localized display information for this particular 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 + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str """ _validation = { - "service_specification": {"readonly": True}, + "provider": {"readonly": True}, + "resource": {"readonly": True}, + "operation": {"readonly": True}, + "description": {"readonly": True}, } _attribute_map = { - "service_specification": {"key": "serviceSpecification", "type": "OperationServiceSpecification"}, + "provider": {"key": "provider", "type": "str"}, + "resource": {"key": "resource", "type": "str"}, + "operation": {"key": "operation", "type": "str"}, + "description": {"key": "description", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.service_specification = None + self.provider: Optional[str] = None + self.resource: Optional[str] = None + self.operation: Optional[str] = None + self.description: Optional[str] = None -class OperationServiceSpecification(_serialization.Model): - """Specifications of the service for this operation. +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. 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] + :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 """ _validation = { - "metric_specifications": {"readonly": True}, - "log_specifications": {"readonly": True}, + "value": {"readonly": True}, + "next_link": {"readonly": True}, } _attribute_map = { - "metric_specifications": {"key": "metricSpecifications", "type": "[OperationMetricsSpecification]"}, - "log_specifications": {"key": "logSpecifications", "type": "[OperationLogsSpecification]"}, + "value": {"key": "value", "type": "[Operation]"}, + "next_link": {"key": "nextLink", "type": "str"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.metric_specifications = None - self.log_specifications = None + self.value: Optional[List["_models.Operation"]] = None + self.next_link: Optional[str] = None class PrivateEndpointConnection(Resource): @@ -1347,14 +997,17 @@ class PrivateEndpointConnection(Resource): 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}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :ivar properties: Describes the properties of an existing private endpoint connection to the Azure AI Search service. :vartype properties: ~azure.mgmt.search.models.PrivateEndpointConnectionProperties @@ -1364,12 +1017,14 @@ class PrivateEndpointConnection(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "properties": {"key": "properties", "type": "PrivateEndpointConnectionProperties"}, } @@ -1411,8 +1066,8 @@ class PrivateEndpointConnectionListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.PrivateEndpointConnection"]] = None + self.next_link: Optional[str] = None class PrivateEndpointConnectionProperties(_serialization.Model): @@ -1550,14 +1205,17 @@ class PrivateLinkResource(Resource): 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}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :ivar properties: Describes the properties of a supported private link resource for the Azure AI Search service. :vartype properties: ~azure.mgmt.search.models.PrivateLinkResourceProperties @@ -1567,6 +1225,7 @@ class PrivateLinkResource(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, + "system_data": {"readonly": True}, "properties": {"readonly": True}, } @@ -1574,13 +1233,14 @@ class PrivateLinkResource(Resource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "properties": {"key": "properties", "type": "PrivateLinkResourceProperties"}, } def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.properties = None + self.properties: Optional["_models.PrivateLinkResourceProperties"] = None class PrivateLinkResourceProperties(_serialization.Model): @@ -1622,10 +1282,10 @@ class PrivateLinkResourceProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = None - self.shareable_private_link_resource_types = None + self.group_id: Optional[str] = None + self.required_members: Optional[List[str]] = None + self.required_zone_names: Optional[List[str]] = None + self.shareable_private_link_resource_types: Optional[List["_models.ShareablePrivateLinkResourceType"]] = None class PrivateLinkResourcesResult(_serialization.Model): @@ -1648,7 +1308,88 @@ class PrivateLinkResourcesResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.PrivateLinkResource"]] = None + + +class ProvisioningIssue(_serialization.Model): + """Describes a provisioning issue for a network security perimeter configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the issue. + :vartype name: str + :ivar properties: Details of a provisioning issue for a network security perimeter (NSP) + configuration. Resource providers should generate separate provisioning issue elements for each + separate issue detected, and include a meaningful and distinctive description, as well as any + appropriate suggestedResourceIds and suggestedAccessRules. + :vartype properties: ~azure.mgmt.search.models.ProvisioningIssueProperties + """ + + _validation = { + "name": {"readonly": True}, + "properties": {"readonly": True}, + } + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "properties": {"key": "properties", "type": "ProvisioningIssueProperties"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.name: Optional[str] = None + self.properties: Optional["_models.ProvisioningIssueProperties"] = None + + +class ProvisioningIssueProperties(_serialization.Model): + """Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource + providers should generate separate provisioning issue elements for each separate issue + detected, and include a meaningful and distinctive description, as well as any appropriate + suggestedResourceIds and suggestedAccessRules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar issue_type: Type of issue. Known values are: "Unknown", + "ConfigurationPropagationFailure", "MissingPerimeterConfiguration", and + "MissingIdentityConfiguration". + :vartype issue_type: str or ~azure.mgmt.search.models.IssueType + :ivar severity: Severity of the issue. Known values are: "Warning" and "Error". + :vartype severity: str or ~azure.mgmt.search.models.Severity + :ivar description: Description of the issue. + :vartype description: str + :ivar suggested_resource_ids: Fully qualified resource IDs of suggested resources that can be + associated to the network security perimeter (NSP) to remediate the issue. + :vartype suggested_resource_ids: list[str] + :ivar suggested_access_rules: Access rules that can be added to the network security profile + (NSP) to remediate the issue. + :vartype suggested_access_rules: list[~azure.mgmt.search.models.AccessRule] + """ + + _validation = { + "issue_type": {"readonly": True}, + "severity": {"readonly": True}, + "description": {"readonly": True}, + "suggested_resource_ids": {"readonly": True}, + "suggested_access_rules": {"readonly": True}, + } + + _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": "[AccessRule]"}, + } + + def __init__(self, **kwargs: Any) -> None: + """ """ + super().__init__(**kwargs) + self.issue_type: Optional[Union[str, "_models.IssueType"]] = None + self.severity: Optional[Union[str, "_models.Severity"]] = None + self.description: Optional[str] = None + self.suggested_resource_ids: Optional[List[str]] = None + self.suggested_access_rules: Optional[List["_models.AccessRule"]] = None class QueryKey(_serialization.Model): @@ -1677,8 +1418,8 @@ class QueryKey(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.key = None + self.name: Optional[str] = None + self.key: Optional[str] = None class QuotaUsageResult(_serialization.Model): @@ -1734,7 +1475,7 @@ def __init__( self.unit = unit self.current_value = current_value self.limit = limit - self.name = None + self.name: Optional["_models.QuotaUsageResultName"] = None class QuotaUsageResultName(_serialization.Model): @@ -1788,8 +1529,42 @@ class QuotaUsagesListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.QuotaUsageResult"]] = None + self.next_link: Optional[str] = None + + +class ResourceAssociation(_serialization.Model): + """Information about resource association. + + :ivar name: Name of the resource association. + :vartype name: str + :ivar access_mode: Access mode of the resource association. Known values are: "Enforced", + "Learning", and "Audit". + :vartype access_mode: str or ~azure.mgmt.search.models.ResourceAssociationAccessMode + """ + + _attribute_map = { + "name": {"key": "name", "type": "str"}, + "access_mode": {"key": "accessMode", "type": "str"}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + access_mode: Optional[Union[str, "_models.ResourceAssociationAccessMode"]] = None, + **kwargs: Any + ) -> None: + """ + :keyword name: Name of the resource association. + :paramtype name: str + :keyword access_mode: Access mode of the resource association. Known values are: "Enforced", + "Learning", and "Audit". + :paramtype access_mode: str or ~azure.mgmt.search.models.ResourceAssociationAccessMode + """ + super().__init__(**kwargs) + self.name = name + self.access_mode = access_mode class SearchManagementRequestOptions(_serialization.Model): @@ -1822,14 +1597,17 @@ class TrackedResource(Resource): All required parameters must be populated in order to send to server. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -1840,6 +1618,7 @@ class TrackedResource(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, + "system_data": {"readonly": True}, "location": {"required": True}, } @@ -1847,6 +1626,7 @@ class TrackedResource(Resource): "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, } @@ -1870,14 +1650,17 @@ class SearchService(TrackedResource): All required parameters must be populated in order to send to server. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -1887,9 +1670,6 @@ class SearchService(TrackedResource): :vartype sku: ~azure.mgmt.search.models.Sku :ivar identity: The identity of the resource. :vartype identity: ~azure.mgmt.search.models.Identity - :ivar system_data: Azure Resource Manager metadata of the search service containing createdBy - and modifiedBy information. - :vartype system_data: ~azure.mgmt.search.models.SystemData :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. :vartype replica_count: int @@ -1906,12 +1686,12 @@ class SearchService(TrackedResource): and "highDensity". :vartype hosting_mode: str or ~azure.mgmt.search.models.HostingMode :ivar compute_type: Configure this property to support the search service using either the - default compute or Azure Confidential Compute. Known values are: "default" and "confidential". + Default Compute or Azure Confidential Compute. Known values are: "default" and "confidential". :vartype compute_type: str or ~azure.mgmt.search.models.ComputeType :ivar public_network_access: This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. Known - values are: "enabled" and "disabled". + values are: "enabled", "disabled", and "securedByPerimeter". :vartype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess :ivar status: The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search @@ -1935,18 +1715,17 @@ class SearchService(TrackedResource): from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service - uses capacity that is already set up. Known values are: "Succeeded", "Provisioning", and - "Failed". + 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 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 data_exfiltration_protections: 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 data_exfiltration_protections: list[str or + ~azure.mgmt.search.models.SearchDataExfiltrationProtection] :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 @@ -1972,19 +1751,20 @@ class SearchService(TrackedResource): :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 - :ivar upgrade_available: Indicates whether or not the search service has an upgrade available. - :vartype upgrade_available: bool - :ivar service_upgrade_date: The date and time the search service was last upgraded. This field + :ivar upgrade_available: Indicates if the search service has an upgrade available. Known values + are: "notAvailable" and "available". + :vartype upgrade_available: str or ~azure.mgmt.search.models.UpgradeAvailable + :ivar service_upgraded_at: The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. - :vartype service_upgrade_date: ~datetime.datetime + :vartype service_upgraded_at: ~datetime.datetime """ _validation = { "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, - "location": {"required": True}, "system_data": {"readonly": True}, + "location": {"required": True}, "replica_count": {"maximum": 12, "minimum": 1}, "partition_count": {"maximum": 12, "minimum": 1}, "status": {"readonly": True}, @@ -1993,19 +1773,18 @@ class SearchService(TrackedResource): "private_endpoint_connections": {"readonly": True}, "shared_private_link_resources": {"readonly": True}, "e_tag": {"readonly": True}, - "upgrade_available": {"readonly": True}, - "service_upgrade_date": {"readonly": True}, + "service_upgraded_at": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "tags": {"key": "tags", "type": "{str}"}, "location": {"key": "location", "type": "str"}, "sku": {"key": "sku", "type": "Sku"}, "identity": {"key": "identity", "type": "Identity"}, - "system_data": {"key": "systemData", "type": "SystemData"}, "replica_count": {"key": "properties.replicaCount", "type": "int"}, "partition_count": {"key": "properties.partitionCount", "type": "int"}, "endpoint": {"key": "properties.endpoint", "type": "str"}, @@ -2016,7 +1795,7 @@ class SearchService(TrackedResource): "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]"}, + "data_exfiltration_protections": {"key": "properties.dataExfiltrationProtections", "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"}, @@ -2030,8 +1809,8 @@ class SearchService(TrackedResource): "type": "[SharedPrivateLinkResource]", }, "e_tag": {"key": "properties.eTag", "type": "str"}, - "upgrade_available": {"key": "properties.upgradeAvailable", "type": "bool"}, - "service_upgrade_date": {"key": "properties.serviceUpgradeDate", "type": "iso-8601"}, + "upgrade_available": {"key": "properties.upgradeAvailable", "type": "str"}, + "service_upgraded_at": {"key": "properties.serviceUpgradedAt", "type": "iso-8601"}, } def __init__( # pylint: disable=too-many-locals @@ -2048,13 +1827,12 @@ def __init__( # pylint: disable=too-many-locals compute_type: Optional[Union[str, "_models.ComputeType"]] = None, 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, + data_exfiltration_protections: Optional[List[Union[str, "_models.SearchDataExfiltrationProtection"]]] = None, encryption_with_cmk: Optional["_models.EncryptionWithCmk"] = None, disable_local_auth: Optional[bool] = None, auth_options: Optional["_models.DataPlaneAuthOptions"] = None, semantic_search: Optional[Union[str, "_models.SearchSemanticSearch"]] = None, + upgrade_available: Optional[Union[str, "_models.UpgradeAvailable"]] = None, **kwargs: Any ) -> None: """ @@ -2085,22 +1863,22 @@ def __init__( # pylint: disable=too-many-locals "default" and "highDensity". :paramtype hosting_mode: str or ~azure.mgmt.search.models.HostingMode :keyword compute_type: Configure this property to support the search service using either the - default compute or Azure Confidential Compute. Known values are: "default" and "confidential". + Default Compute or Azure Confidential Compute. Known values are: "default" and "confidential". :paramtype compute_type: str or ~azure.mgmt.search.models.ComputeType :keyword public_network_access: This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. Known - values are: "enabled" and "disabled". + values are: "enabled", "disabled", and "securedByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess :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 + :keyword data_exfiltration_protections: 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] + :paramtype data_exfiltration_protections: list[str or + ~azure.mgmt.search.models.SearchDataExfiltrationProtection] :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 @@ -2115,31 +1893,33 @@ def __init__( # pylint: disable=too-many-locals 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 + :keyword upgrade_available: Indicates if the search service has an upgrade available. Known + values are: "notAvailable" and "available". + :paramtype upgrade_available: str or ~azure.mgmt.search.models.UpgradeAvailable """ super().__init__(tags=tags, location=location, **kwargs) self.sku = sku self.identity = identity - self.system_data = None self.replica_count = replica_count self.partition_count = partition_count self.endpoint = endpoint self.hosting_mode = hosting_mode self.compute_type = compute_type self.public_network_access = public_network_access - self.status = None - self.status_details = None - self.provisioning_state = None + self.status: Optional[Union[str, "_models.SearchServiceStatus"]] = None + self.status_details: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.network_rule_set = network_rule_set - self.disabled_data_exfiltration_options = disabled_data_exfiltration_options + self.data_exfiltration_protections = data_exfiltration_protections self.encryption_with_cmk = encryption_with_cmk self.disable_local_auth = disable_local_auth self.auth_options = auth_options self.semantic_search = semantic_search - self.private_endpoint_connections = None - self.shared_private_link_resources = None - self.e_tag = None - self.upgrade_available = None - self.service_upgrade_date = None + self.private_endpoint_connections: Optional[List["_models.PrivateEndpointConnection"]] = None + self.shared_private_link_resources: Optional[List["_models.SharedPrivateLinkResource"]] = None + self.e_tag: Optional[str] = None + self.upgrade_available = upgrade_available + self.service_upgraded_at: Optional[datetime.datetime] = None class SearchServiceListResult(_serialization.Model): @@ -2167,8 +1947,8 @@ class SearchServiceListResult(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.value = None - self.next_link = None + self.value: Optional[List["_models.SearchService"]] = None + self.next_link: Optional[str] = None class SearchServiceUpdate(Resource): @@ -2176,14 +1956,17 @@ class SearchServiceUpdate(Resource): 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}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :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 @@ -2196,9 +1979,6 @@ class SearchServiceUpdate(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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy - information. - :vartype system_data: ~azure.mgmt.search.models.SystemData :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. :vartype replica_count: int @@ -2215,12 +1995,12 @@ class SearchServiceUpdate(Resource): and "highDensity". :vartype hosting_mode: str or ~azure.mgmt.search.models.HostingMode :ivar compute_type: Configure this property to support the search service using either the - default compute or Azure Confidential Compute. Known values are: "default" and "confidential". + Default Compute or Azure Confidential Compute. Known values are: "default" and "confidential". :vartype compute_type: str or ~azure.mgmt.search.models.ComputeType :ivar public_network_access: This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. Known - values are: "enabled" and "disabled". + values are: "enabled", "disabled", and "securedByPerimeter". :vartype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess :ivar status: The status of the search service. Possible values include: 'running': The search service is running and no provisioning operations are underway. 'provisioning': The search @@ -2244,18 +2024,17 @@ class SearchServiceUpdate(Resource): from 30 seconds to one minute) by using the Get Search Service operation to see when an operation is completed. If you are using the free service, this value tends to come back as 'Succeeded' directly in the call to Create search service. This is because the free service - uses capacity that is already set up. Known values are: "Succeeded", "Provisioning", and - "Failed". + 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 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 data_exfiltration_protections: 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 data_exfiltration_protections: list[str or + ~azure.mgmt.search.models.SearchDataExfiltrationProtection] :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 @@ -2281,11 +2060,12 @@ class SearchServiceUpdate(Resource): :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 - :ivar upgrade_available: Indicates whether or not the search service has an upgrade available. - :vartype upgrade_available: bool - :ivar service_upgrade_date: The date and time the search service was last upgraded. This field + :ivar upgrade_available: Indicates if the search service has an upgrade available. Known values + are: "notAvailable" and "available". + :vartype upgrade_available: str or ~azure.mgmt.search.models.UpgradeAvailable + :ivar service_upgraded_at: The date and time the search service was last upgraded. This field will be null until the service gets upgraded for the first time. - :vartype service_upgrade_date: ~datetime.datetime + :vartype service_upgraded_at: ~datetime.datetime """ _validation = { @@ -2301,19 +2081,18 @@ class SearchServiceUpdate(Resource): "private_endpoint_connections": {"readonly": True}, "shared_private_link_resources": {"readonly": True}, "e_tag": {"readonly": True}, - "upgrade_available": {"readonly": True}, - "service_upgrade_date": {"readonly": True}, + "service_upgraded_at": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "sku": {"key": "sku", "type": "Sku"}, "location": {"key": "location", "type": "str"}, "tags": {"key": "tags", "type": "{str}"}, "identity": {"key": "identity", "type": "Identity"}, - "system_data": {"key": "systemData", "type": "SystemData"}, "replica_count": {"key": "properties.replicaCount", "type": "int"}, "partition_count": {"key": "properties.partitionCount", "type": "int"}, "endpoint": {"key": "properties.endpoint", "type": "str"}, @@ -2324,7 +2103,7 @@ class SearchServiceUpdate(Resource): "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]"}, + "data_exfiltration_protections": {"key": "properties.dataExfiltrationProtections", "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"}, @@ -2338,8 +2117,8 @@ class SearchServiceUpdate(Resource): "type": "[SharedPrivateLinkResource]", }, "e_tag": {"key": "properties.eTag", "type": "str"}, - "upgrade_available": {"key": "properties.upgradeAvailable", "type": "bool"}, - "service_upgrade_date": {"key": "properties.serviceUpgradeDate", "type": "iso-8601"}, + "upgrade_available": {"key": "properties.upgradeAvailable", "type": "str"}, + "service_upgraded_at": {"key": "properties.serviceUpgradedAt", "type": "iso-8601"}, } def __init__( # pylint: disable=too-many-locals @@ -2356,13 +2135,12 @@ def __init__( # pylint: disable=too-many-locals compute_type: Optional[Union[str, "_models.ComputeType"]] = None, 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, + data_exfiltration_protections: Optional[List[Union[str, "_models.SearchDataExfiltrationProtection"]]] = None, encryption_with_cmk: Optional["_models.EncryptionWithCmk"] = None, disable_local_auth: Optional[bool] = None, auth_options: Optional["_models.DataPlaneAuthOptions"] = None, semantic_search: Optional[Union[str, "_models.SearchSemanticSearch"]] = None, + upgrade_available: Optional[Union[str, "_models.UpgradeAvailable"]] = None, **kwargs: Any ) -> None: """ @@ -2396,22 +2174,22 @@ def __init__( # pylint: disable=too-many-locals "default" and "highDensity". :paramtype hosting_mode: str or ~azure.mgmt.search.models.HostingMode :keyword compute_type: Configure this property to support the search service using either the - default compute or Azure Confidential Compute. Known values are: "default" and "confidential". + Default Compute or Azure Confidential Compute. Known values are: "default" and "confidential". :paramtype compute_type: str or ~azure.mgmt.search.models.ComputeType :keyword public_network_access: This value can be set to 'enabled' to avoid breaking changes on existing customer resources and templates. If set to 'disabled', traffic over public interface is not allowed, and private endpoint connections would be the exclusive access method. Known - values are: "enabled" and "disabled". + values are: "enabled", "disabled", and "securedByPerimeter". :paramtype public_network_access: str or ~azure.mgmt.search.models.PublicNetworkAccess :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 + :keyword data_exfiltration_protections: 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] + :paramtype data_exfiltration_protections: list[str or + ~azure.mgmt.search.models.SearchDataExfiltrationProtection] :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 @@ -2426,33 +2204,35 @@ def __init__( # pylint: disable=too-many-locals 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 + :keyword upgrade_available: Indicates if the search service has an upgrade available. Known + values are: "notAvailable" and "available". + :paramtype upgrade_available: str or ~azure.mgmt.search.models.UpgradeAvailable """ super().__init__(**kwargs) self.sku = sku self.location = location self.tags = tags self.identity = identity - self.system_data = None self.replica_count = replica_count self.partition_count = partition_count self.endpoint = endpoint self.hosting_mode = hosting_mode self.compute_type = compute_type self.public_network_access = public_network_access - self.status = None - self.status_details = None - self.provisioning_state = None + self.status: Optional[Union[str, "_models.SearchServiceStatus"]] = None + self.status_details: Optional[str] = None + self.provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = None self.network_rule_set = network_rule_set - self.disabled_data_exfiltration_options = disabled_data_exfiltration_options + self.data_exfiltration_protections = data_exfiltration_protections self.encryption_with_cmk = encryption_with_cmk self.disable_local_auth = disable_local_auth self.auth_options = auth_options self.semantic_search = semantic_search - self.private_endpoint_connections = None - self.shared_private_link_resources = None - self.e_tag = None - self.upgrade_available = None - self.service_upgrade_date = None + self.private_endpoint_connections: Optional[List["_models.PrivateEndpointConnection"]] = None + self.shared_private_link_resources: Optional[List["_models.SharedPrivateLinkResource"]] = None + self.e_tag: Optional[str] = None + self.upgrade_available = upgrade_available + self.service_upgraded_at: Optional[datetime.datetime] = None class ShareablePrivateLinkResourceProperties(_serialization.Model): @@ -2487,9 +2267,9 @@ class ShareablePrivateLinkResourceProperties(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.type = None - self.group_id = None - self.description = None + self.type: Optional[str] = None + self.group_id: Optional[str] = None + self.description: Optional[str] = None class ShareablePrivateLinkResourceType(_serialization.Model): @@ -2519,8 +2299,8 @@ class ShareablePrivateLinkResourceType(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.name = None - self.properties = None + self.name: Optional[str] = None + self.properties: Optional["_models.ShareablePrivateLinkResourceProperties"] = None class SharedPrivateLinkResource(Resource): @@ -2528,14 +2308,17 @@ class SharedPrivateLinkResource(Resource): 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}. # pylint: disable=line-too-long + :ivar id: Fully qualified resource ID for the resource. E.g. + "/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 system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~azure.mgmt.search.models.SystemData :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 @@ -2545,12 +2328,14 @@ class SharedPrivateLinkResource(Resource): "id": {"readonly": True}, "name": {"readonly": True}, "type": {"readonly": True}, + "system_data": {"readonly": True}, } _attribute_map = { "id": {"key": "id", "type": "str"}, "name": {"key": "name", "type": "str"}, "type": {"key": "type", "type": "str"}, + "system_data": {"key": "systemData", "type": "SystemData"}, "properties": {"key": "properties", "type": "SharedPrivateLinkResourceProperties"}, } @@ -2594,7 +2379,7 @@ def __init__(self, *, next_link: Optional[str] = None, **kwargs: Any) -> None: :paramtype next_link: str """ super().__init__(**kwargs) - self.value = None + self.value: Optional[List["_models.SharedPrivateLinkResource"]] = None self.next_link = next_link @@ -2714,111 +2499,6 @@ def __init__(self, *, name: Optional[Union[str, "_models.SkuName"]] = None, **kw self.name = name -class SkuOffering(_serialization.Model): - """SkuOffering. - - :ivar sku: Defines the SKU of a search service, which determines billing rate and capacity - limits. - :vartype sku: ~azure.mgmt.search.models.Sku - :ivar limits: The limits associated with this SKU offered in this region. - :vartype limits: ~azure.mgmt.search.models.SkuOfferingLimits - """ - - _attribute_map = { - "sku": {"key": "sku", "type": "Sku"}, - "limits": {"key": "limits", "type": "SkuOfferingLimits"}, - } - - def __init__( - self, - *, - sku: Optional["_models.Sku"] = None, - limits: Optional["_models.SkuOfferingLimits"] = None, - **kwargs: Any - ) -> None: - """ - :keyword sku: Defines the SKU of a search service, which determines billing rate and capacity - limits. - :paramtype sku: ~azure.mgmt.search.models.Sku - :keyword limits: The limits associated with this SKU offered in this region. - :paramtype limits: ~azure.mgmt.search.models.SkuOfferingLimits - """ - super().__init__(**kwargs) - self.sku = sku - self.limits = limits - - -class SkuOfferingLimits(_serialization.Model): - """The limits associated with this SKU offered in this region. - - :ivar indexes: The maximum number of indexes available for this SKU. - :vartype indexes: int - :ivar indexers: The maximum number of indexers available for this SKU. - :vartype indexers: int - :ivar partition_storage_in_gigabytes: The maximum storage size in Gigabytes available for this - SKU per partition. - :vartype partition_storage_in_gigabytes: float - :ivar partition_vector_storage_in_gigabytes: The maximum vector storage size in Gigabytes - available for this SKU per partition. - :vartype partition_vector_storage_in_gigabytes: float - :ivar search_units: The maximum number of search units available for this SKU. - :vartype search_units: int - :ivar replicas: The maximum number of replicas available for this SKU. - :vartype replicas: int - :ivar partitions: The maximum number of partitions available for this SKU. - :vartype partitions: int - """ - - _attribute_map = { - "indexes": {"key": "indexes", "type": "int"}, - "indexers": {"key": "indexers", "type": "int"}, - "partition_storage_in_gigabytes": {"key": "partitionStorageInGigabytes", "type": "float"}, - "partition_vector_storage_in_gigabytes": {"key": "partitionVectorStorageInGigabytes", "type": "float"}, - "search_units": {"key": "searchUnits", "type": "int"}, - "replicas": {"key": "replicas", "type": "int"}, - "partitions": {"key": "partitions", "type": "int"}, - } - - def __init__( - self, - *, - indexes: Optional[int] = None, - indexers: Optional[int] = None, - partition_storage_in_gigabytes: Optional[float] = None, - partition_vector_storage_in_gigabytes: Optional[float] = None, - search_units: Optional[int] = None, - replicas: Optional[int] = None, - partitions: Optional[int] = None, - **kwargs: Any - ) -> None: - """ - :keyword indexes: The maximum number of indexes available for this SKU. - :paramtype indexes: int - :keyword indexers: The maximum number of indexers available for this SKU. - :paramtype indexers: int - :keyword partition_storage_in_gigabytes: The maximum storage size in Gigabytes available for - this SKU per partition. - :paramtype partition_storage_in_gigabytes: float - :keyword partition_vector_storage_in_gigabytes: The maximum vector storage size in Gigabytes - available for this SKU per partition. - :paramtype partition_vector_storage_in_gigabytes: float - :keyword search_units: The maximum number of search units available for this SKU. - :paramtype search_units: int - :keyword replicas: The maximum number of replicas available for this SKU. - :paramtype replicas: int - :keyword partitions: The maximum number of partitions available for this SKU. - :paramtype partitions: int - """ - super().__init__(**kwargs) - self.indexes = indexes - self.indexers = indexers - self.partition_storage_in_gigabytes = partition_storage_in_gigabytes - self.partition_vector_storage_in_gigabytes = partition_vector_storage_in_gigabytes - self.search_units = search_units - self.replicas = replicas - self.partitions = partitions - - class SystemData(_serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -2883,14 +2563,14 @@ def __init__( self.last_modified_at = last_modified_at -class UserAssignedManagedIdentity(_serialization.Model): - """The details of the user assigned managed identity assigned to the search service. +class UserAssignedIdentity(_serialization.Model): + """User assigned identity properties. 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. + :ivar principal_id: The principal ID of the assigned identity. :vartype principal_id: str - :ivar client_id: The client ID of user assigned identity. + :ivar client_id: The client ID of the assigned identity. :vartype client_id: str """ @@ -2907,5 +2587,5 @@ class UserAssignedManagedIdentity(_serialization.Model): def __init__(self, **kwargs: Any) -> None: """ """ super().__init__(**kwargs) - self.principal_id = None - self.client_id = None + self.principal_id: Optional[str] = None + self.client_id: Optional[str] = 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 066476445868..fd0dcf43540b 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 @@ -23,6 +23,21 @@ class AadAuthFailureMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): of 401 (Unauthorized) and present a Bearer Challenge.""" +class AccessRuleDirection(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Direction of Access Rule.""" + + INBOUND = "Inbound" + """Applies to inbound network traffic to the secured resources.""" + OUTBOUND = "Outbound" + """Applies to outbound network traffic from the secured resources""" + + +class ActionType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.""" + + INTERNAL = "Internal" + + class AdminKeyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): """AdminKeyKind.""" @@ -33,12 +48,12 @@ class AdminKeyKind(str, Enum, metaclass=CaseInsensitiveEnumMeta): class ComputeType(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """Configure this property to support the search service using either the default compute or Azure + """Configure this property to support the search service using either the Default Compute or Azure Confidential Compute. """ DEFAULT = "default" - """Create the service with the default compute.""" + """Create the service with the Default Compute.""" CONFIDENTIAL = "confidential" """Create the service with Azure Confidential Compute.""" @@ -52,29 +67,6 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): KEY = "Key" -class FeatureName(str, Enum, metaclass=CaseInsensitiveEnumMeta): - """The name of the feature offered in this region.""" - - GROK = "Grok" - """Supports Grok feature.""" - IMAGE_VECTORIZATION = "ImageVectorization" - """Supports Image Vectorization feature.""" - DOCUMENT_INTELLIGENCE = "DocumentIntelligence" - """Supports Document Intelligence feature.""" - QUERY_REWRITE = "QueryRewrite" - """Supports Query Rewrite feature.""" - S3 = "S3" - """Supports S3 feature.""" - STORAGE_OPTIMIZED = "StorageOptimized" - """Supports Storage Optimized feature.""" - SEMANTIC_SEARCH = "SemanticSearch" - """Supports Semantic Search feature.""" - MEGA_STORE = "MegaStore" - """Supports Mega Store feature.""" - AVAILABILITY_ZONES = "AvailabilityZones" - """Supports Availability Zones feature.""" - - class HostingMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Applicable only for the standard3 SKU. You can set this property to enable up to 3 high density partitions that allow up to 1000 indexes, which is much higher than the maximum indexes allowed @@ -105,6 +97,46 @@ class IdentityType(str, Enum, metaclass=CaseInsensitiveEnumMeta): assignment of one or more user assigned identities.""" +class IssueType(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Type of issue.""" + + UNKNOWN = "Unknown" + """Unknown issue type""" + CONFIGURATION_PROPAGATION_FAILURE = "ConfigurationPropagationFailure" + """An error occurred while applying the network security perimeter (NSP) configuration.""" + MISSING_PERIMETER_CONFIGURATION = "MissingPerimeterConfiguration" + """A network connectivity issue is happening on the resource which could be addressed either by + adding new resources to the network security perimeter (NSP) or by modifying access rules.""" + MISSING_IDENTITY_CONFIGURATION = "MissingIdentityConfiguration" + """An managed identity hasn't been associated with the resource. The resource will still be able + to validate inbound traffic from the network security perimeter (NSP) or matching inbound + access rules, but it won't be able to perform outbound access as a member of the NSP.""" + + +class NetworkSecurityPerimeterConfigurationProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Provisioning state of a network security perimeter configuration that is being created or + updated. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + ACCEPTED = "Accepted" + FAILED = "Failed" + CANCELED = "Canceled" + + +class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is "user,system". + """ + + USER = "user" + SYSTEM = "system" + USER_SYSTEM = "user,system" + + class PrivateLinkServiceConnectionProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The provisioning state of the private link service connection. Valid values are Updating, Deleting, Failed, Succeeded, Incomplete, or Canceled. @@ -151,11 +183,11 @@ class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): search service. This is because the free service uses capacity that is already set up. """ - SUCCEEDED = "Succeeded" + SUCCEEDED = "succeeded" """The last provisioning operation has completed successfully.""" - PROVISIONING = "Provisioning" + PROVISIONING = "provisioning" """The search service is being provisioned or scaled up or down.""" - FAILED = "Failed" + FAILED = "failed" """The last provisioning operation has failed.""" @@ -170,6 +202,20 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "disabled" """The search service is not accessible from traffic originating from the public internet. Access is only permitted over approved private endpoint connections.""" + SECURED_BY_PERIMETER = "securedByPerimeter" + """The network security perimeter configuration rules allow or disallow public network access to + the resource. Requires an associated network security perimeter.""" + + +class ResourceAssociationAccessMode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Access mode of the resource association.""" + + ENFORCED = "Enforced" + """Enforced access mode - traffic to the resource that failed access checks is blocked""" + LEARNING = "Learning" + """Learning access mode - traffic to the resource is enabled for analysis but not blocked""" + AUDIT = "Audit" + """Audit access mode - traffic to the resource that fails access checks is logged but not blocked""" class SearchBypass(str, Enum, metaclass=CaseInsensitiveEnumMeta): @@ -178,18 +224,15 @@ class SearchBypass(str, Enum, metaclass=CaseInsensitiveEnumMeta): 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.""" AZURE_SERVICES = "AzureServices" """Indicates that requests originating from Azure trusted services can bypass the rules defined in the 'ipRules' section.""" -class SearchDisabledDataExfiltrationOption(str, Enum, metaclass=CaseInsensitiveEnumMeta): +class SearchDataExfiltrationProtection(str, Enum, metaclass=CaseInsensitiveEnumMeta): """A specific data exfiltration scenario that is disabled for the service.""" - ALL = "All" + BLOCK_ALL = "BlockAll" """Indicates that all data exfiltration scenarios are disabled.""" @@ -269,6 +312,13 @@ class SearchServiceStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The search service is in a subscription that's disabled.""" +class Severity(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Severity of the issue.""" + + WARNING = "Warning" + ERROR = "Error" + + class SharedPrivateLinkResourceAsyncOperationResult(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The current status of the long running asynchronous shared private link resource operation.""" @@ -348,3 +398,12 @@ class UnavailableNameReason(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The search service name doesn't match naming requirements.""" ALREADY_EXISTS = "AlreadyExists" """The search service name is already assigned to a different search service.""" + + +class UpgradeAvailable(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Indicates if the search service has an upgrade available.""" + + NOT_AVAILABLE = "notAvailable" + """An upgrade is currently not available for the service.""" + AVAILABLE = "available" + """There is an upgrade available for the 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 db5cfc541738..209140865c02 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +14,6 @@ from ._patch import * # pylint: disable=unused-wildcard-import from ._operations import Operations # type: ignore -from ._offerings_operations import OfferingsOperations # type: ignore from ._admin_keys_operations import AdminKeysOperations # type: ignore from ._query_keys_operations import QueryKeysOperations # type: ignore from ._services_operations import ServicesOperations # type: ignore @@ -30,7 +30,6 @@ __all__ = [ "Operations", - "OfferingsOperations", "AdminKeysOperations", "QueryKeysOperations", "ServicesOperations", 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 f58a210fca8c..fac68357d0f6 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,9 +6,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar, Union +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,12 +25,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,14 +46,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -88,14 +87,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -132,10 +131,10 @@ class AdminKeysOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def get( 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 index 30b823d9d8ed..7918ee134629 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Iterator, Optional, TypeVar, Union, cast import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -29,12 +31,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -48,14 +47,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) 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( @@ -81,14 +80,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) 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( @@ -122,14 +121,14 @@ def build_reconcile_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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) 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( @@ -171,10 +170,10 @@ class NetworkSecurityPerimeterConfigurationsOperations: # pylint: disable=name- 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_service( @@ -274,7 +273,7 @@ def get( :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. + :param nsp_config_name: The network security perimeter configuration name. Required. :type nsp_config_name: str :return: NetworkSecurityPerimeterConfiguration or the result of cls(response) :rtype: ~azure.mgmt.search.models.NetworkSecurityPerimeterConfiguration @@ -391,7 +390,7 @@ def begin_reconcile( :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. + :param nsp_config_name: The network security perimeter configuration name. Required. :type nsp_config_name: str :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_offerings_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_offerings_operations.py deleted file mode 100644 index 45180e68c906..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_offerings_operations.py +++ /dev/null @@ -1,150 +0,0 @@ -# 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. -# -------------------------------------------------------------------------- -import sys -from typing import Any, Callable, Dict, Iterable, Optional, TypeVar -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.rest import HttpRequest, HttpResponse -from azure.core.tracing.decorator import distributed_trace -from azure.core.utils import case_insensitive_dict -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models -from .._serialization import Serializer - -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore -T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - - -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", "2025-02-01-preview")) - accept = _headers.pop("Accept", "application/json") - - # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.Search/offerings") - - # 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) - - -class OfferingsOperations: - """ - .. warning:: - **DO NOT** instantiate this class directly. - - Instead, you should access the following operations through - :class:`~azure.mgmt.search.SearchManagementClient`'s - :attr:`offerings` 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(self, **kwargs: Any) -> Iterable["_models.OfferingsByRegion"]: - """Lists all of the features and SKUs offered by the Azure AI Search service in each region. - - :return: An iterator like instance of either OfferingsByRegion or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.search.models.OfferingsByRegion] - :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.OfferingsListResult] = kwargs.pop("cls", None) - - error_map: MutableMapping = { - 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_request( - api_version=api_version, - headers=_headers, - params=_params, - ) - _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.url = self._client.format_url(_request.url) - _request.method = "GET" - return _request - - def extract_data(pipeline_response): - deserialized = self._deserialize("OfferingsListResult", pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) # type: ignore - return 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) 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 ad0a0d32c15f..8889276054b3 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -42,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,10 +69,10 @@ class Operations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: 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 38bd864e066b..71feb3a8165d 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -26,12 +28,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +50,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -59,7 +58,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -98,14 +97,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -142,14 +141,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -185,14 +184,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -228,10 +227,10 @@ class PrivateEndpointConnectionsOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @overload def update( 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 8d736dc804d0..b87b7e77d687 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,14 +48,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -92,10 +91,10 @@ class PrivateLinkResourcesOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_supported( 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 11c2379550b0..44b48ce7634b 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,10 +6,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +27,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -50,14 +49,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -91,14 +90,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -132,14 +131,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -176,10 +175,10 @@ class QueryKeysOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def create( 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 1bd2c4ee34d9..95dceb8e547e 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 @@ -5,9 +5,10 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Optional, TypeVar +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -23,13 +24,10 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer -from .._vendor import SearchManagementClientMixinABC +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Serializer +from .._utils.utils import ClientMixinABC -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,14 +41,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Search/locations/{location}/usages/{skuName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "location": _SERIALIZER.url("location", location, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -70,7 +68,7 @@ def build_usage_by_subscription_sku_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -class SearchManagementClientOperationsMixin(SearchManagementClientMixinABC): +class SearchManagementClientOperationsMixin(ClientMixinABC[PipelineClient, SearchManagementClientConfiguration]): @distributed_trace def usage_by_subscription_sku( 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 74a9b296905e..2495ac684aeb 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 @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Literal, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -31,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +53,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -63,7 +61,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}", - ) # 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"), @@ -96,7 +94,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -104,7 +102,7 @@ def build_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}", - ) # 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"), @@ -137,14 +135,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -177,14 +175,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -212,14 +210,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -244,7 +242,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -272,7 +270,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -305,14 +303,14 @@ def build_upgrade_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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/upgrade", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -346,10 +344,10 @@ class ServicesOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_or_update_initial( self, @@ -445,9 +443,9 @@ def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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 @@ -486,9 +484,9 @@ def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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[bytes] @@ -525,9 +523,9 @@ def begin_create_or_update( :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. + 60 characters in length. Search service names must be 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[bytes] type. Required. 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 0a8bbf431c45..4d3140688bd7 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -5,11 +6,12 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from collections.abc import MutableMapping from io import IOBase -import sys from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -30,12 +32,9 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +54,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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -63,7 +62,7 @@ def build_create_or_update_request( _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -102,14 +101,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -146,14 +145,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), "searchServiceName": _SERIALIZER.url( @@ -189,14 +188,14 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources", - ) # pylint: disable=line-too-long + ) path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -232,10 +231,10 @@ class SharedPrivateLinkResourcesOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") def _create_or_update_initial( self, 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 b527183fa9d5..f0b8edc1f63d 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 @@ -5,10 +5,11 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys +from collections.abc import MutableMapping from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -25,12 +26,9 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._serialization import Serializer +from .._configuration import SearchManagementClientConfiguration +from .._utils.serialization import Deserializer, Serializer -if sys.version_info >= (3, 9): - from collections.abc import MutableMapping -else: - from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,13 +42,13 @@ 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", "2025-02-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Search/locations/{location}/usages" - ) # pylint: disable=line-too-long + ) path_format_arguments = { "location": _SERIALIZER.url("location", location, "str"), "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), @@ -83,10 +81,10 @@ class UsagesOperations: 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") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: SearchManagementClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace def list_by_subscription( 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 9f6625d93ffb..9dbb76eb08eb 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/CreateOrUpdateSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 9bd2626314b6..b440ebb62511 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/DeletePrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 2264a196489e..986e99f171a3 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/DeleteSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 9ae655ff4a69..2a9f9121d3f5 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetPrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 976f8fd1cafa..10fca222c5f5 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetQuotaUsage.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 89bf35f426b2..23c014367453 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetQuotaUsagesList.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 af54a5eec371..3e120aed0543 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/GetSharedPrivateLinkResource.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 541f38cff278..b42ce070b5cc 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListPrivateEndpointConnectionsByService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 e8daec3b282f..3eaadde56e07 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListSharedPrivateLinkResourcesByService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 9ce7c82a7afc..2dba89ec2b95 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/ListSupportedPrivateLinkResources.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index 5c7af4ee40be..d2ec65a5d388 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index 52a49088720e..4deb6e2a4f18 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index 6c95d3183c37..4908e6d6a617 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ).result() -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 220a13de75bd..a4e106c43b28 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 7a25dbcf4594..4bb60cc4d5bc 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceAuthOptions.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 bb6122f9de89..d6fbd65eafc8 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceDisableLocalAuth.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 68c0f33622b6..ce771e91015f 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPrivateEndpoints.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 7caefdcd1340..e3b15c60f4c3 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPs.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index f2cc81d01f2d..5b5e17f6e90c 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -39,7 +40,7 @@ def main(): "computeType": "default", "hostingMode": "default", "networkRuleSet": { - "bypass": "AzurePortal", + "bypass": "AzureServices", "ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}], }, "partitionCount": 1, @@ -52,6 +53,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 d957e2b08350..c6799a3592f7 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithCmkEnforcement.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index af61583249b2..6ee4ef665ae2 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,7 +38,7 @@ def main(): "location": "westus", "properties": { "computeType": "default", - "disabledDataExfiltrationOptions": ["All"], + "dataExfiltrationProtections": ["BlockAll"], "hostingMode": "default", "partitionCount": 1, "replicaCount": 3, @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithDataExfiltration.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 44dfe736534f..c9c1064db6db 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateServiceWithIdentity.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 03496766f6f3..b299d8378019 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -49,6 +50,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateOrUpdateWithSemanticSearch.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 15f76a8cd0b5..31aad29d4f24 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchCreateQueryKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 9bb6d3372568..0774d4fa17b3 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): ) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchDeleteQueryKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 fd78708a4be5..26484e702c01 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,6 +37,6 @@ def main(): ) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchDeleteService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 52ce1e98b366..c2b289105636 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetAdminKeys.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 5e7505e50e00..a9714a4a6609 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchGetService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchGetService.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_list_offerings.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_offerings.py deleted file mode 100644 index 551f28f83346..000000000000 --- a/sdk/search/azure-mgmt-search/generated_samples/search_list_offerings.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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_list_offerings.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="SUBSCRIPTION_ID", - ) - - response = client.offerings.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListOfferings.json -if __name__ == "__main__": - main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py b/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py index a7431ca1afc0..8083bbdc3c70 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_list_operations.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListOperations.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 256ef2ca8d34..a5f2f00ce61a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListQueryKeysBySearchService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 d3ecd3208fb0..be6a5037e875 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListServicesByResourceGroup.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 ea7647c56a5a..d27e8765b6af 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -35,6 +36,6 @@ def main(): print(item) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchListServicesBySubscription.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 4d8d40bda51a..fa29d6793400 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchRegenerateAdminKey.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 c2706755f0a5..62b97e69b0a9 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateService.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 5aacaabba3fc..e2d825ec1738 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -44,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceAuthOptions.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 24b5d78c54c9..df865f7b2455 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceDisableLocalAuth.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 b508108e46de..49de723443f9 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPrivateEndpoints.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 d317b20fdaee..4841626974d8 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPs.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index f8cc911d1240..dbcfd7e0b0b6 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -36,7 +37,7 @@ def main(): service={ "properties": { "networkRuleSet": { - "bypass": "AzurePortal", + "bypass": "AzureServices", "ipRules": [{"value": "123.4.5.6"}, {"value": "123.4.6.0/18"}], }, "partitionCount": 1, @@ -48,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToAllowAccessFromPublicCustomIPsAndBypass.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 076e291f7e9a..aa8e6de2047a 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -38,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceToRemoveIdentity.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 22ec0ad0a0ea..81fe58eb08ab 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithCmkEnforcement.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 index 768c7c0a4fc3..529b2f9f1ce5 100644 --- 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -34,13 +35,13 @@ def main(): resource_group_name="rg1", search_service_name="mysearchservice", service={ - "properties": {"disabledDataExfiltrationOptions": ["All"], "replicaCount": 2}, + "properties": {"dataExfiltrationProtections": ["BlockAll"], "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/2025-02-01-preview/examples/SearchUpdateServiceWithDataExfiltration.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/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 66a67aa9b9f6..dec0b5d81283 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSemanticSearch.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSemanticSearch.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_sku.py b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_sku.py index b0692ac2da94..51355afddbf3 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_sku.py +++ b/sdk/search/azure-mgmt-search/generated_samples/search_update_service_with_sku.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -41,6 +42,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/SearchUpdateServiceWithSku.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/SearchUpdateServiceWithSku.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 da715883a5e5..fa868c2b117c 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 @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -43,6 +44,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpdatePrivateEndpointConnection.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/UpdatePrivateEndpointConnection.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_samples/upgrade_search_service_to_latest_version.py b/sdk/search/azure-mgmt-search/generated_samples/upgrade_search_service_to_latest_version.py index f136dc361b6c..4a274175bb54 100644 --- a/sdk/search/azure-mgmt-search/generated_samples/upgrade_search_service_to_latest_version.py +++ b/sdk/search/azure-mgmt-search/generated_samples/upgrade_search_service_to_latest_version.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -37,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/preview/2025-02-01-preview/examples/UpgradeSearchServiceToLatestVersion.json +# x-ms-original-file: specification/search/resource-manager/Microsoft.Search/stable/2025-05-01/examples/UpgradeSearchServiceToLatestVersion.json if __name__ == "__main__": main() diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management.py index d0a2e3a0c5bd..4ed7ed23a7b9 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management.py @@ -24,7 +24,7 @@ def test_usage_by_subscription_sku(self, resource_group): response = self.client.usage_by_subscription_sku( location="str", sku_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations.py index 7d019ac207fd..b24cc56a7942 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations.py @@ -24,7 +24,7 @@ def test_admin_keys_get(self, resource_group): response = self.client.admin_keys.get( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_admin_keys_regenerate(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", key_kind="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations_async.py index 05e1acaaaabe..537e68ac8eb9 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_admin_keys_operations_async.py @@ -25,7 +25,7 @@ async def test_admin_keys_get(self, resource_group): response = await self.client.admin_keys.get( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_admin_keys_regenerate(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", key_kind="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_async.py index 18f8598bc4ca..4eb76cd346b6 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_async.py @@ -25,7 +25,7 @@ async def test_usage_by_subscription_sku(self, resource_group): response = await self.client.usage_by_subscription_sku( location="str", sku_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations.py index 9c868607cd8e..179d189e39c5 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations.py @@ -24,7 +24,7 @@ def test_network_security_perimeter_configurations_list_by_service(self, resourc response = self.client.network_security_perimeter_configurations.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_network_security_perimeter_configurations_get(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", nsp_config_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_network_security_perimeter_configurations_begin_reconcile(self, resourc resource_group_name=resource_group.name, search_service_name="str", nsp_config_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations_async.py index 19fc7bdabcdb..62476a20d40f 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_network_security_perimeter_configurations_operations_async.py @@ -25,7 +25,7 @@ async def test_network_security_perimeter_configurations_list_by_service(self, r response = self.client.network_security_perimeter_configurations.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_network_security_perimeter_configurations_get(self, resource_grou resource_group_name=resource_group.name, search_service_name="str", nsp_config_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -52,7 +52,7 @@ async def test_network_security_perimeter_configurations_begin_reconcile(self, r resource_group_name=resource_group.name, search_service_name="str", nsp_config_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations.py index 65ab1be8bad0..0917694f8a6a 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations.py @@ -22,7 +22,7 @@ def setup_method(self, method): @recorded_by_proxy def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations_async.py index bb81a4848c94..1746785cafd8 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_operations_async.py @@ -23,7 +23,7 @@ def setup_method(self, method): @recorded_by_proxy_async async def test_operations_list(self, resource_group): response = self.client.operations.list( - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations.py index a9175912c44e..e644d8c37dcb 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations.py @@ -38,9 +38,17 @@ def test_private_endpoint_connections_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -53,7 +61,7 @@ def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", private_endpoint_connection_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -66,7 +74,7 @@ def test_private_endpoint_connections_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", private_endpoint_connection_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -78,7 +86,7 @@ def test_private_endpoint_connections_list_by_service(self, resource_group): response = self.client.private_endpoint_connections.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations_async.py index 530364e717eb..40072d778937 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_endpoint_connections_operations_async.py @@ -39,9 +39,17 @@ async def test_private_endpoint_connections_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -54,7 +62,7 @@ async def test_private_endpoint_connections_get(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", private_endpoint_connection_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -67,7 +75,7 @@ async def test_private_endpoint_connections_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", private_endpoint_connection_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -79,7 +87,7 @@ async def test_private_endpoint_connections_list_by_service(self, resource_group response = self.client.private_endpoint_connections.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations.py index a8b333f2595d..8f0ba5742f82 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations.py @@ -24,7 +24,7 @@ def test_private_link_resources_list_supported(self, resource_group): response = self.client.private_link_resources.list_supported( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations_async.py index 1db5140fed86..127bfee7fac2 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_private_link_resources_operations_async.py @@ -25,7 +25,7 @@ async def test_private_link_resources_list_supported(self, resource_group): response = self.client.private_link_resources.list_supported( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations.py index 5224dd513560..fa89e0ce01ff 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations.py @@ -25,7 +25,7 @@ def test_query_keys_create(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -37,7 +37,7 @@ def test_query_keys_list_by_search_service(self, resource_group): response = self.client.query_keys.list_by_search_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -50,7 +50,7 @@ def test_query_keys_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", key="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations_async.py index 2c297a1f4427..8aab03e30b32 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_query_keys_operations_async.py @@ -26,7 +26,7 @@ async def test_query_keys_create(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -38,7 +38,7 @@ async def test_query_keys_list_by_search_service(self, resource_group): response = self.client.query_keys.list_by_search_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -51,7 +51,7 @@ async def test_query_keys_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", key="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations.py index a978ff9b56e3..9cf81f1c87c3 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations.py @@ -28,8 +28,8 @@ def test_services_begin_create_or_update(self, resource_group): "location": "str", "authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "str"}, "apiKeyOnly": {}}, "computeType": "str", + "dataExfiltrationProtections": ["str"], "disableLocalAuth": bool, - "disabledDataExfiltrationOptions": ["str"], "eTag": "str", "encryptionWithCmk": {"encryptionComplianceStatus": "str", "enforcement": "str"}, "endpoint": "str", @@ -58,6 +58,14 @@ def test_services_begin_create_or_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -65,7 +73,7 @@ def test_services_begin_create_or_update(self, resource_group): "publicNetworkAccess": "enabled", "replicaCount": 1, "semanticSearch": "str", - "serviceUpgradeDate": "2020-02-20 00:00:00", + "serviceUpgradedAt": "2020-02-20 00:00:00", "sharedPrivateLinkResources": [ { "id": "str", @@ -78,6 +86,14 @@ def test_services_begin_create_or_update(self, resource_group): "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -94,9 +110,9 @@ def test_services_begin_create_or_update(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "upgradeAvailable": bool, + "upgradeAvailable": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -111,8 +127,8 @@ def test_services_update(self, resource_group): service={ "authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "str"}, "apiKeyOnly": {}}, "computeType": "str", + "dataExfiltrationProtections": ["str"], "disableLocalAuth": bool, - "disabledDataExfiltrationOptions": ["str"], "eTag": "str", "encryptionWithCmk": {"encryptionComplianceStatus": "str", "enforcement": "str"}, "endpoint": "str", @@ -142,6 +158,14 @@ def test_services_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -149,7 +173,7 @@ def test_services_update(self, resource_group): "publicNetworkAccess": "enabled", "replicaCount": 1, "semanticSearch": "str", - "serviceUpgradeDate": "2020-02-20 00:00:00", + "serviceUpgradedAt": "2020-02-20 00:00:00", "sharedPrivateLinkResources": [ { "id": "str", @@ -162,6 +186,14 @@ def test_services_update(self, resource_group): "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -178,9 +210,9 @@ def test_services_update(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "upgradeAvailable": bool, + "upgradeAvailable": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -192,7 +224,7 @@ def test_services_get(self, resource_group): response = self.client.services.get( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -204,7 +236,7 @@ def test_services_delete(self, resource_group): response = self.client.services.delete( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -215,7 +247,7 @@ def test_services_delete(self, resource_group): def test_services_list_by_resource_group(self, resource_group): response = self.client.services.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -225,7 +257,7 @@ def test_services_list_by_resource_group(self, resource_group): @recorded_by_proxy def test_services_list_by_subscription(self, resource_group): response = self.client.services.list_by_subscription( - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself @@ -236,7 +268,7 @@ def test_services_list_by_subscription(self, resource_group): def test_services_check_name_availability(self, resource_group): response = self.client.services.check_name_availability( name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", type="searchServices", ) @@ -249,7 +281,7 @@ def test_services_begin_upgrade(self, resource_group): response = self.client.services.begin_upgrade( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations_async.py index b020f3189204..928292918ca3 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_services_operations_async.py @@ -30,8 +30,8 @@ async def test_services_begin_create_or_update(self, resource_group): "location": "str", "authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "str"}, "apiKeyOnly": {}}, "computeType": "str", + "dataExfiltrationProtections": ["str"], "disableLocalAuth": bool, - "disabledDataExfiltrationOptions": ["str"], "eTag": "str", "encryptionWithCmk": {"encryptionComplianceStatus": "str", "enforcement": "str"}, "endpoint": "str", @@ -60,6 +60,14 @@ async def test_services_begin_create_or_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -67,7 +75,7 @@ async def test_services_begin_create_or_update(self, resource_group): "publicNetworkAccess": "enabled", "replicaCount": 1, "semanticSearch": "str", - "serviceUpgradeDate": "2020-02-20 00:00:00", + "serviceUpgradedAt": "2020-02-20 00:00:00", "sharedPrivateLinkResources": [ { "id": "str", @@ -80,6 +88,14 @@ async def test_services_begin_create_or_update(self, resource_group): "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -96,9 +112,9 @@ async def test_services_begin_create_or_update(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "upgradeAvailable": bool, + "upgradeAvailable": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -114,8 +130,8 @@ async def test_services_update(self, resource_group): service={ "authOptions": {"aadOrApiKey": {"aadAuthFailureMode": "str"}, "apiKeyOnly": {}}, "computeType": "str", + "dataExfiltrationProtections": ["str"], "disableLocalAuth": bool, - "disabledDataExfiltrationOptions": ["str"], "eTag": "str", "encryptionWithCmk": {"encryptionComplianceStatus": "str", "enforcement": "str"}, "endpoint": "str", @@ -145,6 +161,14 @@ async def test_services_update(self, resource_group): }, "provisioningState": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -152,7 +176,7 @@ async def test_services_update(self, resource_group): "publicNetworkAccess": "enabled", "replicaCount": 1, "semanticSearch": "str", - "serviceUpgradeDate": "2020-02-20 00:00:00", + "serviceUpgradedAt": "2020-02-20 00:00:00", "sharedPrivateLinkResources": [ { "id": "str", @@ -165,6 +189,14 @@ async def test_services_update(self, resource_group): "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", } ], @@ -181,9 +213,9 @@ async def test_services_update(self, resource_group): }, "tags": {"str": "str"}, "type": "str", - "upgradeAvailable": bool, + "upgradeAvailable": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -195,7 +227,7 @@ async def test_services_get(self, resource_group): response = await self.client.services.get( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -207,7 +239,7 @@ async def test_services_delete(self, resource_group): response = await self.client.services.delete( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -218,7 +250,7 @@ async def test_services_delete(self, resource_group): async def test_services_list_by_resource_group(self, resource_group): response = self.client.services.list_by_resource_group( resource_group_name=resource_group.name, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -228,7 +260,7 @@ async def test_services_list_by_resource_group(self, resource_group): @recorded_by_proxy_async async def test_services_list_by_subscription(self, resource_group): response = self.client.services.list_by_subscription( - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself @@ -239,7 +271,7 @@ async def test_services_list_by_subscription(self, resource_group): async def test_services_check_name_availability(self, resource_group): response = await self.client.services.check_name_availability( name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", type="searchServices", ) @@ -253,7 +285,7 @@ async def test_services_begin_upgrade(self, resource_group): await self.client.services.begin_upgrade( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) ).result() # call '.result()' to poll until service return final result diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations.py index 1d8d15d74c2d..f38e1dae141a 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations.py @@ -36,9 +36,17 @@ def test_shared_private_link_resources_begin_create_or_update(self, resource_gro "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -51,7 +59,7 @@ def test_shared_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", shared_private_link_resource_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -64,7 +72,7 @@ def test_shared_private_link_resources_begin_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", shared_private_link_resource_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ).result() # call '.result()' to poll until service return final result # please add some check logic here by yourself @@ -76,7 +84,7 @@ def test_shared_private_link_resources_list_by_service(self, resource_group): response = self.client.shared_private_link_resources.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations_async.py index ed1fb76ee5e9..be86d33b544e 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_shared_private_link_resources_operations_async.py @@ -38,9 +38,17 @@ async def test_shared_private_link_resources_begin_create_or_update(self, resour "resourceRegion": "str", "status": "str", }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", + "createdBy": "str", + "createdByType": "str", + "lastModifiedAt": "2020-02-20 00:00:00", + "lastModifiedBy": "str", + "lastModifiedByType": "str", + }, "type": "str", }, - api_version="2025-02-01-preview", + api_version="2025-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -54,7 +62,7 @@ async def test_shared_private_link_resources_get(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", shared_private_link_resource_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) # please add some check logic here by yourself @@ -68,7 +76,7 @@ async def test_shared_private_link_resources_begin_delete(self, resource_group): resource_group_name=resource_group.name, search_service_name="str", shared_private_link_resource_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) ).result() # call '.result()' to poll until service return final result @@ -81,7 +89,7 @@ async def test_shared_private_link_resources_list_by_service(self, resource_grou response = self.client.shared_private_link_resources.list_by_service( resource_group_name=resource_group.name, search_service_name="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations.py index cff1765e1910..98cc7343b1be 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations.py @@ -23,7 +23,7 @@ def setup_method(self, method): def test_usages_list_by_subscription(self, resource_group): response = self.client.usages.list_by_subscription( location="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations_async.py b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations_async.py index 873981ba4766..c03f90fade77 100644 --- a/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations_async.py +++ b/sdk/search/azure-mgmt-search/generated_tests/test_search_management_usages_operations_async.py @@ -24,7 +24,7 @@ def setup_method(self, method): async def test_usages_list_by_subscription(self, resource_group): response = self.client.usages.list_by_subscription( location="str", - api_version="2025-02-01-preview", + api_version="2025-05-01", ) result = [r async for r in response] # please add some check logic here by yourself diff --git a/sdk/search/azure-mgmt-search/sdk_packaging.toml b/sdk/search/azure-mgmt-search/sdk_packaging.toml index 471215f884be..3f846434060f 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 = false +is_stable = true 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 9d3d278b3aab..31b5a197654f 100644 --- a/sdk/search/azure-mgmt-search/setup.py +++ b/sdk/search/azure-mgmt-search/setup.py @@ -49,11 +49,10 @@ 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 :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -77,7 +76,7 @@ "isodate>=0.6.1", "typing-extensions>=4.6.0", "azure-common>=1.1", - "azure-mgmt-core>=1.3.2", + "azure-mgmt-core>=1.5.0", ], - python_requires=">=3.8", + python_requires=">=3.9", ) From 1d6d1ab7757c6181dd4520148fb691c660d61dc1 Mon Sep 17 00:00:00 2001 From: ChenxiJiang333 Date: Thu, 15 May 2025 15:04:30 +0800 Subject: [PATCH 2/2] update changelog --- sdk/search/azure-mgmt-search/CHANGELOG.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sdk/search/azure-mgmt-search/CHANGELOG.md b/sdk/search/azure-mgmt-search/CHANGELOG.md index e6d21a2a6e1e..0b6e75f8372d 100644 --- a/sdk/search/azure-mgmt-search/CHANGELOG.md +++ b/sdk/search/azure-mgmt-search/CHANGELOG.md @@ -60,11 +60,7 @@ - Added enum `UpgradeAvailable` - Added model `UserAssignedIdentity` - Model `ServicesOperations` added method `begin_upgrade` - - Added model `NetworkSecurityPerimeterConfigurationsOperations` - - Method `PrivateEndpointConnectionsOperations.update` has a new overload `def update(self: None, resource_group_name: str, search_service_name: str, private_endpoint_connection_name: str, private_endpoint_connection: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` - - Method `ServicesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, search_service_name: str, service: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` - - Method `ServicesOperations.update` has a new overload `def update(self: None, resource_group_name: str, search_service_name: str, service: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` - - Method `SharedPrivateLinkResourcesOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_group_name: str, search_service_name: str, shared_private_link_resource_name: str, shared_private_link_resource: IO[bytes], search_management_request_options: Optional[SearchManagementRequestOptions], content_type: str)` + - Added operation group `NetworkSecurityPerimeterConfigurationsOperations` ## 9.2.0b3 (2025-04-02)