From f5778e626fa760036e53039e931e7f6f7b6149d9 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Thu, 20 May 2021 16:00:22 +0000 Subject: [PATCH 1/4] Update AutoRest C# version to 3.0.0-beta.20210520.3 --- eng/Packages.Data.props | 2 +- .../src/Generated/AnomalyDetectorClient.cs | 43 ------------------- .../src/Generated/ConfidentialLedgerClient.cs | 13 +----- ...ConfidentialLedgerIdentityServiceClient.cs | 13 +----- .../src/Generated/PurviewCatalogClient.cs | 13 +----- .../src/Generated/PurviewEntities.cs | 19 +++++++- .../src/Generated/PurviewGlossaries.cs | 19 +++++++- .../src/Generated/PurviewRelationships.cs | 19 +++++++- .../src/Generated/PurviewTypes.cs | 19 +++++++- .../PurviewClassificationRuleClient.cs | 13 +----- .../src/Generated/PurviewDataSourceClient.cs | 13 +----- .../src/Generated/PurviewScanClient.cs | 13 +----- .../Generated/PurviewScanningServiceClient.cs | 13 +----- .../src/Generated/RoleAssignmentsClient.cs | 23 ---------- .../src/Generated/RoleDefinitionsClient.cs | 23 ---------- .../src/Generated/BigDataPoolsClient.cs | 23 ---------- .../src/Generated/DataFlowClient.cs | 22 ---------- .../Generated/DataFlowDebugSessionClient.cs | 22 ---------- .../src/Generated/DatasetClient.cs | 22 ---------- .../Generated/IntegrationRuntimesClient.cs | 23 ---------- .../src/Generated/LibraryClient.cs | 22 ---------- .../src/Generated/LinkedServiceClient.cs | 22 ---------- .../src/Generated/NotebookClient.cs | 22 ---------- .../src/Generated/PipelineClient.cs | 22 ---------- .../src/Generated/PipelineRunClient.cs | 23 ---------- .../src/Generated/SparkJobDefinitionClient.cs | 22 ---------- .../src/Generated/SqlPoolsClient.cs | 23 ---------- .../src/Generated/SqlScriptClient.cs | 22 ---------- .../src/Generated/TriggerClient.cs | 22 ---------- .../src/Generated/TriggerRunClient.cs | 23 ---------- .../src/Generated/WorkspaceClient.cs | 23 ---------- .../WorkspaceGitRepoManagementClient.cs | 23 ---------- .../ManagedPrivateEndpointsClient.cs | 22 ---------- .../src/Generated/MonitoringClient.cs | 23 ---------- .../src/Generated/SparkBatchClient.cs | 33 -------------- .../src/Generated/SparkSessionClient.cs | 33 -------------- 36 files changed, 83 insertions(+), 667 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index c8224e556f68b..7afbd5c4b40ed 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -129,7 +129,7 @@ All should have PrivateAssets="All" set so they don't become pacakge dependencies --> - + diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs index 234f6e67d36ad..651a3100c25bf 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs @@ -28,49 +28,6 @@ protected AnomalyDetectorClient() { } - /// Initializes a new instance of AnomalyDetectorClient. - /// Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public AnomalyDetectorClient(Uri endpoint, AzureKeyCredential credential, AnomalyDetectorClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new AnomalyDetectorClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - _pipeline = HttpPipelineBuilder.Build(options, new AzureKeyCredentialPolicy(credential, "Ocp-Apim-Subscription-Key")); - RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); - } - - /// Initializes a new instance of AnomalyDetectorClient. - /// Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public AnomalyDetectorClient(Uri endpoint, TokenCredential credential, AnomalyDetectorClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new AnomalyDetectorClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://cognitiveservices.azure.com/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); - } - /// Initializes a new instance of AnomalyDetectorClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs index 0ed7763bc5165..d21866163262d 100644 --- a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs @@ -18,8 +18,6 @@ public partial class ConfidentialLedgerClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://confidential-ledger.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; private Uri ledgerUri; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -31,24 +29,17 @@ protected ConfidentialLedgerClient() /// Initializes a new instance of ConfidentialLedgerClient. /// The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) + public ConfidentialLedgerClient(Uri ledgerUri, ConfidentialLedgerClientOptions options = null) { if (ledgerUri == null) { throw new ArgumentNullException(nameof(ledgerUri)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new ConfidentialLedgerClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.ledgerUri = ledgerUri; apiVersion = options.Version; } diff --git a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs index 6cacb0c3faa2f..77fd72bc1039b 100644 --- a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs +++ b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs @@ -18,8 +18,6 @@ public partial class ConfidentialLedgerIdentityServiceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://confidential-ledger.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; private Uri identityServiceUri; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -31,24 +29,17 @@ protected ConfidentialLedgerIdentityServiceClient() /// Initializes a new instance of ConfidentialLedgerIdentityServiceClient. /// The Identity Service URL, for example https://identity.accledger.azure.com. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) + public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, ConfidentialLedgerClientOptions options = null) { if (identityServiceUri == null) { throw new ArgumentNullException(nameof(identityServiceUri)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new ConfidentialLedgerClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.identityServiceUri = identityServiceUri; apiVersion = options.Version; } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs index e359129825d63..e578d1e370b95 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs @@ -18,8 +18,6 @@ public partial class PurviewCatalogClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -31,24 +29,17 @@ protected PurviewCatalogClient() /// Initializes a new instance of PurviewCatalogClient. /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewCatalogClient(Uri endpoint, TokenCredential credential, PurviewCatalogClientOptions options = null) + public PurviewCatalogClient(Uri endpoint, PurviewCatalogClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new PurviewCatalogClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.endpoint = endpoint; apiVersion = options.Version; } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs index 47a89306cb0c6..35743db4203aa 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs @@ -19,8 +19,6 @@ public partial class PurviewEntities { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -30,6 +28,23 @@ protected PurviewEntities() { } + /// Initializes a new instance of PurviewEntities. + /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. + /// The options for configuring the client. + public PurviewEntities(Uri endpoint, PurviewCatalogClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + options ??= new PurviewCatalogClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + this.endpoint = endpoint; + apiVersion = options.Version; + } + /// /// Create or update an entity in Atlas. /// Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs index 4e593e7dbfb8c..d9462aed3d31b 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs @@ -18,8 +18,6 @@ public partial class PurviewGlossaries { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,6 +27,23 @@ protected PurviewGlossaries() { } + /// Initializes a new instance of PurviewGlossaries. + /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. + /// The options for configuring the client. + public PurviewGlossaries(Uri endpoint, PurviewCatalogClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + options ??= new PurviewCatalogClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + this.endpoint = endpoint; + apiVersion = options.Version; + } + /// Get all glossaries registered with Atlas. /// The page size - by default there is no paging. /// The offset for pagination purpose. diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs index 12fe76b0d2ceb..c04d0149d24fc 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs @@ -18,8 +18,6 @@ public partial class PurviewRelationships { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,6 +27,23 @@ protected PurviewRelationships() { } + /// Initializes a new instance of PurviewRelationships. + /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. + /// The options for configuring the client. + public PurviewRelationships(Uri endpoint, PurviewCatalogClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + options ??= new PurviewCatalogClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + this.endpoint = endpoint; + apiVersion = options.Version; + } + /// Create a new relationship between entities. /// /// Schema for Request Body: diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs index 49ac028fe5d1f..ca477936c5e63 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs @@ -18,8 +18,6 @@ public partial class PurviewTypes { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,6 +27,23 @@ protected PurviewTypes() { } + /// Initializes a new instance of PurviewTypes. + /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. + /// The options for configuring the client. + public PurviewTypes(Uri endpoint, PurviewCatalogClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + + options ??= new PurviewCatalogClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + this.endpoint = endpoint; + apiVersion = options.Version; + } + /// Get the classification definition for the given GUID. /// The globally unique identifier of the classification. /// The request options. diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs index ae8e9d8c4ecdd..57b4adbd2a392 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs @@ -18,8 +18,6 @@ public partial class PurviewClassificationRuleClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private string classificationRuleName; private readonly string apiVersion; @@ -33,9 +31,8 @@ protected PurviewClassificationRuleClient() /// Initializes a new instance of PurviewClassificationRuleClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) + public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleName, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -45,16 +42,10 @@ public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleNa { throw new ArgumentNullException(nameof(classificationRuleName)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.classificationRuleName = classificationRuleName; apiVersion = options.Version; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs index fe54d429f0e24..b09aa64867fec 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs @@ -18,8 +18,6 @@ public partial class PurviewDataSourceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private string dataSourceName; private readonly string apiVersion; @@ -33,9 +31,8 @@ protected PurviewDataSourceClient() /// Initializes a new instance of PurviewDataSourceClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewDataSourceClient(Uri endpoint, string dataSourceName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) + public PurviewDataSourceClient(Uri endpoint, string dataSourceName, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -45,16 +42,10 @@ public PurviewDataSourceClient(Uri endpoint, string dataSourceName, TokenCredent { throw new ArgumentNullException(nameof(dataSourceName)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.dataSourceName = dataSourceName; apiVersion = options.Version; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs index 9e86500207cc8..4471d18b6c483 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs @@ -18,8 +18,6 @@ public partial class PurviewScanClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private string dataSourceName; private string scanName; @@ -35,9 +33,8 @@ protected PurviewScanClient() /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. /// The String to use. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) + public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -51,16 +48,10 @@ public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, T { throw new ArgumentNullException(nameof(scanName)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.dataSourceName = dataSourceName; this.scanName = scanName; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs index e361711e0bb9e..0ceab85ffaf8f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs @@ -18,8 +18,6 @@ public partial class PurviewScanningServiceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } - private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; - private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -31,24 +29,17 @@ protected PurviewScanningServiceClient() /// Initializes a new instance of PurviewScanningServiceClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. - /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewScanningServiceClient(Uri endpoint, TokenCredential credential, PurviewScanningServiceClientOptions options = null) + public PurviewScanningServiceClient(Uri endpoint, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _tokenCredential = credential; - var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); this.endpoint = endpoint; apiVersion = options.Version; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs index 1d617ab09f236..33f2a51e84228 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.AccessControl.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.AccessControl @@ -28,28 +27,6 @@ protected RoleAssignmentsClient() { } - /// Initializes a new instance of RoleAssignmentsClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public RoleAssignmentsClient(Uri endpoint, TokenCredential credential, AccessControlClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new AccessControlClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new RoleAssignmentsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of RoleAssignmentsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs index 928f02c5da7ef..22e2d188b5a9d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs @@ -11,7 +11,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.AccessControl.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.AccessControl @@ -28,28 +27,6 @@ protected RoleDefinitionsClient() { } - /// Initializes a new instance of RoleDefinitionsClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public RoleDefinitionsClient(Uri endpoint, TokenCredential credential, AccessControlClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new AccessControlClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new RoleDefinitionsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of RoleDefinitionsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs index f2320e66bfccc..af4134b948bfb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected BigDataPoolsClient() { } - /// Initializes a new instance of BigDataPoolsClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public BigDataPoolsClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new BigDataPoolsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of BigDataPoolsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs index c56fc6e45fa04..d9be7469dc6cf 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs @@ -27,28 +27,6 @@ protected DataFlowClient() { } - /// Initializes a new instance of DataFlowClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public DataFlowClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new DataFlowRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of DataFlowClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs index b2a99b9f7440c..b1edb9a178a0b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs @@ -27,28 +27,6 @@ protected DataFlowDebugSessionClient() { } - /// Initializes a new instance of DataFlowDebugSessionClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public DataFlowDebugSessionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new DataFlowDebugSessionRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of DataFlowDebugSessionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs index c525700e624eb..0f6a2b5f489f0 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs @@ -27,28 +27,6 @@ protected DatasetClient() { } - /// Initializes a new instance of DatasetClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public DatasetClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new DatasetRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of DatasetClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs index f133a27489772..aedfd637956fb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected IntegrationRuntimesClient() { } - /// Initializes a new instance of IntegrationRuntimesClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public IntegrationRuntimesClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new IntegrationRuntimesRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of IntegrationRuntimesClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs index 3f1eba4fd538a..5b7430e926590 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs @@ -28,28 +28,6 @@ protected LibraryClient() { } - /// Initializes a new instance of LibraryClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public LibraryClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new LibraryRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of LibraryClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs index 7ed5d1db4aa91..14d498ff943ea 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs @@ -27,28 +27,6 @@ protected LinkedServiceClient() { } - /// Initializes a new instance of LinkedServiceClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public LinkedServiceClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new LinkedServiceRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of LinkedServiceClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs index 5987c4d06e38a..992f376aa518b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs @@ -27,28 +27,6 @@ protected NotebookClient() { } - /// Initializes a new instance of NotebookClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public NotebookClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new NotebookRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of NotebookClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs index 6b2c8e8357519..0c38fe438408c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs @@ -28,28 +28,6 @@ protected PipelineClient() { } - /// Initializes a new instance of PipelineClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public PipelineClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new PipelineRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of PipelineClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs index 8cb8e17310402..761feea0bdb10 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected PipelineRunClient() { } - /// Initializes a new instance of PipelineRunClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public PipelineRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new PipelineRunRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of PipelineRunClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs index 533191f9c16d6..bb7a68ae55104 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs @@ -27,28 +27,6 @@ protected SparkJobDefinitionClient() { } - /// Initializes a new instance of SparkJobDefinitionClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public SparkJobDefinitionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new SparkJobDefinitionRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of SparkJobDefinitionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs index d9392f6d6150d..892cbf7322d26 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected SqlPoolsClient() { } - /// Initializes a new instance of SqlPoolsClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public SqlPoolsClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new SqlPoolsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of SqlPoolsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs index 91f8ed10b31ef..ffa8da9097c08 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs @@ -27,28 +27,6 @@ protected SqlScriptClient() { } - /// Initializes a new instance of SqlScriptClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public SqlScriptClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new SqlScriptRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of SqlScriptClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs index c411eeefa4040..f007a0818c799 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs @@ -27,28 +27,6 @@ protected TriggerClient() { } - /// Initializes a new instance of TriggerClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public TriggerClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new TriggerRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of TriggerClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs index ee90318dfd7d4..41bf2a83dcc0f 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected TriggerRunClient() { } - /// Initializes a new instance of TriggerRunClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public TriggerRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new TriggerRunRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of TriggerRunClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs index 2ae7d780b4c03..2d71c24d08915 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected WorkspaceClient() { } - /// Initializes a new instance of WorkspaceClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public WorkspaceClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new WorkspaceRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of WorkspaceClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs index 06c3591944825..b6733a74dbaaa 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -27,28 +26,6 @@ protected WorkspaceGitRepoManagementClient() { } - /// Initializes a new instance of WorkspaceGitRepoManagementClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public WorkspaceGitRepoManagementClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - if (credential == null) - { - throw new ArgumentNullException(nameof(credential)); - } - - options ??= new ArtifactsClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://dev.azuresynapse.net/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); - RestClient = new WorkspaceGitRepoManagementRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); - } - /// Initializes a new instance of WorkspaceGitRepoManagementClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs index 470db49bd4bd6..9751c94fe85de 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs @@ -27,28 +27,6 @@ protected ManagedPrivateEndpointsClient() { } - /// Initializes a new instance of ManagedPrivateEndpointsClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - 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); - } - /// Initializes a new instance of ManagedPrivateEndpointsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs index f63a33abf1612..d18cc60b9b9b2 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Monitoring.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Monitoring @@ -27,28 +26,6 @@ protected MonitoringClient() { } - /// Initializes a new instance of MonitoringClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - public MonitoringClient(Uri 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); - } - /// Initializes a new instance of MonitoringClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs index 5c7105cd800df..e7cca1c66c6c8 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Spark.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Spark @@ -27,38 +26,6 @@ protected SparkBatchClient() { } - /// Initializes a new instance of SparkBatchClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// Name of the spark pool. - /// A credential used to authenticate to an Azure Service. - /// Valid api-version for the request. - /// The options for configuring the client. - 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); - } - /// Initializes a new instance of SparkBatchClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs index 76099df0fbac6..5de16a56b40e6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs @@ -10,7 +10,6 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Spark.Models; -using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Spark @@ -27,38 +26,6 @@ protected SparkSessionClient() { } - /// Initializes a new instance of SparkSessionClient. - /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. - /// Name of the spark pool. - /// A credential used to authenticate to an Azure Service. - /// Valid api-version for the request. - /// The options for configuring the client. - public SparkSessionClient(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 SparkSessionRestClient(_clientDiagnostics, _pipeline, endpoint, sparkPoolName, livyApiVersion); - } - /// Initializes a new instance of SparkSessionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. From c4706a21fa5c7fa3d4378091984f1e873ffe94d0 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 20 May 2021 09:57:20 -0500 Subject: [PATCH 2/4] Move to new autorest auth option names --- .../Azure.AI.AnomalyDetector/src/autorest.md | 6 +++--- .../Azure.Storage.ConfidentialLedger/src/autorest.md | 4 ++-- sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md | 4 ++-- .../Azure.Analytics.Purview.Scanning/src/autorest.md | 4 ++-- .../Azure.Analytics.Synapse.AccessControl/src/autorest.md | 4 ++-- .../Azure.Analytics.Synapse.Artifacts/src/autorest.md | 4 ++-- .../src/autorest.md | 4 ++-- .../Azure.Analytics.Synapse.Monitoring/src/autorest.md | 4 ++-- sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md index fff0c605522ea..1aa1122538b07 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md @@ -8,9 +8,9 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d5a7f1fbca0fd9b16cc1e1a9016d4a0ea31a5d53/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md namespace: Azure.AI.AnomalyDetector public-clients: true -credential-types: TokenCredential;AzureKeyCredential -credential-header-name: Ocp-Apim-Subscription-Key -credential-scopes: https://cognitiveservices.azure.com/.default +security: AADToken;AzureKey +security-header-name: Ocp-Apim-Subscription-Key +security-scopes: https://cognitiveservices.azure.com/.default ``` ### Make Endpoint type as Uri diff --git a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/autorest.md b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/autorest.md index d1fd6751d0223..88bd7029f8bed 100644 --- a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/autorest.md +++ b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/autorest.md @@ -5,8 +5,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: ConfidentialLedger namespace: Azure.Storage.ConfidentialLedger -credential-types: TokenCredential -credential-scopes: "https://confidential-ledger.azure.com/.default" +security: AADToken +security-scopes: "https://confidential-ledger.azure.com/.default" low-level-client: true input-file: - https://github.com/Azure/azure-rest-api-specs/blob/e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/0.1-preview/common.json diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md index f04ed3b6395d6..c0f3dfa0a8ef3 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md @@ -7,8 +7,8 @@ title: PurviewCatalog input-file: https://github.com/Azure/azure-rest-api-specs/blob/0bfd6032ae89b4d8d7c55ac23309cb6e30b6c1e0/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-05-01-preview/purviewcatalog.json namespace: Azure.Analytics.Purview.Catalog low-level-client: true -credential-types: TokenCredential -credential-scopes: https://purview.azure.net/.default +security: AADToken +security-scopes: https://purview.azure.net/.default ``` # Model endpoint parameter as a url, not a string. diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md index 5b25f352e33af..85fd5f7506765 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md @@ -7,8 +7,8 @@ title: PurviewScanningService input-file: https://github.com/Azure/azure-rest-api-specs/blob/8478d2280c54d0065ac6271e39321849c090c659/specification/purview/data-plane/Azure.Data.Purview.Scanning/preview/2018-12-01-preview/scanningService.json namespace: Azure.Analytics.Purview.Scanning low-level-client: true -credential-types: TokenCredential -credential-scopes: https://purview.azure.net/.default +security: AADToken +security-scopes: https://purview.azure.net/.default modelerfour: lenient-model-deduplication: true ``` diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md index c79a3768d0342..6e869f2d53d14 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/autorest.md @@ -11,8 +11,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/fc5e2fbcfc3f585d38bdb1c513ce1ad2c570cf3d/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.AccessControl public-clients: true -credential-types: TokenCredential -credential-scopes: https://dev.azuresynapse.net/.default +security: AADToken +security-scopes: https://dev.azuresynapse.net/.default ``` ### Make Endpoint type as Uri diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md index a6eb78f32d84d..c40310bfe28ce 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/autorest.md @@ -11,8 +11,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/fc5e2fbcfc3f585d38bdb1c513ce1ad2c570cf3d/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Artifacts public-clients: true -credential-types: TokenCredential -credential-scopes: https://dev.azuresynapse.net/.default +security: AADToken +security-scopes: https://dev.azuresynapse.net/.default modelerfour: lenient-model-deduplication: true ``` diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/autorest.md index 5d15c1d573b94..e85ac1e63530b 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/autorest.md @@ -11,8 +11,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/fc5e2fbcfc3f585d38bdb1c513ce1ad2c570cf3d/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.ManagedPrivateEndpoints public-clients: true -credential-types: TokenCredential -credential-scopes: https://dev.azuresynapse.net/.default +security: AADToken +security-scopes: https://dev.azuresynapse.net/.default ``` ### Make Endpoint type as Uri diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/autorest.md index c3b93431cae39..99a3e4741e981 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/autorest.md @@ -11,8 +11,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/fc5e2fbcfc3f585d38bdb1c513ce1ad2c570cf3d/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Monitoring public-clients: true -credential-types: TokenCredential -credential-scopes: https://dev.azuresynapse.net/.default +security: AADToken +security-scopes: https://dev.azuresynapse.net/.default ``` ### Make Endpoint type as Uri diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md index 647c291c0e682..fca6e123b1461 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/autorest.md @@ -11,8 +11,8 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/fc5e2fbcfc3f585d38bdb1c513ce1ad2c570cf3d/specification/synapse/data-plane/readme.md namespace: Azure.Analytics.Synapse.Spark public-clients: true -credential-types: TokenCredential -credential-scopes: https://dev.azuresynapse.net/.default +security: AADToken +security-scopes: https://dev.azuresynapse.net/.default ``` ### Make Endpoint type as Uri From 4652839ae3c9daa15150627bc731c1d7492730a2 Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 20 May 2021 11:11:21 -0500 Subject: [PATCH 3/4] Fix one list --- sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md index 1aa1122538b07..cd6873e7661ef 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md @@ -8,7 +8,9 @@ require: - https://github.com/Azure/azure-rest-api-specs/blob/d5a7f1fbca0fd9b16cc1e1a9016d4a0ea31a5d53/specification/cognitiveservices/data-plane/AnomalyDetector/readme.md namespace: Azure.AI.AnomalyDetector public-clients: true -security: AADToken;AzureKey +security: + - AADToken + - AzureKey security-header-name: Ocp-Apim-Subscription-Key security-scopes: https://cognitiveservices.azure.com/.default ``` From 58d3b8083f7c9b671868808936fdd1abb2b8802f Mon Sep 17 00:00:00 2001 From: Chris Hamons Date: Thu, 20 May 2021 11:17:46 -0500 Subject: [PATCH 4/4] Regenerate Code --- .../src/Generated/AnomalyDetectorClient.cs | 43 +++++++++++++++++++ .../src/Generated/ConfidentialLedgerClient.cs | 13 +++++- ...ConfidentialLedgerIdentityServiceClient.cs | 13 +++++- .../src/Generated/PurviewCatalogClient.cs | 13 +++++- .../src/Generated/PurviewEntities.cs | 19 +------- .../src/Generated/PurviewGlossaries.cs | 19 +------- .../src/Generated/PurviewRelationships.cs | 19 +------- .../src/Generated/PurviewTypes.cs | 19 +------- .../PurviewClassificationRuleClient.cs | 13 +++++- .../src/Generated/PurviewDataSourceClient.cs | 13 +++++- .../src/Generated/PurviewScanClient.cs | 13 +++++- .../Generated/PurviewScanningServiceClient.cs | 13 +++++- .../src/Generated/RoleAssignmentsClient.cs | 23 ++++++++++ .../src/Generated/RoleDefinitionsClient.cs | 23 ++++++++++ .../src/Generated/BigDataPoolsClient.cs | 23 ++++++++++ .../src/Generated/DataFlowClient.cs | 22 ++++++++++ .../Generated/DataFlowDebugSessionClient.cs | 22 ++++++++++ .../src/Generated/DatasetClient.cs | 22 ++++++++++ .../Generated/IntegrationRuntimesClient.cs | 23 ++++++++++ .../src/Generated/LibraryClient.cs | 22 ++++++++++ .../src/Generated/LinkedServiceClient.cs | 22 ++++++++++ .../src/Generated/NotebookClient.cs | 22 ++++++++++ .../src/Generated/PipelineClient.cs | 22 ++++++++++ .../src/Generated/PipelineRunClient.cs | 23 ++++++++++ .../src/Generated/SparkJobDefinitionClient.cs | 22 ++++++++++ .../src/Generated/SqlPoolsClient.cs | 23 ++++++++++ .../src/Generated/SqlScriptClient.cs | 22 ++++++++++ .../src/Generated/TriggerClient.cs | 22 ++++++++++ .../src/Generated/TriggerRunClient.cs | 23 ++++++++++ .../src/Generated/WorkspaceClient.cs | 23 ++++++++++ .../WorkspaceGitRepoManagementClient.cs | 23 ++++++++++ .../ManagedPrivateEndpointsClient.cs | 22 ++++++++++ .../src/Generated/MonitoringClient.cs | 23 ++++++++++ .../src/Generated/SparkBatchClient.cs | 33 ++++++++++++++ .../src/Generated/SparkSessionClient.cs | 33 ++++++++++++++ 35 files changed, 666 insertions(+), 82 deletions(-) diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs index 651a3100c25bf..afa8a8524415a 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs @@ -28,6 +28,49 @@ protected AnomalyDetectorClient() { } + /// Initializes a new instance of AnomalyDetectorClient. + /// Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public AnomalyDetectorClient(Uri endpoint, TokenCredential credential, AnomalyDetectorClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new AnomalyDetectorClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://cognitiveservices.azure.com/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); + } + + /// Initializes a new instance of AnomalyDetectorClient. + /// Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public AnomalyDetectorClient(Uri endpoint, AzureKeyCredential credential, AnomalyDetectorClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new AnomalyDetectorClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + _pipeline = HttpPipelineBuilder.Build(options, new AzureKeyCredentialPolicy(credential, "Ocp-Apim-Subscription-Key")); + RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); + } + /// Initializes a new instance of AnomalyDetectorClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs index d21866163262d..0ed7763bc5165 100644 --- a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs @@ -18,6 +18,8 @@ public partial class ConfidentialLedgerClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://confidential-ledger.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; private Uri ledgerUri; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,17 +31,24 @@ protected ConfidentialLedgerClient() /// Initializes a new instance of ConfidentialLedgerClient. /// The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public ConfidentialLedgerClient(Uri ledgerUri, ConfidentialLedgerClientOptions options = null) + public ConfidentialLedgerClient(Uri ledgerUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) { if (ledgerUri == null) { throw new ArgumentNullException(nameof(ledgerUri)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new ConfidentialLedgerClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.ledgerUri = ledgerUri; apiVersion = options.Version; } diff --git a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs index 77fd72bc1039b..6cacb0c3faa2f 100644 --- a/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs +++ b/sdk/confidentialledger/Azure.Storage.ConfidentialLedger/src/Generated/ConfidentialLedgerIdentityServiceClient.cs @@ -18,6 +18,8 @@ public partial class ConfidentialLedgerIdentityServiceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://confidential-ledger.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; private Uri identityServiceUri; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,17 +31,24 @@ protected ConfidentialLedgerIdentityServiceClient() /// Initializes a new instance of ConfidentialLedgerIdentityServiceClient. /// The Identity Service URL, for example https://identity.accledger.azure.com. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, ConfidentialLedgerClientOptions options = null) + public ConfidentialLedgerIdentityServiceClient(Uri identityServiceUri, TokenCredential credential, ConfidentialLedgerClientOptions options = null) { if (identityServiceUri == null) { throw new ArgumentNullException(nameof(identityServiceUri)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new ConfidentialLedgerClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.identityServiceUri = identityServiceUri; apiVersion = options.Version; } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs index e578d1e370b95..e359129825d63 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewCatalogClient.cs @@ -18,6 +18,8 @@ public partial class PurviewCatalogClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,17 +31,24 @@ protected PurviewCatalogClient() /// Initializes a new instance of PurviewCatalogClient. /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewCatalogClient(Uri endpoint, PurviewCatalogClientOptions options = null) + public PurviewCatalogClient(Uri endpoint, TokenCredential credential, PurviewCatalogClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new PurviewCatalogClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.endpoint = endpoint; apiVersion = options.Version; } diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs index 35743db4203aa..47a89306cb0c6 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewEntities.cs @@ -19,6 +19,8 @@ public partial class PurviewEntities { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -28,23 +30,6 @@ protected PurviewEntities() { } - /// Initializes a new instance of PurviewEntities. - /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. - /// The options for configuring the client. - public PurviewEntities(Uri endpoint, PurviewCatalogClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - - options ??= new PurviewCatalogClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); - this.endpoint = endpoint; - apiVersion = options.Version; - } - /// /// Create or update an entity in Atlas. /// Existing entity is matched using its unique guid if supplied or by its unique attributes eg: qualifiedName. diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs index d9462aed3d31b..4e593e7dbfb8c 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewGlossaries.cs @@ -18,6 +18,8 @@ public partial class PurviewGlossaries { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -27,23 +29,6 @@ protected PurviewGlossaries() { } - /// Initializes a new instance of PurviewGlossaries. - /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. - /// The options for configuring the client. - public PurviewGlossaries(Uri endpoint, PurviewCatalogClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - - options ??= new PurviewCatalogClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); - this.endpoint = endpoint; - apiVersion = options.Version; - } - /// Get all glossaries registered with Atlas. /// The page size - by default there is no paging. /// The offset for pagination purpose. diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs index c04d0149d24fc..12fe76b0d2ceb 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewRelationships.cs @@ -18,6 +18,8 @@ public partial class PurviewRelationships { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -27,23 +29,6 @@ protected PurviewRelationships() { } - /// Initializes a new instance of PurviewRelationships. - /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. - /// The options for configuring the client. - public PurviewRelationships(Uri endpoint, PurviewCatalogClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - - options ??= new PurviewCatalogClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); - this.endpoint = endpoint; - apiVersion = options.Version; - } - /// Create a new relationship between entities. /// /// Schema for Request Body: diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs index ca477936c5e63..49ac028fe5d1f 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/Generated/PurviewTypes.cs @@ -18,6 +18,8 @@ public partial class PurviewTypes { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -27,23 +29,6 @@ protected PurviewTypes() { } - /// Initializes a new instance of PurviewTypes. - /// The catalog endpoint of your Purview account. Example: https://{accountName}.catalog.purview.azure.com. - /// The options for configuring the client. - public PurviewTypes(Uri endpoint, PurviewCatalogClientOptions options = null) - { - if (endpoint == null) - { - throw new ArgumentNullException(nameof(endpoint)); - } - - options ??= new PurviewCatalogClientOptions(); - _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); - this.endpoint = endpoint; - apiVersion = options.Version; - } - /// Get the classification definition for the given GUID. /// The globally unique identifier of the classification. /// The request options. diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs index 57b4adbd2a392..ae8e9d8c4ecdd 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewClassificationRuleClient.cs @@ -18,6 +18,8 @@ public partial class PurviewClassificationRuleClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private string classificationRuleName; private readonly string apiVersion; @@ -31,8 +33,9 @@ protected PurviewClassificationRuleClient() /// Initializes a new instance of PurviewClassificationRuleClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleName, PurviewScanningServiceClientOptions options = null) + public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -42,10 +45,16 @@ public PurviewClassificationRuleClient(Uri endpoint, string classificationRuleNa { throw new ArgumentNullException(nameof(classificationRuleName)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.classificationRuleName = classificationRuleName; apiVersion = options.Version; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs index b09aa64867fec..fe54d429f0e24 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewDataSourceClient.cs @@ -18,6 +18,8 @@ public partial class PurviewDataSourceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private string dataSourceName; private readonly string apiVersion; @@ -31,8 +33,9 @@ protected PurviewDataSourceClient() /// Initializes a new instance of PurviewDataSourceClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewDataSourceClient(Uri endpoint, string dataSourceName, PurviewScanningServiceClientOptions options = null) + public PurviewDataSourceClient(Uri endpoint, string dataSourceName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -42,10 +45,16 @@ public PurviewDataSourceClient(Uri endpoint, string dataSourceName, PurviewScann { throw new ArgumentNullException(nameof(dataSourceName)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.dataSourceName = dataSourceName; apiVersion = options.Version; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs index 4471d18b6c483..9e86500207cc8 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanClient.cs @@ -18,6 +18,8 @@ public partial class PurviewScanClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private string dataSourceName; private string scanName; @@ -33,8 +35,9 @@ protected PurviewScanClient() /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. /// The String to use. /// The String to use. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, PurviewScanningServiceClientOptions options = null) + public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, TokenCredential credential, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { @@ -48,10 +51,16 @@ public PurviewScanClient(Uri endpoint, string dataSourceName, string scanName, P { throw new ArgumentNullException(nameof(scanName)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.endpoint = endpoint; this.dataSourceName = dataSourceName; this.scanName = scanName; diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs index 0ceab85ffaf8f..e361711e0bb9e 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/Generated/PurviewScanningServiceClient.cs @@ -18,6 +18,8 @@ public partial class PurviewScanningServiceClient { /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline { get; } + private readonly string[] AuthorizationScopes = { "https://purview.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; private Uri endpoint; private readonly string apiVersion; private readonly ClientDiagnostics _clientDiagnostics; @@ -29,17 +31,24 @@ protected PurviewScanningServiceClient() /// Initializes a new instance of PurviewScanningServiceClient. /// The scanning endpoint of your purview account. Example: https://{accountName}.scan.purview.azure.com. + /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - public PurviewScanningServiceClient(Uri endpoint, PurviewScanningServiceClientOptions options = null) + public PurviewScanningServiceClient(Uri endpoint, TokenCredential credential, PurviewScanningServiceClientOptions options = null) { if (endpoint == null) { throw new ArgumentNullException(nameof(endpoint)); } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } options ??= new PurviewScanningServiceClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { new LowLevelCallbackPolicy() }); + _tokenCredential = credential; + var authPolicy = new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes); + Pipeline = HttpPipelineBuilder.Build(options, new HttpPipelinePolicy[] { authPolicy, new LowLevelCallbackPolicy() }); this.endpoint = endpoint; apiVersion = options.Version; } diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs index 33f2a51e84228..1d617ab09f236 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleAssignmentsClient.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.AccessControl @@ -27,6 +28,28 @@ protected RoleAssignmentsClient() { } + /// Initializes a new instance of RoleAssignmentsClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public RoleAssignmentsClient(Uri endpoint, TokenCredential credential, AccessControlClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new AccessControlClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new RoleAssignmentsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of RoleAssignmentsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs index 22e2d188b5a9d..928f02c5da7ef 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.AccessControl/src/Generated/RoleDefinitionsClient.cs @@ -11,6 +11,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.AccessControl.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.AccessControl @@ -27,6 +28,28 @@ protected RoleDefinitionsClient() { } + /// Initializes a new instance of RoleDefinitionsClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public RoleDefinitionsClient(Uri endpoint, TokenCredential credential, AccessControlClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new AccessControlClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new RoleDefinitionsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of RoleDefinitionsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs index af4134b948bfb..f2320e66bfccc 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/BigDataPoolsClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected BigDataPoolsClient() { } + /// Initializes a new instance of BigDataPoolsClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public BigDataPoolsClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new BigDataPoolsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of BigDataPoolsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs index d9be7469dc6cf..c56fc6e45fa04 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowClient.cs @@ -27,6 +27,28 @@ protected DataFlowClient() { } + /// Initializes a new instance of DataFlowClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public DataFlowClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new DataFlowRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of DataFlowClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs index b1edb9a178a0b..b2a99b9f7440c 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DataFlowDebugSessionClient.cs @@ -27,6 +27,28 @@ protected DataFlowDebugSessionClient() { } + /// Initializes a new instance of DataFlowDebugSessionClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public DataFlowDebugSessionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new DataFlowDebugSessionRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of DataFlowDebugSessionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs index 0f6a2b5f489f0..c525700e624eb 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/DatasetClient.cs @@ -27,6 +27,28 @@ protected DatasetClient() { } + /// Initializes a new instance of DatasetClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public DatasetClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new DatasetRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of DatasetClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs index aedfd637956fb..f133a27489772 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/IntegrationRuntimesClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected IntegrationRuntimesClient() { } + /// Initializes a new instance of IntegrationRuntimesClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public IntegrationRuntimesClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new IntegrationRuntimesRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of IntegrationRuntimesClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs index 5b7430e926590..3f1eba4fd538a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LibraryClient.cs @@ -28,6 +28,28 @@ protected LibraryClient() { } + /// Initializes a new instance of LibraryClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public LibraryClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new LibraryRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of LibraryClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs index 14d498ff943ea..7ed5d1db4aa91 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/LinkedServiceClient.cs @@ -27,6 +27,28 @@ protected LinkedServiceClient() { } + /// Initializes a new instance of LinkedServiceClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public LinkedServiceClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new LinkedServiceRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of LinkedServiceClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs index 992f376aa518b..5987c4d06e38a 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/NotebookClient.cs @@ -27,6 +27,28 @@ protected NotebookClient() { } + /// Initializes a new instance of NotebookClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public NotebookClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new NotebookRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of NotebookClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs index 0c38fe438408c..6b2c8e8357519 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineClient.cs @@ -28,6 +28,28 @@ protected PipelineClient() { } + /// Initializes a new instance of PipelineClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public PipelineClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new PipelineRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of PipelineClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs index 761feea0bdb10..8cb8e17310402 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/PipelineRunClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected PipelineRunClient() { } + /// Initializes a new instance of PipelineRunClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public PipelineRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new PipelineRunRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of PipelineRunClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs index bb7a68ae55104..533191f9c16d6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SparkJobDefinitionClient.cs @@ -27,6 +27,28 @@ protected SparkJobDefinitionClient() { } + /// Initializes a new instance of SparkJobDefinitionClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public SparkJobDefinitionClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new SparkJobDefinitionRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of SparkJobDefinitionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs index 892cbf7322d26..d9392f6d6150d 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlPoolsClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected SqlPoolsClient() { } + /// Initializes a new instance of SqlPoolsClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public SqlPoolsClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new SqlPoolsRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of SqlPoolsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs index ffa8da9097c08..91f8ed10b31ef 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/SqlScriptClient.cs @@ -27,6 +27,28 @@ protected SqlScriptClient() { } + /// Initializes a new instance of SqlScriptClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public SqlScriptClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new SqlScriptRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of SqlScriptClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs index f007a0818c799..c411eeefa4040 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerClient.cs @@ -27,6 +27,28 @@ protected TriggerClient() { } + /// Initializes a new instance of TriggerClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public TriggerClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new TriggerRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of TriggerClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs index 41bf2a83dcc0f..ee90318dfd7d4 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/TriggerRunClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected TriggerRunClient() { } + /// Initializes a new instance of TriggerRunClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public TriggerRunClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new TriggerRunRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of TriggerRunClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs index 2d71c24d08915..2ae7d780b4c03 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected WorkspaceClient() { } + /// Initializes a new instance of WorkspaceClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public WorkspaceClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new WorkspaceRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of WorkspaceClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs index b6733a74dbaaa..06c3591944825 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/WorkspaceGitRepoManagementClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Artifacts.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Artifacts @@ -26,6 +27,28 @@ protected WorkspaceGitRepoManagementClient() { } + /// Initializes a new instance of WorkspaceGitRepoManagementClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public WorkspaceGitRepoManagementClient(Uri endpoint, TokenCredential credential, ArtifactsClientOptions options = null) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (credential == null) + { + throw new ArgumentNullException(nameof(credential)); + } + + options ??= new ArtifactsClientOptions(); + _clientDiagnostics = new ClientDiagnostics(options); + string[] scopes = { "https://dev.azuresynapse.net/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + RestClient = new WorkspaceGitRepoManagementRestClient(_clientDiagnostics, _pipeline, endpoint, options.Version); + } + /// Initializes a new instance of WorkspaceGitRepoManagementClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs index 9751c94fe85de..470db49bd4bd6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints/src/Generated/ManagedPrivateEndpointsClient.cs @@ -27,6 +27,28 @@ protected ManagedPrivateEndpointsClient() { } + /// Initializes a new instance of ManagedPrivateEndpointsClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + 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); + } + /// Initializes a new instance of ManagedPrivateEndpointsClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs index d18cc60b9b9b2..f63a33abf1612 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Monitoring/src/Generated/MonitoringClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Monitoring.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Monitoring @@ -26,6 +27,28 @@ protected MonitoringClient() { } + /// Initializes a new instance of MonitoringClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + public MonitoringClient(Uri 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); + } + /// Initializes a new instance of MonitoringClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs index e7cca1c66c6c8..5c7105cd800df 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkBatchClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Spark @@ -26,6 +27,38 @@ protected SparkBatchClient() { } + /// Initializes a new instance of SparkBatchClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// A credential used to authenticate to an Azure Service. + /// Valid api-version for the request. + /// The options for configuring the client. + 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); + } + /// Initializes a new instance of SparkBatchClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses. diff --git a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs index 5de16a56b40e6..76099df0fbac6 100644 --- a/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs +++ b/sdk/synapse/Azure.Analytics.Synapse.Spark/src/Generated/SparkSessionClient.cs @@ -10,6 +10,7 @@ using System.Threading.Tasks; using Azure; using Azure.Analytics.Synapse.Spark.Models; +using Azure.Core; using Azure.Core.Pipeline; namespace Azure.Analytics.Synapse.Spark @@ -26,6 +27,38 @@ protected SparkSessionClient() { } + /// Initializes a new instance of SparkSessionClient. + /// The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + /// Name of the spark pool. + /// A credential used to authenticate to an Azure Service. + /// Valid api-version for the request. + /// The options for configuring the client. + public SparkSessionClient(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 SparkSessionRestClient(_clientDiagnostics, _pipeline, endpoint, sparkPoolName, livyApiVersion); + } + /// Initializes a new instance of SparkSessionClient. /// The handler for diagnostic messaging in the client. /// The HTTP pipeline for sending and receiving REST requests and responses.