/// <summary> /// Initializes a new instance of the <see cref="ManagedPrivateEndpointsClient"/>. /// </summary> public ManagedPrivateEndpointsClient(Uri endpoint, TokenCredential credential, ManagedPrivateEndpointsClientOptions options) : this(new ClientDiagnostics(options), SynapseClientPipeline.Build(options, credential), endpoint.ToString(), options.VersionString) { }
public ManagedPrivateEndpointsClient(Uri endpoint, TokenCredential credential, ManagedPrivateEndpointsClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } if (credential == null) { throw new ArgumentNullException(nameof(credential)); } options ??= new ManagedPrivateEndpointsClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); string[] scopes = { "https://dev.azuresynapse.net/.default" }; _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); RestClient = new ManagedPrivateEndpointsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); }