Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdk automation/azure mgmt search #14125

Merged
merged 4 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions sdk/search/azure-mgmt-search/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
30 changes: 11 additions & 19 deletions sdk/search/azure-mgmt-search/README.md
Original file line number Diff line number Diff line change
@@ -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)
7 changes: 4 additions & 3 deletions sdk/search/azure-mgmt-search/azure/mgmt/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Original file line number Diff line number Diff line change
@@ -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<msrestazure.azure_active_directory>`
: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
Original file line number Diff line number Diff line change
Expand Up @@ -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<msrestazure.azure_active_directory>`
: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
Expand All @@ -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
Expand All @@ -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)

Expand All @@ -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)
131 changes: 99 additions & 32 deletions sdk/search/azure-mgmt-search/azure/mgmt/search/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]
Loading