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