public SparkBatchClient(Uri endpoint, string sparkPoolName, TokenCredential credential, string livyApiVersion = "2019-11-01-preview", SparkClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } if (sparkPoolName == null) { throw new ArgumentNullException(nameof(sparkPoolName)); } if (credential == null) { throw new ArgumentNullException(nameof(credential)); } if (livyApiVersion == null) { throw new ArgumentNullException(nameof(livyApiVersion)); } options ??= new SparkClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); string[] scopes = { "https://dev.azuresynapse.net/.default" }; _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); RestClient = new SparkBatchRestClient(_clientDiagnostics, _pipeline, endpoint, sparkPoolName, livyApiVersion); }
internal SparkBatchClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Uri endpoint, string sparkPoolName, string livyApiVersion = "2019-11-01-preview") { RestClient = new SparkBatchRestClient(clientDiagnostics, pipeline, endpoint, sparkPoolName, livyApiVersion); _clientDiagnostics = clientDiagnostics; _pipeline = pipeline; }