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..afa8a8524415a 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/Generated/AnomalyDetectorClient.cs @@ -32,7 +32,7 @@ protected 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) + public AnomalyDetectorClient(Uri endpoint, TokenCredential credential, AnomalyDetectorClientOptions options = null) { if (endpoint == null) { @@ -45,7 +45,8 @@ public AnomalyDetectorClient(Uri endpoint, AzureKeyCredential credential, Anomal options ??= new AnomalyDetectorClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - _pipeline = HttpPipelineBuilder.Build(options, new AzureKeyCredentialPolicy(credential, "Ocp-Apim-Subscription-Key")); + string[] scopes = { "https://cognitiveservices.azure.com/.default" }; + _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); } @@ -53,7 +54,7 @@ public AnomalyDetectorClient(Uri endpoint, AzureKeyCredential credential, Anomal /// 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) + public AnomalyDetectorClient(Uri endpoint, AzureKeyCredential credential, AnomalyDetectorClientOptions options = null) { if (endpoint == null) { @@ -66,8 +67,7 @@ public AnomalyDetectorClient(Uri endpoint, TokenCredential credential, AnomalyDe options ??= new AnomalyDetectorClientOptions(); _clientDiagnostics = new ClientDiagnostics(options); - string[] scopes = { "https://cognitiveservices.azure.com/.default" }; - _pipeline = HttpPipelineBuilder.Build(options, new BearerTokenAuthenticationPolicy(credential, scopes)); + _pipeline = HttpPipelineBuilder.Build(options, new AzureKeyCredentialPolicy(credential, "Ocp-Apim-Subscription-Key")); RestClient = new AnomalyDetectorRestClient(_clientDiagnostics, _pipeline, endpoint); } diff --git a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md index fff0c605522ea..cd6873e7661ef 100644 --- a/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md +++ b/sdk/anomalydetector/Azure.AI.AnomalyDetector/src/autorest.md @@ -8,9 +8,11 @@ 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