Skip to content
Closed
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
4 changes: 2 additions & 2 deletions sdk/synapse/azure-mgmt-synapse/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "7a54c1a83d14da431c0ae48c4315cba143084bce",
"commit": "3da06fc59377121c44b25fc9aa161c92c464ff29",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
],
"autorest_command": "autorest specification/synapse/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/synapse/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"readme": "specification/synapse/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
DataMaskingPoliciesOperations,
DataMaskingRulesOperations,
ExtendedSqlPoolBlobAuditingPoliciesOperations,
GetOperations,
IntegrationRuntimeAuthKeysOperations,
IntegrationRuntimeConnectionInfosOperations,
IntegrationRuntimeCredentialsOperations,
Expand Down Expand Up @@ -286,6 +287,8 @@ class SynapseManagementClient: # pylint: disable=client-accepts-api-version-key
:ivar integration_runtime_status: IntegrationRuntimeStatusOperations operations
:vartype integration_runtime_status:
azure.mgmt.synapse.operations.IntegrationRuntimeStatusOperations
:ivar get: GetOperations operations
:vartype get: azure.mgmt.synapse.operations.GetOperations
:ivar spark_configuration: SparkConfigurationOperations operations
:vartype spark_configuration: azure.mgmt.synapse.operations.SparkConfigurationOperations
:ivar spark_configurations: SparkConfigurationsOperations operations
Expand Down Expand Up @@ -521,6 +524,7 @@ def __init__(
self.integration_runtime_status = IntegrationRuntimeStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.get = GetOperations(self._client, self._config, self._serialize, self._deserialize)
self.spark_configuration = SparkConfigurationOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "2.1.0b6"
VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
DataMaskingPoliciesOperations,
DataMaskingRulesOperations,
ExtendedSqlPoolBlobAuditingPoliciesOperations,
GetOperations,
IntegrationRuntimeAuthKeysOperations,
IntegrationRuntimeConnectionInfosOperations,
IntegrationRuntimeCredentialsOperations,
Expand Down Expand Up @@ -290,6 +291,8 @@ class SynapseManagementClient: # pylint: disable=client-accepts-api-version-key
:ivar integration_runtime_status: IntegrationRuntimeStatusOperations operations
:vartype integration_runtime_status:
azure.mgmt.synapse.aio.operations.IntegrationRuntimeStatusOperations
:ivar get: GetOperations operations
:vartype get: azure.mgmt.synapse.aio.operations.GetOperations
:ivar spark_configuration: SparkConfigurationOperations operations
:vartype spark_configuration: azure.mgmt.synapse.aio.operations.SparkConfigurationOperations
:ivar spark_configurations: SparkConfigurationsOperations operations
Expand Down Expand Up @@ -525,6 +528,7 @@ def __init__(
self.integration_runtime_status = IntegrationRuntimeStatusOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.get = GetOperations(self._client, self._config, self._serialize, self._deserialize)
self.spark_configuration = SparkConfigurationOperations(
self._client, self._config, self._serialize, self._deserialize
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
from ._integration_runtime_auth_keys_operations import IntegrationRuntimeAuthKeysOperations
from ._integration_runtime_monitoring_data_operations import IntegrationRuntimeMonitoringDataOperations
from ._integration_runtime_status_operations import IntegrationRuntimeStatusOperations
from ._get_operations import GetOperations
from ._spark_configuration_operations import SparkConfigurationOperations
from ._spark_configurations_operations import SparkConfigurationsOperations
from ._kusto_operations_operations import KustoOperationsOperations
Expand Down Expand Up @@ -169,6 +170,7 @@
"IntegrationRuntimeAuthKeysOperations",
"IntegrationRuntimeMonitoringDataOperations",
"IntegrationRuntimeStatusOperations",
"GetOperations",
"SparkConfigurationOperations",
"SparkConfigurationsOperations",
"KustoOperationsOperations",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._get_operations import (
build_integration_runtime_start_request,
build_integration_runtime_stop_request,
)

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]


class GetOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~azure.mgmt.synapse.aio.SynapseManagementClient`'s
:attr:`get` attribute.
"""

models = _models

def __init__(self, *args, **kwargs) -> None:
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")

@distributed_trace_async
async def integration_runtime_start(
self,
resource_group_name: str,
workspace_name: str,
integration_runtime_name: str,
integration_runtime_operation_id: str,
**kwargs: Any
) -> _models.IntegrationRuntimeOperationStatus:
"""Get integration runtime start operation status.

Get an integration runtime start operation status.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param workspace_name: The name of the workspace. Required.
:type workspace_name: str
:param integration_runtime_name: Integration runtime name. Required.
:type integration_runtime_name: str
:param integration_runtime_operation_id: Integration runtime Operation Id. Required.
:type integration_runtime_operation_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: IntegrationRuntimeOperationStatus or the result of cls(response)
:rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeOperationStatus
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-06-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-06-01-preview")
)
cls: ClsType[_models.IntegrationRuntimeOperationStatus] = kwargs.pop("cls", None)

request = build_integration_runtime_start_request(
resource_group_name=resource_group_name,
workspace_name=workspace_name,
integration_runtime_name=integration_runtime_name,
integration_runtime_operation_id=integration_runtime_operation_id,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.integration_runtime_start.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("IntegrationRuntimeOperationStatus", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

integration_runtime_start.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start/operationstatuses/{integrationRuntimeOperationId}"
}

@distributed_trace_async
async def integration_runtime_stop(
self,
resource_group_name: str,
workspace_name: str,
integration_runtime_name: str,
integration_runtime_operation_id: str,
**kwargs: Any
) -> _models.IntegrationRuntimeStopOperationStatus:
"""Get integration runtime stop operation status.

Get an integration runtime stop operation status.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param workspace_name: The name of the workspace. Required.
:type workspace_name: str
:param integration_runtime_name: Integration runtime name. Required.
:type integration_runtime_name: str
:param integration_runtime_operation_id: Integration runtime Operation Id. Required.
:type integration_runtime_operation_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: IntegrationRuntimeStopOperationStatus or the result of cls(response)
:rtype: ~azure.mgmt.synapse.models.IntegrationRuntimeStopOperationStatus
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: Literal["2021-06-01-preview"] = kwargs.pop(
"api_version", _params.pop("api-version", "2021-06-01-preview")
)
cls: ClsType[_models.IntegrationRuntimeStopOperationStatus] = kwargs.pop("cls", None)

request = build_integration_runtime_stop_request(
resource_group_name=resource_group_name,
workspace_name=workspace_name,
integration_runtime_name=integration_runtime_name,
integration_runtime_operation_id=integration_runtime_operation_id,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.integration_runtime_stop.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=False, **kwargs
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("IntegrationRuntimeStopOperationStatus", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

integration_runtime_stop.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop/operationstatuses/{integrationRuntimeOperationId}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
from ._models_py3 import IntegrationRuntimeMonitoringData
from ._models_py3 import IntegrationRuntimeNodeIpAddress
from ._models_py3 import IntegrationRuntimeNodeMonitoringData
from ._models_py3 import IntegrationRuntimeOperationStatus
from ._models_py3 import IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint
from ._models_py3 import IntegrationRuntimeOutboundNetworkDependenciesEndpoint
from ._models_py3 import IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails
Expand All @@ -96,6 +97,7 @@
from ._models_py3 import IntegrationRuntimeSsisProperties
from ._models_py3 import IntegrationRuntimeStatus
from ._models_py3 import IntegrationRuntimeStatusResponse
from ._models_py3 import IntegrationRuntimeStopOperationStatus
from ._models_py3 import IntegrationRuntimeVNetProperties
from ._models_py3 import IotHubDataConnection
from ._models_py3 import IpFirewallRuleInfo
Expand Down Expand Up @@ -346,6 +348,7 @@
from ._synapse_management_client_enums import VulnerabilityAssessmentScanState
from ._synapse_management_client_enums import VulnerabilityAssessmentScanTriggerType
from ._synapse_management_client_enums import WorkspacePublicNetworkAccess
from ._synapse_management_client_enums import WorkspaceStatus
from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
from ._patch import patch_sdk as _patch_sdk
Expand Down Expand Up @@ -431,6 +434,7 @@
"IntegrationRuntimeMonitoringData",
"IntegrationRuntimeNodeIpAddress",
"IntegrationRuntimeNodeMonitoringData",
"IntegrationRuntimeOperationStatus",
"IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint",
"IntegrationRuntimeOutboundNetworkDependenciesEndpoint",
"IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails",
Expand All @@ -441,6 +445,7 @@
"IntegrationRuntimeSsisProperties",
"IntegrationRuntimeStatus",
"IntegrationRuntimeStatusResponse",
"IntegrationRuntimeStopOperationStatus",
"IntegrationRuntimeVNetProperties",
"IotHubDataConnection",
"IpFirewallRuleInfo",
Expand Down Expand Up @@ -690,6 +695,7 @@
"VulnerabilityAssessmentScanState",
"VulnerabilityAssessmentScanTriggerType",
"WorkspacePublicNetworkAccess",
"WorkspaceStatus",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Loading