From a9e7d8404d8ae4eddcd4ac28d0a8ea36b9baa17d Mon Sep 17 00:00:00 2001 From: jikma Date: Wed, 25 Sep 2019 15:29:28 -0700 Subject: [PATCH 1/2] Add support for data flow --- .../datafactory_resource-manager.txt | 6 +- .../Generated/DataFactoryManagementClient.cs | 14 + .../DataFlowDebugSessionOperations.cs | 1430 +++++++++++++++ ...ataFlowDebugSessionOperationsExtensions.cs | 280 +++ .../src/Generated/DataFlowsOperations.cs | 1227 +++++++++++++ .../DataFlowsOperationsExtensions.cs | 258 +++ .../Generated/IDataFactoryManagementClient.cs | 10 + .../IDataFlowDebugSessionOperations.cs | 183 ++ .../src/Generated/IDataFlowsOperations.cs | 168 ++ .../AddDataFlowToDebugSessionResponse.cs | 54 + .../CreateDataFlowDebugSessionRequest.cs | 99 ++ .../CreateDataFlowDebugSessionResponse.cs | 61 + .../src/Generated/Models/DataFlow.cs | 74 + .../Models/DataFlowDebugCommandPayload.cs | 95 + .../Models/DataFlowDebugCommandRequest.cs | 86 + .../Models/DataFlowDebugCommandResponse.cs | 66 + .../Models/DataFlowDebugCommandType.cs | 23 + .../Generated/Models/DataFlowDebugPackage.cs | 140 ++ .../DataFlowDebugPackageDebugSettings.cs | 72 + .../DataFlowDebugSessionCreateHeaders.cs | 54 + ...taFlowDebugSessionExecuteCommandHeaders.cs | 54 + .../Models/DataFlowDebugSessionInfo.cs | 133 ++ .../src/Generated/Models/DataFlowFolder.cs | 53 + .../src/Generated/Models/DataFlowReference.cs | 99 ++ .../src/Generated/Models/DataFlowResource.cs | 70 + .../src/Generated/Models/DataFlowSink.cs | 68 + .../src/Generated/Models/DataFlowSource.cs | 68 + .../Generated/Models/DataFlowSourceSetting.cs | 72 + .../Generated/Models/DataFlowStagingInfo.cs | 73 + .../DeleteDataFlowDebugSessionRequest.cs | 53 + .../Models/ExecuteDataFlowActivity.cs | 111 ++ .../GetDataFactoryOperationStatusResponse.cs | 65 + .../src/Generated/Models/MappingDataFlow.cs | 87 + .../src/Generated/Models/Transformation.cs | 73 + .../SdkInfo_DataFactoryManagementClient.cs | 6 +- ...rosoft.Azure.Management.DataFactory.csproj | 4 + .../src/changelog.md | 4 + .../tests/JsonSamples/DataFlowJsonSamples.cs | 57 + .../tests/JsonSamples/PipelineJsonSamples.cs | 35 + .../ScenarioTests/DataFlowScenarioTests.cs | 148 ++ .../DataFlowScenarioTests/DataFlowCrud.json | 1543 +++++++++++++++++ .../DataFlowDebugSession_AddDataFlow.json | 108 ++ .../TestData/DataFlowDebugSession_Create.json | 44 + .../TestData/DataFlowDebugSession_Delete.json | 22 + .../DataFlowDebugSession_ExecuteCommand.json | 34 + .../DataFlowDebugSession_QueryByFactory.json | 33 + .../tests/TestData/DataFlows_Create.json | 107 ++ .../tests/TestData/DataFlows_Delete.json | 13 + .../tests/TestData/DataFlows_Get.json | 66 + .../TestData/DataFlows_ListByFactory.json | 68 + .../tests/TestData/DataFlows_Update.json | 107 ++ .../tests/UnitTests/DataFlowTests.cs | 33 + .../tests/UnitTests/ExamplesUnitTest.cs | 105 ++ .../tests/Utils/ExampleCapture.cs | 93 + 54 files changed, 8104 insertions(+), 5 deletions(-) create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DataFlowJsonSamples.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/ScenarioTests/DataFlowScenarioTests.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/SessionRecords/DataFlowScenarioTests/DataFlowCrud.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_AddDataFlow.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Create.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Delete.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_ExecuteCommand.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_QueryByFactory.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Create.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Delete.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Get.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_ListByFactory.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Update.json create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/DataFlowTests.cs diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index 82c737e681de5..be2f5462733b4 100644 --- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt @@ -3,12 +3,12 @@ AutoRest installed successfully. Commencing code generation Generating CSharp code Executing AutoRest command -cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=C:\azure-sdk-for-net\sdk -2019-09-24 03:31:37 UTC +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\GitHub\azure-sdk-for-net\sdk +2019-09-25 19:09:56 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 6bec7452e59b579f0a1e203b937bf1157eb8af1e +Commit: 151f8794e84d2544961ca64c80f2fdddada29bad AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs index eb02c8389215b..0dfc24d48fa04 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs @@ -145,6 +145,16 @@ public partial class DataFactoryManagementClient : ServiceClient public virtual IRerunTriggersOperations RerunTriggers { get; private set; } + /// + /// Gets the IDataFlowsOperations. + /// + public virtual IDataFlowsOperations DataFlows { get; private set; } + + /// + /// Gets the IDataFlowDebugSessionOperations. + /// + public virtual IDataFlowDebugSessionOperations DataFlowDebugSession { get; private set; } + /// /// Initializes a new instance of the DataFactoryManagementClient class. /// @@ -400,6 +410,8 @@ private void Initialize() Triggers = new TriggersOperations(this); TriggerRuns = new TriggerRunsOperations(this); RerunTriggers = new RerunTriggersOperations(this); + DataFlows = new DataFlowsOperations(this); + DataFlowDebugSession = new DataFlowDebugSessionOperations(this); BaseUri = new System.Uri("https://management.azure.com"); ApiVersion = "2018-06-01"; AcceptLanguage = "en-US"; @@ -447,6 +459,8 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("type")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("authenticationType")); diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs new file mode 100644 index 0000000000000..76f92c2f233b5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperations.cs @@ -0,0 +1,1430 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowDebugSessionOperations operations. + /// + internal partial class DataFlowDebugSessionOperations : IServiceOperations, IDataFlowDebugSessionOperations + { + /// + /// Initializes a new instance of the DataFlowDebugSessionOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DataFlowDebugSessionOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Create", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/createDataFlowDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDataFlowDebugSessions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> AddDataFlowWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugPackage request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "AddDataFlow", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/addDataFlowToDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/deleteDataFlowDebugSession").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> ExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (request == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "request"); + } + if (request != null) + { + request.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("request", request); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ExecuteCommand", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/executeDataFlowDebugCommand").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(request != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(JsonSerializer.Create(Client.DeserializationSettings)); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> QueryByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "QueryByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs new file mode 100644 index 0000000000000..7c4c66a33f93b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowDebugSessionOperationsExtensions.cs @@ -0,0 +1,280 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DataFlowDebugSessionOperations. + /// + public static partial class DataFlowDebugSessionOperationsExtensions + { + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + public static CreateDataFlowDebugSessionResponse Create(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request) + { + return operations.CreateAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Creates a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The cancellation token. + /// + public static async Task CreateAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage QueryByFactory(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName) + { + return operations.QueryByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> QueryByFactoryAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + public static AddDataFlowToDebugSessionResponse AddDataFlow(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugPackage request) + { + return operations.AddDataFlowAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Add a data flow into debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// The cancellation token. + /// + public static async Task AddDataFlowAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugPackage request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.AddDataFlowWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + public static void Delete(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request) + { + operations.DeleteAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Deletes a data flow debug session. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + public static DataFlowDebugCommandResponse ExecuteCommand(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request) + { + return operations.ExecuteCommandAsync(resourceGroupName, factoryName, request).GetAwaiter().GetResult(); + } + + /// + /// Execute a data flow debug command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The cancellation token. + /// + public static async Task ExecuteCommandAsync(this IDataFlowDebugSessionOperations operations, string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ExecuteCommandWithHttpMessagesAsync(resourceGroupName, factoryName, request, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage QueryByFactoryNext(this IDataFlowDebugSessionOperations operations, string nextPageLink) + { + return operations.QueryByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Query all active data flow debug sessions. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> QueryByFactoryNextAsync(this IDataFlowDebugSessionOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.QueryByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs new file mode 100644 index 0000000000000..6fa599d78b4b6 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperations.cs @@ -0,0 +1,1227 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowsOperations operations. + /// + internal partial class DataFlowsOperations : IServiceOperations, IDataFlowsOperations + { + /// + /// Initializes a new instance of the DataFlowsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal DataFlowsOperations(DataFactoryManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the DataFactoryManagementClient + /// + public DataFactoryManagementClient Client { get; private set; } + + /// + /// Creates or updates a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (dataFlow == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlow"); + } + if (dataFlow != null) + { + dataFlow.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("ifMatch", ifMatch); + tracingParameters.Add("dataFlow", dataFlow); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifMatch != null) + { + if (_httpRequest.Headers.Contains("If-Match")) + { + _httpRequest.Headers.Remove("If-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-Match", ifMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(dataFlow != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(dataFlow, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Gets a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("ifNoneMatch", ifNoneMatch); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (ifNoneMatch != null) + { + if (_httpRequest.Headers.Contains("If-None-Match")) + { + _httpRequest.Headers.Remove("If-None-Match"); + } + _httpRequest.Headers.TryAddWithoutValidation("If-None-Match", ifNoneMatch); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Deletes a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (dataFlowName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "dataFlowName"); + } + if (dataFlowName != null) + { + if (dataFlowName.Length > 260) + { + throw new ValidationException(ValidationRules.MaxLength, "dataFlowName", 260); + } + if (dataFlowName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "dataFlowName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(dataFlowName, "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$")) + { + throw new ValidationException(ValidationRules.Pattern, "dataFlowName", "^[A-Za-z0-9_][^<>*#.%&:\\\\+?/]*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("dataFlowName", dataFlowName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Delete", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows/{dataFlowName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + _url = _url.Replace("{dataFlowName}", System.Uri.EscapeDataString(dataFlowName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 204) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists data flows. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+$"); + } + } + if (factoryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "factoryName"); + } + if (factoryName != null) + { + if (factoryName.Length > 63) + { + throw new ValidationException(ValidationRules.MaxLength, "factoryName", 63); + } + if (factoryName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "factoryName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(factoryName, "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$")) + { + throw new ValidationException(ValidationRules.Pattern, "factoryName", "^[A-Za-z0-9]+(?:-[A-Za-z0-9]+)*$"); + } + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("factoryName", factoryName); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactory", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/dataflows").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{factoryName}", System.Uri.EscapeDataString(factoryName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Lists data flows. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (nextPageLink == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListByFactoryNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse>(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs new file mode 100644 index 0000000000000..b9128218a2f85 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFlowsOperationsExtensions.cs @@ -0,0 +1,258 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DataFlowsOperations. + /// + public static partial class DataFlowsOperationsExtensions + { + /// + /// Creates or updates a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + public static DataFlowResource CreateOrUpdate(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string)) + { + return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, dataFlowName, dataFlow, ifMatch).GetAwaiter().GetResult(); + } + + /// + /// Creates or updates a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, for + /// which it should match existing entity or can be * for unconditional update. + /// + /// + /// The cancellation token. + /// + public static async Task CreateOrUpdateAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, dataFlow, ifMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + public static DataFlowResource Get(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string)) + { + return operations.GetAsync(resourceGroupName, factoryName, dataFlowName, ifNoneMatch).GetAwaiter().GetResult(); + } + + /// + /// Gets a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If the ETag + /// matches the existing entity tag, or if * was provided, then no content will + /// be returned. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Deletes a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + public static void Delete(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName) + { + operations.DeleteAsync(resourceGroupName, factoryName, dataFlowName).GetAwaiter().GetResult(); + } + + /// + /// Deletes a data flow. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, string dataFlowName, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, dataFlowName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + public static IPage ListByFactory(this IDataFlowsOperations operations, string resourceGroupName, string factoryName) + { + return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryAsync(this IDataFlowsOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListByFactoryNext(this IDataFlowsOperations operations, string nextPageLink) + { + return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// Lists data flows. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async Task> ListByFactoryNextAsync(this IDataFlowsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListByFactoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs index e0b46a5bd0ad2..1648e0af85c19 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs @@ -140,5 +140,15 @@ public partial interface IDataFactoryManagementClient : System.IDisposable /// IRerunTriggersOperations RerunTriggers { get; } + /// + /// Gets the IDataFlowsOperations. + /// + IDataFlowsOperations DataFlows { get; } + + /// + /// Gets the IDataFlowDebugSessionOperations. + /// + IDataFlowDebugSessionOperations DataFlowDebugSession { get; } + } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs new file mode 100644 index 0000000000000..b81a78a97a6ba --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowDebugSessionOperations.cs @@ -0,0 +1,183 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowDebugSessionOperations operations. + /// + public partial interface IDataFlowDebugSessionOperations + { + /// + /// Creates a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateWithHttpMessagesAsync(string resourceGroupName, string factoryName, CreateDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query all active data flow debug sessions. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> QueryByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Add a data flow into debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition with debug content. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> AddDataFlowWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugPackage request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a data flow debug session. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug session definition for deletion + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, DeleteDataFlowDebugSessionRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Execute a data flow debug command. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// Data flow debug command definition. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ExecuteCommandWithHttpMessagesAsync(string resourceGroupName, string factoryName, DataFlowDebugCommandRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Query all active data flow debug sessions. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> QueryByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs new file mode 100644 index 0000000000000..9d1e9bf3f49c5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFlowsOperations.cs @@ -0,0 +1,168 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// DataFlowsOperations operations. + /// + public partial interface IDataFlowsOperations + { + /// + /// Creates or updates a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// Data flow resource definition. + /// + /// + /// ETag of the data flow entity. Should only be specified for update, + /// for which it should match existing entity or can be * for + /// unconditional update. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, DataFlowResource dataFlow, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// ETag of the data flow entity. Should only be specified for get. If + /// the ETag matches the existing entity tag, or if * was provided, + /// then no content will be returned. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> GetWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Deletes a data flow. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The data flow name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string factoryName, string dataFlowName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists data flows. + /// + /// + /// The resource group name. + /// + /// + /// The factory name. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryWithHttpMessagesAsync(string resourceGroupName, string factoryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Lists data flows. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task>> ListByFactoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs new file mode 100644 index 0000000000000..efbe4ecfdf4da --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/AddDataFlowToDebugSessionResponse.cs @@ -0,0 +1,54 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure for starting data flow debug session. + /// + public partial class AddDataFlowToDebugSessionResponse + { + /// + /// Initializes a new instance of the AddDataFlowToDebugSessionResponse + /// class. + /// + public AddDataFlowToDebugSessionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AddDataFlowToDebugSessionResponse + /// class. + /// + /// The ID of data flow debug job + /// version. + public AddDataFlowToDebugSessionResponse(string jobVersion = default(string)) + { + JobVersion = jobVersion; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug job version. + /// + [JsonProperty(PropertyName = "jobVersion")] + public string JobVersion { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs new file mode 100644 index 0000000000000..8becead1903b7 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionRequest.cs @@ -0,0 +1,99 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for creating data flow debug session. + /// + public partial class CreateDataFlowDebugSessionRequest + { + /// + /// Initializes a new instance of the CreateDataFlowDebugSessionRequest + /// class. + /// + public CreateDataFlowDebugSessionRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CreateDataFlowDebugSessionRequest + /// class. + /// + /// Compute type of the cluster. The value + /// will be overwritten by the same setting in integration runtime if + /// provided. + /// Core count of the cluster. The value will + /// be overwritten by the same setting in integration runtime if + /// provided. + /// Time to live setting of the cluster in + /// minutes. + /// Set to use integration runtime + /// setting for data flow debug session. + public CreateDataFlowDebugSessionRequest(string computeType = default(string), int? coreCount = default(int?), int? timeToLive = default(int?), IntegrationRuntimeResource integrationRuntime = default(IntegrationRuntimeResource)) + { + ComputeType = computeType; + CoreCount = coreCount; + TimeToLive = timeToLive; + IntegrationRuntime = integrationRuntime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets compute type of the cluster. The value will be + /// overwritten by the same setting in integration runtime if provided. + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster. The value will be + /// overwritten by the same setting in integration runtime if provided. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets time to live setting of the cluster in minutes. + /// + [JsonProperty(PropertyName = "timeToLive")] + public int? TimeToLive { get; set; } + + /// + /// Gets or sets set to use integration runtime setting for data flow + /// debug session. + /// + [JsonProperty(PropertyName = "integrationRuntime")] + public IntegrationRuntimeResource IntegrationRuntime { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (IntegrationRuntime != null) + { + IntegrationRuntime.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs new file mode 100644 index 0000000000000..f2f79da08226a --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CreateDataFlowDebugSessionResponse.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure for creating data flow debug session. + /// + public partial class CreateDataFlowDebugSessionResponse + { + /// + /// Initializes a new instance of the + /// CreateDataFlowDebugSessionResponse class. + /// + public CreateDataFlowDebugSessionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// CreateDataFlowDebugSessionResponse class. + /// + /// The state of the debug session. + /// The ID of data flow debug session. + public CreateDataFlowDebugSessionResponse(string status = default(string), string sessionId = default(string)) + { + Status = status; + SessionId = sessionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the state of the debug session. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs new file mode 100644 index 0000000000000..f88c4d091d89d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlow.cs @@ -0,0 +1,74 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Azure Data Factory nested object which contains a flow with data + /// movements and transformations. + /// + public partial class DataFlow + { + /// + /// Initializes a new instance of the DataFlow class. + /// + public DataFlow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlow class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + public DataFlow(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder)) + { + Description = description; + Annotations = annotations; + Folder = folder; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the description of the data flow. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Gets or sets list of tags that can be used for describing the data + /// flow. + /// + [JsonProperty(PropertyName = "annotations")] + public IList Annotations { get; set; } + + /// + /// Gets or sets the folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// + [JsonProperty(PropertyName = "folder")] + public DataFlowFolder Folder { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs new file mode 100644 index 0000000000000..c54876caac7ff --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandPayload.cs @@ -0,0 +1,95 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Structure of command payload. + /// + public partial class DataFlowDebugCommandPayload + { + /// + /// Initializes a new instance of the DataFlowDebugCommandPayload + /// class. + /// + public DataFlowDebugCommandPayload() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandPayload + /// class. + /// + /// The stream name which is used for + /// preview. + /// Row limits for preview response. + /// Array of column names. + /// The expression which is used for + /// preview. + public DataFlowDebugCommandPayload(string streamName, int? rowLimits = default(int?), IList columns = default(IList), string expression = default(string)) + { + StreamName = streamName; + RowLimits = rowLimits; + Columns = columns; + Expression = expression; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the stream name which is used for preview. + /// + [JsonProperty(PropertyName = "streamName")] + public string StreamName { get; set; } + + /// + /// Gets or sets row limits for preview response. + /// + [JsonProperty(PropertyName = "rowLimits")] + public int? RowLimits { get; set; } + + /// + /// Gets or sets array of column names. + /// + [JsonProperty(PropertyName = "columns")] + public IList Columns { get; set; } + + /// + /// Gets or sets the expression which is used for preview. + /// + [JsonProperty(PropertyName = "expression")] + public string Expression { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StreamName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StreamName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs new file mode 100644 index 0000000000000..66c559cf2f300 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandRequest.cs @@ -0,0 +1,86 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for data flow debug command. + /// + public partial class DataFlowDebugCommandRequest + { + /// + /// Initializes a new instance of the DataFlowDebugCommandRequest + /// class. + /// + public DataFlowDebugCommandRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandRequest + /// class. + /// + /// The ID of data flow debug session. + /// The command type. Possible values include: + /// 'executePreviewQuery', 'executeStatisticsQuery', + /// 'executeExpressionQuery' + /// The command payload object. + public DataFlowDebugCommandRequest(string sessionId = default(string), string command = default(string), DataFlowDebugCommandPayload commandPayload = default(DataFlowDebugCommandPayload)) + { + SessionId = sessionId; + Command = command; + CommandPayload = commandPayload; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets the command type. Possible values include: + /// 'executePreviewQuery', 'executeStatisticsQuery', + /// 'executeExpressionQuery' + /// + [JsonProperty(PropertyName = "command")] + public string Command { get; set; } + + /// + /// Gets or sets the command payload object. + /// + [JsonProperty(PropertyName = "commandPayload")] + public DataFlowDebugCommandPayload CommandPayload { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (CommandPayload != null) + { + CommandPayload.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs new file mode 100644 index 0000000000000..034a3c28f49bc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandResponse.cs @@ -0,0 +1,66 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Response body structure of data flow result for data preview, + /// statistics or expression preview. + /// + public partial class DataFlowDebugCommandResponse + { + /// + /// Initializes a new instance of the DataFlowDebugCommandResponse + /// class. + /// + public DataFlowDebugCommandResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugCommandResponse + /// class. + /// + /// The run status of data preview, statistics or + /// expression preview. + /// The result data of data preview, statistics or + /// expression preview. + public DataFlowDebugCommandResponse(string status = default(string), string data = default(string)) + { + Status = status; + Data = data; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the run status of data preview, statistics or + /// expression preview. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + /// + /// Gets or sets the result data of data preview, statistics or + /// expression preview. + /// + [JsonProperty(PropertyName = "data")] + public string Data { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs new file mode 100644 index 0000000000000..23470ffe9278c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugCommandType.cs @@ -0,0 +1,23 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + + /// + /// Defines values for DataFlowDebugCommandType. + /// + public static class DataFlowDebugCommandType + { + public const string ExecutePreviewQuery = "executePreviewQuery"; + public const string ExecuteStatisticsQuery = "executeStatisticsQuery"; + public const string ExecuteExpressionQuery = "executeExpressionQuery"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs new file mode 100644 index 0000000000000..47849b16b15b9 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackage.cs @@ -0,0 +1,140 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Request body structure for starting data flow debug session. + /// + public partial class DataFlowDebugPackage + { + /// + /// Initializes a new instance of the DataFlowDebugPackage class. + /// + public DataFlowDebugPackage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugPackage class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The ID of data flow debug session. + /// Data flow instance. + /// List of datasets. + /// List of linked services. + /// Staging info for debug session. + /// Data flow debug settings. + public DataFlowDebugPackage(IDictionary additionalProperties = default(IDictionary), string sessionId = default(string), DataFlowResource dataFlow = default(DataFlowResource), IList datasets = default(IList), IList linkedServices = default(IList), DataFlowStagingInfo staging = default(DataFlowStagingInfo), DataFlowDebugPackageDebugSettings debugSettings = default(DataFlowDebugPackageDebugSettings)) + { + AdditionalProperties = additionalProperties; + SessionId = sessionId; + DataFlow = dataFlow; + Datasets = datasets; + LinkedServices = linkedServices; + Staging = staging; + DebugSettings = debugSettings; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets data flow instance. + /// + [JsonProperty(PropertyName = "dataFlow")] + public DataFlowResource DataFlow { get; set; } + + /// + /// Gets or sets list of datasets. + /// + [JsonProperty(PropertyName = "datasets")] + public IList Datasets { get; set; } + + /// + /// Gets or sets list of linked services. + /// + [JsonProperty(PropertyName = "linkedServices")] + public IList LinkedServices { get; set; } + + /// + /// Gets or sets staging info for debug session. + /// + [JsonProperty(PropertyName = "staging")] + public DataFlowStagingInfo Staging { get; set; } + + /// + /// Gets or sets data flow debug settings. + /// + [JsonProperty(PropertyName = "debugSettings")] + public DataFlowDebugPackageDebugSettings DebugSettings { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DataFlow != null) + { + DataFlow.Validate(); + } + if (Datasets != null) + { + foreach (var element in Datasets) + { + if (element != null) + { + element.Validate(); + } + } + } + if (LinkedServices != null) + { + foreach (var element1 in LinkedServices) + { + if (element1 != null) + { + element1.Validate(); + } + } + } + if (Staging != null) + { + Staging.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs new file mode 100644 index 0000000000000..ba905f0711b30 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugPackageDebugSettings.cs @@ -0,0 +1,72 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow debug settings. + /// + public partial class DataFlowDebugPackageDebugSettings + { + /// + /// Initializes a new instance of the DataFlowDebugPackageDebugSettings + /// class. + /// + public DataFlowDebugPackageDebugSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugPackageDebugSettings + /// class. + /// + /// Source setting for data flow + /// debug. + /// Data flow parameters. + /// Parameters for dataset. + public DataFlowDebugPackageDebugSettings(IList sourceSettings = default(IList), IDictionary parameters = default(IDictionary), object datasetParameters = default(object)) + { + SourceSettings = sourceSettings; + Parameters = parameters; + DatasetParameters = datasetParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets source setting for data flow debug. + /// + [JsonProperty(PropertyName = "sourceSettings")] + public IList SourceSettings { get; set; } + + /// + /// Gets or sets data flow parameters. + /// + [JsonProperty(PropertyName = "parameters")] + public IDictionary Parameters { get; set; } + + /// + /// Gets or sets parameters for dataset. + /// + [JsonProperty(PropertyName = "datasetParameters")] + public object DatasetParameters { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs new file mode 100644 index 0000000000000..d2e5f57282dfb --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionCreateHeaders.cs @@ -0,0 +1,54 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for Create operation. + /// + public partial class DataFlowDebugSessionCreateHeaders + { + /// + /// Initializes a new instance of the DataFlowDebugSessionCreateHeaders + /// class. + /// + public DataFlowDebugSessionCreateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugSessionCreateHeaders + /// class. + /// + /// URI to poll for asynchronous operation + /// status. + public DataFlowDebugSessionCreateHeaders(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URI to poll for asynchronous operation status. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs new file mode 100644 index 0000000000000..6b26e807ebf7e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionExecuteCommandHeaders.cs @@ -0,0 +1,54 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Defines headers for ExecuteCommand operation. + /// + public partial class DataFlowDebugSessionExecuteCommandHeaders + { + /// + /// Initializes a new instance of the + /// DataFlowDebugSessionExecuteCommandHeaders class. + /// + public DataFlowDebugSessionExecuteCommandHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DataFlowDebugSessionExecuteCommandHeaders class. + /// + /// URI to poll for asynchronous operation + /// status. + public DataFlowDebugSessionExecuteCommandHeaders(string location = default(string)) + { + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets URI to poll for asynchronous operation status. + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs new file mode 100644 index 0000000000000..4269ae63d198e --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowDebugSessionInfo.cs @@ -0,0 +1,133 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow debug session info. + /// + public partial class DataFlowDebugSessionInfo + { + /// + /// Initializes a new instance of the DataFlowDebugSessionInfo class. + /// + public DataFlowDebugSessionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowDebugSessionInfo class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The name of the data flow. + /// Compute type of the cluster. + /// Core count of the cluster. + /// Node count of the cluster. (deprecated + /// property) + /// Attached integration runtime + /// name of data flow debug session. + /// The ID of data flow debug session. + /// Start time of data flow debug + /// session. + /// Compute type of the + /// cluster. + /// Last activity time of data flow + /// debug session. + public DataFlowDebugSessionInfo(IDictionary additionalProperties = default(IDictionary), string dataFlowName = default(string), string computeType = default(string), int? coreCount = default(int?), int? nodeCount = default(int?), string integrationRuntimeName = default(string), string sessionId = default(string), string startTime = default(string), int? timeToLiveInMinutes = default(int?), string lastActivityTime = default(string)) + { + AdditionalProperties = additionalProperties; + DataFlowName = dataFlowName; + ComputeType = computeType; + CoreCount = coreCount; + NodeCount = nodeCount; + IntegrationRuntimeName = integrationRuntimeName; + SessionId = sessionId; + StartTime = startTime; + TimeToLiveInMinutes = timeToLiveInMinutes; + LastActivityTime = lastActivityTime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the name of the data flow. + /// + [JsonProperty(PropertyName = "dataFlowName")] + public string DataFlowName { get; set; } + + /// + /// Gets or sets compute type of the cluster. + /// + [JsonProperty(PropertyName = "computeType")] + public string ComputeType { get; set; } + + /// + /// Gets or sets core count of the cluster. + /// + [JsonProperty(PropertyName = "coreCount")] + public int? CoreCount { get; set; } + + /// + /// Gets or sets node count of the cluster. (deprecated property) + /// + [JsonProperty(PropertyName = "nodeCount")] + public int? NodeCount { get; set; } + + /// + /// Gets or sets attached integration runtime name of data flow debug + /// session. + /// + [JsonProperty(PropertyName = "integrationRuntimeName")] + public string IntegrationRuntimeName { get; set; } + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + /// + /// Gets or sets start time of data flow debug session. + /// + [JsonProperty(PropertyName = "startTime")] + public string StartTime { get; set; } + + /// + /// Gets or sets compute type of the cluster. + /// + [JsonProperty(PropertyName = "timeToLiveInMinutes")] + public int? TimeToLiveInMinutes { get; set; } + + /// + /// Gets or sets last activity time of data flow debug session. + /// + [JsonProperty(PropertyName = "lastActivityTime")] + public string LastActivityTime { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs new file mode 100644 index 0000000000000..99419a661eeed --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowFolder.cs @@ -0,0 +1,53 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The folder that this data flow is in. If not specified, Data flow will + /// appear at the root level. + /// + public partial class DataFlowFolder + { + /// + /// Initializes a new instance of the DataFlowFolder class. + /// + public DataFlowFolder() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowFolder class. + /// + /// The name of the folder that this data flow is + /// in. + public DataFlowFolder(string name = default(string)) + { + Name = name; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the folder that this data flow is in. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs new file mode 100644 index 0000000000000..da9861bce286d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowReference.cs @@ -0,0 +1,99 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Data flow reference type. + /// + public partial class DataFlowReference + { + /// + /// Initializes a new instance of the DataFlowReference class. + /// + public DataFlowReference() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowReference class. + /// + /// Reference data flow name. + /// Unmatched properties from the + /// message are deserialized this collection + /// Reference data flow parameters from + /// dataset. + public DataFlowReference(string referenceName, IDictionary additionalProperties = default(IDictionary), object datasetParameters = default(object)) + { + AdditionalProperties = additionalProperties; + ReferenceName = referenceName; + DatasetParameters = datasetParameters; + CustomInit(); + } + /// + /// Static constructor for DataFlowReference class. + /// + static DataFlowReference() + { + Type = "DataFlowReference"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets reference data flow name. + /// + [JsonProperty(PropertyName = "referenceName")] + public string ReferenceName { get; set; } + + /// + /// Gets or sets reference data flow parameters from dataset. + /// + [JsonProperty(PropertyName = "datasetParameters")] + public object DatasetParameters { get; set; } + + /// + /// Data flow reference type. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ReferenceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReferenceName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs new file mode 100644 index 0000000000000..6ee35e23dc6e3 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowResource.cs @@ -0,0 +1,70 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Data flow resource type. + /// + public partial class DataFlowResource : SubResource + { + /// + /// Initializes a new instance of the DataFlowResource class. + /// + public DataFlowResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowResource class. + /// + /// Data flow properties. + /// The resource identifier. + /// The resource name. + /// The resource type. + /// Etag identifies change in the resource. + public DataFlowResource(DataFlow properties, string id = default(string), string name = default(string), string type = default(string), string etag = default(string)) + : base(id, name, type, etag) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow properties. + /// + [JsonProperty(PropertyName = "properties")] + public DataFlow Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs new file mode 100644 index 0000000000000..89a39070f26a4 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSink.cs @@ -0,0 +1,68 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Transformation for data flow sink. + /// + public partial class DataFlowSink : Transformation + { + /// + /// Initializes a new instance of the DataFlowSink class. + /// + public DataFlowSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSink class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + public DataFlowSink(string name, string description = default(string), DatasetReference dataset = default(DatasetReference)) + : base(name, description) + { + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets dataset reference. + /// + [JsonProperty(PropertyName = "dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs new file mode 100644 index 0000000000000..980ed9cd488f1 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSource.cs @@ -0,0 +1,68 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Transformation for data flow source. + /// + public partial class DataFlowSource : Transformation + { + /// + /// Initializes a new instance of the DataFlowSource class. + /// + public DataFlowSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSource class. + /// + /// Transformation name. + /// Transformation description. + /// Dataset reference. + public DataFlowSource(string name, string description = default(string), DatasetReference dataset = default(DatasetReference)) + : base(name, description) + { + Dataset = dataset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets dataset reference. + /// + [JsonProperty(PropertyName = "dataset")] + public DatasetReference Dataset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (Dataset != null) + { + Dataset.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs new file mode 100644 index 0000000000000..1ab99dab04595 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowSourceSetting.cs @@ -0,0 +1,72 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Definition of data flow source setting for debug. + /// + public partial class DataFlowSourceSetting + { + /// + /// Initializes a new instance of the DataFlowSourceSetting class. + /// + public DataFlowSourceSetting() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowSourceSetting class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// The data flow source name. + /// Defines the row limit of data flow source in + /// debug. + public DataFlowSourceSetting(IDictionary additionalProperties = default(IDictionary), string sourceName = default(string), int? rowLimit = default(int?)) + { + AdditionalProperties = additionalProperties; + SourceName = sourceName; + RowLimit = rowLimit; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets the data flow source name. + /// + [JsonProperty(PropertyName = "sourceName")] + public string SourceName { get; set; } + + /// + /// Gets or sets defines the row limit of data flow source in debug. + /// + [JsonProperty(PropertyName = "rowLimit")] + public int? RowLimit { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs new file mode 100644 index 0000000000000..b77877ea33a0b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DataFlowStagingInfo.cs @@ -0,0 +1,73 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Staging info for execute data flow activity. + /// + public partial class DataFlowStagingInfo + { + /// + /// Initializes a new instance of the DataFlowStagingInfo class. + /// + public DataFlowStagingInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataFlowStagingInfo class. + /// + /// Staging linked service + /// reference. + /// Folder path for staging blob. + public DataFlowStagingInfo(LinkedServiceReference linkedService = default(LinkedServiceReference), string folderPath = default(string)) + { + LinkedService = linkedService; + FolderPath = folderPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets staging linked service reference. + /// + [JsonProperty(PropertyName = "linkedService")] + public LinkedServiceReference LinkedService { get; set; } + + /// + /// Gets or sets folder path for staging blob. + /// + [JsonProperty(PropertyName = "folderPath")] + public string FolderPath { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (LinkedService != null) + { + LinkedService.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs new file mode 100644 index 0000000000000..d6bcccba884aa --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DeleteDataFlowDebugSessionRequest.cs @@ -0,0 +1,53 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body structure for deleting data flow debug session. + /// + public partial class DeleteDataFlowDebugSessionRequest + { + /// + /// Initializes a new instance of the DeleteDataFlowDebugSessionRequest + /// class. + /// + public DeleteDataFlowDebugSessionRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeleteDataFlowDebugSessionRequest + /// class. + /// + /// The ID of data flow debug session. + public DeleteDataFlowDebugSessionRequest(string sessionId = default(string)) + { + SessionId = sessionId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the ID of data flow debug session. + /// + [JsonProperty(PropertyName = "sessionId")] + public string SessionId { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs new file mode 100644 index 0000000000000..2ec5dc7577f42 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ExecuteDataFlowActivity.cs @@ -0,0 +1,111 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Execute data flow activity. + /// + [Newtonsoft.Json.JsonObject("ExecuteDataFlow")] + [Rest.Serialization.JsonTransformation] + public partial class ExecuteDataFlowActivity : ExecutionActivity + { + /// + /// Initializes a new instance of the ExecuteDataFlowActivity class. + /// + public ExecuteDataFlowActivity() + { + DataFlow = new DataFlowReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the ExecuteDataFlowActivity class. + /// + /// Activity name. + /// Data flow reference. + /// Unmatched properties from the + /// message are deserialized this collection + /// Activity description. + /// Activity depends on condition. + /// Activity user properties. + /// Linked service reference. + /// Activity policy. + /// Staging info for execute data flow + /// activity. + /// The integration runtime + /// reference. + public ExecuteDataFlowActivity(string name, DataFlowReference dataFlow, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), DataFlowStagingInfo staging = default(DataFlowStagingInfo), IntegrationRuntimeReference integrationRuntime = default(IntegrationRuntimeReference)) + : base(name, additionalProperties, description, dependsOn, userProperties, linkedServiceName, policy) + { + DataFlow = dataFlow; + Staging = staging; + IntegrationRuntime = integrationRuntime; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets data flow reference. + /// + [JsonProperty(PropertyName = "typeProperties.dataFlow")] + public DataFlowReference DataFlow { get; set; } + + /// + /// Gets or sets staging info for execute data flow activity. + /// + [JsonProperty(PropertyName = "typeProperties.staging")] + public DataFlowStagingInfo Staging { get; set; } + + /// + /// Gets or sets the integration runtime reference. + /// + [JsonProperty(PropertyName = "typeProperties.integrationRuntime")] + public IntegrationRuntimeReference IntegrationRuntime { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (DataFlow == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DataFlow"); + } + if (DataFlow != null) + { + DataFlow.Validate(); + } + if (Staging != null) + { + Staging.Validate(); + } + if (IntegrationRuntime != null) + { + IntegrationRuntime.Validate(); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs new file mode 100644 index 0000000000000..024f0b4c47ebc --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/GetDataFactoryOperationStatusResponse.cs @@ -0,0 +1,65 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Response body structure for get data factory operation status. + /// + public partial class GetDataFactoryOperationStatusResponse + { + /// + /// Initializes a new instance of the + /// GetDataFactoryOperationStatusResponse class. + /// + public GetDataFactoryOperationStatusResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// GetDataFactoryOperationStatusResponse class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Status of the operation. + public GetDataFactoryOperationStatusResponse(IDictionary additionalProperties = default(IDictionary), string status = default(string)) + { + AdditionalProperties = additionalProperties; + Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets unmatched properties from the message are deserialized + /// this collection + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + /// + /// Gets or sets status of the operation. + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs new file mode 100644 index 0000000000000..5cb562ed62813 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/MappingDataFlow.cs @@ -0,0 +1,87 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Mapping data flow. + /// + [Rest.Serialization.JsonTransformation] + public partial class MappingDataFlow : DataFlow + { + /// + /// Initializes a new instance of the MappingDataFlow class. + /// + public MappingDataFlow() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MappingDataFlow class. + /// + /// The description of the data flow. + /// List of tags that can be used for + /// describing the data flow. + /// The folder that this data flow is in. If not + /// specified, Data flow will appear at the root level. + /// List of sources in data flow. + /// List of sinks in data flow. + /// List of transformations in data + /// flow. + /// DataFlow script. + public MappingDataFlow(string description = default(string), IList annotations = default(IList), DataFlowFolder folder = default(DataFlowFolder), IList sources = default(IList), IList sinks = default(IList), IList transformations = default(IList), string script = default(string)) + : base(description, annotations, folder) + { + Sources = sources; + Sinks = sinks; + Transformations = transformations; + Script = script; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of sources in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.sources")] + public IList Sources { get; set; } + + /// + /// Gets or sets list of sinks in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.sinks")] + public IList Sinks { get; set; } + + /// + /// Gets or sets list of transformations in data flow. + /// + [JsonProperty(PropertyName = "typeProperties.transformations")] + public IList Transformations { get; set; } + + /// + /// Gets or sets dataFlow script. + /// + [JsonProperty(PropertyName = "typeProperties.script")] + public string Script { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs new file mode 100644 index 0000000000000..08f3df869cf69 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/Transformation.cs @@ -0,0 +1,73 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// A data flow transformation. + /// + public partial class Transformation + { + /// + /// Initializes a new instance of the Transformation class. + /// + public Transformation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Transformation class. + /// + /// Transformation name. + /// Transformation description. + public Transformation(string name, string description = default(string)) + { + Name = name; + Description = description; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets transformation name. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets transformation description. + /// + [JsonProperty(PropertyName = "description")] + public string Description { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs index c563702e56623..1538ce7baf06e 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs @@ -20,6 +20,8 @@ public static IEnumerable> ApiInfo_DataFactoryMana return new Tuple[] { new Tuple("DataFactory", "ActivityRuns", "2018-06-01"), + new Tuple("DataFactory", "DataFlowDebugSession", "2018-06-01"), + new Tuple("DataFactory", "DataFlows", "2018-06-01"), new Tuple("DataFactory", "Datasets", "2018-06-01"), new Tuple("DataFactory", "ExposureControl", "2018-06-01"), new Tuple("DataFactory", "Factories", "2018-06-01"), @@ -39,10 +41,10 @@ public static IEnumerable> ApiInfo_DataFactoryMana // BEGIN: Code Generation Metadata Section public static readonly String AutoRestVersion = "latest"; public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=C:\\azure-sdk-for-net\\sdk"; + public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\\GitHub\\azure-sdk-for-net\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "6bec7452e59b579f0a1e203b937bf1157eb8af1e"; + public static readonly String GithubCommidId = "151f8794e84d2544961ca64c80f2fdddada29bad"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj index 6dee3ae44db1a..58656bbdec017 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj @@ -10,6 +10,10 @@ Microsoft Azure resource management;Data Factory;ADF; diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md index 200234b7cffee..769428d52cd7b 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md @@ -2,6 +2,10 @@ ## Current version ### Feature Additions +- Added support for Data Flow: + * Added data flow object model and CRUD APIs + * Added data flow debug session APIs + * Added support for execute data flow activity type - Added property queryTimeout to tabular sources ## Version 4.1.3 diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DataFlowJsonSamples.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DataFlowJsonSamples.cs new file mode 100644 index 0000000000000..addd011f0c237 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/DataFlowJsonSamples.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +using DataFactory.Tests.Utils; + +namespace DataFactory.Tests.JsonSamples +{ + public class DataFlowJsonSamples : JsonSampleCollection + { + [JsonSample] + public const string MappingDataFlow = @" + { + ""name"": ""exampleDataFlow"", + ""properties"": { + ""description"": ""Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation."", + ""type"": ""MappingDataFlow"", + ""typeProperties"": { + ""sources"": [ + { + ""dataset"": { + ""referenceName"": ""CurrencyDatasetUSD"", + ""type"": ""DatasetReference"" + }, + ""name"": ""USDCurrency"" + }, + { + ""dataset"": { + ""referenceName"": ""CurrencyDatasetCAD"", + ""type"": ""DatasetReference"" + }, + ""name"": ""CADSource"" + } + ], + ""sinks"": [ + { + ""dataset"": { + ""referenceName"": ""USDOutput"", + ""type"": ""DatasetReference"" + }, + ""name"": ""USDSink"" + }, + { + ""dataset"": { + ""referenceName"": ""CADOutput"", + ""type"": ""DatasetReference"" + }, + ""name"": ""CADSink"" + } + ], + ""script"": ""some script"" + } + } + } +"; + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs index e27649a772ad1..341aa2816875d 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/JsonSamples/PipelineJsonSamples.cs @@ -5234,6 +5234,41 @@ public class PipelineJsonSamples : JsonSampleCollection ] } } +"; + + [JsonSample] + public const string ExecuteDataFlowActivityPipeline = @" +{ + name: ""My Execute Data Flow Activity pipeline"", + properties: + { + activities: + [ + { + name: ""TestActivity"", + description: ""Test activity description"", + type: ""ExecuteDataFlow"", + typeProperties: { + dataFlow: { + referenceName: ""referenced1"", + type: ""DataFlowReference"" + }, + staging: { + linkedService: { + referenceName: ""referenced2"", + type: ""LinkedServiceReference"" + }, + folderPath: ""adfjobs/staging"" + }, + integrationRuntime: { + referenceName: ""dataflowIR10minTTL"", + type: ""IntegrationRuntimeReference"" + } + } + } + ] + } +} "; } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/ScenarioTests/DataFlowScenarioTests.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/ScenarioTests/DataFlowScenarioTests.cs new file mode 100644 index 0000000000000..d04e157b6b239 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/ScenarioTests/DataFlowScenarioTests.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +using DataFactory.Tests.Utils; +using Microsoft.Azure.Management.DataFactory; +using Microsoft.Azure.Management.DataFactory.Models; +using Microsoft.Rest.Azure; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Threading.Tasks; +using Xunit; + +namespace DataFactory.Tests.ScenarioTests +{ + public class DataFlowScenarioTests : ScenarioTestBase + { + [Fact] + [Trait(TraitName.TestType, TestType.Scenario)] + public async Task DataFlowCrud() + { + string dataFlowName = "TestDataFlow"; + string datasetName = "TestDataFlowDataset"; + string linkedServiceName = "TestDataFlowLinkedService"; + + Func action = async (client) => + { + await DataFactoryScenarioTests.Create(client, this.ResourceGroupName, this.DataFactoryName, new Factory(location: FactoryLocation)); + + var expectedLinkedService = LinkedServiceScenarioTests.GetLinkedServiceResource(null); + await LinkedServiceScenarioTests.Create(client, this.ResourceGroupName, this.DataFactoryName, linkedServiceName, expectedLinkedService); + var expectedDataset = DatasetScenarioTests.GetDatasetResource(null, linkedServiceName); + await DatasetScenarioTests.Create(client, this.ResourceGroupName, this.DataFactoryName, datasetName, expectedDataset); + + DataFlowResource expectedDataFlow = GetDataFlowResource(null, datasetName); + await Create(client, this.ResourceGroupName, this.DataFactoryName, dataFlowName, expectedDataFlow); + await GetList(client, this.ResourceGroupName, this.DataFactoryName, dataFlowName, expectedDataFlow); + + DataFlowResource updatedDataFlow = GetDataFlowResource("data flow description", datasetName); + await Update(client, this.ResourceGroupName, this.DataFactoryName, dataFlowName, updatedDataFlow); + await GetList(client, this.ResourceGroupName, this.DataFactoryName, dataFlowName, updatedDataFlow); + + await Delete(client, this.ResourceGroupName, this.DataFactoryName, dataFlowName); + await DatasetScenarioTests.Delete(client, this.ResourceGroupName, this.DataFactoryName, datasetName); + await LinkedServiceScenarioTests.Delete(client, this.ResourceGroupName, this.DataFactoryName, linkedServiceName); + }; + + Func finallyAction = async (client) => + { + await client.Factories.DeleteAsync(this.ResourceGroupName, this.DataFactoryName); + }; + + await this.RunTest(action, finallyAction); + } + + internal static DataFlowResource GetDataFlowResource(string description, string datasetName) + { + DataFlowResource resource = new DataFlowResource + { + Properties = new MappingDataFlow + { + Description = description, + Sources = new List() { + new DataFlowSource() + { + Name = "source", + Description = "source 1", + Dataset = new DatasetReference() + { + ReferenceName = datasetName, + Parameters = new Dictionary + { + { "JobId", new Expression("@pipeline().parameters.JobId") } + } + } + } + }, + Sinks = new List() { + new DataFlowSink() + { + Name = "sink", + Description = "sink 1", + Dataset = new DatasetReference() + { + ReferenceName = datasetName, + Parameters = new Dictionary + { + { "JobId", new Expression("@pipeline().parameters.JobId") } + } + } + } + }, + Transformations = new List() { + new Transformation() + { + Name = "transformation", + Description = "transformation 1" + } + } + } + }; + + return resource; + } + + internal static async Task Create(DataFactoryManagementClient client, string resourceGroupName, string dataFactoryName, string dataFlowName, DataFlowResource expectedDataFlow) + { + AzureOperationResponse createDataFlowResponse = await client.DataFlows.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, dataFactoryName, dataFlowName, expectedDataFlow); + ValidateDataFlow(client, resourceGroupName, dataFactoryName, expectedDataFlow, createDataFlowResponse.Body, dataFlowName); + Assert.Equal(HttpStatusCode.OK, createDataFlowResponse.Response.StatusCode); + } + + internal static async Task Update(DataFactoryManagementClient client, string resourceGroupName, string dataFactoryName, string dataFlowName, DataFlowResource expectedDataFlow) + { + AzureOperationResponse updateDataFlowResponse = await client.DataFlows.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, dataFactoryName, dataFlowName, expectedDataFlow); + ValidateDataFlow(client, resourceGroupName, dataFactoryName, expectedDataFlow, updateDataFlowResponse.Body, dataFlowName); + Assert.Equal(HttpStatusCode.OK, updateDataFlowResponse.Response.StatusCode); + } + + internal static async Task Delete(DataFactoryManagementClient client, string resourceGroupName, string dataFactoryName, string dataFlowName) + { + AzureOperationResponse deleteDataFlowResponse = await client.DataFlows.DeleteWithHttpMessagesAsync(resourceGroupName, dataFactoryName, dataFlowName); + Assert.Equal(HttpStatusCode.OK, deleteDataFlowResponse.Response.StatusCode); + deleteDataFlowResponse = await client.DataFlows.DeleteWithHttpMessagesAsync(resourceGroupName, dataFactoryName, dataFlowName); + Assert.Equal(HttpStatusCode.NoContent, deleteDataFlowResponse.Response.StatusCode); + } + + internal static async Task GetList(DataFactoryManagementClient client, string resourceGroupName, string dataFactoryName, string dataFlowName, DataFlowResource expectedDataFlow) + { + AzureOperationResponse getDataFlowResponse = await client.DataFlows.GetWithHttpMessagesAsync(resourceGroupName, dataFactoryName, dataFlowName); + ValidateDataFlow(client, resourceGroupName, dataFactoryName, expectedDataFlow, getDataFlowResponse.Body, dataFlowName); + Assert.Equal(HttpStatusCode.OK, getDataFlowResponse.Response.StatusCode); + + AzureOperationResponse> listDataFlowResponse = await client.DataFlows.ListByFactoryWithHttpMessagesAsync(resourceGroupName, dataFactoryName); + ValidateDataFlow(client, resourceGroupName, dataFactoryName, expectedDataFlow, listDataFlowResponse.Body.First(), dataFlowName); + Assert.Equal(HttpStatusCode.OK, listDataFlowResponse.Response.StatusCode); + } + + private static void ValidateDataFlow(DataFactoryManagementClient client, string resourceGroupName, string dataFactoryName, DataFlowResource expected, DataFlowResource actual, string expectedName) + { + ValidateSubResource(client, resourceGroupName, actual, dataFactoryName, expectedName, "dataflows"); + Assert.IsType(actual.Properties); + } + } +} + diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/SessionRecords/DataFlowScenarioTests/DataFlowCrud.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/SessionRecords/DataFlowScenarioTests/DataFlowCrud.json new file mode 100644 index 0000000000000..94b4626ae7437 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/SessionRecords/DataFlowScenarioTests/DataFlowCrud.json @@ -0,0 +1,1543 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourcegroups/sdktestingadfrg9216?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "68cf5302-9f4f-481c-a352-0ad73f879dcd" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "a6838ef5-2f3d-4a22-a87a-81cc11649770" + ], + "x-ms-correlation-request-id": [ + "a6838ef5-2f3d-4a22-a87a-81cc11649770" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205935Z:a6838ef5-2f3d-4a22-a87a-81cc11649770" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:35 GMT" + ], + "Content-Length": [ + "191" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216\",\r\n \"name\": \"sdktestingadfrg9216\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", + "StatusCode": 201 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxP2FwaS12ZXJzaW9uPTIwMTgtMDYtMDE=", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "38b2c249-f454-4ff1-8295-86fd7d6dec2c" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "29" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "418e574e-5d37-42a8-b3eb-e9983621032f" + ], + "x-ms-correlation-request-id": [ + "418e574e-5d37-42a8-b3eb-e9983621032f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205937Z:418e574e-5d37-42a8-b3eb-e9983621032f" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:36 GMT" + ], + "Content-Length": [ + "426" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"sdktestingfactory4491\",\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491\",\r\n \"type\": \"Microsoft.DataFactory/factories\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2019-09-25T20:59:37.0328183Z\",\r\n \"version\": \"2018-06-01\"\r\n },\r\n \"eTag\": \"\\\"030029fa-0000-0700-0000-5d8bd5390000\\\"\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxP2FwaS12ZXJzaW9uPTIwMTgtMDYtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2184dc89-11b7-40f3-ac02-b97b0b09f784" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "25e69938-34f7-41fd-80a9-5c533ea3339c" + ], + "x-ms-correlation-request-id": [ + "25e69938-34f7-41fd-80a9-5c533ea3339c" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205937Z:25e69938-34f7-41fd-80a9-5c533ea3339c" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:36 GMT" + ], + "Content-Length": [ + "559" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"name\": \"sdktestingfactory4491\",\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491\",\r\n \"type\": \"Microsoft.DataFactory/factories\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2019-09-25T20:59:37.0328183Z\",\r\n \"version\": \"2018-06-01\",\r\n \"factoryStatistics\": {\r\n \"totalResourceCount\": 0,\r\n \"maxAllowedResourceCount\": 0,\r\n \"factorySizeInGbUnits\": 0,\r\n \"maxAllowedFactorySizeInGbUnits\": 0\r\n }\r\n },\r\n \"eTag\": \"\\\"030029fa-0000-0700-0000-5d8bd5390000\\\"\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXM/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11963f1b-c8e5-4608-a1dd-a8afc3e2170b" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "1eb7a6db-b5bc-45e3-9c4a-932095dd179e" + ], + "x-ms-correlation-request-id": [ + "1eb7a6db-b5bc-45e3-9c4a-932095dd179e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205937Z:1eb7a6db-b5bc-45e3-9c4a-932095dd179e" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:36 GMT" + ], + "Content-Length": [ + "438" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"name\": \"sdktestingfactory4491\",\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491\",\r\n \"type\": \"Microsoft.DataFactory/factories\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"createTime\": \"2019-09-25T20:59:37.0328183Z\",\r\n \"version\": \"2018-06-01\"\r\n },\r\n \"eTag\": \"\\\"030029fa-0000-0700-0000-5d8bd5390000\\\"\",\r\n \"location\": \"West US\",\r\n \"tags\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/linkedservices/TestDataFlowLinkedService?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2xpbmtlZHNlcnZpY2VzL1Rlc3REYXRhRmxvd0xpbmtlZFNlcnZpY2U/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"AzureDataLakeStore\",\r\n \"typeProperties\": {\r\n \"dataLakeStoreUri\": \"adl://test.azuredatalakestore.net/\"\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c92f9d07-ecfe-46ce-9148-0bbb2aa963e7" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "159" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "4105b076-aa16-4011-914c-77d79e794f0a" + ], + "x-ms-correlation-request-id": [ + "4105b076-aa16-4011-914c-77d79e794f0a" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205938Z:4105b076-aa16-4011-914c-77d79e794f0a" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:37 GMT" + ], + "Content-Length": [ + "455" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/linkedservices/TestDataFlowLinkedService\",\r\n \"name\": \"TestDataFlowLinkedService\",\r\n \"type\": \"Microsoft.DataFactory/factories/linkedservices\",\r\n \"properties\": {\r\n \"type\": \"AzureDataLakeStore\",\r\n \"typeProperties\": {\r\n \"dataLakeStoreUri\": \"adl://test.azuredatalakestore.net/\"\r\n }\r\n },\r\n \"etag\": \"1500d732-0000-0700-0000-5d8bd5390000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/datasets/TestDataFlowDataset?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFzZXRzL1Rlc3REYXRhRmxvd0RhdGFzZXQ/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"AzureBlob\",\r\n \"typeProperties\": {\r\n \"folderPath\": {\r\n \"value\": \"@dataset().MyFolderPath\",\r\n \"type\": \"Expression\"\r\n },\r\n \"fileName\": {\r\n \"value\": \"@dataset().MyFileName\",\r\n \"type\": \"Expression\"\r\n },\r\n \"format\": {\r\n \"type\": \"TextFormat\"\r\n }\r\n },\r\n \"linkedServiceName\": {\r\n \"referenceName\": \"TestDataFlowLinkedService\",\r\n \"type\": \"LinkedServiceReference\"\r\n },\r\n \"parameters\": {\r\n \"MyFolderPath\": {\r\n \"type\": \"String\"\r\n },\r\n \"MyFileName\": {\r\n \"type\": \"String\"\r\n }\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f7ab140e-1d2d-4bc8-9e10-a7860a6cafb5" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "633" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "04e1dc48-2865-4d2e-a8c2-1f58ae829385" + ], + "x-ms-correlation-request-id": [ + "04e1dc48-2865-4d2e-a8c2-1f58ae829385" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205939Z:04e1dc48-2865-4d2e-a8c2-1f58ae829385" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:38 GMT" + ], + "Content-Length": [ + "708" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/datasets/TestDataFlowDataset\",\r\n \"name\": \"TestDataFlowDataset\",\r\n \"type\": \"Microsoft.DataFactory/factories/datasets\",\r\n \"properties\": {\r\n \"type\": \"AzureBlob\",\r\n \"typeProperties\": {\r\n \"folderPath\": {\r\n \"value\": \"@dataset().MyFolderPath\",\r\n \"type\": \"Expression\"\r\n },\r\n \"fileName\": {\r\n \"value\": \"@dataset().MyFileName\",\r\n \"type\": \"Expression\"\r\n },\r\n \"format\": {\r\n \"type\": \"TextFormat\"\r\n }\r\n },\r\n \"linkedServiceName\": {\r\n \"referenceName\": \"TestDataFlowLinkedService\",\r\n \"type\": \"LinkedServiceReference\"\r\n },\r\n \"parameters\": {\r\n \"MyFolderPath\": {\r\n \"type\": \"String\"\r\n },\r\n \"MyFileName\": {\r\n \"type\": \"String\"\r\n }\r\n }\r\n },\r\n \"etag\": \"1500e332-0000-0700-0000-5d8bd53a0000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n }\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0fe371b8-fbbb-475a-8690-788ed76abd0e" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1093" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "db331b3d-6312-483b-b62e-e19b556bb192" + ], + "x-ms-correlation-request-id": [ + "db331b3d-6312-483b-b62e-e19b556bb192" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205939Z:db331b3d-6312-483b-b62e-e19b556bb192" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:38 GMT" + ], + "Content-Length": [ + "863" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n }\r\n },\r\n \"etag\": \"1500ed32-0000-0700-0000-5d8bd53b0000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "PUT", + "RequestBody": "{\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n },\r\n \"description\": \"data flow description\"\r\n }\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8d1d0557-e28f-45f5-b2cc-fb679e03f0e1" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "1138" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1195" + ], + "x-ms-request-id": [ + "d9d42a2a-28ed-4a97-8071-e0a51905e3fd" + ], + "x-ms-correlation-request-id": [ + "d9d42a2a-28ed-4a97-8071-e0a51905e3fd" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205939Z:d9d42a2a-28ed-4a97-8071-e0a51905e3fd" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:38 GMT" + ], + "Content-Length": [ + "901" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n },\r\n \"description\": \"data flow description\"\r\n },\r\n \"etag\": \"1500fe32-0000-0700-0000-5d8bd53b0000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8a898624-b4cf-493b-ae08-44a302893226" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "8508cc4b-f3c6-4e4e-a6e0-3ff8d89c7988" + ], + "x-ms-correlation-request-id": [ + "8508cc4b-f3c6-4e4e-a6e0-3ff8d89c7988" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205939Z:8508cc4b-f3c6-4e4e-a6e0-3ff8d89c7988" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:38 GMT" + ], + "Content-Length": [ + "863" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n }\r\n },\r\n \"etag\": \"1500ed32-0000-0700-0000-5d8bd53b0000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d24118c5-91f6-485e-8a61-3a2ba1c0baba" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "da8cb9c4-6062-422d-896f-d5561320966f" + ], + "x-ms-correlation-request-id": [ + "da8cb9c4-6062-422d-896f-d5561320966f" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205940Z:da8cb9c4-6062-422d-896f-d5561320966f" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:39 GMT" + ], + "Content-Length": [ + "901" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n },\r\n \"description\": \"data flow description\"\r\n },\r\n \"etag\": \"1500fe32-0000-0700-0000-5d8bd53b0000\"\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cz9hcGktdmVyc2lvbj0yMDE4LTA2LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "02b3b57c-352a-41bb-b4e1-45e1ab505d0f" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "8008fc1a-0b77-4e3f-ad0f-311cc3ec2b52" + ], + "x-ms-correlation-request-id": [ + "8008fc1a-0b77-4e3f-ad0f-311cc3ec2b52" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205939Z:8008fc1a-0b77-4e3f-ad0f-311cc3ec2b52" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:38 GMT" + ], + "Content-Length": [ + "875" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n }\r\n },\r\n \"etag\": \"1500ed32-0000-0700-0000-5d8bd53b0000\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cz9hcGktdmVyc2lvbj0yMDE4LTA2LTAx", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "83be23c5-ec8d-4402-af46-12dbca340819" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "40720c36-5fd6-4779-9fd7-bbaf1995913d" + ], + "x-ms-correlation-request-id": [ + "40720c36-5fd6-4779-9fd7-bbaf1995913d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205940Z:40720c36-5fd6-4779-9fd7-bbaf1995913d" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:39 GMT" + ], + "Content-Length": [ + "913" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow\",\r\n \"name\": \"TestDataFlow\",\r\n \"type\": \"Microsoft.DataFactory/factories/dataflows\",\r\n \"properties\": {\r\n \"type\": \"MappingDataFlow\",\r\n \"typeProperties\": {\r\n \"sources\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"source\",\r\n \"description\": \"source 1\"\r\n }\r\n ],\r\n \"sinks\": [\r\n {\r\n \"dataset\": {\r\n \"referenceName\": \"TestDataFlowDataset\",\r\n \"parameters\": {\r\n \"JobId\": {\r\n \"value\": \"@pipeline().parameters.JobId\",\r\n \"type\": \"Expression\"\r\n }\r\n },\r\n \"type\": \"DatasetReference\"\r\n },\r\n \"name\": \"sink\",\r\n \"description\": \"sink 1\"\r\n }\r\n ],\r\n \"transformations\": [\r\n {\r\n \"name\": \"transformation\",\r\n \"description\": \"transformation 1\"\r\n }\r\n ]\r\n },\r\n \"description\": \"data flow description\"\r\n },\r\n \"etag\": \"1500fe32-0000-0700-0000-5d8bd53b0000\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a4e13e42-18b3-4b84-8fa9-d68a3e40a500" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "d09706ae-4b76-46aa-90df-295c83650c9e" + ], + "x-ms-correlation-request-id": [ + "d09706ae-4b76-46aa-90df-295c83650c9e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205940Z:d09706ae-4b76-46aa-90df-295c83650c9e" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:39 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/dataflows/TestDataFlow?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFmbG93cy9UZXN0RGF0YUZsb3c/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d80c23b5-d849-4dbd-b6a3-8fc6a6e13776" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14998" + ], + "x-ms-request-id": [ + "9832fbc5-97d3-401d-8b6a-2d2e1ea2c5ce" + ], + "x-ms-correlation-request-id": [ + "9832fbc5-97d3-401d-8b6a-2d2e1ea2c5ce" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205940Z:9832fbc5-97d3-401d-8b6a-2d2e1ea2c5ce" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:39 GMT" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/datasets/TestDataFlowDataset?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFzZXRzL1Rlc3REYXRhRmxvd0RhdGFzZXQ/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "40cd3688-6264-451a-903c-a8db4260836d" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14997" + ], + "x-ms-request-id": [ + "2fa8693a-c63d-44a8-a935-67536f4ed886" + ], + "x-ms-correlation-request-id": [ + "2fa8693a-c63d-44a8-a935-67536f4ed886" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205941Z:2fa8693a-c63d-44a8-a935-67536f4ed886" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:40 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/datasets/TestDataFlowDataset?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2RhdGFzZXRzL1Rlc3REYXRhRmxvd0RhdGFzZXQ/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "23a73eeb-df22-4c2e-8833-b5fbd50d8968" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14996" + ], + "x-ms-request-id": [ + "42827b19-f0ad-4c72-a36f-ccb40b58b23e" + ], + "x-ms-correlation-request-id": [ + "42827b19-f0ad-4c72-a36f-ccb40b58b23e" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205941Z:42827b19-f0ad-4c72-a36f-ccb40b58b23e" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:40 GMT" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491/linkedservices/TestDataFlowLinkedService?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxL2xpbmtlZHNlcnZpY2VzL1Rlc3REYXRhRmxvd0xpbmtlZFNlcnZpY2U/YXBpLXZlcnNpb249MjAxOC0wNi0wMQ==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "41ae3ecb-52e1-4e89-9714-04fbae6d62da" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14995" + ], + "x-ms-request-id": [ + "844a92ec-e43b-4edf-a0cf-a464cdcff9ba" + ], + "x-ms-correlation-request-id": [ + "844a92ec-e43b-4edf-a0cf-a464cdcff9ba" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205941Z:844a92ec-e43b-4edf-a0cf-a464cdcff9ba" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:40 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourceGroups/sdktestingadfrg9216/providers/Microsoft.DataFactory/factories/sdktestingfactory4491?api-version=2018-06-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlR3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTYvcHJvdmlkZXJzL01pY3Jvc29mdC5EYXRhRmFjdG9yeS9mYWN0b3JpZXMvc2RrdGVzdGluZ2ZhY3Rvcnk0NDkxP2FwaS12ZXJzaW9uPTIwMTgtMDYtMDE=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "34065590-2b5c-457a-a1a5-2163689c0461" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.DataFactory.DataFactoryManagementClient/4.1.4.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Server": [ + "Microsoft-IIS/10.0" + ], + "X-Powered-By": [ + "ASP.NET" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14994" + ], + "x-ms-request-id": [ + "fe9e3bbf-15c4-44d9-8163-efb8376c3893" + ], + "x-ms-correlation-request-id": [ + "fe9e3bbf-15c4-44d9-8163-efb8376c3893" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205942Z:fe9e3bbf-15c4-44d9-8163-efb8376c3893" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:41 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/resourcegroups/sdktestingadfrg9216?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L3Jlc291cmNlZ3JvdXBzL3Nka3Rlc3RpbmdhZGZyZzkyMTY/YXBpLXZlcnNpb249MjAxNy0wNS0xMA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7e0ddf6f-d2ac-4946-b949-4fa16826d1b8" + ], + "Accept-Language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-deletes": [ + "14999" + ], + "x-ms-request-id": [ + "c353aa12-d994-494f-aacc-338eea9a46d0" + ], + "x-ms-correlation-request-id": [ + "c353aa12-d994-494f-aacc-338eea9a46d0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205943Z:c353aa12-d994-494f-aacc-338eea9a46d0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:42 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUkV0VVJWTlVTVTVIUVVSR1VrYzVNakUyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "c4777242-8c8a-425b-b5cb-f6d14533b532" + ], + "x-ms-correlation-request-id": [ + "c4777242-8c8a-425b-b5cb-f6d14533b532" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T205958Z:c4777242-8c8a-425b-b5cb-f6d14533b532" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 20:59:57 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUkV0VVJWTlVTVTVIUVVSR1VrYzVNakUyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "20f89b75-b422-43c9-90b4-1fee1cca01a0" + ], + "x-ms-correlation-request-id": [ + "20f89b75-b422-43c9-90b4-1fee1cca01a0" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T210013Z:20f89b75-b422-43c9-90b4-1fee1cca01a0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 21:00:12 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUkV0VVJWTlVTVTVIUVVSR1VrYzVNakUyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "Location": [ + "https://management.azure.com/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10" + ], + "Retry-After": [ + "15" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "26a54410-f87b-4af4-a7cd-b36d2ad9bf1d" + ], + "x-ms-correlation-request-id": [ + "26a54410-f87b-4af4-a7cd-b36d2ad9bf1d" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T210028Z:26a54410-f87b-4af4-a7cd-b36d2ad9bf1d" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 21:00:27 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 202 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUkV0VVJWTlVTVTVIUVVSR1VrYzVNakUyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11995" + ], + "x-ms-request-id": [ + "60267e0c-8d57-4a1f-bda0-afc300f4247b" + ], + "x-ms-correlation-request-id": [ + "60267e0c-8d57-4a1f-bda0-afc300f4247b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T210043Z:60267e0c-8d57-4a1f-bda0-afc300f4247b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 21:00:42 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/1e42591f-1f0c-4c5a-b7f2-a268f6105ec5/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1TREtURVNUSU5HQURGUkc5MjE2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2017-05-10", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMWU0MjU5MWYtMWYwYy00YzVhLWI3ZjItYTI2OGY2MTA1ZWM1L29wZXJhdGlvbnJlc3VsdHMvZXlKcWIySkpaQ0k2SWxKRlUwOVZVa05GUjFKUFZWQkVSVXhGVkVsUFRrcFBRaTFUUkV0VVJWTlVTVTVIUVVSR1VrYzVNakUyTFZkRlUxUlZVeUlzSW1wdllreHZZMkYwYVc5dUlqb2lkMlZ6ZEhWekluMD9hcGktdmVyc2lvbj0yMDE3LTA1LTEw", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "User-Agent": [ + "FxVersion/4.6.28008.01", + "OSName/Windows", + "OSVersion/Microsoft.Windows.10.0.18362.", + "Microsoft.Azure.Management.ResourceManager.ResourceManagementClient/1.6.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11994" + ], + "x-ms-request-id": [ + "92e86454-ca80-40c4-8825-a613c48c200b" + ], + "x-ms-correlation-request-id": [ + "92e86454-ca80-40c4-8825-a613c48c200b" + ], + "x-ms-routing-request-id": [ + "WESTUS:20190925T210043Z:92e86454-ca80-40c4-8825-a613c48c200b" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Wed, 25 Sep 2019 21:00:42 GMT" + ], + "Expires": [ + "-1" + ], + "Content-Length": [ + "0" + ] + }, + "ResponseBody": "", + "StatusCode": 200 + } + ], + "Names": { + "RunTest": [ + "sdktestingadfrg9216", + "sdktestingfactory4491" + ] + }, + "Variables": { + "SubscriptionId": "1e42591f-1f0c-4c5a-b7f2-a268f6105ec5" + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_AddDataFlow.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_AddDataFlow.json new file mode 100644 index 0000000000000..40452adbe4424 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_AddDataFlow.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "request": { + "dataFlow": { + "properties": { + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "DelimitedText2", + "type": "DatasetReference" + }, + "name": "source1", + "typeProperties": {} + } + ], + "sinks": [], + "transformations": [], + "script": "\n\nsource(output(\n\t\tColumn_1 as string\n\t),\n\tallowSchemaDrift: true,\n\tvalidateSchema: false) ~> source1" + } + } + }, + "datasets": [ + { + "properties": { + "linkedServiceName": { + "referenceName": "linkedService5", + "type": "LinkedServiceReference" + }, + "annotations": [], + "type": "DelimitedText", + "typeProperties": { + "location": { + "type": "AzureBlobStorageLocation", + "fileName": "Ansiencoding.csv", + "container": "dataflow-sample-data" + }, + "columnDelimiter": ",", + "escapeChar": "\\", + "firstRowAsHeader": true, + "quoteChar": "\"" + }, + "schema": [ + { + "type": "String" + } + ] + } + } + ], + "linkedServices": [ + { + "properties": { + "type": "AzureBlobStorage", + "typeProperties": { + "connectionString": "DefaultEndpointsProtocol=https;AccountName=;EndpointSuffix=core.windows.net;", + "encryptedCredential": "" + }, + "annotations": [] + } + } + ], + "debugSettings": { + "sourceSettings": [ + { + "sourceName": "source1", + "rowLimit": 1000 + }, + { + "sourceName": "source2", + "rowLimit": 222 + } + ], + "parameters": { + "sourcePath": "Toy" + }, + "datasetParameters": { + "Movies": { + "path": "abc" + }, + "Output": { + "time": "def" + } + } + }, + "sessionId": "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }, + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:40:01 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14989", + "x-ms-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "x-ms-correlation-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd" + }, + "body": { + "jobVersion": "e5328ee7-c524-4207-8ba4-b709010db33d" + } + } + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Create.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Create.json new file mode 100644 index 0000000000000..fcbc63ef8c20f --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Create.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "request": { + "timeToLive": 60, + "integrationRuntime": { + "properties": { + "type": "Managed", + "typeProperties": { + "computeProperties": { + "location": "AutoResolve", + "dataFlowProperties": { + "computeType": "General", + "coreCount": 48, + "timeToLive": 10 + } + } + } + } + } + }, + "api-version": "2018-06-01" + }, + "responses": { + "202": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:40:01 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14989", + "x-ms-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "x-ms-correlation-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "location": "https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/operationStatuses/dfCreateSession$$229c688c-944c-44ac-b31a-82d50f347154?api-version=2018-06-01" + } + }, + "200": { + "body": { + "status": "Succeeded", + "sessionId": "229c688c-944c-44ac-b31a-82d50f347154" + } + } + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Delete.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Delete.json new file mode 100644 index 0000000000000..5d6428c220f67 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_Delete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "request": { + "sessionId": "91fb57e0-8292-47be-89ff-c8f2d2bb2a7e" + }, + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:40:01 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14989", + "x-ms-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "x-ms-correlation-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd" + } + } + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_ExecuteCommand.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_ExecuteCommand.json new file mode 100644 index 0000000000000..ebb6972f7a2d5 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_ExecuteCommand.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "request": { + "commandPayload": { + "streamName": "source1", + "rowLimits": 100 + }, + "command": "executePreviewQuery", + "sessionId": "f06ed247-9d07-49b2-b05e-2cb4a2fc871e" + }, + "api-version": "2018-06-01" + }, + "responses": { + "202": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:40:01 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14989", + "x-ms-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "x-ms-correlation-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "location": "https://management.azure.com/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/operationResults/dfCommandOutput$$f06ed247-9d07-49b2-b05e-2cb4a2fc871e$$e5328ee7-c524-4207-8ba4-b709010db33d$$ace5eaf0-3e93-45ba-ada3-bf77da321a7b?api-version=2018-06-01" + } + }, + "200": { + "body": { + "status": "Succeeded", + "data": "some output" + } + } + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_QueryByFactory.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_QueryByFactory.json new file mode 100644 index 0000000000000..c31f612fdfe71 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlowDebugSession_QueryByFactory.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:40:01 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14989", + "x-ms-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd", + "x-ms-correlation-request-id": "2f955e10-c6df-45a7-97d4-81acdb8540cd" + }, + "body": { + "value": [ + { + "userObjectId": "0a7e0d6e-f2b7-48cc-8cd8-618326f5662f", + "startTime": "2019-09-05T18:23:20.3257799+00:00", + "lastActivityTime": "2019-09-05T18:28:00.9459674+00:00", + "dataFlowName": "DebugSession-0a7e0d6e-f2b7-48cc-8cd8-618326f5662f", + "sessionId": "229c688c-944c-44ac-b31a-82d50f347154", + "coreCount": 48, + "computeType": "General", + "timeToLiveInMinutes": 60 + } + ] + } + } + } +} \ No newline at end of file diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Create.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Create.json new file mode 100644 index 0000000000000..8c2ece5099049 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Create.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "dataFlowName": "exampleDataFlow", + "ifMatch": null, + "dataFlow": { + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + } + }, + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Mon, 22 Apr 2019 18:33:50 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "ce95d6dd-c04d-4b02-b7ad-fe79c9b26df0", + "x-ms-correlation-request-id": "ce95d6dd-c04d-4b02-b7ad-fe79c9b26df0" + }, + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset", + "name": "exampleDataFlow", + "type": "Microsoft.DataFactory/factories/dataflows", + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + }, + "etag": "0a0066d4-0000-0000-0000-5b245bd20000" + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Delete.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Delete.json new file mode 100644 index 0000000000000..c8d00c1e4f59d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "dataFlowName": "exampleDataFlow", + "api-version": "2018-06-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Get.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Get.json new file mode 100644 index 0000000000000..794da6f64a090 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Get.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "dataFlowName": "exampleDataFlow", + "ifNoneMatch": "15004c4f-0000-0200-0000-5cbe090e0000", + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Mon, 22 Apr 2019 18:33:50 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "48983fb5-612a-44c6-8158-add7ffebb32b", + "x-ms-correlation-request-id": "48983fb5-612a-44c6-8158-add7ffebb32b" + }, + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/dataflows/exampleDataFlow", + "name": "exampleDataFlow", + "type": "Microsoft.DataFactory/factories/dataflows", + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + }, + "etag": "15004c4f-0000-0200-0000-5cbe090e0000" + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_ListByFactory.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_ListByFactory.json new file mode 100644 index 0000000000000..e722aa052d18d --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_ListByFactory.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Sat, 16 Jun 2018 00:37:40 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-reads": "14992", + "x-ms-request-id": "341c9ece-5062-448b-be98-3ccbf476ed5d", + "x-ms-correlation-request-id": "341c9ece-5062-448b-be98-3ccbf476ed5d" + }, + "body": { + "value": [ + { + "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/dataflows/exampleDataFlow", + "name": "exampleDataFlow", + "type": "Microsoft.DataFactory/factories/dataflows", + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + }, + "etag": "0a0068d4-0000-0000-0000-5b245bd30000" + } + ] + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Update.json b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Update.json new file mode 100644 index 0000000000000..add80790c2a7b --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/TestData/DataFlows_Update.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "subscriptionId": "12345678-1234-1234-1234-12345678abc", + "resourceGroupName": "exampleResourceGroup", + "factoryName": "exampleFactoryName", + "dataFlowName": "exampleDataFlow", + "ifMatch": null, + "dataFlow": { + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + } + }, + "api-version": "2018-06-01" + }, + "responses": { + "200": { + "headers": { + "Date": "Mon, 22 Apr 2019 18:33:50 GMT", + "X-Content-Type-Options": "nosniff", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "ce95d6dd-c04d-4b02-b7ad-fe79c9b26df0", + "x-ms-correlation-request-id": "ce95d6dd-c04d-4b02-b7ad-fe79c9b26df0" + }, + "body": { + "id": "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/datasets/exampleDataset", + "name": "exampleDataFlow", + "type": "Microsoft.DataFactory/factories/dataflows", + "properties": { + "description": "Sample demo data flow to convert currencies showing usage of union, derive and conditional split transformation.", + "type": "MappingDataFlow", + "typeProperties": { + "sources": [ + { + "dataset": { + "referenceName": "CurrencyDatasetUSD", + "type": "DatasetReference" + }, + "name": "USDCurrency" + }, + { + "dataset": { + "referenceName": "CurrencyDatasetCAD", + "type": "DatasetReference" + }, + "name": "CADSource" + } + ], + "sinks": [ + { + "dataset": { + "referenceName": "USDOutput", + "type": "DatasetReference" + }, + "name": "USDSink" + }, + { + "dataset": { + "referenceName": "CADOutput", + "type": "DatasetReference" + }, + "name": "CADSink" + } + ], + "script": "source(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: false,validateSchema: false) ~> USDCurrency\nsource(output(PreviousConversionRate as double,Country as string,DateTime1 as string,CurrentConversionRate as double),allowSchemaDrift: true,validateSchema: false) ~> CADSource\nUSDCurrency, CADSource union(byName: true)~> Union\nUnion derive(NewCurrencyRate = round(CurrentConversionRate*1.25)) ~> NewCurrencyColumn\nNewCurrencyColumn split(Country == 'USD',Country == 'CAD',disjoint: false) ~> ConditionalSplit1@(USD, CAD)\nConditionalSplit1@USD sink(saveMode:'overwrite' ) ~> USDSink\nConditionalSplit1@CAD sink(saveMode:'overwrite' ) ~> CADSink" + } + }, + "etag": "0a0068d4-0000-0000-0000-5b245bd30002" + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/DataFlowTests.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/DataFlowTests.cs new file mode 100644 index 0000000000000..b3036d1745a74 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/DataFlowTests.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +using DataFactory.Tests.JsonSamples; +using DataFactory.Tests.Utils; +using Microsoft.Azure.Management.DataFactory.Models; +using Xunit; +using Xunit.Abstractions; +using Xunit.Sdk; + +namespace DataFactory.Tests.UnitTests +{ + public class DataFlowTests : BaseUnitTest + { + // Enable Xunit test output logger. + protected readonly ITestOutputHelper logger = new TestOutputHelper(); + + public DataFlowTests(ITestOutputHelper logger) + : base() + { + this.logger = logger; + } + + [Theory] + [ClassData(typeof(DataFlowJsonSamples))] + [Trait(TraitName.TestType, TestType.Unit)] + public void DataFlow_SerializationTest(JsonSampleInfo jsonSample) + { + TestJsonSample(jsonSample); + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/ExamplesUnitTest.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/ExamplesUnitTest.cs index 7dfa4d56da6f4..33b9f2dd95466 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/ExamplesUnitTest.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/UnitTests/ExamplesUnitTest.cs @@ -462,6 +462,102 @@ public void Datasets_Delete() }); } + [Fact] + public void DataFlows_Create() + { + RunTest("DataFlows_Create", (example, client, responseCode) => + { + DataFlowResource resource = client.DataFlows.CreateOrUpdate(RGN(example), FN(example), DFN(example), DFR(example, client)); + CheckResponseBody(example, client, responseCode, resource); + }); + } + + [Fact] + public void DataFlows_Update() + { + RunTest("DataFlows_Update", (example, client, responseCode) => + { + DataFlowResource resource = client.DataFlows.CreateOrUpdate(RGN(example), FN(example), DFN(example), DFR(example, client)); + CheckResponseBody(example, client, responseCode, resource); + }); + } + + [Fact] + public void DataFlows_ListByFactory() + { + RunTest("DataFlows_ListByFactory", (example, client, responseCode) => + { + IPage resources = client.DataFlows.ListByFactory(RGN(example), FN(example)); + CheckResponseBody(example, client, responseCode, (Page)resources); + }); + } + + [Fact] + public void DataFlows_Get() + { + RunTest("DataFlows_Get", (example, client, responseCode) => + { + DataFlowResource resource = client.DataFlows.Get(RGN(example), FN(example), DFN(example)); + CheckResponseBody(example, client, responseCode, resource); + }); + } + + [Fact] + public void DataFlows_Delete() + { + RunTest("DataFlows_Delete", (example, client, responseCode) => + { + client.Datasets.Delete(RGN(example), FN(example), DFN(example)); + }); + } + + [Fact] + public void DataFlowDebugSession_Create() + { + RunTest("DataFlowDebugSession_Create", (example, client, responseCode) => + { + CreateDataFlowDebugSessionResponse response = client.DataFlowDebugSession.Create(RGN(example), FN(example), request: GetTypedParameter(example, client, "request")); + }); + } + + [Fact] + public void DataFlowDebugSession_QueryByFactory() + { + RunTest("DataFlowDebugSession_QueryByFactory", (example, client, responseCode) => + { + IPage response = client.DataFlowDebugSession.QueryByFactory(RGN(example), FN(example)); + CheckResponseBody(example, client, responseCode, (Page)response); + }); + } + + [Fact] + public void DataFlowDebugSession_AddDataFlow() + { + RunTest("DataFlowDebugSession_AddDataFlow", (example, client, responseCode) => + { + AddDataFlowToDebugSessionResponse response = client.DataFlowDebugSession.AddDataFlow(RGN(example), FN(example), request: GetTypedParameter(example, client, "request")); + CheckResponseBody(example, client, responseCode, response); + }); + } + + [Fact] + public void DataFlowDebugSession_ExecuteCommand() + { + RunTest("DataFlowDebugSession_ExecuteCommand", (example, client, responseCode) => + { + DataFlowDebugCommandResponse response = client.DataFlowDebugSession.ExecuteCommand(RGN(example), FN(example), request: GetTypedParameter(example, client, "request")); + }); + } + + [Fact] + public void DataFlowDebugSession_Delete() + { + RunTest("DataFlowDebugSession_Delete", (example, client, responseCode) => + { + client.DataFlowDebugSession.Delete(RGN(example), FN(example), request: GetTypedParameter(example, client, "request")); + }); + } + [Fact] public void Pipelines_Create() { @@ -704,6 +800,10 @@ private string PN(Example example) { return (string)example.Parameters["pipelineName"]; } + private string DFN(Example example) + { + return (string)example.Parameters["dataFlowName"]; + } private string LN(Example example) { return (string)example.Parameters["locationId"]; @@ -756,5 +856,10 @@ private PipelineResource PR(Example example, IDataFactoryManagementClient client { return GetTypedParameter(example, client, "pipeline"); } + + private DataFlowResource DFR(Example example, IDataFactoryManagementClient client) + { + return GetTypedParameter(example, client, "dataFlow"); + } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/Utils/ExampleCapture.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/Utils/ExampleCapture.cs index 99ec58aef2e18..bb1a01a014f56 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/Utils/ExampleCapture.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/tests/Utils/ExampleCapture.cs @@ -26,6 +26,7 @@ public class ExampleCapture private const string triggerName = "exampleTrigger"; private const string eventTriggerName = "exampleEventTrigger"; private const string datasetName = "exampleDataset"; + private const string dataFlowName = "exampleDataFlow"; private const string pipelineName = "examplePipeline"; private const string parentPipeline1Name = "parentPipeline1"; private const string parentPipeline2Name = "parentPipeline2"; @@ -109,6 +110,12 @@ public void CaptureAllExamples() CaptureDatasets_Get(); // 200 CaptureDatasets_ListByFactory(); // 200 + // Start DataFlows operations, leaving dataset available + CaptureDataFlows_Create(); // 200 + CaptureDataFlows_Update(); // 200 + CaptureDataFlows_Get(); // 200 + CaptureDataFlows_ListByFactory(); // 200 + // All Pipelines and PipelineRuns operations, creating/running/monitoring/deleting pipeline CapturePipelines_Create(); // 200 CapturePipelines_Update(); // 200 @@ -150,6 +157,10 @@ public void CaptureAllExamples() CaptureDatasets_Delete(); // 200 CaptureDatasets_Delete(); // 204 + // Finish DataFlows operations, deleting data flow + CaptureDataFlows_Delete(); // 200 + CaptureDataFlows_Delete(); // 204 + // Finish LinkedServices operations, deleting linked service CaptureLinkedServices_Delete(); // 200 CaptureLinkedServices_Delete(); // 204 @@ -677,6 +688,88 @@ private void CaptureDatasets_Delete() client.Datasets.Delete(secrets.ResourceGroupName, secrets.FactoryName, datasetName); } + private DataFlowResource GetDataFlowResource(string description) + { + DataFlowResource resource = new DataFlowResource + { + Properties = new MappingDataFlow + { + Description = description, + Sources = new List() { + new DataFlowSource() + { + Name = "source", + Description = "source 1", + Dataset = new DatasetReference() + { + ReferenceName = "dataset", + Parameters = new Dictionary + { + { "JobId", new Expression("@pipeline().parameters.JobId") } + } + } + } + }, + Sinks = new List() { + new DataFlowSink() + { + Name = "sink", + Description = "sink 1", + Dataset = new DatasetReference() + { + ReferenceName = "dataset", + Parameters = new Dictionary + { + { "JobId", new Expression("@pipeline().parameters.JobId") } + } + } + } + }, + Transformations = new List() { + new Transformation() + { + Name = "transformation", + Description = "transformation 1" + } + } + } + }; + + return resource; + } + + private void CaptureDataFlows_Create() + { + interceptor.CurrentExampleName = "DataFlows_Create"; + DataFlowResource resourceIn = GetDataFlowResource(null); + DataFlowResource resource = client.DataFlows.CreateOrUpdate(secrets.ResourceGroupName, secrets.FactoryName, dataFlowName, resourceIn); + } + + private void CaptureDataFlows_Update() + { + interceptor.CurrentExampleName = "DataFlows_Update"; + DataFlowResource resourceIn = GetDataFlowResource("Example description"); + DataFlowResource resource = client.DataFlows.CreateOrUpdate(secrets.ResourceGroupName, secrets.FactoryName, dataFlowName, resourceIn); + } + + private void CaptureDataFlows_Get() + { + interceptor.CurrentExampleName = "DataFlows_Get"; + DataFlowResource resource = client.DataFlows.Get(secrets.ResourceGroupName, secrets.FactoryName, dataFlowName); + } + + private void CaptureDataFlows_ListByFactory() + { + interceptor.CurrentExampleName = "DataFlows_ListByFactory"; + IPage resources = client.DataFlows.ListByFactory(secrets.ResourceGroupName, secrets.FactoryName); + } + + private void CaptureDataFlows_Delete() + { + interceptor.CurrentExampleName = "DataFlows_Delete"; + client.DataFlows.Delete(secrets.ResourceGroupName, secrets.FactoryName, dataFlowName); + } + private PipelineResource GetPipelineResource(string description) { PipelineResource resource = new PipelineResource From dadb005485eef7fd4d6a01f48b6ddf84539c17af Mon Sep 17 00:00:00 2001 From: jikma Date: Wed, 25 Sep 2019 16:13:09 -0700 Subject: [PATCH 2/2] address feedback --- .../datafactory_resource-manager.txt | 4 +- .../Generated/Models/CosmosDbLinkedService.cs | 46 ++++++---- .../Models/CosmosDbSqlApiCollectionDataset.cs | 92 +++++++++++++++++++ .../Generated/Models/CosmosDbSqlApiSink.cs | 73 +++++++++++++++ .../Generated/Models/CosmosDbSqlApiSource.cs | 86 +++++++++++++++++ .../Models/DocumentDbCollectionSink.cs | 8 +- .../SdkInfo_DataFactoryManagementClient.cs | 2 +- ...rosoft.Azure.Management.DataFactory.csproj | 11 ++- .../src/Properties/AssemblyInfo.cs | 4 +- .../src/changelog.md | 12 ++- 10 files changed, 305 insertions(+), 33 deletions(-) create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs create mode 100644 sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt index be2f5462733b4..f7c1340973df1 100644 --- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt @@ -4,11 +4,11 @@ Commencing code generation Generating CSharp code Executing AutoRest command cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\GitHub\azure-sdk-for-net\sdk -2019-09-25 19:09:56 UTC +2019-09-25 22:44:08 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 151f8794e84d2544961ca64c80f2fdddada29bad +Commit: 6d4e0d294d568a37b1f3421b789290934517d115 AutoRest information Requested version: latest Bootstrapper version: autorest@2.0.4283 diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs index 63ffd43705763..076249b687556 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbLinkedService.cs @@ -35,8 +35,6 @@ public CosmosDbLinkedService() /// /// Initializes a new instance of the CosmosDbLinkedService class. /// - /// The connection string. Type: string, - /// SecureString or AzureKeyVaultSecretReference. /// Unmatched properties from the /// message are deserialized this collection /// The integration runtime reference. @@ -44,16 +42,26 @@ public CosmosDbLinkedService() /// Parameters for linked service. /// List of tags that can be used for /// describing the linked service. - /// The Azure key vault secret reference of - /// accountKey in connection string. + /// The connection string. Type: string, + /// SecureString or AzureKeyVaultSecretReference. + /// The endpoint of the Azure CosmosDB + /// account. Type: string (or Expression with resultType + /// string) + /// The name of the database. Type: string (or + /// Expression with resultType string) + /// The account key of the Azure CosmosDB + /// account. Type: SecureString or + /// AzureKeyVaultSecretReference. /// The encrypted credential used for /// authentication. Credentials are encrypted using the integration /// runtime credential manager. Type: string (or Expression with /// resultType string). - public CosmosDbLinkedService(object connectionString, IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), AzureKeyVaultSecretReference accountKey = default(AzureKeyVaultSecretReference), object encryptedCredential = default(object)) + public CosmosDbLinkedService(IDictionary additionalProperties = default(IDictionary), IntegrationRuntimeReference connectVia = default(IntegrationRuntimeReference), string description = default(string), IDictionary parameters = default(IDictionary), IList annotations = default(IList), object connectionString = default(object), object accountEndpoint = default(object), object database = default(object), SecretBase accountKey = default(SecretBase), object encryptedCredential = default(object)) : base(additionalProperties, connectVia, description, parameters, annotations) { ConnectionString = connectionString; + AccountEndpoint = accountEndpoint; + Database = database; AccountKey = accountKey; EncryptedCredential = encryptedCredential; CustomInit(); @@ -72,11 +80,25 @@ public CosmosDbLinkedService() public object ConnectionString { get; set; } /// - /// Gets or sets the Azure key vault secret reference of accountKey in - /// connection string. + /// Gets or sets the endpoint of the Azure CosmosDB account. Type: + /// string (or Expression with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.accountEndpoint")] + public object AccountEndpoint { get; set; } + + /// + /// Gets or sets the name of the database. Type: string (or Expression + /// with resultType string) + /// + [JsonProperty(PropertyName = "typeProperties.database")] + public object Database { get; set; } + + /// + /// Gets or sets the account key of the Azure CosmosDB account. Type: + /// SecureString or AzureKeyVaultSecretReference. /// [JsonProperty(PropertyName = "typeProperties.accountKey")] - public AzureKeyVaultSecretReference AccountKey { get; set; } + public SecretBase AccountKey { get; set; } /// /// Gets or sets the encrypted credential used for authentication. @@ -95,14 +117,6 @@ public CosmosDbLinkedService() public override void Validate() { base.Validate(); - if (ConnectionString == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); - } - if (AccountKey != null) - { - AccountKey.Validate(); - } } } } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs new file mode 100644 index 0000000000000..7e787f7f12636 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiCollectionDataset.cs @@ -0,0 +1,92 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Microsoft Azure CosmosDB (SQL API) Collection dataset. + /// + [Newtonsoft.Json.JsonObject("CosmosDbSqlApiCollection")] + [Rest.Serialization.JsonTransformation] + public partial class CosmosDbSqlApiCollectionDataset : Dataset + { + /// + /// Initializes a new instance of the CosmosDbSqlApiCollectionDataset + /// class. + /// + public CosmosDbSqlApiCollectionDataset() + { + LinkedServiceName = new LinkedServiceReference(); + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiCollectionDataset + /// class. + /// + /// Linked service reference. + /// CosmosDB (SQL API) collection name. + /// Type: string (or Expression with resultType string). + /// Unmatched properties from the + /// message are deserialized this collection + /// Dataset description. + /// Columns that define the structure of the + /// dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetDataElement. + /// Columns that define the physical type schema + /// of the dataset. Type: array (or Expression with resultType array), + /// itemType: DatasetSchemaDataElement. + /// Parameters for dataset. + /// List of tags that can be used for + /// describing the Dataset. + /// The folder that this Dataset is in. If not + /// specified, Dataset will appear at the root level. + public CosmosDbSqlApiCollectionDataset(LinkedServiceReference linkedServiceName, object collectionName, IDictionary additionalProperties = default(IDictionary), string description = default(string), object structure = default(object), object schema = default(object), IDictionary parameters = default(IDictionary), IList annotations = default(IList), DatasetFolder folder = default(DatasetFolder)) + : base(linkedServiceName, additionalProperties, description, structure, schema, parameters, annotations, folder) + { + CollectionName = collectionName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets cosmosDB (SQL API) collection name. Type: string (or + /// Expression with resultType string). + /// + [JsonProperty(PropertyName = "typeProperties.collectionName")] + public object CollectionName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (CollectionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "CollectionName"); + } + } + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs new file mode 100644 index 0000000000000..a6f5bf1acc86c --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSink.cs @@ -0,0 +1,73 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure CosmosDB (SQL API) Collection sink. + /// + public partial class CosmosDbSqlApiSink : CopySink + { + /// + /// Initializes a new instance of the CosmosDbSqlApiSink class. + /// + public CosmosDbSqlApiSink() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiSink class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Write batch size. Type: integer (or + /// Expression with resultType integer), minimum: 0. + /// Write batch timeout. Type: string + /// (or Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// Sink retry count. Type: integer (or + /// Expression with resultType integer). + /// Sink retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the sink data store. Type: integer (or + /// Expression with resultType integer). + /// Describes how to write data to Azure + /// Cosmos DB. Type: string (or Expression with resultType string). + /// Allowed values: insert and upsert. + public CosmosDbSqlApiSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object writeBehavior = default(object)) + : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections) + { + WriteBehavior = writeBehavior; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets describes how to write data to Azure Cosmos DB. Type: + /// string (or Expression with resultType string). Allowed values: + /// insert and upsert. + /// + [JsonProperty(PropertyName = "writeBehavior")] + public object WriteBehavior { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs new file mode 100644 index 0000000000000..b51433059c565 --- /dev/null +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/CosmosDbSqlApiSource.cs @@ -0,0 +1,86 @@ +// +// 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. +// + +namespace Microsoft.Azure.Management.DataFactory.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// A copy activity Azure CosmosDB (SQL API) Collection source. + /// + public partial class CosmosDbSqlApiSource : CopySource + { + /// + /// Initializes a new instance of the CosmosDbSqlApiSource class. + /// + public CosmosDbSqlApiSource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CosmosDbSqlApiSource class. + /// + /// Unmatched properties from the + /// message are deserialized this collection + /// Source retry count. Type: integer + /// (or Expression with resultType integer). + /// Source retry wait. Type: string (or + /// Expression with resultType string), pattern: + /// ((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])). + /// The maximum concurrent + /// connection count for the source data store. Type: integer (or + /// Expression with resultType integer). + /// SQL API query. Type: string (or Expression with + /// resultType string). + /// Page size of the result. Type: integer (or + /// Expression with resultType integer). + /// Preferred regions. Type: array of + /// strings (or Expression with resultType array of strings). + public CosmosDbSqlApiSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object query = default(object), object pageSize = default(object), object preferredRegions = default(object)) + : base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections) + { + Query = query; + PageSize = pageSize; + PreferredRegions = preferredRegions; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SQL API query. Type: string (or Expression with + /// resultType string). + /// + [JsonProperty(PropertyName = "query")] + public object Query { get; set; } + + /// + /// Gets or sets page size of the result. Type: integer (or Expression + /// with resultType integer). + /// + [JsonProperty(PropertyName = "pageSize")] + public object PageSize { get; set; } + + /// + /// Gets or sets preferred regions. Type: array of strings (or + /// Expression with resultType array of strings). + /// + [JsonProperty(PropertyName = "preferredRegions")] + public object PreferredRegions { get; set; } + + } +} diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs index 9ceefb6b22446..7e1ca124e4b3a 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/DocumentDbCollectionSink.cs @@ -50,7 +50,8 @@ public DocumentDbCollectionSink() /// is . (dot). Type: string (or Expression with resultType /// string). /// Describes how to write data to Azure - /// Cosmos DB. Allowed values: insert and upsert. + /// Cosmos DB. Type: string (or Expression with resultType string). + /// Allowed values: insert and upsert. public DocumentDbCollectionSink(IDictionary additionalProperties = default(IDictionary), object writeBatchSize = default(object), object writeBatchTimeout = default(object), object sinkRetryCount = default(object), object sinkRetryWait = default(object), object maxConcurrentConnections = default(object), object nestingSeparator = default(object), object writeBehavior = default(object)) : base(additionalProperties, writeBatchSize, writeBatchTimeout, sinkRetryCount, sinkRetryWait, maxConcurrentConnections) { @@ -72,8 +73,9 @@ public DocumentDbCollectionSink() public object NestingSeparator { get; set; } /// - /// Gets or sets describes how to write data to Azure Cosmos DB. - /// Allowed values: insert and upsert. + /// Gets or sets describes how to write data to Azure Cosmos DB. Type: + /// string (or Expression with resultType string). Allowed values: + /// insert and upsert. /// [JsonProperty(PropertyName = "writeBehavior")] public object WriteBehavior { get; set; } diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs index 1538ce7baf06e..d1ae6d996bdc4 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/SdkInfo_DataFactoryManagementClient.cs @@ -44,7 +44,7 @@ public static IEnumerable> ApiInfo_DataFactoryMana public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/datafactory/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\\GitHub\\azure-sdk-for-net\\sdk"; public static readonly String GithubForkName = "Azure"; public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "151f8794e84d2544961ca64c80f2fdddada29bad"; + public static readonly String GithubCommidId = "6d4e0d294d568a37b1f3421b789290934517d115"; public static readonly String CodeGenerationErrors = ""; public static readonly String GithubRepoName = "azure-rest-api-specs"; // END: Code Generation Metadata Section diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj index 58656bbdec017..0b0f9f6846d7a 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Microsoft.Azure.Management.DataFactory.csproj @@ -5,16 +5,17 @@ Microsoft.Azure.Management.DataFactory Azure Data Factory V2 is the data integration platform that goes beyond Azure Data Factory V1's orchestration and batch-processing of time-series data, with a general purpose app model supporting modern data warehousing patterns and scenarios, lift-and-shift SSIS, and data-driven SaaS applications. Compose and manage reliable and secure data integration workflows at scale. Use native ADF data connectors and Integration Runtimes to move and transform cloud and on-premises data that can be unstructured, semi-structured, and structured with Hadoop, Azure Data Lake, Spark, SQL Server, Cosmos DB and many other data platforms. - 4.1.4 + 4.2.0 Microsoft.Azure.Management.DataFactory Microsoft Azure resource management;Data Factory;ADF; diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Properties/AssemblyInfo.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Properties/AssemblyInfo.cs index 17582e1d7bb32..2f29c73889c80 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Properties/AssemblyInfo.cs +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Properties/AssemblyInfo.cs @@ -6,8 +6,8 @@ [assembly: AssemblyTitle("Microsoft Azure Data Factory Management Library")] [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Data Factory Resources.")] -[assembly: AssemblyVersion("4.1.0.0")] -[assembly: AssemblyFileVersion("4.1.4.0")] +[assembly: AssemblyVersion("4.2.0.0")] +[assembly: AssemblyFileVersion("4.2.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")] diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md index 769428d52cd7b..7571742b741f2 100644 --- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md +++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/changelog.md @@ -2,11 +2,15 @@ ## Current version ### Feature Additions -- Added support for Data Flow: - * Added data flow object model and CRUD APIs - * Added data flow debug session APIs - * Added support for execute data flow activity type + +## Version 4.2.0 +### Feature Additions +* Added support for Data Flow: + - Added data flow object model and CRUD APIs + - Added data flow debug session APIs + - Added support for execute data flow activity type - Added property queryTimeout to tabular sources +- Added support for Cosmos DB SQL API dataset and copy source/sink ## Version 4.1.3 ### Feature Additions