From c456ad03d135974c127e24c795e3e58cdd337abd Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 2 Sep 2020 03:33:53 +0000 Subject: [PATCH 1/3] Generated from ddd3cdf3c6715b17fe1b2f25045634dec6ee447c Re-add capitalizations where appropriate --- sdk/search/azure-mgmt-search/README.md | 30 +- .../azure/mgmt/search/__init__.py | 7 +- .../azure/mgmt/search/_configuration.py | 50 + ...client.py => _search_management_client.py} | 65 +- .../azure/mgmt/search/models/__init__.py | 131 +- .../azure/mgmt/search/models/_models.py | 1211 +++++++++++++++++ .../azure/mgmt/search/models/_models_py3.py | 1211 +++++++++++++++++ .../azure/mgmt/search/models/_paged_models.py | 92 ++ ....py => _search_management_client_enums.py} | 38 + .../mgmt/search/models/admin_key_result.py | 41 - .../search/models/admin_key_result_py3.py | 41 - .../models/check_name_availability_input.py | 48 - .../check_name_availability_input_py3.py | 48 - .../models/check_name_availability_output.py | 51 - .../check_name_availability_output_py3.py | 51 - .../azure/mgmt/search/models/identity.py | 48 - .../azure/mgmt/search/models/identity_py3.py | 48 - .../azure/mgmt/search/models/operation.py | 41 - .../mgmt/search/models/operation_display.py | 51 - .../search/models/operation_display_py3.py | 51 - .../mgmt/search/models/operation_paged.py | 27 - .../azure/mgmt/search/models/operation_py3.py | 41 - .../azure/mgmt/search/models/query_key.py | 41 - .../mgmt/search/models/query_key_paged.py | 27 - .../azure/mgmt/search/models/query_key_py3.py | 41 - .../azure/mgmt/search/models/resource.py | 61 - .../azure/mgmt/search/models/resource_py3.py | 61 - .../search_management_request_options.py | 30 - .../search_management_request_options_py3.py | 30 - .../mgmt/search/models/search_service.py | 124 -- .../search/models/search_service_paged.py | 27 - .../mgmt/search/models/search_service_py3.py | 124 -- .../azure/mgmt/search/models/sku.py | 39 - .../azure/mgmt/search/models/sku_py3.py | 39 - .../azure/mgmt/search/operations/__init__.py | 14 +- ...perations.py => _admin_keys_operations.py} | 18 +- .../{operations.py => _operations.py} | 20 +- ...private_endpoint_connections_operations.py | 374 +++++ .../_private_link_resources_operations.py | 126 ++ ...perations.py => _query_keys_operations.py} | 40 +- ..._operations.py => _services_operations.py} | 87 +- ...hared_private_link_resources_operations.py | 433 ++++++ sdk/search/azure-mgmt-search/setup.py | 6 +- 43 files changed, 3774 insertions(+), 1410 deletions(-) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/{search_management_client.py => _search_management_client.py} (59%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/models/{search_management_client_enums.py => _search_management_client_enums.py} (65%) delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{admin_keys_operations.py => _admin_keys_operations.py} (94%) rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{operations.py => _operations.py} (88%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{query_keys_operations.py => _query_keys_operations.py} (92%) rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{services_operations.py => _services_operations.py} (92%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py diff --git a/sdk/search/azure-mgmt-search/README.md b/sdk/search/azure-mgmt-search/README.md index 503608414dae..3a79ce7ad362 100644 --- a/sdk/search/azure-mgmt-search/README.md +++ b/sdk/search/azure-mgmt-search/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Search Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). - -## Usage - -For code examples, see [Search -Management](https://docs.microsoft.com/python/api/overview/azure/search) +For code examples, see [Search Management](https://docs.microsoft.com/python/api/overview/azure/search) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-search%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-search%2FREADME.png) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py index 3c614360eda6..1663dcf1d993 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .search_management_client import SearchManagementClient -from .version import VERSION +from ._configuration import SearchManagementClientConfiguration +from ._search_management_client import SearchManagementClient +__all__ = ['SearchManagementClient', 'SearchManagementClientConfiguration'] -__all__ = ['SearchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py new file mode 100644 index 000000000000..20d91c5fae29 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class SearchManagementClientConfiguration(AzureConfiguration): + """Configuration for SearchManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SearchManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 similarity index 59% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/search_management_client.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py index 9c86581dc538..bee2c3b01771 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 @@ -11,51 +11,20 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.admin_keys_operations import AdminKeysOperations -from .operations.query_keys_operations import QueryKeysOperations -from .operations.services_operations import ServicesOperations -from . import models - - -class SearchManagementClientConfiguration(AzureConfiguration): - """Configuration for SearchManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SearchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SearchManagementClientConfiguration +from .operations import Operations +from .operations import AdminKeysOperations +from .operations import QueryKeysOperations +from .operations import ServicesOperations +from .operations import PrivateLinkResourcesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import SharedPrivateLinkResourcesOperations +from . import models class SearchManagementClient(SDKClient): - """Client that can be used to manage Azure Search services and API keys. + """Client that can be used to manage Azure Cognitive Search services and API keys. :ivar config: Configuration for client. :vartype config: SearchManagementClientConfiguration @@ -68,6 +37,12 @@ class SearchManagementClient(SDKClient): :vartype query_keys: azure.mgmt.search.operations.QueryKeysOperations :ivar services: Services operations :vartype services: azure.mgmt.search.operations.ServicesOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.search.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.search.operations.PrivateEndpointConnectionsOperations + :ivar shared_private_link_resources: SharedPrivateLinkResources operations + :vartype shared_private_link_resources: azure.mgmt.search.operations.SharedPrivateLinkResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -86,7 +61,7 @@ def __init__( super(SearchManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-08-19' + self.api_version = '2020-08-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -98,3 +73,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.services = ServicesOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shared_private_link_resources = SharedPrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) 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 d09b7141363d..cdf2018bcd87 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 @@ -10,62 +10,129 @@ # -------------------------------------------------------------------------- try: - from .check_name_availability_input_py3 import CheckNameAvailabilityInput - from .check_name_availability_output_py3 import CheckNameAvailabilityOutput - from .admin_key_result_py3 import AdminKeyResult - from .query_key_py3 import QueryKey - from .sku_py3 import Sku - from .search_service_py3 import SearchService - from .identity_py3 import Identity - from .resource_py3 import Resource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .search_management_request_options_py3 import SearchManagementRequestOptions + from ._models_py3 import AdminKeyResult + from ._models_py3 import AsyncOperationResult + from ._models_py3 import AzureEntityResource + from ._models_py3 import CheckNameAvailabilityInput + from ._models_py3 import CheckNameAvailabilityOutput + from ._models_py3 import Identity + from ._models_py3 import IpRule + from ._models_py3 import NetworkRuleSet + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionProperties + from ._models_py3 import PrivateEndpointConnectionPropertiesPrivateEndpoint + from ._models_py3 import PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import ProxyResource + from ._models_py3 import QueryKey + from ._models_py3 import Resource + from ._models_py3 import SearchManagementRequestOptions + from ._models_py3 import SearchService + from ._models_py3 import SearchServiceUpdate + from ._models_py3 import ShareablePrivateLinkResourceProperties + from ._models_py3 import ShareablePrivateLinkResourceType + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import SharedPrivateLinkResourceProperties + from ._models_py3 import Sku + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): - from .check_name_availability_input import CheckNameAvailabilityInput - from .check_name_availability_output import CheckNameAvailabilityOutput - from .admin_key_result import AdminKeyResult - from .query_key import QueryKey - from .sku import Sku - from .search_service import SearchService - from .identity import Identity - from .resource import Resource - from .operation_display import OperationDisplay - from .operation import Operation - from .search_management_request_options import SearchManagementRequestOptions -from .operation_paged import OperationPaged -from .query_key_paged import QueryKeyPaged -from .search_service_paged import SearchServicePaged -from .search_management_client_enums import ( + from ._models import AdminKeyResult + from ._models import AsyncOperationResult + from ._models import AzureEntityResource + from ._models import CheckNameAvailabilityInput + from ._models import CheckNameAvailabilityOutput + from ._models import Identity + from ._models import IpRule + from ._models import NetworkRuleSet + from ._models import Operation + from ._models import OperationDisplay + from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointConnectionProperties + from ._models import PrivateEndpointConnectionPropertiesPrivateEndpoint + from ._models import PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import ProxyResource + from ._models import QueryKey + from ._models import Resource + from ._models import SearchManagementRequestOptions + from ._models import SearchService + from ._models import SearchServiceUpdate + from ._models import ShareablePrivateLinkResourceProperties + from ._models import ShareablePrivateLinkResourceType + from ._models import SharedPrivateLinkResource + from ._models import SharedPrivateLinkResourceProperties + from ._models import Sku + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged +from ._paged_models import PrivateLinkResourcePaged +from ._paged_models import QueryKeyPaged +from ._paged_models import SearchServicePaged +from ._paged_models import SharedPrivateLinkResourcePaged +from ._search_management_client_enums import ( UnavailableNameReason, SkuName, + PrivateLinkServiceConnectionStatus, + SharedPrivateLinkResourceStatus, + SharedPrivateLinkResourceProvisioningState, HostingMode, + PublicNetworkAccess, SearchServiceStatus, ProvisioningState, IdentityType, + SharedPrivateLinkResourceAsyncOperationResult, AdminKeyKind, ) __all__ = [ + 'AdminKeyResult', + 'AsyncOperationResult', + 'AzureEntityResource', 'CheckNameAvailabilityInput', 'CheckNameAvailabilityOutput', - 'AdminKeyResult', - 'QueryKey', - 'Sku', - 'SearchService', 'Identity', - 'Resource', - 'OperationDisplay', + 'IpRule', + 'NetworkRuleSet', 'Operation', + 'OperationDisplay', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionProperties', + 'PrivateEndpointConnectionPropertiesPrivateEndpoint', + 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'ProxyResource', + 'QueryKey', + 'Resource', 'SearchManagementRequestOptions', + 'SearchService', + 'SearchServiceUpdate', + 'ShareablePrivateLinkResourceProperties', + 'ShareablePrivateLinkResourceType', + 'SharedPrivateLinkResource', + 'SharedPrivateLinkResourceProperties', + 'Sku', + 'TrackedResource', 'OperationPaged', 'QueryKeyPaged', 'SearchServicePaged', + 'PrivateLinkResourcePaged', + 'PrivateEndpointConnectionPaged', + 'SharedPrivateLinkResourcePaged', 'UnavailableNameReason', 'SkuName', + 'PrivateLinkServiceConnectionStatus', + 'SharedPrivateLinkResourceStatus', + 'SharedPrivateLinkResourceProvisioningState', 'HostingMode', + 'PublicNetworkAccess', 'SearchServiceStatus', 'ProvisioningState', 'IdentityType', + 'SharedPrivateLinkResourceAsyncOperationResult', 'AdminKeyKind', ] diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py new file mode 100644 index 000000000000..30cd5a8d1ad5 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py @@ -0,0 +1,1211 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class AsyncOperationResult(Model): + """The details of a long running asynchronous shared private link resource + operation. + + :param status: The current status of the long running asynchronous shared + private link resource operation. Possible values include: 'Running', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceAsyncOperationResult + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class Resource(Model): + """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} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The search service name to validate. 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. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.search.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Describes a particular API error with an error code and a message. + + :param code: An error code that describes the error condition more + precisely than an HTTP status code. Can be used to programmatically handle + specific error cases. + :type code: str + :param message: A message that describes the error in detail and provides + debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.search.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: 'None', + 'SystemAssigned' + :type type: str or ~azure.mgmt.search.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class IpRule(Model): + """The IP restriction rule of the Azure Cognitive Search service. + + :param value: Value corresponding to a single IPv4 address (eg., + 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be + allowed. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpRule, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class NetworkRuleSet(Model): + """Network specific rules that determine how the Azure Cognitive Search + service may be reached. + + :param ip_rules: A list of IP restriction rules that defines the inbound + network(s) with allowing access to the search service endpoint. At the + meantime, all other public IP networks are blocked by the firewall. These + restriction rules are applied only when the 'publicNetworkAccess' of the + search service is 'enabled'; otherwise, traffic over public interface is + not allowed even with any public IP rules, and private endpoint + connections would be the exclusive access method. + :type ip_rules: list[~azure.mgmt.search.models.IpRule] + """ + + _attribute_map = { + 'ip_rules': {'key': 'ipRules', 'type': '[IpRule]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.ip_rules = kwargs.get('ip_rules', None) + + +class Operation(Model): + """Describes a REST API operation. + + 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}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that describes the operation. + + 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 + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None + + +class PrivateEndpointConnection(Resource): + """Describes an existing Private Endpoint connection to the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateEndpointConnectionProperties(Model): + """Describes the properties of an existing Private Endpoint connection to the + Azure Cognitive Search service. + + :param private_endpoint: The private endpoint resource from + Microsoft.Network provider. + :type private_endpoint: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint + :param private_link_service_connection_state: Describes the current state + of an existing Private Link Service connection to the Azure Private + Endpoint. + :type private_link_service_connection_state: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointConnectionPropertiesPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionPropertiesPrivateEndpoint(Model): + """The private endpoint resource from Microsoft.Network provider. + + :param id: The resource id of the private endpoint resource from + Microsoft.Network provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionPropertiesPrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState(Model): + """Describes the current state of an existing Private Link Service connection + to the Azure Private Endpoint. + + :param status: Status of the the private link service connection. Can be + Pending, Approved, Rejected, or Disconnected. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus + :param description: The description for the private link service + connection state. + :type description: str + :param actions_required: A description of any extra actions that may be + required. Default value: "None" . + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'PrivateLinkServiceConnectionStatus'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', "None") + + +class PrivateLinkResource(Resource): + """Describes a supported private link resource for the Azure Cognitive Search + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: Describes the properties of a supported private link + resource for the Azure Cognitive Search service. + :vartype properties: + ~azure.mgmt.search.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Describes the properties of a supported private link resource for the Azure + Cognitive Search service. For a given API version, this represents the + 'supported' groupIds when creating a shared private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The group ID of the private link resource. + :vartype group_id: str + :ivar required_members: The list of required members of the private link + resource. + :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] + :ivar shareable_private_link_resource_types: The list of resources that + are onboarded to private link service, that are supported by Azure + Cognitive Search. + :vartype shareable_private_link_resource_types: + list[~azure.mgmt.search.models.ShareablePrivateLinkResourceType] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + 'shareable_private_link_resource_types': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'shareable_private_link_resource_types': {'key': 'shareablePrivateLinkResourceTypes', 'type': '[ShareablePrivateLinkResourceType]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + self.shareable_private_link_resource_types = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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): + super(ProxyResource, self).__init__(**kwargs) + + +class QueryKey(Model): + """Describes an API key for a given Azure Cognitive Search service that has + permissions for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None + + +class SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class SearchService(TrackedResource): + """Describes an Azure Cognitive Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, **kwargs): + super(SearchService, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") + self.public_network_access = kwargs.get('public_network_access', "enabled") + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = kwargs.get('network_rule_set', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + + +class SearchServiceUpdate(Resource): + """The parameters used to update an Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, **kwargs): + super(SearchServiceUpdate, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") + self.public_network_access = kwargs.get('public_network_access', "enabled") + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = kwargs.get('network_rule_set', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = kwargs.get('sku', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class ShareablePrivateLinkResourceProperties(Model): + """Describes the properties of a resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The resource provider type for the resource that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype type: str + :ivar group_id: The resource provider group id for the resource that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype group_id: str + :ivar description: The description of the resource type that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype description: str + """ + + _validation = { + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShareablePrivateLinkResourceProperties, self).__init__(**kwargs) + self.type = None + self.group_id = None + self.description = None + + +class ShareablePrivateLinkResourceType(Model): + """Describes an resource type that has been onboarded to private link service, + supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + :vartype name: str + :ivar properties: Describes the properties of a resource type that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype properties: + ~azure.mgmt.search.models.ShareablePrivateLinkResourceProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ShareablePrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(ShareablePrivateLinkResourceType, self).__init__(**kwargs) + self.name = None + self.properties = None + + +class SharedPrivateLinkResource(Resource): + """Describes a Shared Private Link Resource managed by the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'SharedPrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SharedPrivateLinkResourceProperties(Model): + """Describes the properties of an existing Shared Private Link Resource + managed by the Azure Cognitive Search service. + + :param private_link_resource_id: The resource id of the resource the + shared private link resource is for. + :type private_link_resource_id: str + :param group_id: The group id from the provider of resource the shared + private link resource is for. + :type group_id: str + :param request_message: The request message for requesting approval of the + shared private link resource. + :type request_message: str + :param resource_region: Optional. Can be used to specify the Azure + Resource Manager location of the resource to which a shared private link + is to be created. This is only required for those resources whose DNS + configuration are regional (such as Azure Kubernetes Service). + :type resource_region: str + :param status: Status of the shared private link resource. Can be Pending, + Approved, Rejected or Disconnected. Possible values include: 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus + :param provisioning_state: The provisioning state of the shared private + link resource. Can be Updating, Deleting, Failed, Succeeded or Incomplete. + Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded', + 'Incomplete' + :type provisioning_state: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState + """ + + _attribute_map = { + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'resource_region': {'key': 'resourceRegion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'SharedPrivateLinkResourceStatus'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'SharedPrivateLinkResourceProvisioningState'}, + } + + def __init__(self, **kwargs): + super(SharedPrivateLinkResourceProperties, self).__init__(**kwargs) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.group_id = kwargs.get('group_id', None) + self.request_message = kwargs.get('request_message', None) + self.resource_region = kwargs.get('resource_region', None) + self.status = kwargs.get('status', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class Sku(Model): + """Defines the SKU of an Azure Cognitive Search Service, which determines + price tier and capacity limits. + + :param name: The SKU of the search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': The largest Standard offering with up to 12 partitions and 12 + replicas (or up to 3 partitions with more indexes if you also set the + hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports + 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports + 2TB per partition, up to 12 partitions.'. Possible values include: 'free', + 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', + 'storage_optimized_l2' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) 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 new file mode 100644 index 000000000000..415d191c832b --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py @@ -0,0 +1,1211 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class AsyncOperationResult(Model): + """The details of a long running asynchronous shared private link resource + operation. + + :param status: The current status of the long running asynchronous shared + private link resource operation. Possible values include: 'Running', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceAsyncOperationResult + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = status + + +class Resource(Model): + """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} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The search service name to validate. 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. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.search.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Describes a particular API error with an error code and a message. + + :param code: An error code that describes the error condition more + precisely than an HTTP status code. Can be used to programmatically handle + specific error cases. + :type code: str + :param message: A message that describes the error in detail and provides + debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.search.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: 'None', + 'SystemAssigned' + :type type: str or ~azure.mgmt.search.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, *, type, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class IpRule(Model): + """The IP restriction rule of the Azure Cognitive Search service. + + :param value: Value corresponding to a single IPv4 address (eg., + 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be + allowed. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(IpRule, self).__init__(**kwargs) + self.value = value + + +class NetworkRuleSet(Model): + """Network specific rules that determine how the Azure Cognitive Search + service may be reached. + + :param ip_rules: A list of IP restriction rules that defines the inbound + network(s) with allowing access to the search service endpoint. At the + meantime, all other public IP networks are blocked by the firewall. These + restriction rules are applied only when the 'publicNetworkAccess' of the + search service is 'enabled'; otherwise, traffic over public interface is + not allowed even with any public IP rules, and private endpoint + connections would be the exclusive access method. + :type ip_rules: list[~azure.mgmt.search.models.IpRule] + """ + + _attribute_map = { + 'ip_rules': {'key': 'ipRules', 'type': '[IpRule]'}, + } + + def __init__(self, *, ip_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.ip_rules = ip_rules + + +class Operation(Model): + """Describes a REST API operation. + + 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}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that describes the operation. + + 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 + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None + + +class PrivateEndpointConnection(Resource): + """Describes an existing Private Endpoint connection to the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = properties + + +class PrivateEndpointConnectionProperties(Model): + """Describes the properties of an existing Private Endpoint connection to the + Azure Cognitive Search service. + + :param private_endpoint: The private endpoint resource from + Microsoft.Network provider. + :type private_endpoint: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint + :param private_link_service_connection_state: Describes the current state + of an existing Private Link Service connection to the Azure Private + Endpoint. + :type private_link_service_connection_state: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointConnectionPropertiesPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionPropertiesPrivateEndpoint(Model): + """The private endpoint resource from Microsoft.Network provider. + + :param id: The resource id of the private endpoint resource from + Microsoft.Network provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PrivateEndpointConnectionPropertiesPrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState(Model): + """Describes the current state of an existing Private Link Service connection + to the Azure Private Endpoint. + + :param status: Status of the the private link service connection. Can be + Pending, Approved, Rejected, or Disconnected. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus + :param description: The description for the private link service + connection state. + :type description: str + :param actions_required: A description of any extra actions that may be + required. Default value: "None" . + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'PrivateLinkServiceConnectionStatus'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, actions_required: str="None", **kwargs) -> None: + super(PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(Resource): + """Describes a supported private link resource for the Azure Cognitive Search + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: Describes the properties of a supported private link + resource for the Azure Cognitive Search service. + :vartype properties: + ~azure.mgmt.search.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Describes the properties of a supported private link resource for the Azure + Cognitive Search service. For a given API version, this represents the + 'supported' groupIds when creating a shared private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The group ID of the private link resource. + :vartype group_id: str + :ivar required_members: The list of required members of the private link + resource. + :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] + :ivar shareable_private_link_resource_types: The list of resources that + are onboarded to private link service, that are supported by Azure + Cognitive Search. + :vartype shareable_private_link_resource_types: + list[~azure.mgmt.search.models.ShareablePrivateLinkResourceType] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + 'shareable_private_link_resource_types': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'shareable_private_link_resource_types': {'key': 'shareablePrivateLinkResourceTypes', 'type': '[ShareablePrivateLinkResourceType]'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + self.shareable_private_link_resource_types = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class QueryKey(Model): + """Describes an API key for a given Azure Cognitive Search service that has + permissions for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None + + +class SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, **kwargs) -> None: + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = client_request_id + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class SearchService(TrackedResource): + """Describes an Azure Cognitive Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, *, location: str, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", public_network_access="enabled", network_rule_set=None, sku=None, identity=None, **kwargs) -> None: + super(SearchService, self).__init__(tags=tags, location=location, **kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.public_network_access = public_network_access + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = network_rule_set + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = sku + self.identity = identity + + +class SearchServiceUpdate(Resource): + """The parameters used to update an Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, *, replica_count: int=1, partition_count: int=1, hosting_mode="default", public_network_access="enabled", network_rule_set=None, sku=None, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(SearchServiceUpdate, self).__init__(**kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.public_network_access = public_network_access + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = network_rule_set + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = sku + self.location = location + self.tags = tags + self.identity = identity + + +class ShareablePrivateLinkResourceProperties(Model): + """Describes the properties of a resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The resource provider type for the resource that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype type: str + :ivar group_id: The resource provider group id for the resource that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype group_id: str + :ivar description: The description of the resource type that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype description: str + """ + + _validation = { + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ShareablePrivateLinkResourceProperties, self).__init__(**kwargs) + self.type = None + self.group_id = None + self.description = None + + +class ShareablePrivateLinkResourceType(Model): + """Describes an resource type that has been onboarded to private link service, + supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + :vartype name: str + :ivar properties: Describes the properties of a resource type that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype properties: + ~azure.mgmt.search.models.ShareablePrivateLinkResourceProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ShareablePrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(ShareablePrivateLinkResourceType, self).__init__(**kwargs) + self.name = None + self.properties = None + + +class SharedPrivateLinkResource(Resource): + """Describes a Shared Private Link Resource managed by the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'SharedPrivateLinkResourceProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.properties = properties + + +class SharedPrivateLinkResourceProperties(Model): + """Describes the properties of an existing Shared Private Link Resource + managed by the Azure Cognitive Search service. + + :param private_link_resource_id: The resource id of the resource the + shared private link resource is for. + :type private_link_resource_id: str + :param group_id: The group id from the provider of resource the shared + private link resource is for. + :type group_id: str + :param request_message: The request message for requesting approval of the + shared private link resource. + :type request_message: str + :param resource_region: Optional. Can be used to specify the Azure + Resource Manager location of the resource to which a shared private link + is to be created. This is only required for those resources whose DNS + configuration are regional (such as Azure Kubernetes Service). + :type resource_region: str + :param status: Status of the shared private link resource. Can be Pending, + Approved, Rejected or Disconnected. Possible values include: 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus + :param provisioning_state: The provisioning state of the shared private + link resource. Can be Updating, Deleting, Failed, Succeeded or Incomplete. + Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded', + 'Incomplete' + :type provisioning_state: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState + """ + + _attribute_map = { + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'resource_region': {'key': 'resourceRegion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'SharedPrivateLinkResourceStatus'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'SharedPrivateLinkResourceProvisioningState'}, + } + + def __init__(self, *, private_link_resource_id: str=None, group_id: str=None, request_message: str=None, resource_region: str=None, status=None, provisioning_state=None, **kwargs) -> None: + super(SharedPrivateLinkResourceProperties, self).__init__(**kwargs) + self.private_link_resource_id = private_link_resource_id + self.group_id = group_id + self.request_message = request_message + self.resource_region = resource_region + self.status = status + self.provisioning_state = provisioning_state + + +class Sku(Model): + """Defines the SKU of an Azure Cognitive Search Service, which determines + price tier and capacity limits. + + :param name: The SKU of the search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': The largest Standard offering with up to 12 partitions and 12 + replicas (or up to 3 partitions with more indexes if you also set the + hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports + 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports + 2TB per partition, up to 12 partitions.'. Possible values include: 'free', + 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', + 'storage_optimized_l2' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py new file mode 100644 index 000000000000..09c08af3b5a2 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py @@ -0,0 +1,92 @@ +# 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 msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class QueryKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`QueryKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[QueryKey]'} + } + + def __init__(self, *args, **kwargs): + + super(QueryKeyPaged, self).__init__(*args, **kwargs) +class SearchServicePaged(Paged): + """ + A paging container for iterating over a list of :class:`SearchService ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SearchService]'} + } + + def __init__(self, *args, **kwargs): + + super(SearchServicePaged, self).__init__(*args, **kwargs) +class PrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) +class SharedPrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedPrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedPrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedPrivateLinkResourcePaged, self).__init__(*args, **kwargs) 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 similarity index 65% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py index cf76e9f19b0d..18b26a59613e 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 @@ -29,12 +29,43 @@ class SkuName(str, Enum): storage_optimized_l2 = "storage_optimized_l2" +class PrivateLinkServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class SharedPrivateLinkResourceStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class SharedPrivateLinkResourceProvisioningState(str, Enum): + + updating = "Updating" + deleting = "Deleting" + failed = "Failed" + succeeded = "Succeeded" + incomplete = "Incomplete" + + class HostingMode(str, Enum): default = "default" high_density = "highDensity" +class PublicNetworkAccess(str, Enum): + + enabled = "enabled" + disabled = "disabled" + + class SearchServiceStatus(str, Enum): running = "running" @@ -58,6 +89,13 @@ class IdentityType(str, Enum): system_assigned = "SystemAssigned" +class SharedPrivateLinkResourceAsyncOperationResult(str, Enum): + + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + + class AdminKeyKind(str, Enum): primary = "primary" diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py deleted file mode 100644 index bfeabe50e70e..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class AdminKeyResult(Model): - """Response containing the primary and secondary admin API keys for a given - Azure Search service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The primary admin API key of the Search service. - :vartype primary_key: str - :ivar secondary_key: The secondary admin API key of the Search service. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdminKeyResult, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py deleted file mode 100644 index 29217db297ce..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class AdminKeyResult(Model): - """Response containing the primary and secondary admin API keys for a given - Azure Search service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The primary admin API key of the Search service. - :vartype primary_key: str - :ivar secondary_key: The secondary admin API key of the Search service. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AdminKeyResult, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py deleted file mode 100644 index 053e06fd8f43..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class CheckNameAvailabilityInput(Model): - """Input of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Search service name to validate. 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. - :type name: str - :ivar type: Required. The type of the resource whose name is to be - validated. This value must always be 'searchServices'. Default value: - "searchServices" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "searchServices" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityInput, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py deleted file mode 100644 index 012969c50154..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class CheckNameAvailabilityInput(Model): - """Input of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Search service name to validate. 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. - :type name: str - :ivar type: Required. The type of the resource whose name is to be - validated. This value must always be 'searchServices'. Default value: - "searchServices" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "searchServices" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityInput, self).__init__(**kwargs) - self.name = name diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py deleted file mode 100644 index 12b592e51574..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class CheckNameAvailabilityOutput(Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar is_name_available: A value indicating whether the name is available. - :vartype is_name_available: bool - :ivar reason: The reason why the name is not available. 'Invalid' - indicates the name provided does not match the naming requirements - (incorrect length, unsupported characters, etc.). 'AlreadyExists' - indicates that the name is already in use and is therefore unavailable. - Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason - :ivar message: A message that explains why the name is invalid and - provides resource naming requirements. Available only if 'Invalid' is - returned in the 'reason' property. - :vartype message: str - """ - - _validation = { - 'is_name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityOutput, self).__init__(**kwargs) - self.is_name_available = None - self.reason = None - self.message = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py deleted file mode 100644 index bbffe7f214e1..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class CheckNameAvailabilityOutput(Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar is_name_available: A value indicating whether the name is available. - :vartype is_name_available: bool - :ivar reason: The reason why the name is not available. 'Invalid' - indicates the name provided does not match the naming requirements - (incorrect length, unsupported characters, etc.). 'AlreadyExists' - indicates that the name is already in use and is therefore unavailable. - Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason - :ivar message: A message that explains why the name is invalid and - provides resource naming requirements. Available only if 'Invalid' is - returned in the 'reason' property. - :vartype message: str - """ - - _validation = { - 'is_name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityOutput, self).__init__(**kwargs) - self.is_name_available = None - self.reason = None - self.message = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py deleted file mode 100644 index 5d6912d964ce..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: Required. The identity type. Possible values include: 'None', - 'SystemAssigned' - :type type: str or ~azure.mgmt.search.models.IdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'IdentityType'}, - } - - def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py deleted file mode 100644 index 61d3064568ae..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: Required. The identity type. Possible values include: 'None', - 'SystemAssigned' - :type type: str or ~azure.mgmt.search.models.IdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'IdentityType'}, - } - - def __init__(self, *, type, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py deleted file mode 100644 index 7269ad98e425..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class Operation(Model): - """Describes a REST API operation. - - 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}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.search.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py deleted file mode 100644 index 0c4d5975dc8d..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - 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 - """ - - _validation = { - 'provider': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.operation = None - self.resource = None - self.description = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py deleted file mode 100644 index a1e6e6bfc353..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - 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 - """ - - _validation = { - 'provider': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.operation = None - self.resource = None - self.description = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py deleted file mode 100644 index 6aaeff67cdb2..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py deleted file mode 100644 index 1b4dbae10d28..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class Operation(Model): - """Describes a REST API operation. - - 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}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.search.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py deleted file mode 100644 index 4b4f282ed5eb..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class QueryKey(Model): - """Describes an API key for a given Azure Search service that has permissions - for query operations only. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the query API key; may be empty. - :vartype name: str - :ivar key: The value of the query API key. - :vartype key: str - """ - - _validation = { - 'name': {'readonly': True}, - 'key': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryKey, self).__init__(**kwargs) - self.name = None - self.key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py deleted file mode 100644 index f1fc2d9aade8..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class QueryKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryKey]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py deleted file mode 100644 index e02c33495eed..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class QueryKey(Model): - """Describes an API key for a given Azure Search service that has permissions - for query operations only. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the query API key; may be empty. - :vartype name: str - :ivar key: The value of the query API key. - :vartype key: str - """ - - _validation = { - 'name': {'readonly': True}, - 'key': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(QueryKey, self).__init__(**kwargs) - self.name = None - self.key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py deleted file mode 100644 index 8dc5dd8833f9..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py +++ /dev/null @@ -1,61 +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 msrest.serialization import Model - - -class Resource(Model): - """Base type for all Azure resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py deleted file mode 100644 index 752e7a2cbbb9..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py +++ /dev/null @@ -1,61 +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 msrest.serialization import Model - - -class Resource(Model): - """Base type for all Azure resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.identity = identity diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py deleted file mode 100644 index 96e0dc7df52e..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class SearchManagementRequestOptions(Model): - """Additional parameters for a set of operations. - - :param client_request_id: A client-generated GUID value that identifies - this request. If specified, this will be included in response information - as a way to track the request. - :type client_request_id: str - """ - - _attribute_map = { - 'client_request_id': {'key': '', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchManagementRequestOptions, self).__init__(**kwargs) - self.client_request_id = kwargs.get('client_request_id', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py deleted file mode 100644 index 3e36e9a15800..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class SearchManagementRequestOptions(Model): - """Additional parameters for a set of operations. - - :param client_request_id: A client-generated GUID value that identifies - this request. If specified, this will be included in response information - as a way to track the request. - :type client_request_id: str - """ - - _attribute_map = { - 'client_request_id': {'key': '', 'type': 'str'}, - } - - def __init__(self, *, client_request_id: str=None, **kwargs) -> None: - super(SearchManagementRequestOptions, self).__init__(**kwargs) - self.client_request_id = client_request_id diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py deleted file mode 100644 index 6bd3de6791de..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py +++ /dev/null @@ -1,124 +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 .resource import Resource - - -class SearchService(Resource): - """Describes an Azure Search service and its current state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - :param 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. Default value: 1 . - :type replica_count: int - :param partition_count: The number of partitions in the Search service; if - specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only - valid for standard SKUs. For 'standard3' services with hostingMode set to - 'highDensity', the allowed values are between 1 and 3. Default value: 1 . - :type partition_count: int - :param hosting_mode: 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 for - any other SKU. For the standard3 SKU, the value is either 'default' or - 'highDensity'. For all other SKUs, this value must be 'default'. Possible - values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode - :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 service is being provisioned or - scaled up or down. 'deleting': The Search service is being deleted. - 'degraded': The Search service is degraded. This can occur when the - underlying search units are not healthy. The Search service is most likely - operational, but performance might be slow and some requests might be - dropped. 'disabled': The Search service is disabled. In this state, the - service will reject all API requests. 'error': The Search service is in an - error state. If your service is in the degraded, disabled, or error - states, it means the Azure Search team is actively investigating the - underlying issue. Dedicated services in these states are still chargeable - based on the number of search units provisioned. Possible values include: - 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus - :ivar status_details: The details of the Search service status. - :vartype status_details: str - :ivar provisioning_state: The state of the last provisioning operation - performed on the Search service. Provisioning is an intermediate state - that occurs while service capacity is being established. After capacity is - set up, provisioningState changes to either 'succeeded' or 'failed'. - Client applications can poll provisioning status (the recommended polling - interval is 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. Possible values include: 'succeeded', - 'provisioning', 'failed' - :vartype provisioning_state: str or - ~azure.mgmt.search.models.ProvisioningState - :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. This property is required when creating a new Search - Service. - :type sku: ~azure.mgmt.search.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'replica_count': {'maximum': 12, 'minimum': 1}, - 'partition_count': {'maximum': 12, 'minimum': 1}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, - 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, - 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(SearchService, self).__init__(**kwargs) - self.replica_count = kwargs.get('replica_count', 1) - self.partition_count = kwargs.get('partition_count', 1) - self.hosting_mode = kwargs.get('hosting_mode', "default") - self.status = None - self.status_details = None - self.provisioning_state = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py deleted file mode 100644 index dbb3236affea..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class SearchServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`SearchService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SearchService]'} - } - - def __init__(self, *args, **kwargs): - - super(SearchServicePaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py deleted file mode 100644 index 823afff5b9a5..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py +++ /dev/null @@ -1,124 +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 .resource_py3 import Resource - - -class SearchService(Resource): - """Describes an Azure Search service and its current state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - :param 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. Default value: 1 . - :type replica_count: int - :param partition_count: The number of partitions in the Search service; if - specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only - valid for standard SKUs. For 'standard3' services with hostingMode set to - 'highDensity', the allowed values are between 1 and 3. Default value: 1 . - :type partition_count: int - :param hosting_mode: 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 for - any other SKU. For the standard3 SKU, the value is either 'default' or - 'highDensity'. For all other SKUs, this value must be 'default'. Possible - values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode - :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 service is being provisioned or - scaled up or down. 'deleting': The Search service is being deleted. - 'degraded': The Search service is degraded. This can occur when the - underlying search units are not healthy. The Search service is most likely - operational, but performance might be slow and some requests might be - dropped. 'disabled': The Search service is disabled. In this state, the - service will reject all API requests. 'error': The Search service is in an - error state. If your service is in the degraded, disabled, or error - states, it means the Azure Search team is actively investigating the - underlying issue. Dedicated services in these states are still chargeable - based on the number of search units provisioned. Possible values include: - 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus - :ivar status_details: The details of the Search service status. - :vartype status_details: str - :ivar provisioning_state: The state of the last provisioning operation - performed on the Search service. Provisioning is an intermediate state - that occurs while service capacity is being established. After capacity is - set up, provisioningState changes to either 'succeeded' or 'failed'. - Client applications can poll provisioning status (the recommended polling - interval is 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. Possible values include: 'succeeded', - 'provisioning', 'failed' - :vartype provisioning_state: str or - ~azure.mgmt.search.models.ProvisioningState - :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. This property is required when creating a new Search - Service. - :type sku: ~azure.mgmt.search.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'replica_count': {'maximum': 12, 'minimum': 1}, - 'partition_count': {'maximum': 12, 'minimum': 1}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, - 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, - 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: - super(SearchService, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.replica_count = replica_count - self.partition_count = partition_count - self.hosting_mode = hosting_mode - self.status = None - self.status_details = None - self.provisioning_state = None - self.sku = sku diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py deleted file mode 100644 index 375894ee72ca..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Sku(Model): - """Defines the SKU of an Azure Search Service, which determines price tier and - capacity limits. - - :param name: The SKU of the Search service. Valid values include: 'free': - Shared service. 'basic': Dedicated service with up to 3 replicas. - 'standard': Dedicated service with up to 12 partitions and 12 replicas. - 'standard2': Similar to standard, but with more capacity per search unit. - 'standard3': The largest Standard offering with up to 12 partitions and 12 - replicas (or up to 3 partitions with more indexes if you also set the - hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports - 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports - 2TB per partition, up to 12 partitions.'. Possible values include: 'free', - 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', - 'storage_optimized_l2' - :type name: str or ~azure.mgmt.search.models.SkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py deleted file mode 100644 index aae43fc4e4b7..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Sku(Model): - """Defines the SKU of an Azure Search Service, which determines price tier and - capacity limits. - - :param name: The SKU of the Search service. Valid values include: 'free': - Shared service. 'basic': Dedicated service with up to 3 replicas. - 'standard': Dedicated service with up to 12 partitions and 12 replicas. - 'standard2': Similar to standard, but with more capacity per search unit. - 'standard3': The largest Standard offering with up to 12 partitions and 12 - replicas (or up to 3 partitions with more indexes if you also set the - hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports - 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports - 2TB per partition, up to 12 partitions.'. Possible values include: 'free', - 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', - 'storage_optimized_l2' - :type name: str or ~azure.mgmt.search.models.SkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name 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 4b49a00e8eb1..be7923d1fb0f 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 @@ -9,14 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .admin_keys_operations import AdminKeysOperations -from .query_keys_operations import QueryKeysOperations -from .services_operations import ServicesOperations +from ._operations import Operations +from ._admin_keys_operations import AdminKeysOperations +from ._query_keys_operations import QueryKeysOperations +from ._services_operations import ServicesOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._shared_private_link_resources_operations import SharedPrivateLinkResourcesOperations __all__ = [ 'Operations', 'AdminKeysOperations', 'QueryKeysOperations', 'ServicesOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', + 'SharedPrivateLinkResourcesOperations', ] 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 similarity index 94% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py index 7887d302f3d4..c1c06571498d 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 @@ -19,11 +19,13 @@ class AdminKeysOperations(object): """AdminKeysOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,21 +35,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): """Gets the primary and secondary admin API keys for the specified Azure - Search service. + Cognitive Search service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -102,7 +104,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdminKeyResult', response) @@ -122,8 +123,8 @@ def regenerate( current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. Possible values include: 'primary', @@ -183,7 +184,6 @@ def regenerate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdminKeyResult', response) 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 similarity index 88% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py index c83587eafb24..0039448d7c60 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 @@ -19,11 +19,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.search.models.OperationPaged[~azure.mgmt.search.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Search/operations'} 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 new file mode 100644 index 000000000000..746543c3405f --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,374 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + def update( + self, resource_group_name, search_service_name, private_endpoint_connection_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Updates a Private Endpoint connection to the search service in the + given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + private_endpoint_connection = models.PrivateEndpointConnection(properties=properties) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get( + self, resource_group_name, search_service_name, private_endpoint_connection_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the private endpoint connection to the search + service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def delete( + self, resource_group_name, search_service_name, private_endpoint_connection_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Disconnects the private endpoint connection and deletes it from the + search service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def list_by_service( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all private endpoint connections in the given service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.search.models.PrivateEndpointConnectionPaged[~azure.mgmt.search.models.PrivateEndpointConnection] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections'} 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 new file mode 100644 index 000000000000..bc37b3bab670 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py @@ -0,0 +1,126 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + def list_supported( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all supported private link resource types for the given + service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.mgmt.search.models.PrivateLinkResourcePaged[~azure.mgmt.search.models.PrivateLinkResource] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_supported.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_supported.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources'} 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 similarity index 92% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py index 8fb9e29e0309..1fa02c10cef7 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 @@ -19,11 +19,13 @@ class QueryKeysOperations(object): """QueryKeysOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,21 +35,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config def create( self, resource_group_name, search_service_name, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Generates a new query key for the specified Search service. You can + """Generates a new query key for the specified search service. You can create up to 50 query keys per service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param name: The name of the new query API key. :type name: str @@ -105,7 +107,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('QueryKey', response) @@ -118,14 +119,15 @@ def create( def list_by_search_service( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Returns the list of query API keys for the given Azure Search service. + """Returns the list of query API keys for the given Azure Cognitive Search + service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -145,8 +147,7 @@ def list_by_search_service( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_search_service.metadata['url'] @@ -178,7 +179,12 @@ def internal_paging(next_link=None, raw=False): header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -189,12 +195,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_search_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys'} @@ -209,8 +213,8 @@ def delete( current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param key: The query key to be deleted. Query keys are identified by value, not by name. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py similarity index 92% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py index c89b0d0e364d..32cdb81e1e25 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 @@ -21,11 +21,13 @@ class ServicesOperations(object): """ServicesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config @@ -99,24 +101,24 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a Search service in the given resource group. If the - Search service already exists, all properties will be updated with the + """Creates or updates a search service in the given resource group. If the + search service already exists, all properties will be updated with the given values. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure 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 + :param search_service_name: The name of the Azure Cognitive Search + service to create or update. Search service names must only contain + lowercase letters, digits or dashes, cannot use dash as the first two + or last one characters, cannot contain consecutive dashes, and must be + between 2 and 60 characters in length. Search service names must be + globally unique since they are part of the service URI (https://.search.windows.net). You cannot change the service name after the service is created. :type search_service_name: str - :param service: The definition of the Search service to create or + :param service: The definition of the search service to create or update. :type service: ~azure.mgmt.search.models.SearchService :param search_management_request_options: Additional parameters for @@ -166,17 +168,17 @@ def get_long_running_output(response): def update( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Updates an existing Search service in the given resource group. + """Updates an existing search service in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service to - update. + :param search_service_name: The name of the Azure Cognitive Search + service to update. :type search_service_name: str - :param service: The definition of the Search service to update. - :type service: ~azure.mgmt.search.models.SearchService + :param service: The definition of the search service to update. + :type service: ~azure.mgmt.search.models.SearchServiceUpdate :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: @@ -222,7 +224,7 @@ def update( header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') # Construct body - body_content = self._serialize.body(service, 'SearchService') + body_content = self._serialize.body(service, 'SearchServiceUpdate') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -234,7 +236,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SearchService', response) @@ -247,15 +248,15 @@ def update( def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets the Search service with the given name in the given resource + """Gets the search service with the given name in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -310,7 +311,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SearchService', response) @@ -323,15 +323,15 @@ def get( def delete( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Deletes a Search service in the given resource group, along with its + """Deletes a search service in the given resource group, along with its associated resources. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -390,7 +390,7 @@ def delete( def list_by_resource_group( self, resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all Search services in the given resource group. + """Gets a list of all search services in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure @@ -414,8 +414,7 @@ def list_by_resource_group( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -447,6 +446,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -457,19 +461,17 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices'} def list_by_subscription( self, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all Search services in the given subscription. + """Gets a list of all search services in the given subscription. :param search_management_request_options: Additional parameters for the operation @@ -489,8 +491,7 @@ def list_by_subscription( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -521,6 +522,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -531,23 +537,21 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Search/searchServices'} def check_name_availability( self, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Checks whether or not the given Search service name is available for + """Checks whether or not the given search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://.search.windows.net). - :param name: The Search service name to validate. Search service names + :param name: The search service name to validate. 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. @@ -608,7 +612,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityOutput', response) 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 new file mode 100644 index 000000000000..3c8edd84f11f --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py @@ -0,0 +1,433 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SharedPrivateLinkResourcesOperations(object): + """SharedPrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, search_service_name, shared_private_link_resource_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + shared_private_link_resource = models.SharedPrivateLinkResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(shared_private_link_resource, 'SharedPrivateLinkResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, search_service_name, shared_private_link_resource_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Initiates the creation or update of a shared private link resource + managed by the search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SharedPrivateLinkResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.search.models.SharedPrivateLinkResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.search.models.SharedPrivateLinkResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + shared_private_link_resource_name=shared_private_link_resource_name, + properties=properties, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + def get( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the shared private link resource managed by the + search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SharedPrivateLinkResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SharedPrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + + def _delete_initial( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Initiates the deletion of the shared private link resource from the + search service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + shared_private_link_resource_name=shared_private_link_resource_name, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + def list_by_service( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all shared private link resources managed by the given + service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SharedPrivateLinkResource + :rtype: + ~azure.mgmt.search.models.SharedPrivateLinkResourcePaged[~azure.mgmt.search.models.SharedPrivateLinkResource] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharedPrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources'} diff --git a/sdk/search/azure-mgmt-search/setup.py b/sdk/search/azure-mgmt-search/setup.py index a2f5d0ca1a19..9d7054e7f31f 100644 --- a/sdk/search/azure-mgmt-search/setup.py +++ b/sdk/search/azure-mgmt-search/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False, From aac297ecb6f86732b83745a04b5aae4a44397d3a Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 2 Sep 2020 03:33:53 +0000 Subject: [PATCH 2/3] Generated from ddd3cdf3c6715b17fe1b2f25045634dec6ee447c Re-add capitalizations where appropriate --- sdk/search/azure-mgmt-search/README.md | 30 +- .../azure/mgmt/search/__init__.py | 7 +- .../azure/mgmt/search/_configuration.py | 50 + ...client.py => _search_management_client.py} | 65 +- .../azure/mgmt/search/models/__init__.py | 131 +- .../azure/mgmt/search/models/_models.py | 1211 +++++++++++++++++ .../azure/mgmt/search/models/_models_py3.py | 1211 +++++++++++++++++ .../azure/mgmt/search/models/_paged_models.py | 92 ++ ....py => _search_management_client_enums.py} | 38 + .../mgmt/search/models/admin_key_result.py | 41 - .../search/models/admin_key_result_py3.py | 41 - .../models/check_name_availability_input.py | 48 - .../check_name_availability_input_py3.py | 48 - .../models/check_name_availability_output.py | 51 - .../check_name_availability_output_py3.py | 51 - .../azure/mgmt/search/models/identity.py | 48 - .../azure/mgmt/search/models/identity_py3.py | 48 - .../azure/mgmt/search/models/operation.py | 41 - .../mgmt/search/models/operation_display.py | 51 - .../search/models/operation_display_py3.py | 51 - .../mgmt/search/models/operation_paged.py | 27 - .../azure/mgmt/search/models/operation_py3.py | 41 - .../azure/mgmt/search/models/query_key.py | 41 - .../mgmt/search/models/query_key_paged.py | 27 - .../azure/mgmt/search/models/query_key_py3.py | 41 - .../azure/mgmt/search/models/resource.py | 61 - .../azure/mgmt/search/models/resource_py3.py | 61 - .../search_management_request_options.py | 30 - .../search_management_request_options_py3.py | 30 - .../mgmt/search/models/search_service.py | 124 -- .../search/models/search_service_paged.py | 27 - .../mgmt/search/models/search_service_py3.py | 124 -- .../azure/mgmt/search/models/sku.py | 39 - .../azure/mgmt/search/models/sku_py3.py | 39 - .../azure/mgmt/search/operations/__init__.py | 14 +- ...perations.py => _admin_keys_operations.py} | 18 +- .../{operations.py => _operations.py} | 20 +- ...private_endpoint_connections_operations.py | 374 +++++ .../_private_link_resources_operations.py | 126 ++ ...perations.py => _query_keys_operations.py} | 40 +- ..._operations.py => _services_operations.py} | 87 +- ...hared_private_link_resources_operations.py | 433 ++++++ sdk/search/azure-mgmt-search/setup.py | 6 +- 43 files changed, 3774 insertions(+), 1410 deletions(-) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/{search_management_client.py => _search_management_client.py} (59%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/models/{search_management_client_enums.py => _search_management_client_enums.py} (65%) delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py delete mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{admin_keys_operations.py => _admin_keys_operations.py} (94%) rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{operations.py => _operations.py} (88%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{query_keys_operations.py => _query_keys_operations.py} (92%) rename sdk/search/azure-mgmt-search/azure/mgmt/search/operations/{services_operations.py => _services_operations.py} (92%) create mode 100644 sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py diff --git a/sdk/search/azure-mgmt-search/README.md b/sdk/search/azure-mgmt-search/README.md index 503608414dae..3a79ce7ad362 100644 --- a/sdk/search/azure-mgmt-search/README.md +++ b/sdk/search/azure-mgmt-search/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Search Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). - -## Usage - -For code examples, see [Search -Management](https://docs.microsoft.com/python/api/overview/azure/search) +For code examples, see [Search Management](https://docs.microsoft.com/python/api/overview/azure/search) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-search%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-search%2FREADME.png) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py index 3c614360eda6..1663dcf1d993 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py @@ -9,10 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- -from .search_management_client import SearchManagementClient -from .version import VERSION +from ._configuration import SearchManagementClientConfiguration +from ._search_management_client import SearchManagementClient +__all__ = ['SearchManagementClient', 'SearchManagementClientConfiguration'] -__all__ = ['SearchManagementClient'] +from .version import VERSION __version__ = VERSION diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py new file mode 100644 index 000000000000..20d91c5fae29 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/_configuration.py @@ -0,0 +1,50 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class SearchManagementClientConfiguration(AzureConfiguration): + """Configuration for SearchManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :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. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SearchManagementClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id 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 similarity index 59% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/search_management_client.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/_search_management_client.py index 9c86581dc538..bee2c3b01771 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 @@ -11,51 +11,20 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from msrestazure import AzureConfiguration -from .version import VERSION -from .operations.operations import Operations -from .operations.admin_keys_operations import AdminKeysOperations -from .operations.query_keys_operations import QueryKeysOperations -from .operations.services_operations import ServicesOperations -from . import models - - -class SearchManagementClientConfiguration(AzureConfiguration): - """Configuration for SearchManagementClient - Note that all parameters used to create this instance are saved as instance - attributes. - :param credentials: Credentials needed for the client to connect to Azure. - :type credentials: :mod:`A msrestazure Credentials - object` - :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. - :type subscription_id: str - :param str base_url: Service URL - """ - - def __init__( - self, credentials, subscription_id, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if subscription_id is None: - raise ValueError("Parameter 'subscription_id' must not be None.") - if not base_url: - base_url = 'https://management.azure.com' - - super(SearchManagementClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-mgmt-search/{}'.format(VERSION)) - self.add_user_agent('Azure-SDK-For-Python') - - self.credentials = credentials - self.subscription_id = subscription_id +from ._configuration import SearchManagementClientConfiguration +from .operations import Operations +from .operations import AdminKeysOperations +from .operations import QueryKeysOperations +from .operations import ServicesOperations +from .operations import PrivateLinkResourcesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import SharedPrivateLinkResourcesOperations +from . import models class SearchManagementClient(SDKClient): - """Client that can be used to manage Azure Search services and API keys. + """Client that can be used to manage Azure Cognitive Search services and API keys. :ivar config: Configuration for client. :vartype config: SearchManagementClientConfiguration @@ -68,6 +37,12 @@ class SearchManagementClient(SDKClient): :vartype query_keys: azure.mgmt.search.operations.QueryKeysOperations :ivar services: Services operations :vartype services: azure.mgmt.search.operations.ServicesOperations + :ivar private_link_resources: PrivateLinkResources operations + :vartype private_link_resources: azure.mgmt.search.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnections operations + :vartype private_endpoint_connections: azure.mgmt.search.operations.PrivateEndpointConnectionsOperations + :ivar shared_private_link_resources: SharedPrivateLinkResources operations + :vartype shared_private_link_resources: azure.mgmt.search.operations.SharedPrivateLinkResourcesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -86,7 +61,7 @@ def __init__( super(SearchManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2015-08-19' + self.api_version = '2020-08-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -98,3 +73,9 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.services = ServicesOperations( self._client, self.config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.shared_private_link_resources = SharedPrivateLinkResourcesOperations( + self._client, self.config, self._serialize, self._deserialize) 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 d09b7141363d..cdf2018bcd87 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 @@ -10,62 +10,129 @@ # -------------------------------------------------------------------------- try: - from .check_name_availability_input_py3 import CheckNameAvailabilityInput - from .check_name_availability_output_py3 import CheckNameAvailabilityOutput - from .admin_key_result_py3 import AdminKeyResult - from .query_key_py3 import QueryKey - from .sku_py3 import Sku - from .search_service_py3 import SearchService - from .identity_py3 import Identity - from .resource_py3 import Resource - from .operation_display_py3 import OperationDisplay - from .operation_py3 import Operation - from .search_management_request_options_py3 import SearchManagementRequestOptions + from ._models_py3 import AdminKeyResult + from ._models_py3 import AsyncOperationResult + from ._models_py3 import AzureEntityResource + from ._models_py3 import CheckNameAvailabilityInput + from ._models_py3 import CheckNameAvailabilityOutput + from ._models_py3 import Identity + from ._models_py3 import IpRule + from ._models_py3 import NetworkRuleSet + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionProperties + from ._models_py3 import PrivateEndpointConnectionPropertiesPrivateEndpoint + from ._models_py3 import PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import ProxyResource + from ._models_py3 import QueryKey + from ._models_py3 import Resource + from ._models_py3 import SearchManagementRequestOptions + from ._models_py3 import SearchService + from ._models_py3 import SearchServiceUpdate + from ._models_py3 import ShareablePrivateLinkResourceProperties + from ._models_py3 import ShareablePrivateLinkResourceType + from ._models_py3 import SharedPrivateLinkResource + from ._models_py3 import SharedPrivateLinkResourceProperties + from ._models_py3 import Sku + from ._models_py3 import TrackedResource except (SyntaxError, ImportError): - from .check_name_availability_input import CheckNameAvailabilityInput - from .check_name_availability_output import CheckNameAvailabilityOutput - from .admin_key_result import AdminKeyResult - from .query_key import QueryKey - from .sku import Sku - from .search_service import SearchService - from .identity import Identity - from .resource import Resource - from .operation_display import OperationDisplay - from .operation import Operation - from .search_management_request_options import SearchManagementRequestOptions -from .operation_paged import OperationPaged -from .query_key_paged import QueryKeyPaged -from .search_service_paged import SearchServicePaged -from .search_management_client_enums import ( + from ._models import AdminKeyResult + from ._models import AsyncOperationResult + from ._models import AzureEntityResource + from ._models import CheckNameAvailabilityInput + from ._models import CheckNameAvailabilityOutput + from ._models import Identity + from ._models import IpRule + from ._models import NetworkRuleSet + from ._models import Operation + from ._models import OperationDisplay + from ._models import PrivateEndpointConnection + from ._models import PrivateEndpointConnectionProperties + from ._models import PrivateEndpointConnectionPropertiesPrivateEndpoint + from ._models import PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + from ._models import PrivateLinkResource + from ._models import PrivateLinkResourceProperties + from ._models import ProxyResource + from ._models import QueryKey + from ._models import Resource + from ._models import SearchManagementRequestOptions + from ._models import SearchService + from ._models import SearchServiceUpdate + from ._models import ShareablePrivateLinkResourceProperties + from ._models import ShareablePrivateLinkResourceType + from ._models import SharedPrivateLinkResource + from ._models import SharedPrivateLinkResourceProperties + from ._models import Sku + from ._models import TrackedResource +from ._paged_models import OperationPaged +from ._paged_models import PrivateEndpointConnectionPaged +from ._paged_models import PrivateLinkResourcePaged +from ._paged_models import QueryKeyPaged +from ._paged_models import SearchServicePaged +from ._paged_models import SharedPrivateLinkResourcePaged +from ._search_management_client_enums import ( UnavailableNameReason, SkuName, + PrivateLinkServiceConnectionStatus, + SharedPrivateLinkResourceStatus, + SharedPrivateLinkResourceProvisioningState, HostingMode, + PublicNetworkAccess, SearchServiceStatus, ProvisioningState, IdentityType, + SharedPrivateLinkResourceAsyncOperationResult, AdminKeyKind, ) __all__ = [ + 'AdminKeyResult', + 'AsyncOperationResult', + 'AzureEntityResource', 'CheckNameAvailabilityInput', 'CheckNameAvailabilityOutput', - 'AdminKeyResult', - 'QueryKey', - 'Sku', - 'SearchService', 'Identity', - 'Resource', - 'OperationDisplay', + 'IpRule', + 'NetworkRuleSet', 'Operation', + 'OperationDisplay', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionProperties', + 'PrivateEndpointConnectionPropertiesPrivateEndpoint', + 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState', + 'PrivateLinkResource', + 'PrivateLinkResourceProperties', + 'ProxyResource', + 'QueryKey', + 'Resource', 'SearchManagementRequestOptions', + 'SearchService', + 'SearchServiceUpdate', + 'ShareablePrivateLinkResourceProperties', + 'ShareablePrivateLinkResourceType', + 'SharedPrivateLinkResource', + 'SharedPrivateLinkResourceProperties', + 'Sku', + 'TrackedResource', 'OperationPaged', 'QueryKeyPaged', 'SearchServicePaged', + 'PrivateLinkResourcePaged', + 'PrivateEndpointConnectionPaged', + 'SharedPrivateLinkResourcePaged', 'UnavailableNameReason', 'SkuName', + 'PrivateLinkServiceConnectionStatus', + 'SharedPrivateLinkResourceStatus', + 'SharedPrivateLinkResourceProvisioningState', 'HostingMode', + 'PublicNetworkAccess', 'SearchServiceStatus', 'ProvisioningState', 'IdentityType', + 'SharedPrivateLinkResourceAsyncOperationResult', 'AdminKeyKind', ] diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py new file mode 100644 index 000000000000..30cd5a8d1ad5 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models.py @@ -0,0 +1,1211 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class AsyncOperationResult(Model): + """The details of a long running asynchronous shared private link resource + operation. + + :param status: The current status of the long running asynchronous shared + private link resource operation. Possible values include: 'Running', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceAsyncOperationResult + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class Resource(Model): + """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} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The search service name to validate. 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. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, **kwargs): + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.search.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, **kwargs): + super(CloudError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Describes a particular API error with an error code and a message. + + :param code: An error code that describes the error condition more + precisely than an HTTP status code. Can be used to programmatically handle + specific error cases. + :type code: str + :param message: A message that describes the error in detail and provides + debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.search.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, **kwargs): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: 'None', + 'SystemAssigned' + :type type: str or ~azure.mgmt.search.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, **kwargs): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class IpRule(Model): + """The IP restriction rule of the Azure Cognitive Search service. + + :param value: Value corresponding to a single IPv4 address (eg., + 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be + allowed. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IpRule, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class NetworkRuleSet(Model): + """Network specific rules that determine how the Azure Cognitive Search + service may be reached. + + :param ip_rules: A list of IP restriction rules that defines the inbound + network(s) with allowing access to the search service endpoint. At the + meantime, all other public IP networks are blocked by the firewall. These + restriction rules are applied only when the 'publicNetworkAccess' of the + search service is 'enabled'; otherwise, traffic over public interface is + not allowed even with any public IP rules, and private endpoint + connections would be the exclusive access method. + :type ip_rules: list[~azure.mgmt.search.models.IpRule] + """ + + _attribute_map = { + 'ip_rules': {'key': 'ipRules', 'type': '[IpRule]'}, + } + + def __init__(self, **kwargs): + super(NetworkRuleSet, self).__init__(**kwargs) + self.ip_rules = kwargs.get('ip_rules', None) + + +class Operation(Model): + """Describes a REST API operation. + + 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}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that describes the operation. + + 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 + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None + + +class PrivateEndpointConnection(Resource): + """Describes an existing Private Endpoint connection to the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PrivateEndpointConnectionProperties(Model): + """Describes the properties of an existing Private Endpoint connection to the + Azure Cognitive Search service. + + :param private_endpoint: The private endpoint resource from + Microsoft.Network provider. + :type private_endpoint: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint + :param private_link_service_connection_state: Describes the current state + of an existing Private Link Service connection to the Azure Private + Endpoint. + :type private_link_service_connection_state: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointConnectionPropertiesPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionPropertiesPrivateEndpoint(Model): + """The private endpoint resource from Microsoft.Network provider. + + :param id: The resource id of the private endpoint resource from + Microsoft.Network provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionPropertiesPrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState(Model): + """Describes the current state of an existing Private Link Service connection + to the Azure Private Endpoint. + + :param status: Status of the the private link service connection. Can be + Pending, Approved, Rejected, or Disconnected. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus + :param description: The description for the private link service + connection state. + :type description: str + :param actions_required: A description of any extra actions that may be + required. Default value: "None" . + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'PrivateLinkServiceConnectionStatus'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', "None") + + +class PrivateLinkResource(Resource): + """Describes a supported private link resource for the Azure Cognitive Search + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: Describes the properties of a supported private link + resource for the Azure Cognitive Search service. + :vartype properties: + ~azure.mgmt.search.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Describes the properties of a supported private link resource for the Azure + Cognitive Search service. For a given API version, this represents the + 'supported' groupIds when creating a shared private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The group ID of the private link resource. + :vartype group_id: str + :ivar required_members: The list of required members of the private link + resource. + :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] + :ivar shareable_private_link_resource_types: The list of resources that + are onboarded to private link service, that are supported by Azure + Cognitive Search. + :vartype shareable_private_link_resource_types: + list[~azure.mgmt.search.models.ShareablePrivateLinkResourceType] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + 'shareable_private_link_resource_types': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'shareable_private_link_resource_types': {'key': 'shareablePrivateLinkResourceTypes', 'type': '[ShareablePrivateLinkResourceType]'}, + } + + def __init__(self, **kwargs): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + self.shareable_private_link_resource_types = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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): + super(ProxyResource, self).__init__(**kwargs) + + +class QueryKey(Model): + """Describes an API key for a given Azure Cognitive Search service that has + permissions for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None + + +class SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = kwargs.get('client_request_id', None) + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + + +class SearchService(TrackedResource): + """Describes an Azure Cognitive Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, **kwargs): + super(SearchService, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") + self.public_network_access = kwargs.get('public_network_access', "enabled") + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = kwargs.get('network_rule_set', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + + +class SearchServiceUpdate(Resource): + """The parameters used to update an Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, **kwargs): + super(SearchServiceUpdate, self).__init__(**kwargs) + self.replica_count = kwargs.get('replica_count', 1) + self.partition_count = kwargs.get('partition_count', 1) + self.hosting_mode = kwargs.get('hosting_mode', "default") + self.public_network_access = kwargs.get('public_network_access', "enabled") + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = kwargs.get('network_rule_set', None) + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = kwargs.get('sku', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + + +class ShareablePrivateLinkResourceProperties(Model): + """Describes the properties of a resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The resource provider type for the resource that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype type: str + :ivar group_id: The resource provider group id for the resource that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype group_id: str + :ivar description: The description of the resource type that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype description: str + """ + + _validation = { + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ShareablePrivateLinkResourceProperties, self).__init__(**kwargs) + self.type = None + self.group_id = None + self.description = None + + +class ShareablePrivateLinkResourceType(Model): + """Describes an resource type that has been onboarded to private link service, + supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + :vartype name: str + :ivar properties: Describes the properties of a resource type that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype properties: + ~azure.mgmt.search.models.ShareablePrivateLinkResourceProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ShareablePrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(ShareablePrivateLinkResourceType, self).__init__(**kwargs) + self.name = None + self.properties = None + + +class SharedPrivateLinkResource(Resource): + """Describes a Shared Private Link Resource managed by the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'SharedPrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs): + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class SharedPrivateLinkResourceProperties(Model): + """Describes the properties of an existing Shared Private Link Resource + managed by the Azure Cognitive Search service. + + :param private_link_resource_id: The resource id of the resource the + shared private link resource is for. + :type private_link_resource_id: str + :param group_id: The group id from the provider of resource the shared + private link resource is for. + :type group_id: str + :param request_message: The request message for requesting approval of the + shared private link resource. + :type request_message: str + :param resource_region: Optional. Can be used to specify the Azure + Resource Manager location of the resource to which a shared private link + is to be created. This is only required for those resources whose DNS + configuration are regional (such as Azure Kubernetes Service). + :type resource_region: str + :param status: Status of the shared private link resource. Can be Pending, + Approved, Rejected or Disconnected. Possible values include: 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus + :param provisioning_state: The provisioning state of the shared private + link resource. Can be Updating, Deleting, Failed, Succeeded or Incomplete. + Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded', + 'Incomplete' + :type provisioning_state: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState + """ + + _attribute_map = { + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'resource_region': {'key': 'resourceRegion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'SharedPrivateLinkResourceStatus'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'SharedPrivateLinkResourceProvisioningState'}, + } + + def __init__(self, **kwargs): + super(SharedPrivateLinkResourceProperties, self).__init__(**kwargs) + self.private_link_resource_id = kwargs.get('private_link_resource_id', None) + self.group_id = kwargs.get('group_id', None) + self.request_message = kwargs.get('request_message', None) + self.resource_region = kwargs.get('resource_region', None) + self.status = kwargs.get('status', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class Sku(Model): + """Defines the SKU of an Azure Cognitive Search Service, which determines + price tier and capacity limits. + + :param name: The SKU of the search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': The largest Standard offering with up to 12 partitions and 12 + replicas (or up to 3 partitions with more indexes if you also set the + hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports + 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports + 2TB per partition, up to 12 partitions.'. Possible values include: 'free', + 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', + 'storage_optimized_l2' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) 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 new file mode 100644 index 000000000000..415d191c832b --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_models_py3.py @@ -0,0 +1,1211 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class AdminKeyResult(Model): + """Response containing the primary and secondary admin API keys for a given + Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_key: The primary admin API key of the search service. + :vartype primary_key: str + :ivar secondary_key: The secondary admin API key of the search service. + :vartype secondary_key: str + """ + + _validation = { + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + } + + _attribute_map = { + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AdminKeyResult, self).__init__(**kwargs) + self.primary_key = None + self.secondary_key = None + + +class AsyncOperationResult(Model): + """The details of a long running asynchronous shared private link resource + operation. + + :param status: The current status of the long running asynchronous shared + private link resource operation. Possible values include: 'Running', + 'Succeeded', 'Failed' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceAsyncOperationResult + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__(self, *, status=None, **kwargs) -> None: + super(AsyncOperationResult, self).__init__(**kwargs) + self.status = status + + +class Resource(Model): + """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} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AzureEntityResource(Resource): + """The resource model definition for a Azure Resource Manager resource with an + etag. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar etag: Resource Etag. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AzureEntityResource, self).__init__(**kwargs) + self.etag = None + + +class CheckNameAvailabilityInput(Model): + """Input of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The search service name to validate. 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. + :type name: str + :ivar type: Required. The type of the resource whose name is to be + validated. This value must always be 'searchServices'. Default value: + "searchServices" . + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "searchServices" + + def __init__(self, *, name: str, **kwargs) -> None: + super(CheckNameAvailabilityInput, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityOutput(Model): + """Output of check name availability API. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar is_name_available: A value indicating whether the name is available. + :vartype is_name_available: bool + :ivar reason: The reason why the name is not available. 'Invalid' + indicates the name provided does not match the naming requirements + (incorrect length, unsupported characters, etc.). 'AlreadyExists' + indicates that the name is already in use and is therefore unavailable. + Possible values include: 'Invalid', 'AlreadyExists' + :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason + :ivar message: A message that explains why the name is invalid and + provides resource naming requirements. Available only if 'Invalid' is + returned in the 'reason' property. + :vartype message: str + """ + + _validation = { + 'is_name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(CheckNameAvailabilityOutput, self).__init__(**kwargs) + self.is_name_available = None + self.reason = None + self.message = None + + +class CloudError(Model): + """Contains information about an API error. + + :param error: Describes a particular API error with an error code and a + message. + :type error: ~azure.mgmt.search.models.CloudErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'CloudErrorBody'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(CloudError, self).__init__(**kwargs) + self.error = error + + +class CloudErrorException(HttpOperationError): + """Server responsed with exception of type: 'CloudError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args) + + +class CloudErrorBody(Model): + """Describes a particular API error with an error code and a message. + + :param code: An error code that describes the error condition more + precisely than an HTTP status code. Can be used to programmatically handle + specific error cases. + :type code: str + :param message: A message that describes the error in detail and provides + debugging information. + :type message: str + :param target: The target of the particular error (for example, the name + of the property in error). + :type target: str + :param details: Contains nested errors that are related to this error. + :type details: list[~azure.mgmt.search.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None: + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Identity(Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: Required. The identity type. Possible values include: 'None', + 'SystemAssigned' + :type type: str or ~azure.mgmt.search.models.IdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'IdentityType'}, + } + + def __init__(self, *, type, **kwargs) -> None: + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class IpRule(Model): + """The IP restriction rule of the Azure Cognitive Search service. + + :param value: Value corresponding to a single IPv4 address (eg., + 123.1.2.3) or an IP range in CIDR format (eg., 123.1.2.3/24) to be + allowed. + :type value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, **kwargs) -> None: + super(IpRule, self).__init__(**kwargs) + self.value = value + + +class NetworkRuleSet(Model): + """Network specific rules that determine how the Azure Cognitive Search + service may be reached. + + :param ip_rules: A list of IP restriction rules that defines the inbound + network(s) with allowing access to the search service endpoint. At the + meantime, all other public IP networks are blocked by the firewall. These + restriction rules are applied only when the 'publicNetworkAccess' of the + search service is 'enabled'; otherwise, traffic over public interface is + not allowed even with any public IP rules, and private endpoint + connections would be the exclusive access method. + :type ip_rules: list[~azure.mgmt.search.models.IpRule] + """ + + _attribute_map = { + 'ip_rules': {'key': 'ipRules', 'type': '[IpRule]'}, + } + + def __init__(self, *, ip_rules=None, **kwargs) -> None: + super(NetworkRuleSet, self).__init__(**kwargs) + self.ip_rules = ip_rules + + +class Operation(Model): + """Describes a REST API operation. + + 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}. + :vartype name: str + :ivar display: The object that describes the operation. + :vartype display: ~azure.mgmt.search.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """The object that describes the operation. + + 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 + """ + + _validation = { + 'provider': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.operation = None + self.resource = None + self.description = None + + +class PrivateEndpointConnection(Resource): + """Describes an existing Private Endpoint connection to the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'PrivateEndpointConnectionProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.properties = properties + + +class PrivateEndpointConnectionProperties(Model): + """Describes the properties of an existing Private Endpoint connection to the + Azure Cognitive Search service. + + :param private_endpoint: The private endpoint resource from + Microsoft.Network provider. + :type private_endpoint: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateEndpoint + :param private_link_service_connection_state: Describes the current state + of an existing Private Link Service connection to the Azure Private + Endpoint. + :type private_link_service_connection_state: + ~azure.mgmt.search.models.PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'privateEndpoint', 'type': 'PrivateEndpointConnectionPropertiesPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'privateLinkServiceConnectionState', 'type': 'PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState'}, + } + + def __init__(self, *, private_endpoint=None, private_link_service_connection_state=None, **kwargs) -> None: + super(PrivateEndpointConnectionProperties, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionPropertiesPrivateEndpoint(Model): + """The private endpoint resource from Microsoft.Network provider. + + :param id: The resource id of the private endpoint resource from + Microsoft.Network provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, **kwargs) -> None: + super(PrivateEndpointConnectionPropertiesPrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState(Model): + """Describes the current state of an existing Private Link Service connection + to the Azure Private Endpoint. + + :param status: Status of the the private link service connection. Can be + Pending, Approved, Rejected, or Disconnected. Possible values include: + 'Pending', 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.PrivateLinkServiceConnectionStatus + :param description: The description for the private link service + connection state. + :type description: str + :param actions_required: A description of any extra actions that may be + required. Default value: "None" . + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'PrivateLinkServiceConnectionStatus'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__(self, *, status=None, description: str=None, actions_required: str="None", **kwargs) -> None: + super(PrivateEndpointConnectionPropertiesPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkResource(Resource): + """Describes a supported private link resource for the Azure Cognitive Search + service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :ivar properties: Describes the properties of a supported private link + resource for the Azure Cognitive Search service. + :vartype properties: + ~azure.mgmt.search.models.PrivateLinkResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResource, self).__init__(**kwargs) + self.properties = None + + +class PrivateLinkResourceProperties(Model): + """Describes the properties of a supported private link resource for the Azure + Cognitive Search service. For a given API version, this represents the + 'supported' groupIds when creating a shared private link resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar group_id: The group ID of the private link resource. + :vartype group_id: str + :ivar required_members: The list of required members of the private link + resource. + :vartype required_members: list[str] + :ivar required_zone_names: The list of required DNS zone names of the + private link resource. + :vartype required_zone_names: list[str] + :ivar shareable_private_link_resource_types: The list of resources that + are onboarded to private link service, that are supported by Azure + Cognitive Search. + :vartype shareable_private_link_resource_types: + list[~azure.mgmt.search.models.ShareablePrivateLinkResourceType] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'required_zone_names': {'readonly': True}, + 'shareable_private_link_resource_types': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'shareable_private_link_resource_types': {'key': 'shareablePrivateLinkResourceTypes', 'type': '[ShareablePrivateLinkResourceType]'}, + } + + def __init__(self, **kwargs) -> None: + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = None + self.shareable_private_link_resource_types = None + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + 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) -> None: + super(ProxyResource, self).__init__(**kwargs) + + +class QueryKey(Model): + """Describes an API key for a given Azure Cognitive Search service that has + permissions for query operations only. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the query API key; may be empty. + :vartype name: str + :ivar key: The value of the query API key. + :vartype key: str + """ + + _validation = { + 'name': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(QueryKey, self).__init__(**kwargs) + self.name = None + self.key = None + + +class SearchManagementRequestOptions(Model): + """Additional parameters for a set of operations. + + :param client_request_id: A client-generated GUID value that identifies + this request. If specified, this will be included in response information + as a way to track the request. + :type client_request_id: str + """ + + _attribute_map = { + 'client_request_id': {'key': '', 'type': 'str'}, + } + + def __init__(self, *, client_request_id: str=None, **kwargs) -> None: + super(SearchManagementRequestOptions, self).__init__(**kwargs) + self.client_request_id = client_request_id + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, *, location: str, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class SearchService(TrackedResource): + """Describes an Azure Cognitive Search service and its current state. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives + :type location: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, *, location: str, tags=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", public_network_access="enabled", network_rule_set=None, sku=None, identity=None, **kwargs) -> None: + super(SearchService, self).__init__(tags=tags, location=location, **kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.public_network_access = public_network_access + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = network_rule_set + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = sku + self.identity = identity + + +class SearchServiceUpdate(Resource): + """The parameters used to update an Azure Cognitive Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param 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. Default value: 1 . + :type replica_count: int + :param partition_count: The number of partitions in the search service; if + specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only + valid for standard SKUs. For 'standard3' services with hostingMode set to + 'highDensity', the allowed values are between 1 and 3. Default value: 1 . + :type partition_count: int + :param hosting_mode: 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 for + any other SKU. For the standard3 SKU, the value is either 'default' or + 'highDensity'. For all other SKUs, this value must be 'default'. Possible + values include: 'default', 'highDensity'. Default value: "default" . + :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode + :param 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. Possible values + include: 'enabled', 'disabled'. Default value: "enabled" . + :type 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 service is being provisioned or + scaled up or down. 'deleting': The search service is being deleted. + 'degraded': The search service is degraded. This can occur when the + underlying search units are not healthy. The search service is most likely + operational, but performance might be slow and some requests might be + dropped. 'disabled': The search service is disabled. In this state, the + service will reject all API requests. 'error': The search service is in an + error state. If your service is in the degraded, disabled, or error + states, it means the Azure Cognitive Search team is actively investigating + the underlying issue. Dedicated services in these states are still + chargeable based on the number of search units provisioned. Possible + values include: 'running', 'provisioning', 'deleting', 'degraded', + 'disabled', 'error' + :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus + :ivar status_details: The details of the search service status. + :vartype status_details: str + :ivar provisioning_state: The state of the last provisioning operation + performed on the search service. Provisioning is an intermediate state + that occurs while service capacity is being established. After capacity is + set up, provisioningState changes to either 'succeeded' or 'failed'. + Client applications can poll provisioning status (the recommended polling + interval is 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. Possible values include: 'succeeded', + 'provisioning', 'failed' + :vartype provisioning_state: str or + ~azure.mgmt.search.models.ProvisioningState + :param network_rule_set: Network specific rules that determine how the + Azure Cognitive Search service may be reached. + :type network_rule_set: ~azure.mgmt.search.models.NetworkRuleSet + :ivar private_endpoint_connections: The list of private endpoint + connections to the Azure Cognitive Search service. + :vartype private_endpoint_connections: + list[~azure.mgmt.search.models.PrivateEndpointConnection] + :ivar shared_private_link_resources: The list of shared private link + resources managed by the Azure Cognitive Search service. + :vartype shared_private_link_resources: + list[~azure.mgmt.search.models.SharedPrivateLinkResource] + :param sku: The SKU of the Search Service, which determines price tier and + capacity limits. This property is required when creating a new Search + Service. + :type sku: ~azure.mgmt.search.models.Sku + :param location: The geographic location of the resource. This must be one + of the supported and registered Azure Geo Regions (for example, West US, + East US, Southeast Asia, and so forth). This property is required when + creating a new resource. + :type location: str + :param tags: Tags to help categorize the resource in the Azure portal. + :type tags: dict[str, str] + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.search.models.Identity + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'replica_count': {'maximum': 12, 'minimum': 1}, + 'partition_count': {'maximum': 12, 'minimum': 1}, + 'status': {'readonly': True}, + 'status_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'shared_private_link_resources': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, + 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'PublicNetworkAccess'}, + 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, + 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + } + + def __init__(self, *, replica_count: int=1, partition_count: int=1, hosting_mode="default", public_network_access="enabled", network_rule_set=None, sku=None, location: str=None, tags=None, identity=None, **kwargs) -> None: + super(SearchServiceUpdate, self).__init__(**kwargs) + self.replica_count = replica_count + self.partition_count = partition_count + self.hosting_mode = hosting_mode + self.public_network_access = public_network_access + self.status = None + self.status_details = None + self.provisioning_state = None + self.network_rule_set = network_rule_set + self.private_endpoint_connections = None + self.shared_private_link_resources = None + self.sku = sku + self.location = location + self.tags = tags + self.identity = identity + + +class ShareablePrivateLinkResourceProperties(Model): + """Describes the properties of a resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar type: The resource provider type for the resource that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype type: str + :ivar group_id: The resource provider group id for the resource that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype group_id: str + :ivar description: The description of the resource type that has been + onboarded to private link service, supported by Azure Cognitive Search. + :vartype description: str + """ + + _validation = { + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ShareablePrivateLinkResourceProperties, self).__init__(**kwargs) + self.type = None + self.group_id = None + self.description = None + + +class ShareablePrivateLinkResourceType(Model): + """Describes an resource type that has been onboarded to private link service, + supported by Azure Cognitive Search. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the resource type that has been onboarded to + private link service, supported by Azure Cognitive Search. + :vartype name: str + :ivar properties: Describes the properties of a resource type that has + been onboarded to private link service, supported by Azure Cognitive + Search. + :vartype properties: + ~azure.mgmt.search.models.ShareablePrivateLinkResourceProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'properties': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ShareablePrivateLinkResourceProperties'}, + } + + def __init__(self, **kwargs) -> None: + super(ShareablePrivateLinkResourceType, self).__init__(**kwargs) + self.name = None + self.properties = None + + +class SharedPrivateLinkResource(Resource): + """Describes a Shared Private Link Resource managed by the Azure Cognitive + Search service. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. Ex- + Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :vartype type: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + """ + + _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'}, + 'properties': {'key': 'properties', 'type': 'SharedPrivateLinkResourceProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(SharedPrivateLinkResource, self).__init__(**kwargs) + self.properties = properties + + +class SharedPrivateLinkResourceProperties(Model): + """Describes the properties of an existing Shared Private Link Resource + managed by the Azure Cognitive Search service. + + :param private_link_resource_id: The resource id of the resource the + shared private link resource is for. + :type private_link_resource_id: str + :param group_id: The group id from the provider of resource the shared + private link resource is for. + :type group_id: str + :param request_message: The request message for requesting approval of the + shared private link resource. + :type request_message: str + :param resource_region: Optional. Can be used to specify the Azure + Resource Manager location of the resource to which a shared private link + is to be created. This is only required for those resources whose DNS + configuration are regional (such as Azure Kubernetes Service). + :type resource_region: str + :param status: Status of the shared private link resource. Can be Pending, + Approved, Rejected or Disconnected. Possible values include: 'Pending', + 'Approved', 'Rejected', 'Disconnected' + :type status: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceStatus + :param provisioning_state: The provisioning state of the shared private + link resource. Can be Updating, Deleting, Failed, Succeeded or Incomplete. + Possible values include: 'Updating', 'Deleting', 'Failed', 'Succeeded', + 'Incomplete' + :type provisioning_state: str or + ~azure.mgmt.search.models.SharedPrivateLinkResourceProvisioningState + """ + + _attribute_map = { + 'private_link_resource_id': {'key': 'privateLinkResourceId', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'request_message': {'key': 'requestMessage', 'type': 'str'}, + 'resource_region': {'key': 'resourceRegion', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'SharedPrivateLinkResourceStatus'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'SharedPrivateLinkResourceProvisioningState'}, + } + + def __init__(self, *, private_link_resource_id: str=None, group_id: str=None, request_message: str=None, resource_region: str=None, status=None, provisioning_state=None, **kwargs) -> None: + super(SharedPrivateLinkResourceProperties, self).__init__(**kwargs) + self.private_link_resource_id = private_link_resource_id + self.group_id = group_id + self.request_message = request_message + self.resource_region = resource_region + self.status = status + self.provisioning_state = provisioning_state + + +class Sku(Model): + """Defines the SKU of an Azure Cognitive Search Service, which determines + price tier and capacity limits. + + :param name: The SKU of the search service. Valid values include: 'free': + Shared service. 'basic': Dedicated service with up to 3 replicas. + 'standard': Dedicated service with up to 12 partitions and 12 replicas. + 'standard2': Similar to standard, but with more capacity per search unit. + 'standard3': The largest Standard offering with up to 12 partitions and 12 + replicas (or up to 3 partitions with more indexes if you also set the + hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports + 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports + 2TB per partition, up to 12 partitions.'. Possible values include: 'free', + 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', + 'storage_optimized_l2' + :type name: str or ~azure.mgmt.search.models.SkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'SkuName'}, + } + + def __init__(self, *, name=None, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py new file mode 100644 index 000000000000..09c08af3b5a2 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/_paged_models.py @@ -0,0 +1,92 @@ +# 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 msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class QueryKeyPaged(Paged): + """ + A paging container for iterating over a list of :class:`QueryKey ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[QueryKey]'} + } + + def __init__(self, *args, **kwargs): + + super(QueryKeyPaged, self).__init__(*args, **kwargs) +class SearchServicePaged(Paged): + """ + A paging container for iterating over a list of :class:`SearchService ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SearchService]'} + } + + def __init__(self, *args, **kwargs): + + super(SearchServicePaged, self).__init__(*args, **kwargs) +class PrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateLinkResourcePaged, self).__init__(*args, **kwargs) +class PrivateEndpointConnectionPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateEndpointConnection ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateEndpointConnection]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateEndpointConnectionPaged, self).__init__(*args, **kwargs) +class SharedPrivateLinkResourcePaged(Paged): + """ + A paging container for iterating over a list of :class:`SharedPrivateLinkResource ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[SharedPrivateLinkResource]'} + } + + def __init__(self, *args, **kwargs): + + super(SharedPrivateLinkResourcePaged, self).__init__(*args, **kwargs) 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 similarity index 65% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_client_enums.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/models/_search_management_client_enums.py index cf76e9f19b0d..18b26a59613e 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 @@ -29,12 +29,43 @@ class SkuName(str, Enum): storage_optimized_l2 = "storage_optimized_l2" +class PrivateLinkServiceConnectionStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class SharedPrivateLinkResourceStatus(str, Enum): + + pending = "Pending" + approved = "Approved" + rejected = "Rejected" + disconnected = "Disconnected" + + +class SharedPrivateLinkResourceProvisioningState(str, Enum): + + updating = "Updating" + deleting = "Deleting" + failed = "Failed" + succeeded = "Succeeded" + incomplete = "Incomplete" + + class HostingMode(str, Enum): default = "default" high_density = "highDensity" +class PublicNetworkAccess(str, Enum): + + enabled = "enabled" + disabled = "disabled" + + class SearchServiceStatus(str, Enum): running = "running" @@ -58,6 +89,13 @@ class IdentityType(str, Enum): system_assigned = "SystemAssigned" +class SharedPrivateLinkResourceAsyncOperationResult(str, Enum): + + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + + class AdminKeyKind(str, Enum): primary = "primary" diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py deleted file mode 100644 index bfeabe50e70e..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class AdminKeyResult(Model): - """Response containing the primary and secondary admin API keys for a given - Azure Search service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The primary admin API key of the Search service. - :vartype primary_key: str - :ivar secondary_key: The secondary admin API key of the Search service. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(AdminKeyResult, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py deleted file mode 100644 index 29217db297ce..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/admin_key_result_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class AdminKeyResult(Model): - """Response containing the primary and secondary admin API keys for a given - Azure Search service. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar primary_key: The primary admin API key of the Search service. - :vartype primary_key: str - :ivar secondary_key: The secondary admin API key of the Search service. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(AdminKeyResult, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py deleted file mode 100644 index 053e06fd8f43..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class CheckNameAvailabilityInput(Model): - """Input of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Search service name to validate. 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. - :type name: str - :ivar type: Required. The type of the resource whose name is to be - validated. This value must always be 'searchServices'. Default value: - "searchServices" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "searchServices" - - def __init__(self, **kwargs): - super(CheckNameAvailabilityInput, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py deleted file mode 100644 index 012969c50154..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_input_py3.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class CheckNameAvailabilityInput(Model): - """Input of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The Search service name to validate. 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. - :type name: str - :ivar type: Required. The type of the resource whose name is to be - validated. This value must always be 'searchServices'. Default value: - "searchServices" . - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True, 'constant': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - type = "searchServices" - - def __init__(self, *, name: str, **kwargs) -> None: - super(CheckNameAvailabilityInput, self).__init__(**kwargs) - self.name = name diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py deleted file mode 100644 index 12b592e51574..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class CheckNameAvailabilityOutput(Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar is_name_available: A value indicating whether the name is available. - :vartype is_name_available: bool - :ivar reason: The reason why the name is not available. 'Invalid' - indicates the name provided does not match the naming requirements - (incorrect length, unsupported characters, etc.). 'AlreadyExists' - indicates that the name is already in use and is therefore unavailable. - Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason - :ivar message: A message that explains why the name is invalid and - provides resource naming requirements. Available only if 'Invalid' is - returned in the 'reason' property. - :vartype message: str - """ - - _validation = { - 'is_name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(CheckNameAvailabilityOutput, self).__init__(**kwargs) - self.is_name_available = None - self.reason = None - self.message = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py deleted file mode 100644 index bbffe7f214e1..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/check_name_availability_output_py3.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class CheckNameAvailabilityOutput(Model): - """Output of check name availability API. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar is_name_available: A value indicating whether the name is available. - :vartype is_name_available: bool - :ivar reason: The reason why the name is not available. 'Invalid' - indicates the name provided does not match the naming requirements - (incorrect length, unsupported characters, etc.). 'AlreadyExists' - indicates that the name is already in use and is therefore unavailable. - Possible values include: 'Invalid', 'AlreadyExists' - :vartype reason: str or ~azure.mgmt.search.models.UnavailableNameReason - :ivar message: A message that explains why the name is invalid and - provides resource naming requirements. Available only if 'Invalid' is - returned in the 'reason' property. - :vartype message: str - """ - - _validation = { - 'is_name_available': {'readonly': True}, - 'reason': {'readonly': True}, - 'message': {'readonly': True}, - } - - _attribute_map = { - 'is_name_available': {'key': 'nameAvailable', 'type': 'bool'}, - 'reason': {'key': 'reason', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(CheckNameAvailabilityOutput, self).__init__(**kwargs) - self.is_name_available = None - self.reason = None - self.message = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py deleted file mode 100644 index 5d6912d964ce..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: Required. The identity type. Possible values include: 'None', - 'SystemAssigned' - :type type: str or ~azure.mgmt.search.models.IdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'IdentityType'}, - } - - def __init__(self, **kwargs): - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs.get('type', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py deleted file mode 100644 index 61d3064568ae..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/identity_py3.py +++ /dev/null @@ -1,48 +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 msrest.serialization import Model - - -class Identity(Model): - """Identity for the resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar principal_id: The principal ID of resource identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of resource. - :vartype tenant_id: str - :param type: Required. The identity type. Possible values include: 'None', - 'SystemAssigned' - :type type: str or ~azure.mgmt.search.models.IdentityType - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'IdentityType'}, - } - - def __init__(self, *, type, **kwargs) -> None: - super(Identity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = type diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py deleted file mode 100644 index 7269ad98e425..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class Operation(Model): - """Describes a REST API operation. - - 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}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.search.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs): - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py deleted file mode 100644 index 0c4d5975dc8d..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - 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 - """ - - _validation = { - 'provider': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.operation = None - self.resource = None - self.description = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py deleted file mode 100644 index a1e6e6bfc353..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_display_py3.py +++ /dev/null @@ -1,51 +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 msrest.serialization import Model - - -class OperationDisplay(Model): - """The object that describes the operation. - - 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 - """ - - _validation = { - 'provider': {'readonly': True}, - 'operation': {'readonly': True}, - 'resource': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(OperationDisplay, self).__init__(**kwargs) - self.provider = None - self.operation = None - self.resource = None - self.description = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py deleted file mode 100644 index 6aaeff67cdb2..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class OperationPaged(Paged): - """ - A paging container for iterating over a list of :class:`Operation ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[Operation]'} - } - - def __init__(self, *args, **kwargs): - - super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py deleted file mode 100644 index 1b4dbae10d28..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/operation_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class Operation(Model): - """Describes a REST API operation. - - 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}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.search.models.OperationDisplay - """ - - _validation = { - 'name': {'readonly': True}, - 'display': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__(self, **kwargs) -> None: - super(Operation, self).__init__(**kwargs) - self.name = None - self.display = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py deleted file mode 100644 index 4b4f282ed5eb..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class QueryKey(Model): - """Describes an API key for a given Azure Search service that has permissions - for query operations only. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the query API key; may be empty. - :vartype name: str - :ivar key: The value of the query API key. - :vartype key: str - """ - - _validation = { - 'name': {'readonly': True}, - 'key': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(QueryKey, self).__init__(**kwargs) - self.name = None - self.key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py deleted file mode 100644 index f1fc2d9aade8..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class QueryKeyPaged(Paged): - """ - A paging container for iterating over a list of :class:`QueryKey ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[QueryKey]'} - } - - def __init__(self, *args, **kwargs): - - super(QueryKeyPaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py deleted file mode 100644 index e02c33495eed..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/query_key_py3.py +++ /dev/null @@ -1,41 +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 msrest.serialization import Model - - -class QueryKey(Model): - """Describes an API key for a given Azure Search service that has permissions - for query operations only. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar name: The name of the query API key; may be empty. - :vartype name: str - :ivar key: The value of the query API key. - :vartype key: str - """ - - _validation = { - 'name': {'readonly': True}, - 'key': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'key': {'key': 'key', 'type': 'str'}, - } - - def __init__(self, **kwargs) -> None: - super(QueryKey, self).__init__(**kwargs) - self.name = None - self.key = None diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py deleted file mode 100644 index 8dc5dd8833f9..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource.py +++ /dev/null @@ -1,61 +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 msrest.serialization import Model - - -class Resource(Model): - """Base type for all Azure resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - } - - def __init__(self, **kwargs): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py deleted file mode 100644 index 752e7a2cbbb9..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/resource_py3.py +++ /dev/null @@ -1,61 +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 msrest.serialization import Model - - -class Resource(Model): - """Base type for all Azure resources. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - """ - - _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'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, **kwargs) -> None: - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - self.identity = identity diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py deleted file mode 100644 index 96e0dc7df52e..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class SearchManagementRequestOptions(Model): - """Additional parameters for a set of operations. - - :param client_request_id: A client-generated GUID value that identifies - this request. If specified, this will be included in response information - as a way to track the request. - :type client_request_id: str - """ - - _attribute_map = { - 'client_request_id': {'key': '', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(SearchManagementRequestOptions, self).__init__(**kwargs) - self.client_request_id = kwargs.get('client_request_id', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py deleted file mode 100644 index 3e36e9a15800..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_management_request_options_py3.py +++ /dev/null @@ -1,30 +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 msrest.serialization import Model - - -class SearchManagementRequestOptions(Model): - """Additional parameters for a set of operations. - - :param client_request_id: A client-generated GUID value that identifies - this request. If specified, this will be included in response information - as a way to track the request. - :type client_request_id: str - """ - - _attribute_map = { - 'client_request_id': {'key': '', 'type': 'str'}, - } - - def __init__(self, *, client_request_id: str=None, **kwargs) -> None: - super(SearchManagementRequestOptions, self).__init__(**kwargs) - self.client_request_id = client_request_id diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py deleted file mode 100644 index 6bd3de6791de..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service.py +++ /dev/null @@ -1,124 +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 .resource import Resource - - -class SearchService(Resource): - """Describes an Azure Search service and its current state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - :param 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. Default value: 1 . - :type replica_count: int - :param partition_count: The number of partitions in the Search service; if - specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only - valid for standard SKUs. For 'standard3' services with hostingMode set to - 'highDensity', the allowed values are between 1 and 3. Default value: 1 . - :type partition_count: int - :param hosting_mode: 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 for - any other SKU. For the standard3 SKU, the value is either 'default' or - 'highDensity'. For all other SKUs, this value must be 'default'. Possible - values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode - :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 service is being provisioned or - scaled up or down. 'deleting': The Search service is being deleted. - 'degraded': The Search service is degraded. This can occur when the - underlying search units are not healthy. The Search service is most likely - operational, but performance might be slow and some requests might be - dropped. 'disabled': The Search service is disabled. In this state, the - service will reject all API requests. 'error': The Search service is in an - error state. If your service is in the degraded, disabled, or error - states, it means the Azure Search team is actively investigating the - underlying issue. Dedicated services in these states are still chargeable - based on the number of search units provisioned. Possible values include: - 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus - :ivar status_details: The details of the Search service status. - :vartype status_details: str - :ivar provisioning_state: The state of the last provisioning operation - performed on the Search service. Provisioning is an intermediate state - that occurs while service capacity is being established. After capacity is - set up, provisioningState changes to either 'succeeded' or 'failed'. - Client applications can poll provisioning status (the recommended polling - interval is 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. Possible values include: 'succeeded', - 'provisioning', 'failed' - :vartype provisioning_state: str or - ~azure.mgmt.search.models.ProvisioningState - :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. This property is required when creating a new Search - Service. - :type sku: ~azure.mgmt.search.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'replica_count': {'maximum': 12, 'minimum': 1}, - 'partition_count': {'maximum': 12, 'minimum': 1}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, - 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, - 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(SearchService, self).__init__(**kwargs) - self.replica_count = kwargs.get('replica_count', 1) - self.partition_count = kwargs.get('partition_count', 1) - self.hosting_mode = kwargs.get('hosting_mode', "default") - self.status = None - self.status_details = None - self.provisioning_state = None - self.sku = kwargs.get('sku', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py deleted file mode 100644 index dbb3236affea..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_paged.py +++ /dev/null @@ -1,27 +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 msrest.paging import Paged - - -class SearchServicePaged(Paged): - """ - A paging container for iterating over a list of :class:`SearchService ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[SearchService]'} - } - - def __init__(self, *args, **kwargs): - - super(SearchServicePaged, self).__init__(*args, **kwargs) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py deleted file mode 100644 index 823afff5b9a5..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/search_service_py3.py +++ /dev/null @@ -1,124 +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 .resource_py3 import Resource - - -class SearchService(Resource): - """Describes an Azure Search service and its current state. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: The ID of the resource. This can be used with the Azure Resource - Manager to link resources together. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The resource type. - :vartype type: str - :param location: The geographic location of the resource. This must be one - of the supported and registered Azure Geo Regions (for example, West US, - East US, Southeast Asia, and so forth). This property is required when - creating a new resource. - :type location: str - :param tags: Tags to help categorize the resource in the Azure portal. - :type tags: dict[str, str] - :param identity: The identity of the resource. - :type identity: ~azure.mgmt.search.models.Identity - :param 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. Default value: 1 . - :type replica_count: int - :param partition_count: The number of partitions in the Search service; if - specified, it can be 1, 2, 3, 4, 6, or 12. Values greater than 1 are only - valid for standard SKUs. For 'standard3' services with hostingMode set to - 'highDensity', the allowed values are between 1 and 3. Default value: 1 . - :type partition_count: int - :param hosting_mode: 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 for - any other SKU. For the standard3 SKU, the value is either 'default' or - 'highDensity'. For all other SKUs, this value must be 'default'. Possible - values include: 'default', 'highDensity'. Default value: "default" . - :type hosting_mode: str or ~azure.mgmt.search.models.HostingMode - :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 service is being provisioned or - scaled up or down. 'deleting': The Search service is being deleted. - 'degraded': The Search service is degraded. This can occur when the - underlying search units are not healthy. The Search service is most likely - operational, but performance might be slow and some requests might be - dropped. 'disabled': The Search service is disabled. In this state, the - service will reject all API requests. 'error': The Search service is in an - error state. If your service is in the degraded, disabled, or error - states, it means the Azure Search team is actively investigating the - underlying issue. Dedicated services in these states are still chargeable - based on the number of search units provisioned. Possible values include: - 'running', 'provisioning', 'deleting', 'degraded', 'disabled', 'error' - :vartype status: str or ~azure.mgmt.search.models.SearchServiceStatus - :ivar status_details: The details of the Search service status. - :vartype status_details: str - :ivar provisioning_state: The state of the last provisioning operation - performed on the Search service. Provisioning is an intermediate state - that occurs while service capacity is being established. After capacity is - set up, provisioningState changes to either 'succeeded' or 'failed'. - Client applications can poll provisioning status (the recommended polling - interval is 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. Possible values include: 'succeeded', - 'provisioning', 'failed' - :vartype provisioning_state: str or - ~azure.mgmt.search.models.ProvisioningState - :param sku: The SKU of the Search Service, which determines price tier and - capacity limits. This property is required when creating a new Search - Service. - :type sku: ~azure.mgmt.search.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'replica_count': {'maximum': 12, 'minimum': 1}, - 'partition_count': {'maximum': 12, 'minimum': 1}, - 'status': {'readonly': True}, - 'status_details': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'Identity'}, - 'replica_count': {'key': 'properties.replicaCount', 'type': 'int'}, - 'partition_count': {'key': 'properties.partitionCount', 'type': 'int'}, - 'hosting_mode': {'key': 'properties.hostingMode', 'type': 'HostingMode'}, - 'status': {'key': 'properties.status', 'type': 'SearchServiceStatus'}, - 'status_details': {'key': 'properties.statusDetails', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str=None, tags=None, identity=None, replica_count: int=1, partition_count: int=1, hosting_mode="default", sku=None, **kwargs) -> None: - super(SearchService, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.replica_count = replica_count - self.partition_count = partition_count - self.hosting_mode = hosting_mode - self.status = None - self.status_details = None - self.provisioning_state = None - self.sku = sku diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py deleted file mode 100644 index 375894ee72ca..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Sku(Model): - """Defines the SKU of an Azure Search Service, which determines price tier and - capacity limits. - - :param name: The SKU of the Search service. Valid values include: 'free': - Shared service. 'basic': Dedicated service with up to 3 replicas. - 'standard': Dedicated service with up to 12 partitions and 12 replicas. - 'standard2': Similar to standard, but with more capacity per search unit. - 'standard3': The largest Standard offering with up to 12 partitions and 12 - replicas (or up to 3 partitions with more indexes if you also set the - hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports - 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports - 2TB per partition, up to 12 partitions.'. Possible values include: 'free', - 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', - 'storage_optimized_l2' - :type name: str or ~azure.mgmt.search.models.SkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py deleted file mode 100644 index aae43fc4e4b7..000000000000 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/models/sku_py3.py +++ /dev/null @@ -1,39 +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 msrest.serialization import Model - - -class Sku(Model): - """Defines the SKU of an Azure Search Service, which determines price tier and - capacity limits. - - :param name: The SKU of the Search service. Valid values include: 'free': - Shared service. 'basic': Dedicated service with up to 3 replicas. - 'standard': Dedicated service with up to 12 partitions and 12 replicas. - 'standard2': Similar to standard, but with more capacity per search unit. - 'standard3': The largest Standard offering with up to 12 partitions and 12 - replicas (or up to 3 partitions with more indexes if you also set the - hostingMode property to 'highDensity'). 'storage_optimized_l1': Supports - 1TB per partition, up to 12 partitions. 'storage_optimized_l2': Supports - 2TB per partition, up to 12 partitions.'. Possible values include: 'free', - 'basic', 'standard', 'standard2', 'standard3', 'storage_optimized_l1', - 'storage_optimized_l2' - :type name: str or ~azure.mgmt.search.models.SkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'SkuName'}, - } - - def __init__(self, *, name=None, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name 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 4b49a00e8eb1..be7923d1fb0f 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 @@ -9,14 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from .operations import Operations -from .admin_keys_operations import AdminKeysOperations -from .query_keys_operations import QueryKeysOperations -from .services_operations import ServicesOperations +from ._operations import Operations +from ._admin_keys_operations import AdminKeysOperations +from ._query_keys_operations import QueryKeysOperations +from ._services_operations import ServicesOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._shared_private_link_resources_operations import SharedPrivateLinkResourcesOperations __all__ = [ 'Operations', 'AdminKeysOperations', 'QueryKeysOperations', 'ServicesOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', + 'SharedPrivateLinkResourcesOperations', ] 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 similarity index 94% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/admin_keys_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_admin_keys_operations.py index 7887d302f3d4..c1c06571498d 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 @@ -19,11 +19,13 @@ class AdminKeysOperations(object): """AdminKeysOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,21 +35,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): """Gets the primary and secondary admin API keys for the specified Azure - Search service. + Cognitive Search service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -102,7 +104,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdminKeyResult', response) @@ -122,8 +123,8 @@ def regenerate( current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param key_kind: Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. Possible values include: 'primary', @@ -183,7 +184,6 @@ def regenerate( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('AdminKeyResult', response) 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 similarity index 88% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_operations.py index c83587eafb24..0039448d7c60 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 @@ -19,11 +19,13 @@ class Operations(object): """Operations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config @@ -52,8 +54,7 @@ def list( ~azure.mgmt.search.models.OperationPaged[~azure.mgmt.search.models.Operation] :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] @@ -78,6 +79,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -88,12 +94,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/providers/Microsoft.Search/operations'} 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 new file mode 100644 index 000000000000..746543c3405f --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,374 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + def update( + self, resource_group_name, search_service_name, private_endpoint_connection_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Updates a Private Endpoint connection to the search service in the + given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param properties: Describes the properties of an existing Private + Endpoint connection to the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.PrivateEndpointConnectionProperties + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + private_endpoint_connection = models.PrivateEndpointConnection(properties=properties) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def get( + self, resource_group_name, search_service_name, private_endpoint_connection_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the private endpoint connection to the search + service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def delete( + self, resource_group_name, search_service_name, private_endpoint_connection_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Disconnects the private endpoint connection and deletes it from the + search service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param private_endpoint_connection_name: The name of the private + endpoint connection to the Azure Cognitive Search service with the + specified resource group. + :type private_endpoint_connection_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateEndpointConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.PrivateEndpointConnection or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}'} + + def list_by_service( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all private endpoint connections in the given service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateEndpointConnection + :rtype: + ~azure.mgmt.search.models.PrivateEndpointConnectionPaged[~azure.mgmt.search.models.PrivateEndpointConnection] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateEndpointConnectionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections'} 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 new file mode 100644 index 000000000000..bc37b3bab670 --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_private_link_resources_operations.py @@ -0,0 +1,126 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + def list_supported( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all supported private link resource types for the given + service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateLinkResource + :rtype: + ~azure.mgmt.search.models.PrivateLinkResourcePaged[~azure.mgmt.search.models.PrivateLinkResource] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_supported.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_supported.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources'} 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 similarity index 92% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/query_keys_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_query_keys_operations.py index 8fb9e29e0309..1fa02c10cef7 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 @@ -19,11 +19,13 @@ class QueryKeysOperations(object): """QueryKeysOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -33,21 +35,21 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config def create( self, resource_group_name, search_service_name, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Generates a new query key for the specified Search service. You can + """Generates a new query key for the specified search service. You can create up to 50 query keys per service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param name: The name of the new query API key. :type name: str @@ -105,7 +107,6 @@ def create( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('QueryKey', response) @@ -118,14 +119,15 @@ def create( def list_by_search_service( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Returns the list of query API keys for the given Azure Search service. + """Returns the list of query API keys for the given Azure Cognitive Search + service. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -145,8 +147,7 @@ def list_by_search_service( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_search_service.metadata['url'] @@ -178,7 +179,12 @@ def internal_paging(next_link=None, raw=False): header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -189,12 +195,10 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.QueryKeyPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_search_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys'} @@ -209,8 +213,8 @@ def delete( current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param key: The query key to be deleted. Query keys are identified by value, not by name. diff --git a/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py similarity index 92% rename from sdk/search/azure-mgmt-search/azure/mgmt/search/operations/services_operations.py rename to sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_services_operations.py index c89b0d0e364d..32cdb81e1e25 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 @@ -21,11 +21,13 @@ class ServicesOperations(object): """ServicesOperations operations. + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The API version to use for each request. The current version is 2015-08-19. Constant value: "2015-08-19". + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". """ models = models @@ -35,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-19" + self.api_version = "2020-08-01" self.config = config @@ -99,24 +101,24 @@ def _create_or_update_initial( def create_or_update( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a Search service in the given resource group. If the - Search service already exists, all properties will be updated with the + """Creates or updates a search service in the given resource group. If the + search service already exists, all properties will be updated with the given values. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure 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 + :param search_service_name: The name of the Azure Cognitive Search + service to create or update. Search service names must only contain + lowercase letters, digits or dashes, cannot use dash as the first two + or last one characters, cannot contain consecutive dashes, and must be + between 2 and 60 characters in length. Search service names must be + globally unique since they are part of the service URI (https://.search.windows.net). You cannot change the service name after the service is created. :type search_service_name: str - :param service: The definition of the Search service to create or + :param service: The definition of the search service to create or update. :type service: ~azure.mgmt.search.models.SearchService :param search_management_request_options: Additional parameters for @@ -166,17 +168,17 @@ def get_long_running_output(response): def update( self, resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Updates an existing Search service in the given resource group. + """Updates an existing search service in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service to - update. + :param search_service_name: The name of the Azure Cognitive Search + service to update. :type search_service_name: str - :param service: The definition of the Search service to update. - :type service: ~azure.mgmt.search.models.SearchService + :param service: The definition of the search service to update. + :type service: ~azure.mgmt.search.models.SearchServiceUpdate :param search_management_request_options: Additional parameters for the operation :type search_management_request_options: @@ -222,7 +224,7 @@ def update( header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') # Construct body - body_content = self._serialize.body(service, 'SearchService') + body_content = self._serialize.body(service, 'SearchServiceUpdate') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -234,7 +236,6 @@ def update( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SearchService', response) @@ -247,15 +248,15 @@ def update( def get( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets the Search service with the given name in the given resource + """Gets the search service with the given name in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -310,7 +311,6 @@ def get( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('SearchService', response) @@ -323,15 +323,15 @@ def get( def delete( self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Deletes a Search service in the given resource group, along with its + """Deletes a search service in the given resource group, along with its associated resources. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param search_service_name: The name of the Azure Search service - associated with the specified resource group. + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. :type search_service_name: str :param search_management_request_options: Additional parameters for the operation @@ -390,7 +390,7 @@ def delete( def list_by_resource_group( self, resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all Search services in the given resource group. + """Gets a list of all search services in the given resource group. :param resource_group_name: The name of the resource group within the current subscription. You can obtain this value from the Azure @@ -414,8 +414,7 @@ def list_by_resource_group( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_resource_group.metadata['url'] @@ -447,6 +446,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -457,19 +461,17 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices'} def list_by_subscription( self, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of all Search services in the given subscription. + """Gets a list of all search services in the given subscription. :param search_management_request_options: Additional parameters for the operation @@ -489,8 +491,7 @@ def list_by_subscription( if search_management_request_options is not None: client_request_id = search_management_request_options.client_request_id - def internal_paging(next_link=None, raw=False): - + def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list_by_subscription.metadata['url'] @@ -521,6 +522,11 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -531,23 +537,21 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies) - + header_dict = None if raw: header_dict = {} - client_raw_response = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + deserialized = models.SearchServicePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Search/searchServices'} def check_name_availability( self, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): - """Checks whether or not the given Search service name is available for + """Checks whether or not the given search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://.search.windows.net). - :param name: The Search service name to validate. Search service names + :param name: The search service name to validate. 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. @@ -608,7 +612,6 @@ def check_name_availability( raise exp deserialized = None - if response.status_code == 200: deserialized = self._deserialize('CheckNameAvailabilityOutput', response) 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 new file mode 100644 index 000000000000..3c8edd84f11f --- /dev/null +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/operations/_shared_private_link_resources_operations.py @@ -0,0 +1,433 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class SharedPrivateLinkResourcesOperations(object): + """SharedPrivateLinkResourcesOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for each request. Constant value: "2020-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2020-08-01" + + self.config = config + + + def _create_or_update_initial( + self, resource_group_name, search_service_name, shared_private_link_resource_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + shared_private_link_resource = models.SharedPrivateLinkResource(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct body + body_content = self._serialize.body(shared_private_link_resource, 'SharedPrivateLinkResource') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, search_service_name, shared_private_link_resource_name, properties=None, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Initiates the creation or update of a shared private link resource + managed by the search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param properties: Describes the properties of a Shared Private Link + Resource managed by the Azure Cognitive Search service. + :type properties: + ~azure.mgmt.search.models.SharedPrivateLinkResourceProperties + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns + SharedPrivateLinkResource or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.search.models.SharedPrivateLinkResource] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.search.models.SharedPrivateLinkResource]] + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + shared_private_link_resource_name=shared_private_link_resource_name, + properties=properties, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + def get( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets the details of the shared private link resource managed by the + search service in the given resource group. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SharedPrivateLinkResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.search.models.SharedPrivateLinkResource or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('SharedPrivateLinkResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + + def _delete_initial( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str'), + 'sharedPrivateLinkResourceName': self._serialize.url("shared_private_link_resource_name", shared_private_link_resource_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [202, 204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, search_service_name, shared_private_link_resource_name, search_management_request_options=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Initiates the deletion of the shared private link resource from the + search service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param shared_private_link_resource_name: The name of the shared + private link resource managed by the Azure Cognitive Search service + within the specified resource group. + :type shared_private_link_resource_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + search_service_name=search_service_name, + shared_private_link_resource_name=shared_private_link_resource_name, + search_management_request_options=search_management_request_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}'} + + def list_by_service( + self, resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of all shared private link resources managed by the given + service. + + :param resource_group_name: The name of the resource group within the + current subscription. You can obtain this value from the Azure + Resource Manager API or the portal. + :type resource_group_name: str + :param search_service_name: The name of the Azure Cognitive Search + service associated with the specified resource group. + :type search_service_name: str + :param search_management_request_options: Additional parameters for + the operation + :type search_management_request_options: + ~azure.mgmt.search.models.SearchManagementRequestOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of SharedPrivateLinkResource + :rtype: + ~azure.mgmt.search.models.SharedPrivateLinkResourcePaged[~azure.mgmt.search.models.SharedPrivateLinkResource] + :raises: :class:`CloudError` + """ + client_request_id = None + if search_management_request_options is not None: + client_request_id = search_management_request_options.client_request_id + + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_service.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'searchServiceName': self._serialize.url("search_service_name", search_service_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + if client_request_id is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("client_request_id", client_request_id, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SharedPrivateLinkResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources'} diff --git a/sdk/search/azure-mgmt-search/setup.py b/sdk/search/azure-mgmt-search/setup.py index a2f5d0ca1a19..9d7054e7f31f 100644 --- a/sdk/search/azure-mgmt-search/setup.py +++ b/sdk/search/azure-mgmt-search/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False, From cb9a3859214148e347a707f64ad91272927bdc49 Mon Sep 17 00:00:00 2001 From: colawwj Date: Mon, 28 Sep 2020 13:40:09 +0800 Subject: [PATCH 3/3] release-758-search --- sdk/search/azure-mgmt-search/CHANGELOG.md | 19 + .../azure/mgmt/search/version.py | 2 +- ...st_mgmt_search.test_search_admin_keys.yaml | 224 +- ...st_mgmt_search.test_search_query_keys.yaml | 297 ++- ...test_mgmt_search.test_search_services.yaml | 1925 +++++++++++++++-- .../tests/test_mgmt_search.py | 6 +- 6 files changed, 2076 insertions(+), 397 deletions(-) diff --git a/sdk/search/azure-mgmt-search/CHANGELOG.md b/sdk/search/azure-mgmt-search/CHANGELOG.md index 740ed3ca7087..e8c973395c91 100644 --- a/sdk/search/azure-mgmt-search/CHANGELOG.md +++ b/sdk/search/azure-mgmt-search/CHANGELOG.md @@ -1,5 +1,24 @@ # Release History +## 3.0.0 (2019-09-28) + +**Features** + + - Model SearchService has a new parameter shared_private_link_resources + - Model SearchService has a new parameter public_network_access + - Model SearchService has a new parameter private_endpoint_connections + - Model SearchService has a new parameter network_rule_set + - Added operation group PrivateEndpointConnectionsOperations + - Added operation group PrivateLinkResourcesOperations + - Added operation group SharedPrivateLinkResourcesOperations + +**Breaking changes** + + - Parameter location of model SearchService is now required + - Model Resource no longer has parameter location + - Model Resource no longer has parameter identity + - Model Resource no longer has parameter tags + ## 2.1.0 (2019-05-24) **Features** 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 be75d8eae586..7f225c6aab41 100644 --- a/sdk/search/azure-mgmt-search/azure/mgmt/search/version.py +++ b/sdk/search/azure-mgmt-search/azure/mgmt/search/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1.0" +VERSION = "3.0.0" diff --git a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_admin_keys.yaml b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_admin_keys.yaml index cca43b3b5b89..f123c90f794a 100644 --- a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_admin_keys.yaml +++ b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_admin_keys.yaml @@ -1,105 +1,157 @@ interactions: - request: - body: '{"location": "westus", "sku": {"name": "free"}, "properties": {"hostingMode": - "default", "replicaCount": 1, "partitionCount": 1}}' + body: '{"location": "westus", "properties": {"replicaCount": 1, "partitionCount": + 1, "hostingMode": "default"}, "sku": {"name": "free"}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['129'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [fa2a4500-c8a5-11e6-a051-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '129' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys?api-version=2020-08-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys","name":"ptvstestquerykeys","type":"Microsoft.Search/searchServices","location":"West - US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":null,"provisioningState":"succeeded","hostingMode":"default"},"sku":{"name":"free"}}'} + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys","name":"ptvstestquerykeys","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"free"}}' headers: - Cache-Control: [no-cache] - Content-Length: ['441'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:23:09 GMT'] - ETag: [W/"datetime'2016-12-23T00%3A23%3A10.2711849Z'"] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - elapsed-time: ['1163'] - request-id: [fa2a4500-c8a5-11e6-a051-ecb1d756380e] - x-ms-correlation-request-id: [e73772be-9a67-42b3-92b9-84c65a78f6c2] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [fa2a4500-c8a5-11e6-a051-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002310Z:e73772be-9a67-42b3-92b9-84c65a78f6c2'] - status: {code: 201, message: Created} + cache-control: + - no-cache + content-length: + - '583' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:15 GMT + elapsed-time: + - '1487' + etag: + - W/"datetime'2020-09-28T03%3A14%3A14.2581091Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - aa359c4e-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [fc037518-c8a5-11e6-ad6e-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys/listAdminKeys?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys/listAdminKeys?api-version=2020-08-01 response: - body: {string: '{"primaryKey":"01BF7405A5901538C4F0F3DB31B07B73","secondaryKey":"228E0DA6EC5A817DB1A0BB592BF22723"}'} + body: + string: '{"primaryKey":"2AF954A1BA6D476F68255C5DFFA8ED04","secondaryKey":"D5CC1A982A782AF20CB13E18CEAFEEB4"}' headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:23:11 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['99'] - elapsed-time: ['176'] - request-id: [fc037518-c8a5-11e6-ad6e-ecb1d756380e] - x-ms-correlation-request-id: [d6976bc0-8325-4384-8a80-ff87cba59312] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [fc037518-c8a5-11e6-ad6e-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002311Z:d6976bc0-8325-4384-8a80-ff87cba59312'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '99' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:16 GMT + elapsed-time: + - '289' + expires: + - '-1' + pragma: + - no-cache + request-id: + - b0bb24b2-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [fca6bd10-c8a5-11e6-a35e-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys/regenerateAdminKey/primary?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_admin_keys3f6f0ff0/providers/Microsoft.Search/searchServices/ptvstestquerykeys/regenerateAdminKey/primary?api-version=2020-08-01 response: - body: {string: '{"primaryKey":"160C118CFA43D8555F3171B6D69F2F25","secondaryKey":"228E0DA6EC5A817DB1A0BB592BF22723"}'} + body: + string: '{"primaryKey":"4528C6ECDFC87A5F153C1E6DD1A3C295","secondaryKey":"D5CC1A982A782AF20CB13E18CEAFEEB4"}' headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:23:11 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['99'] - elapsed-time: ['378'] - request-id: [fca6bd10-c8a5-11e6-a35e-ecb1d756380e] - x-ms-correlation-request-id: [de432fee-cbd9-45d7-997e-1c5ed37f477f] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [fca6bd10-c8a5-11e6-a35e-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002312Z:de432fee-cbd9-45d7-997e-1c5ed37f477f'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '99' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:17 GMT + elapsed-time: + - '566' + expires: + - '-1' + pragma: + - no-cache + request-id: + - b1148b6a-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK version: 1 diff --git a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_query_keys.yaml b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_query_keys.yaml index b5b7c5deb7db..b6719f0b41d1 100644 --- a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_query_keys.yaml +++ b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_query_keys.yaml @@ -1,138 +1,207 @@ interactions: - request: - body: '{"properties": {"hostingMode": "default", "replicaCount": 1, "partitionCount": - 1}, "sku": {"name": "free"}, "location": "westus"}' + body: '{"location": "westus", "properties": {"replicaCount": 1, "partitionCount": + 1, "hostingMode": "default"}, "sku": {"name": "basic"}}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['129'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [8b43ff7e-c8a5-11e6-8570-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeys?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeyss?api-version=2020-08-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeys","name":"ptvstestquerykeys","type":"Microsoft.Search/searchServices","location":"West - US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":null,"provisioningState":"succeeded","hostingMode":"default"},"sku":{"name":"free"}}'} + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeyss","name":"ptvstestquerykeyss","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' headers: - Cache-Control: [no-cache] - Content-Length: ['441'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:20:03 GMT'] - ETag: [W/"datetime'2016-12-23T00%3A20%3A03.7237675Z'"] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - elapsed-time: ['1299'] - request-id: [8b43ff7e-c8a5-11e6-8570-ecb1d756380e] - x-ms-correlation-request-id: [ee4f17f1-9aff-4b09-8652-dc297666f9d3] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - x-ms-request-id: [8b43ff7e-c8a5-11e6-8570-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002004Z:ee4f17f1-9aff-4b09-8652-dc297666f9d3'] - status: {code: 201, message: Created} + cache-control: + - no-cache + content-length: + - '586' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:34 GMT + elapsed-time: + - '2235' + etag: + - W/"datetime'2020-09-28T03%3A14%3A33.5665122Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - b631d33c-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 201 + message: Created - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [8cfe2f86-c8a5-11e6-9100-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeys/createQueryKey/testkey?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeyss/createQueryKey/testkey?api-version=2020-08-01 response: - body: {string: '{"name":"testkey","key":"AF89A03FF9A6182B6C4BA88E91D1D5EA"}'} + body: + string: '{"name":"testkey","key":"55CCE3A3AF0D5766D208E78E4B24F240"}' headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:20:04 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['59'] - elapsed-time: ['349'] - request-id: [8cfe2f86-c8a5-11e6-9100-ecb1d756380e] - x-ms-correlation-request-id: [a4820bf9-12f0-4498-bee3-3b40781ac29b] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-id: [8cfe2f86-c8a5-11e6-9100-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002005Z:a4820bf9-12f0-4498-bee3-3b40781ac29b'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '59' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:34 GMT + elapsed-time: + - '215' + expires: + - '-1' + pragma: + - no-cache + request-id: + - bbf72bfa-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [8da5f0f4-c8a5-11e6-a582-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeys/listQueryKeys?api-version=2015-08-19 + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeyss/listQueryKeys?api-version=2020-08-01 response: - body: {string: '{"value":[{"name":null,"key":"F67EDCEFE7EAFC8ADE86A8AE40236A81"},{"name":"testkey","key":"AF89A03FF9A6182B6C4BA88E91D1D5EA"}],"nextLink":null}'} + body: + string: '{"value":[{"name":null,"key":"DAEF832B54D3954FF5E2B0298DDB38D2"},{"name":"testkey","key":"55CCE3A3AF0D5766D208E78E4B24F240"}],"nextLink":null}' headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:20:06 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['142'] - elapsed-time: ['152'] - request-id: [8da5f0f4-c8a5-11e6-a582-ecb1d756380e] - x-ms-correlation-request-id: [65bacbd1-d6b5-48d2-a07a-22ac84b4790e] - x-ms-ratelimit-remaining-subscription-reads: ['14998'] - x-ms-request-id: [8da5f0f4-c8a5-11e6-a582-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002006Z:65bacbd1-d6b5-48d2-a07a-22ac84b4790e'] - status: {code: 200, message: OK} + cache-control: + - no-cache + content-length: + - '142' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:35 GMT + elapsed-time: + - '179' + expires: + - '-1' + pragma: + - no-cache + request-id: + - bc45dcbe-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK - request: body: null headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [8e2a3d62-c8a5-11e6-bdf9-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeys/deleteQueryKey/testkey?api-version=2015-08-19 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_query_keys40e9101d/providers/Microsoft.Search/searchServices/ptvstestquerykeyss/deleteQueryKey/testkey?api-version=2020-08-01 response: - body: {string: '{"error":{"code":"Unknown","message":"This API key does not exist - for service ''ptvstestquerykeys''. RequestId: 8e2a3d62-c8a5-11e6-bdf9-ecb1d756380e","target":null,"details":null}}'} + body: + string: '{"error":{"code":"Unknown","message":"This API key does not exist for + service ''ptvstestquerykeyss''. RequestId: bc8e7dd4-0138-11eb-af89-0242ac110006","target":null,"details":null}}' headers: - Cache-Control: [no-cache] - Content-Language: [en] - Content-Length: ['178'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:20:06 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - elapsed-time: ['199'] - request-id: [8e2a3d62-c8a5-11e6-bdf9-ecb1d756380e] - x-ms-correlation-request-id: [b1665ad3-672b-4b19-beec-a7992634d4c4] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [8e2a3d62-c8a5-11e6-bdf9-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T002007Z:b1665ad3-672b-4b19-beec-a7992634d4c4'] - status: {code: 404, message: Not Found} + cache-control: + - no-cache + content-language: + - en + content-length: + - '179' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:36 GMT + elapsed-time: + - '317' + expires: + - '-1' + pragma: + - no-cache + request-id: + - bc8e7dd4-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 404 + message: Not Found version: 1 diff --git a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_services.yaml b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_services.yaml index 3bfdeb8dc2bc..962409dea0dd 100644 --- a/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_services.yaml +++ b/sdk/search/azure-mgmt-search/tests/recordings/test_mgmt_search.test_search_services.yaml @@ -2,204 +2,1743 @@ interactions: - request: body: '{"name": "ptvstestsearch", "type": "searchServices"}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['52'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [2511dcd8-c8a4-11e6-a7ba-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Search/checkNameAvailability?api-version=2015-08-19 - response: - body: {string: '{"nameAvailable":true,"reason":null,"message":null}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:10:00 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['51'] - elapsed-time: ['8'] - request-id: [2511dcd8-c8a4-11e6-a7ba-ecb1d756380e] - x-ms-correlation-request-id: [b2ebca8b-5c06-4a2b-9139-a3116cec7b16] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - x-ms-request-id: [2511dcd8-c8a4-11e6-a7ba-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001000Z:b2ebca8b-5c06-4a2b-9139-a3116cec7b16'] - status: {code: 200, message: OK} -- request: - body: '{"sku": {"name": "free"}, "location": "westus", "properties": {"replicaCount": - 1, "hostingMode": "default", "partitionCount": 1}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['129'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [25679dda-c8a4-11e6-bf37-ecb1d756380e] + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Search/checkNameAvailability?api-version=2020-08-01 + response: + body: + string: '{"nameAvailable":true,"reason":null,"message":null}' + headers: + cache-control: + - no-cache + content-length: + - '51' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:44 GMT + elapsed-time: + - '68' + expires: + - '-1' + pragma: + - no-cache + request-id: + - c0c2b122-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"replicaCount": 1, "partitionCount": + 1, "hostingMode": "default"}, "sku": {"name": "basic"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '130' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2015-08-19 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West - US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":null,"provisioningState":"succeeded","hostingMode":"default"},"sku":{"name":"free"}}'} - headers: - Cache-Control: [no-cache] - Content-Length: ['433'] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:10:03 GMT'] - ETag: [W/"datetime'2016-12-23T00%3A10%3A03.8006148Z'"] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - elapsed-time: ['1540'] - request-id: [25679dda-c8a4-11e6-bf37-ecb1d756380e] - x-ms-correlation-request-id: [14245062-ac08-464b-a702-5fdee9449cde] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [25679dda-c8a4-11e6-bf37-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001003Z:14245062-ac08-464b-a702-5fdee9449cde'] - status: {code: 201, message: Created} + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:14:55 GMT + elapsed-time: + - '5998' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:15:27 GMT + elapsed-time: + - '351' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:15:58 GMT + elapsed-time: + - '243' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:16:29 GMT + elapsed-time: + - '265' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:17:01 GMT + elapsed-time: + - '2328' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:17:32 GMT + elapsed-time: + - '272' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:18:02 GMT + elapsed-time: + - '266' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:18:33 GMT + elapsed-time: + - '343' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:19:04 GMT + elapsed-time: + - '254' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:19:34 GMT + elapsed-time: + - '266' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:20:05 GMT + elapsed-time: + - '319' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:20:35 GMT + elapsed-time: + - '275' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:21:06 GMT + elapsed-time: + - '333' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:21:37 GMT + elapsed-time: + - '337' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:22:08 GMT + elapsed-time: + - '299' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:22:39 GMT + elapsed-time: + - '311' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:23:10 GMT + elapsed-time: + - '298' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:23:40 GMT + elapsed-time: + - '343' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:24:11 GMT + elapsed-time: + - '287' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:24:41 GMT + elapsed-time: + - '323' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:25:12 GMT + elapsed-time: + - '300' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:25:43 GMT + elapsed-time: + - '361' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:26:13 GMT + elapsed-time: + - '289' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:26:44 GMT + elapsed-time: + - '303' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:27:14 GMT + elapsed-time: + - '266' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:27:45 GMT + elapsed-time: + - '465' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:28:16 GMT + elapsed-time: + - '391' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:28:47 GMT + elapsed-time: + - '391' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:29:18 GMT + elapsed-time: + - '475' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"provisioning","statusDetails":"","provisioningState":"provisioning","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '584' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:29:49 GMT + elapsed-time: + - '314' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '576' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:30:20 GMT + elapsed-time: + - '884' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - c1ac5f70-0138-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK - request: body: '{"name": "ptvstestsearch", "type": "searchServices"}' headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['52'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [2742297e-c8a4-11e6-8276-ecb1d756380e] + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json; charset=utf-8 + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Search/checkNameAvailability?api-version=2015-08-19 - response: - body: {string: '{"nameAvailable":false,"reason":"AlreadyExists","message":null}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:10:04 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['63'] - elapsed-time: ['10'] - request-id: [2742297e-c8a4-11e6-8276-ecb1d756380e] - x-ms-correlation-request-id: [ef856114-9972-4396-a409-d6eee39b2e68] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - x-ms-request-id: [2742297e-c8a4-11e6-8276-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001004Z:ef856114-9972-4396-a409-d6eee39b2e68'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [279d68e2-c8a4-11e6-84fb-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2015-08-19 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West - US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":null,"provisioningState":"succeeded","hostingMode":"default"},"sku":{"name":"free"}}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:10:04 GMT'] - ETag: [W/"datetime'2016-12-23T00%3A10%3A03.8006148Z'"] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['433'] - elapsed-time: ['143'] - request-id: [279d68e2-c8a4-11e6-84fb-ecb1d756380e] - x-ms-correlation-request-id: [4def32c7-e087-4cdc-9756-39d882490106] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [279d68e2-c8a4-11e6-84fb-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001005Z:4def32c7-e087-4cdc-9756-39d882490106'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [281557ae-c8a4-11e6-a504-ecb1d756380e] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices?api-version=2015-08-19 - response: - body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West - US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":null,"provisioningState":"succeeded","hostingMode":"default","ETag":"W/\"datetime''2016-12-23T00%3A10%3A03.8006148Z''\""},"sku":{"name":"free"}}],"nextLink":null}'} - headers: - Cache-Control: [no-cache] - Content-Type: [application/json; charset=utf-8] - Date: ['Fri, 23 Dec 2016 00:10:06 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding,Accept-Encoding'] - X-AspNet-Version: [4.0.30319] - content-length: ['519'] - elapsed-time: ['96'] - request-id: [281557ae-c8a4-11e6-a504-ecb1d756380e] - x-ms-correlation-request-id: [50a32d8a-d220-4ca3-b171-65a1bdd0b990] - x-ms-ratelimit-remaining-subscription-reads: ['14999'] - x-ms-request-id: [281557ae-c8a4-11e6-a504-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001006Z:50a32d8a-d220-4ca3-b171-65a1bdd0b990'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.5.1 (Windows-10-10.0.14393-SP0) requests/2.12.1 msrest/0.4.4 - msrest_azure/0.4.6 searchmanagementclient/0.11.0 Azure-SDK-For-Python] - accept-language: [en-US] - x-ms-client-request-id: [28802758-c8a4-11e6-8db3-ecb1d756380e] + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Search/checkNameAvailability?api-version=2020-08-01 + response: + body: + string: '{"nameAvailable":false,"reason":"AlreadyExists","message":null}' + headers: + cache-control: + - no-cache + content-length: + - '63' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:30:22 GMT + elapsed-time: + - '319' + expires: + - '-1' + pragma: + - no-cache + request-id: + - efbec450-013a-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[]},"sku":{"name":"basic"}}' + headers: + cache-control: + - no-cache + content-length: + - '576' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:30:23 GMT + elapsed-time: + - '323' + etag: + - W/"datetime'2020-09-28T03%3A14%3A54.1241059Z'" + expires: + - '-1' + pragma: + - no-cache + request-id: + - f1119576-013a-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices?api-version=2020-08-01 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch","name":"ptvstestsearch","type":"Microsoft.Search/searchServices","location":"West + US","properties":{"replicaCount":1,"partitionCount":1,"status":"running","statusDetails":"","provisioningState":"succeeded","hostingMode":"default","publicNetworkAccess":"Enabled","networkRuleSet":{"ipRules":[],"bypass":"None"},"privateEndpointConnections":[],"sharedPrivateLinkResources":[],"eTag":"W/\"datetime''2020-09-28T03%3A14%3A54.1241059Z''\""},"sku":{"name":"basic"}}],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '662' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 28 Sep 2020 03:30:23 GMT + elapsed-time: + - '270' + expires: + - '-1' + pragma: + - no-cache + request-id: + - f172fd84-013a-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding,Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 + msrest_azure/0.6.2 azure-mgmt-search/3.0.0 Azure-SDK-For-Python + accept-language: + - en-US method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2015-08-19 - response: - body: {string: ''} - headers: - Cache-Control: [no-cache] - Content-Length: ['0'] - Date: ['Fri, 23 Dec 2016 00:10:06 GMT'] - Expires: ['-1'] - Pragma: [no-cache] - Strict-Transport-Security: [max-age=31536000; includeSubDomains] - X-AspNet-Version: [4.0.30319] - elapsed-time: ['310'] - request-id: [28802758-c8a4-11e6-8db3-ecb1d756380e] - x-ms-correlation-request-id: [b9f61e51-53cc-4ebc-9e9c-ff5b845e0c74] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - x-ms-request-id: [28802758-c8a4-11e6-8db3-ecb1d756380e] - x-ms-routing-request-id: ['CENTRALUS:20161223T001007Z:b9f61e51-53cc-4ebc-9e9c-ff5b845e0c74'] - status: {code: 200, message: OK} + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_search_test_search_services20f20f30/providers/Microsoft.Search/searchServices/ptvstestsearch?api-version=2020-08-01 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Mon, 28 Sep 2020 03:30:33 GMT + elapsed-time: + - '1687' + expires: + - '-1' + pragma: + - no-cache + request-id: + - f1c928d0-013a-11eb-af89-0242ac110006 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK version: 1 diff --git a/sdk/search/azure-mgmt-search/tests/test_mgmt_search.py b/sdk/search/azure-mgmt-search/tests/test_mgmt_search.py index d07827b81316..2aae8dfdf9d3 100644 --- a/sdk/search/azure-mgmt-search/tests/test_mgmt_search.py +++ b/sdk/search/azure-mgmt-search/tests/test_mgmt_search.py @@ -35,7 +35,7 @@ def test_search_services(self, resource_group, location): 'partition_count': 1, 'hosting_mode': 'Default', 'sku': { - 'name': 'free' + 'name': 'basic' } } ).result() @@ -61,7 +61,7 @@ def test_search_services(self, resource_group, location): @ResourceGroupPreparer() def test_search_query_keys(self, resource_group, location): - account_name = 'ptvstestquerykeys' + account_name = 'ptvstestquerykeyss' key_name = 'testkey' service = self.client.services.create_or_update( @@ -73,7 +73,7 @@ def test_search_query_keys(self, resource_group, location): 'partition_count': 1, 'hosting_mode': 'Default', 'sku': { - 'name': 'free' + 'name': 'basic' } } )