diff --git a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt
index 4c578db3441a..78c468870395 100644
--- a/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt
+++ b/eng/mgmt/mgmtmetadata/datafactory_resource-manager.txt
@@ -3,13 +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/main/specification/datafactory/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\Projects\azure-sdk-for-net\sdk
-Autorest CSharp Version: 2.3.82
-2022-10-25 04:48:50 UTC
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/datafactory/resource-manager/readme.md --csharp --version=2.0.4421 --reflect-api-versions --tag=package-2018-06 --csharp-sdks-folder=D:\Code\azure-sdk-for-net\sdk
+2023-01-12 03:56:29 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: main
-Commit: fdd4e5c9b9225698c7f26c75c4b26be5c57e60f8
+Commit: 6e011aae8dd50b5acb4bd5e951f5b930a010bc41
AutoRest information
-Requested version: v2
-Bootstrapper version: autorest@3.6.1
+Requested version: 2.0.4421
+Bootstrapper version: autorest@2.0.4413
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md
index b3fd8dc11908..bdb7f659ac19 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog for the Azure Data Factory V2 .NET SDK
+## Version 9.0.0
+### Feature Additions
+### Breaking Changes
+- Added support for credential operations in DataFactory
+- Added exportsettings required in Snowflake source
+- Added scan folder and spark config support in Sparkjob activity
+
## Version 8.0.0
### Feature Additions
### Breaking Changes
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Customizations/SynapseSparkJobDefinitionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Customizations/SynapseSparkJobDefinitionActivity.cs
index 31462f7b4d8c..da76412edec0 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Customizations/SynapseSparkJobDefinitionActivity.cs
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Customizations/SynapseSparkJobDefinitionActivity.cs
@@ -64,5 +64,75 @@ public partial class SynapseSparkJobDefinitionActivity : ExecutionActivity
NumExecutors = numExecutors;
CustomInit();
}
+
+ ///
+ /// Initializes a new instance of the SynapseSparkJobDefinitionActivity
+ /// class.
+ ///
+ /// Activity name.
+ /// Synapse spark job reference.
+ /// Unmatched properties from the
+ /// message are deserialized this collection
+ /// Activity description.
+ /// Activity depends on condition.
+ /// Activity user properties.
+ /// Linked service reference.
+ /// Activity policy.
+ /// User specified arguments to
+ /// SynapseSparkJobDefinitionActivity.
+ /// The main file used for the job, which will
+ /// override the 'file' of the spark job definition you provide. Type:
+ /// string (or Expression with resultType string).
+ /// The fully-qualified identifier or the main
+ /// class that is in the main definition file, which will override the
+ /// 'className' of the spark job definition you provide. Type: string
+ /// (or Expression with resultType string).
+ /// (Deprecated. Please use pythonCodeReference and
+ /// filesV2) Additional files used for reference in the main definition
+ /// file, which will override the 'files' of the spark job definition
+ /// you provide.
+ /// Additional python code files used
+ /// for reference in the main definition file, which will override the
+ /// 'pyFiles' of the spark job definition you provide.
+ /// Additional files used for reference in the
+ /// main definition file, which will override the 'jars' and 'files' of
+ /// the spark job definition you provide.
+ /// The name of the big data pool which
+ /// will be used to execute the spark batch job, which will override
+ /// the 'targetBigDataPool' of the spark job definition you
+ /// provide.
+ /// Number of core and memory to be used for
+ /// executors allocated in the specified Spark pool for the job, which
+ /// will be used for overriding 'executorCores' and 'executorMemory' of
+ /// the spark job definition you provide. Type: string (or Expression
+ /// with resultType string).
+ /// Spark configuration properties, which will
+ /// override the 'conf' of the spark job definition you
+ /// provide.
+ /// Number of core and memory to be used for
+ /// driver allocated in the specified Spark pool for the job, which
+ /// will be used for overriding 'driverCores' and 'driverMemory' of the
+ /// spark job definition you provide. Type: string (or Expression with
+ /// resultType string).
+ /// Number of executors to launch for this
+ /// job, which will override the 'numExecutors' of the spark job
+ /// definition you provide.
+ public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference sparkJob, IDictionary additionalProperties, string description, IList dependsOn, IList userProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList arguments, object file, object className = default(object), IList files = default(IList), IList pythonCodeReference = default(IList), IList filesV2 = default(IList), BigDataPoolParametrizationReference targetBigDataPool = default(BigDataPoolParametrizationReference), object executorSize = default(object), object conf = default(object), object driverSize = default(object), int? numExecutors = default(int?))
+ : base(name, additionalProperties, description, dependsOn, userProperties, linkedServiceName, policy)
+ {
+ SparkJob = sparkJob;
+ Arguments = arguments;
+ File = file;
+ ClassName = className;
+ Files = files;
+ PythonCodeReference = pythonCodeReference;
+ FilesV2 = filesV2;
+ TargetBigDataPool = targetBigDataPool;
+ ExecutorSize = executorSize;
+ Conf = conf;
+ DriverSize = driverSize;
+ NumExecutors = numExecutors;
+ CustomInit();
+ }
}
}
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.cs
new file mode 100644
index 000000000000..85aa1862551b
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperations.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;
+
+ ///
+ /// CredentialOperations operations.
+ ///
+ internal partial class CredentialOperations : IServiceOperations, ICredentialOperations
+ {
+ ///
+ /// Initializes a new instance of the CredentialOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal CredentialOperations(DataFactoryManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the DataFactoryManagementClient
+ ///
+ public DataFactoryManagementClient Client { get; private set; }
+
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// 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}/credentials").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;
+ }
+
+ ///
+ /// Creates or updates a credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// Credential resource definition.
+ ///
+ ///
+ /// ETag of the credential 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 credentialName, ManagedIdentityCredentialResource credential, 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 (credentialName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "credentialName");
+ }
+ if (credentialName != null)
+ {
+ if (credentialName.Length > 127)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127);
+ }
+ if (credentialName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "credentialName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$");
+ }
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (credential == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "credential");
+ }
+ if (credential != null)
+ {
+ credential.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("credentialName", credentialName);
+ tracingParameters.Add("ifMatch", ifMatch);
+ tracingParameters.Add("credential", credential);
+ 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}/credentials/{credentialName}").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("{credentialName}", System.Uri.EscapeDataString(credentialName));
+ 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(credential != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(credential, 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 credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// ETag of the credential 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 credentialName, 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 (credentialName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "credentialName");
+ }
+ if (credentialName != null)
+ {
+ if (credentialName.Length > 127)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127);
+ }
+ if (credentialName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "credentialName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_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("credentialName", credentialName);
+ 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}/credentials/{credentialName}").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("{credentialName}", System.Uri.EscapeDataString(credentialName));
+ 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 && (int)_statusCode != 304)
+ {
+ 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 credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential 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 credentialName, 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 (credentialName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "credentialName");
+ }
+ if (credentialName != null)
+ {
+ if (credentialName.Length > 127)
+ {
+ throw new ValidationException(ValidationRules.MaxLength, "credentialName", 127);
+ }
+ if (credentialName.Length < 1)
+ {
+ throw new ValidationException(ValidationRules.MinLength, "credentialName", 1);
+ }
+ if (!System.Text.RegularExpressions.Regex.IsMatch(credentialName, "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_A-Za-z0-9]))$"))
+ {
+ throw new ValidationException(ValidationRules.Pattern, "credentialName", "^([_A-Za-z0-9]|([_A-Za-z0-9][-_A-Za-z0-9]{0,125}[_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("credentialName", credentialName);
+ 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}/credentials/{credentialName}").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("{credentialName}", System.Uri.EscapeDataString(credentialName));
+ 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;
+ }
+
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// 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/CredentialOperationsExtensions.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperationsExtensions.cs
new file mode 100644
index 000000000000..b6bc338ec44a
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/CredentialOperationsExtensions.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 CredentialOperations.
+ ///
+ public static partial class CredentialOperationsExtensions
+ {
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ public static IPage ListByFactory(this ICredentialOperations operations, string resourceGroupName, string factoryName)
+ {
+ return operations.ListByFactoryAsync(resourceGroupName, factoryName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListByFactoryAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListByFactoryWithHttpMessagesAsync(resourceGroupName, factoryName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Creates or updates a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// Credential resource definition.
+ ///
+ ///
+ /// ETag of the credential entity. Should only be specified for update, for
+ /// which it should match existing entity or can be * for unconditional update.
+ ///
+ public static ManagedIdentityCredentialResource CreateOrUpdate(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, ManagedIdentityCredentialResource credential, string ifMatch = default(string))
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, factoryName, credentialName, credential, ifMatch).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Creates or updates a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// Credential resource definition.
+ ///
+ ///
+ /// ETag of the credential 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 ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, ManagedIdentityCredentialResource credential, string ifMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, credential, ifMatch, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Gets a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// ETag of the credential 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 ManagedIdentityCredentialResource Get(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string))
+ {
+ return operations.GetAsync(resourceGroupName, factoryName, credentialName, ifNoneMatch).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Gets a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// ETag of the credential 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 ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, string ifNoneMatch = default(string), CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, ifNoneMatch, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Deletes a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ public static void Delete(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName)
+ {
+ operations.DeleteAsync(resourceGroupName, factoryName, credentialName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Deletes a credential.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ICredentialOperations operations, string resourceGroupName, string factoryName, string credentialName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, factoryName, credentialName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListByFactoryNext(this ICredentialOperations operations, string nextPageLink)
+ {
+ return operations.ListByFactoryNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// 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 ICredentialOperations 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/DataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs
index a7b0179ff6a5..ca59d3829e74 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/DataFactoryManagementClient.cs
@@ -160,6 +160,11 @@ public partial class DataFactoryManagementClient : ServiceClient
public virtual IManagedPrivateEndpointsOperations ManagedPrivateEndpoints { get; private set; }
+ ///
+ /// Gets the ICredentialOperations.
+ ///
+ public virtual ICredentialOperations CredentialOperations { get; private set; }
+
///
/// Gets the IPrivateEndPointConnectionsOperations.
///
@@ -438,6 +443,7 @@ private void Initialize()
DataFlowDebugSession = new DataFlowDebugSessionOperations(this);
ManagedVirtualNetworks = new ManagedVirtualNetworksOperations(this);
ManagedPrivateEndpoints = new ManagedPrivateEndpointsOperations(this);
+ CredentialOperations = new CredentialOperations(this);
PrivateEndPointConnections = new PrivateEndPointConnectionsOperations(this);
PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.cs
new file mode 100644
index 000000000000..f03a3317d950
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/ICredentialOperations.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;
+
+ ///
+ /// CredentialOperations operations.
+ ///
+ public partial interface ICredentialOperations
+ {
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// 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));
+ ///
+ /// Creates or updates a credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// Credential resource definition.
+ ///
+ ///
+ /// ETag of the credential 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 credentialName, ManagedIdentityCredentialResource credential, string ifMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Gets a credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential name
+ ///
+ ///
+ /// ETag of the credential 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 credentialName, string ifNoneMatch = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Deletes a credential.
+ ///
+ ///
+ /// The resource group name.
+ ///
+ ///
+ /// The factory name.
+ ///
+ ///
+ /// Credential 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 credentialName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List credentials.
+ ///
+ ///
+ /// 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/IDataFactoryManagementClient.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs
index b8afecb531e5..fcc5cb778bef 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/IDataFactoryManagementClient.cs
@@ -155,6 +155,11 @@ public partial interface IDataFactoryManagementClient : System.IDisposable
///
IManagedPrivateEndpointsOperations ManagedPrivateEndpoints { get; }
+ ///
+ /// Gets the ICredentialOperations.
+ ///
+ ICredentialOperations CredentialOperations { get; }
+
///
/// Gets the IPrivateEndPointConnectionsOperations.
///
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.cs
new file mode 100644
index 000000000000..16b2cc6a30d2
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ConfigurationType.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 ConfigurationType.
+ ///
+ public static class ConfigurationType
+ {
+ public const string Default = "Default";
+ public const string Customized = "Customized";
+ public const string Artifact = "Artifact";
+ }
+}
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredentialResource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredentialResource.cs
new file mode 100644
index 000000000000..abee26e72b66
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/ManagedIdentityCredentialResource.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;
+
+ ///
+ /// Credential resource type.
+ ///
+ public partial class ManagedIdentityCredentialResource : SubResource
+ {
+ ///
+ /// Initializes a new instance of the ManagedIdentityCredentialResource
+ /// class.
+ ///
+ public ManagedIdentityCredentialResource()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ManagedIdentityCredentialResource
+ /// class.
+ ///
+ /// Managed Identity Credential
+ /// properties.
+ /// The resource identifier.
+ /// The resource name.
+ /// The resource type.
+ /// Etag identifies change in the resource.
+ public ManagedIdentityCredentialResource(ManagedIdentityCredential 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 managed Identity Credential properties.
+ ///
+ [JsonProperty(PropertyName = "properties")]
+ public ManagedIdentityCredential 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/SnowflakeSource.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs
index 6375206db3ef..37e1b3037242 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SnowflakeSource.cs
@@ -10,6 +10,7 @@
namespace Microsoft.Azure.Management.DataFactory.Models
{
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -31,6 +32,7 @@ public SnowflakeSource()
///
/// Initializes a new instance of the SnowflakeSource class.
///
+ /// Snowflake export settings.
/// Unmatched properties from the
/// message are deserialized this collection
/// Source retry count. Type: integer
@@ -46,8 +48,7 @@ public SnowflakeSource()
/// with resultType boolean).
/// Snowflake Sql query. Type: string (or
/// Expression with resultType string).
- /// Snowflake export settings.
- public SnowflakeSource(IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object), SnowflakeExportCopyCommand exportSettings = default(SnowflakeExportCopyCommand))
+ public SnowflakeSource(SnowflakeExportCopyCommand exportSettings, IDictionary additionalProperties = default(IDictionary), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object maxConcurrentConnections = default(object), object disableMetricsCollection = default(object), object query = default(object))
: base(additionalProperties, sourceRetryCount, sourceRetryWait, maxConcurrentConnections, disableMetricsCollection)
{
Query = query;
@@ -73,5 +74,18 @@ public SnowflakeSource()
[JsonProperty(PropertyName = "exportSettings")]
public SnowflakeExportCopyCommand ExportSettings { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ExportSettings == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ExportSettings");
+ }
+ }
}
}
diff --git a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs
new file mode 100644
index 000000000000..5e598ffeed1c
--- /dev/null
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SparkConfigurationParametrizationReference.cs
@@ -0,0 +1,83 @@
+//
+// 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;
+
+ ///
+ /// Spark configuration reference.
+ ///
+ public partial class SparkConfigurationParametrizationReference
+ {
+ ///
+ /// Initializes a new instance of the
+ /// SparkConfigurationParametrizationReference class.
+ ///
+ public SparkConfigurationParametrizationReference()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// SparkConfigurationParametrizationReference class.
+ ///
+ /// Reference spark configuration name.
+ /// Type: string (or Expression with resultType string).
+ public SparkConfigurationParametrizationReference(object referenceName)
+ {
+ ReferenceName = referenceName;
+ CustomInit();
+ }
+ ///
+ /// Static constructor for SparkConfigurationParametrizationReference
+ /// class.
+ ///
+ static SparkConfigurationParametrizationReference()
+ {
+ Type = "SparkConfigurationReference";
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets reference spark configuration name. Type: string (or
+ /// Expression with resultType string).
+ ///
+ [JsonProperty(PropertyName = "referenceName")]
+ public object ReferenceName { get; set; }
+
+ ///
+ /// Spark configuration 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/SynapseSparkJobDefinitionActivity.cs b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs
index e39a5a1f3c50..42ba59a49dbf 100644
--- a/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs
+++ b/sdk/datafactory/Microsoft.Azure.Management.DataFactory/src/Generated/Models/SynapseSparkJobDefinitionActivity.cs
@@ -52,6 +52,11 @@ public SynapseSparkJobDefinitionActivity()
/// The main file used for the job, which will
/// override the 'file' of the spark job definition you provide. Type:
/// string (or Expression with resultType string).
+ /// Scanning subfolders from the root folder
+ /// of the main definition file, these files will be added as reference
+ /// files. The folders named 'jars', 'pyFiles', 'files' or 'archives'
+ /// will be scanned, and the folders name are case sensitive. Type:
+ /// boolean (or Expression with resultType boolean).
/// The fully-qualified identifier or the main
/// class that is in the main definition file, which will override the
/// 'className' of the spark job definition you provide. Type: string
@@ -85,13 +90,21 @@ public SynapseSparkJobDefinitionActivity()
/// resultType string).
/// Number of executors to launch for this
/// job, which will override the 'numExecutors' of the spark job
- /// definition you provide.
- public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference sparkJob, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList arguments = default(IList), object file = default(object), object className = default(object), IList files = default(IList), IList pythonCodeReference = default(IList), IList filesV2 = default(IList), BigDataPoolParametrizationReference targetBigDataPool = default(BigDataPoolParametrizationReference), object executorSize = default(object), object conf = default(object), object driverSize = default(object), int? numExecutors = default(int?))
+ /// definition you provide. Type: integer (or Expression with
+ /// resultType integer).
+ /// The type of the spark config.
+ /// Possible values include: 'Default', 'Customized',
+ /// 'Artifact'
+ /// The spark configuration of
+ /// the spark job.
+ /// Spark configuration property.
+ public SynapseSparkJobDefinitionActivity(string name, SynapseSparkJobReference sparkJob, IDictionary additionalProperties = default(IDictionary), string description = default(string), IList dependsOn = default(IList), IList userProperties = default(IList), LinkedServiceReference linkedServiceName = default(LinkedServiceReference), ActivityPolicy policy = default(ActivityPolicy), IList arguments = default(IList), object file = default(object), object scanFolder = default(object), object className = default(object), IList files = default(IList), IList pythonCodeReference = default(IList), IList filesV2 = default(IList), BigDataPoolParametrizationReference targetBigDataPool = default(BigDataPoolParametrizationReference), object executorSize = default(object), object conf = default(object), object driverSize = default(object), object numExecutors = default(object), string configurationType = default(string), SparkConfigurationParametrizationReference targetSparkConfiguration = default(SparkConfigurationParametrizationReference), IDictionary sparkConfig = default(IDictionary))
: base(name, additionalProperties, description, dependsOn, userProperties, linkedServiceName, policy)
{
SparkJob = sparkJob;
Arguments = arguments;
File = file;
+ ScanFolder = scanFolder;
ClassName = className;
Files = files;
PythonCodeReference = pythonCodeReference;
@@ -101,6 +114,9 @@ public SynapseSparkJobDefinitionActivity()
Conf = conf;
DriverSize = driverSize;
NumExecutors = numExecutors;
+ ConfigurationType = configurationType;
+ TargetSparkConfiguration = targetSparkConfiguration;
+ SparkConfig = sparkConfig;
CustomInit();
}
@@ -130,6 +146,16 @@ public SynapseSparkJobDefinitionActivity()
[JsonProperty(PropertyName = "typeProperties.file")]
public object File { get; set; }
+ ///
+ /// Gets or sets scanning subfolders from the root folder of the main
+ /// definition file, these files will be added as reference files. The
+ /// folders named 'jars', 'pyFiles', 'files' or 'archives' will be
+ /// scanned, and the folders name are case sensitive. Type: boolean (or
+ /// Expression with resultType boolean).
+ ///
+ [JsonProperty(PropertyName = "typeProperties.scanFolder")]
+ public object ScanFolder { get; set; }
+
///
/// Gets or sets the fully-qualified identifier or the main class that
/// is in the main definition file, which will override the 'className'
@@ -202,10 +228,29 @@ public SynapseSparkJobDefinitionActivity()
///
/// Gets or sets number of executors to launch for this job, which will
/// override the 'numExecutors' of the spark job definition you
- /// provide.
+ /// provide. Type: integer (or Expression with resultType integer).
///
[JsonProperty(PropertyName = "typeProperties.numExecutors")]
- public int? NumExecutors { get; set; }
+ public object NumExecutors { get; set; }
+
+ ///
+ /// Gets or sets the type of the spark config. Possible values include:
+ /// 'Default', 'Customized', 'Artifact'
+ ///
+ [JsonProperty(PropertyName = "typeProperties.configurationType")]
+ public string ConfigurationType { get; set; }
+
+ ///
+ /// Gets or sets the spark configuration of the spark job.
+ ///
+ [JsonProperty(PropertyName = "typeProperties.targetSparkConfiguration")]
+ public SparkConfigurationParametrizationReference TargetSparkConfiguration { get; set; }
+
+ ///
+ /// Gets or sets spark configuration property.
+ ///
+ [JsonProperty(PropertyName = "typeProperties.sparkConfig")]
+ public IDictionary SparkConfig { get; set; }
///
/// Validate the object.
@@ -228,6 +273,10 @@ public override void Validate()
{
TargetBigDataPool.Validate();
}
+ if (TargetSparkConfiguration != null)
+ {
+ TargetSparkConfiguration.Validate();
+ }
}
}
}
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 ba843ed7aea0..5343a3aba4a9 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,14 +5,14 @@
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.
- 8.0.0
+ 9.0.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 d49f92a18d78..be9ee89b3250 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("8.0.0.0")]
-[assembly: AssemblyFileVersion("8.0.0.0")]
+[assembly: AssemblyVersion("9.0.0.0")]
+[assembly: AssemblyFileVersion("9.0.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Microsoft Azure .NET SDK")]