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

v2023-08-01 WorkspaceRP Swagger Spec Updated with Latest Changes #32325

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
# --------------------------------------------------------------------------
from typing import Any, Callable, Dict, Optional, TypeVar, Union

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
Expand All @@ -20,6 +26,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._managed_network_provisions_operations import build_provision_managed_network_request_initial

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -121,7 +128,7 @@ async def begin_provision_managed_network(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param body: Managed Network Provisioning Options for a machine learning workspace.
:type body: ~azure.mgmt.machinelearningservices.models.ManagedNetworkProvisionOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
Expand All @@ -21,7 +27,13 @@

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._managed_network_settings_rule_operations import build_create_or_update_request_initial, build_delete_request_initial, build_get_request, build_list_request
from ...operations._managed_network_settings_rule_operations import (
build_create_or_update_request_initial,
build_delete_request_initial,
build_get_request,
build_list_request,
)

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -60,7 +72,7 @@ def list(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either OutboundRuleListResult or the result of
Expand Down Expand Up @@ -174,6 +186,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements
response_headers = {}
if response.status_code == 202:
response_headers['Location']=self._deserialize('str', response.headers.get('Location'))
response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After'))


if cls:
Expand All @@ -196,7 +209,7 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param rule_name: Name of the workspace managed network outbound rule.
:type rule_name: str
Expand Down Expand Up @@ -236,7 +249,7 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, None, {})


if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -264,7 +277,7 @@ async def get(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param rule_name: Name of the workspace managed network outbound rule.
:type rule_name: str
Expand Down Expand Up @@ -391,7 +404,7 @@ async def begin_create_or_update(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param rule_name: Name of the workspace managed network outbound rule.
:type rule_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
Expand All @@ -19,6 +25,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._operations import build_list_request

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -48,21 +55,20 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
**kwargs: Any
) -> AsyncIterable["_models.AmlOperationListResult"]:
) -> AsyncIterable["_models.OperationListResult"]:
Hittherhod marked this conversation as resolved.
Show resolved Hide resolved
"""Lists all of the available Azure Machine Learning Workspaces REST API operations.

Lists all of the available Azure Machine Learning Workspaces REST API operations.

:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either AmlOperationListResult or the result of
cls(response)
:return: An iterator like instance of either OperationListResult or the result of cls(response)
:rtype:
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.AmlOperationListResult]
~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.machinelearningservices.models.OperationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
api_version = kwargs.pop('api_version', "2023-08-01-preview") # type: str

cls = kwargs.pop('cls', None) # type: ClsType["_models.AmlOperationListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand All @@ -89,7 +95,7 @@ def prepare_request(next_link=None):
return request

async def extract_data(pipeline_response):
deserialized = self._deserialize("AmlOperationListResult", pipeline_response)
deserialized = self._deserialize("OperationListResult", pipeline_response)
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
Expand All @@ -19,7 +25,13 @@

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._private_endpoint_connections_operations import build_create_or_update_request, build_delete_request, build_get_request, build_list_request
from ...operations._private_endpoint_connections_operations import (
build_create_or_update_request,
build_delete_request,
build_get_request,
build_list_request,
)

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -58,7 +70,7 @@ def list(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either PrivateEndpointConnectionListResult or the result
Expand Down Expand Up @@ -145,7 +157,7 @@ async def delete( # pylint: disable=inconsistent-return-statements

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param private_endpoint_connection_name: NRP Private Endpoint Connection Name.
:type private_endpoint_connection_name: str
Expand Down Expand Up @@ -206,7 +218,7 @@ async def get(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param private_endpoint_connection_name: NRP Private Endpoint Connection Name.
:type private_endpoint_connection_name: str
Expand Down Expand Up @@ -274,7 +286,7 @@ async def create_or_update(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:param private_endpoint_connection_name: NRP Private Endpoint Connection Name.
:type private_endpoint_connection_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar

from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
Expand All @@ -19,6 +25,7 @@
from ... import models as _models
from ..._vendor import _convert_request
from ...operations._private_link_resources_operations import build_list_request

T = TypeVar('T')
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]

Expand Down Expand Up @@ -69,7 +76,7 @@ def list(

:param resource_group_name: The name of the resource group. The name is case insensitive.
:type resource_group_name: str
:param workspace_name: Name of Azure Machine Learning workspace.
:param workspace_name: Azure Machine Learning Workspace Name.
:type workspace_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either PrivateLinkResourceListResult or the result of
Expand Down
Loading