Skip to content
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
3 changes: 2 additions & 1 deletion sdk/synapse/azure-synapse-artifacts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## 0.8.0 (2021-08-10)

- Updated API version to "2020-12-01"
- Updated API version to "2020-12-01" which is the default API version
- Added `NotebookOperationResultOperations`, `OperationResultOperations`, `OperationStatusOperations`
- Added API version "2021-06-01-preview" support

## 0.7.0 (2021-05-11)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# --------------------------------------------------------------------------

from ._artifacts_client import ArtifactsClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['ArtifactsClient']

try:
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# 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.
# 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.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from typing import TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -19,7 +21,6 @@

from azure.core.credentials import TokenCredential


class ArtifactsClientConfiguration(Configuration):
"""Configuration for ArtifactsClient.

Expand Down Expand Up @@ -47,9 +48,8 @@ def __init__(

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-12-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default'])
kwargs.setdefault('sdk_moniker', 'synapse-artifacts/{}'.format(VERSION))
kwargs.setdefault('sdk_moniker', 'azure-synapse-artifacts/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# 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.
# 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.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -17,7 +19,6 @@
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential


class ArtifactsClientConfiguration(Configuration):
"""Configuration for ArtifactsClient.

Expand All @@ -34,7 +35,7 @@ def __init__(
self,
credential: "AsyncTokenCredential",
endpoint: str,
**kwargs: Any
**kwargs # type: Any
) -> None:
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -44,9 +45,8 @@ def __init__(

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-12-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default'])
kwargs.setdefault('sdk_moniker', 'synapse-artifacts/{}'.format(VERSION))
kwargs.setdefault('sdk_moniker', 'azure-synapse-artifacts/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 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.
# --------------------------------------------------------------------------
from .v2020_12_01.models import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 ._artifacts_client import ArtifactsClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['ArtifactsClient']

try:
from ._patch import patch_sdk # type: ignore
patch_sdk()
except ImportError:
pass
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# 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 typing import TYPE_CHECKING

from azure.core import PipelineClient
from msrest import Deserializer, Serializer

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import ArtifactsClientConfiguration
from .operations import LinkedServiceOperations
from .operations import DatasetOperations
from .operations import PipelineOperations
from .operations import PipelineRunOperations
from .operations import TriggerOperations
from .operations import TriggerRunOperations
from .operations import DataFlowOperations
from .operations import DataFlowDebugSessionOperations
from .operations import SqlScriptOperations
from .operations import SparkJobDefinitionOperations
from .operations import NotebookOperations
from .operations import NotebookOperationResultOperations
from .operations import BigDataPoolsOperations
from .operations import WorkspaceGitRepoManagementOperations
from .operations import IntegrationRuntimesOperations
from .operations import LibraryOperations
from .operations import OperationResultOperations
from .operations import OperationStatusOperations
from .operations import SqlPoolsOperations
from .operations import WorkspaceOperations
from . import models


class ArtifactsClient(object):
"""ArtifactsClient.

:ivar linked_service: LinkedServiceOperations operations
:vartype linked_service: azure.synapse.artifacts.v2020_12_01.operations.LinkedServiceOperations
:ivar dataset: DatasetOperations operations
:vartype dataset: azure.synapse.artifacts.v2020_12_01.operations.DatasetOperations
:ivar pipeline: PipelineOperations operations
:vartype pipeline: azure.synapse.artifacts.v2020_12_01.operations.PipelineOperations
:ivar pipeline_run: PipelineRunOperations operations
:vartype pipeline_run: azure.synapse.artifacts.v2020_12_01.operations.PipelineRunOperations
:ivar trigger: TriggerOperations operations
:vartype trigger: azure.synapse.artifacts.v2020_12_01.operations.TriggerOperations
:ivar trigger_run: TriggerRunOperations operations
:vartype trigger_run: azure.synapse.artifacts.v2020_12_01.operations.TriggerRunOperations
:ivar data_flow: DataFlowOperations operations
:vartype data_flow: azure.synapse.artifacts.v2020_12_01.operations.DataFlowOperations
:ivar data_flow_debug_session: DataFlowDebugSessionOperations operations
:vartype data_flow_debug_session: azure.synapse.artifacts.v2020_12_01.operations.DataFlowDebugSessionOperations
:ivar sql_script: SqlScriptOperations operations
:vartype sql_script: azure.synapse.artifacts.v2020_12_01.operations.SqlScriptOperations
:ivar spark_job_definition: SparkJobDefinitionOperations operations
:vartype spark_job_definition: azure.synapse.artifacts.v2020_12_01.operations.SparkJobDefinitionOperations
:ivar notebook: NotebookOperations operations
:vartype notebook: azure.synapse.artifacts.v2020_12_01.operations.NotebookOperations
:ivar notebook_operation_result: NotebookOperationResultOperations operations
:vartype notebook_operation_result: azure.synapse.artifacts.v2020_12_01.operations.NotebookOperationResultOperations
:ivar big_data_pools: BigDataPoolsOperations operations
:vartype big_data_pools: azure.synapse.artifacts.v2020_12_01.operations.BigDataPoolsOperations
:ivar workspace_git_repo_management: WorkspaceGitRepoManagementOperations operations
:vartype workspace_git_repo_management: azure.synapse.artifacts.v2020_12_01.operations.WorkspaceGitRepoManagementOperations
:ivar integration_runtimes: IntegrationRuntimesOperations operations
:vartype integration_runtimes: azure.synapse.artifacts.v2020_12_01.operations.IntegrationRuntimesOperations
:ivar library: LibraryOperations operations
:vartype library: azure.synapse.artifacts.v2020_12_01.operations.LibraryOperations
:ivar operation_result: OperationResultOperations operations
:vartype operation_result: azure.synapse.artifacts.v2020_12_01.operations.OperationResultOperations
:ivar operation_status: OperationStatusOperations operations
:vartype operation_status: azure.synapse.artifacts.v2020_12_01.operations.OperationStatusOperations
:ivar sql_pools: SqlPoolsOperations operations
:vartype sql_pools: azure.synapse.artifacts.v2020_12_01.operations.SqlPoolsOperations
:ivar workspace: WorkspaceOperations operations
:vartype workspace: azure.synapse.artifacts.v2020_12_01.operations.WorkspaceOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.
:type endpoint: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
"""

def __init__(
self,
credential, # type: "TokenCredential"
endpoint, # type: str
**kwargs # type: Any
):
# type: (...) -> None
base_url = '{endpoint}'
self._config = ArtifactsClientConfiguration(credential, endpoint, **kwargs)
self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.linked_service = LinkedServiceOperations(
self._client, self._config, self._serialize, self._deserialize)
self.dataset = DatasetOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pipeline = PipelineOperations(
self._client, self._config, self._serialize, self._deserialize)
self.pipeline_run = PipelineRunOperations(
self._client, self._config, self._serialize, self._deserialize)
self.trigger = TriggerOperations(
self._client, self._config, self._serialize, self._deserialize)
self.trigger_run = TriggerRunOperations(
self._client, self._config, self._serialize, self._deserialize)
self.data_flow = DataFlowOperations(
self._client, self._config, self._serialize, self._deserialize)
self.data_flow_debug_session = DataFlowDebugSessionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.sql_script = SqlScriptOperations(
self._client, self._config, self._serialize, self._deserialize)
self.spark_job_definition = SparkJobDefinitionOperations(
self._client, self._config, self._serialize, self._deserialize)
self.notebook = NotebookOperations(
self._client, self._config, self._serialize, self._deserialize)
self.notebook_operation_result = NotebookOperationResultOperations(
self._client, self._config, self._serialize, self._deserialize)
self.big_data_pools = BigDataPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.workspace_git_repo_management = WorkspaceGitRepoManagementOperations(
self._client, self._config, self._serialize, self._deserialize)
self.integration_runtimes = IntegrationRuntimesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.library = LibraryOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operation_result = OperationResultOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operation_status = OperationStatusOperations(
self._client, self._config, self._serialize, self._deserialize)
self.sql_pools = SqlPoolsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.workspace = WorkspaceOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.

:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()

def __enter__(self):
# type: () -> ArtifactsClient
self._client.__enter__()
return self

def __exit__(self, *exc_details):
# type: (Any) -> None
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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 typing import TYPE_CHECKING

from azure.core.configuration import Configuration
from azure.core.pipeline import policies

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential


class ArtifactsClientConfiguration(Configuration):
"""Configuration for ArtifactsClient.

Note that all parameters used to create this instance are saved as instance
attributes.

:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net.
:type endpoint: str
"""

def __init__(
self,
credential, # type: "TokenCredential"
endpoint, # type: str
**kwargs # type: Any
):
# type: (...) -> None
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
super(ArtifactsClientConfiguration, self).__init__(**kwargs)

self.credential = credential
self.endpoint = endpoint
self.api_version = "2020-12-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://dev.azuresynapse.net/.default'])
kwargs.setdefault('sdk_moniker', 'synapse-artifacts/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
self,
**kwargs # type: Any
):
# type: (...) -> None
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs)
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
self.authentication_policy = kwargs.get('authentication_policy')
if self.credential and not self.authentication_policy:
self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)
Loading