From 6b7211660cb8d3f8c4b83ea260440262ce34d768 Mon Sep 17 00:00:00 2001 From: Yan Xu Date: Fri, 20 Dec 2024 15:16:34 +0800 Subject: [PATCH] update ServiceBusConnectionString from String to SecureString --- .../MachineLearningServices.Autorest/README.md | 3 +++ .../custom/New-AzMLWorkspaceKubernetesObject.ps1 | 2 +- .../docs/New-AzMLWorkspaceKubernetesObject.md | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/MachineLearningServices/MachineLearningServices.Autorest/README.md b/src/MachineLearningServices/MachineLearningServices.Autorest/README.md index 8dc0274f9982..3f7227146729 100644 --- a/src/MachineLearningServices/MachineLearningServices.Autorest/README.md +++ b/src/MachineLearningServices/MachineLearningServices.Autorest/README.md @@ -50,6 +50,9 @@ use-extension: directive: # Fix URL type in autorest v3 + - from: swagger-document + where: $.definitions.KubernetesProperties.properties.serviceBusConnectionString + transform: $["format"] = "password" - from: swagger-document where: $.definitions.WorkspaceConnectionOAuth2.properties.authUrl transform: >- diff --git a/src/MachineLearningServices/MachineLearningServices.Autorest/custom/New-AzMLWorkspaceKubernetesObject.ps1 b/src/MachineLearningServices/MachineLearningServices.Autorest/custom/New-AzMLWorkspaceKubernetesObject.ps1 index eca130ef27b8..f3441dfe33f7 100644 --- a/src/MachineLearningServices/MachineLearningServices.Autorest/custom/New-AzMLWorkspaceKubernetesObject.ps1 +++ b/src/MachineLearningServices/MachineLearningServices.Autorest/custom/New-AzMLWorkspaceKubernetesObject.ps1 @@ -67,7 +67,7 @@ function New-AzMLWorkspaceKubernetesObject { [string] $RelayConnectionString, [Parameter(HelpMessage="ServiceBus connection string.")] - [string] + [System.Security.SecureString] $ServiceBusConnectionString, [Parameter(HelpMessage="VC name.")] [string] diff --git a/src/MachineLearningServices/MachineLearningServices.Autorest/docs/New-AzMLWorkspaceKubernetesObject.md b/src/MachineLearningServices/MachineLearningServices.Autorest/docs/New-AzMLWorkspaceKubernetesObject.md index c8fb0c48e82b..f9046aa130cd 100644 --- a/src/MachineLearningServices/MachineLearningServices.Autorest/docs/New-AzMLWorkspaceKubernetesObject.md +++ b/src/MachineLearningServices/MachineLearningServices.Autorest/docs/New-AzMLWorkspaceKubernetesObject.md @@ -17,7 +17,7 @@ New-AzMLWorkspaceKubernetesObject [-DefaultInstanceType ] [-Description [-DisableLocalAuth ] [-ExtensionInstanceReleaseTrain ] [-ExtensionPrincipalId ] [-InstanceLimit ] [-InstanceNodeSelector ] [-InstanceRequest ] [-Namespace ] [-RelayConnectionString ] [-ResourceId ] - [-ServiceBusConnectionString ] [-VcName ] [] + [-ServiceBusConnectionString ] [-VcName ] [] ``` ## DESCRIPTION @@ -203,7 +203,7 @@ Accept wildcard characters: False ServiceBus connection string. ```yaml -Type: System.String +Type: System.Security.SecureString Parameter Sets: (All) Aliases: