From f27ee80fd3bcc67a3e169951e809f2ff480eb029 Mon Sep 17 00:00:00 2001 From: SaurabhSharma-MSFT <38112130+SaurabhSharma-MSFT@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:19:18 -0800 Subject: [PATCH 1/2] {webapp} Fix description of --identities parameter --- .../azure/cli/command_modules/appservice/_params.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 735f09ec1f1..88dbd5a9f9e 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -287,9 +287,9 @@ def load_arguments(self, _): c.argument('scope', help="The scope the managed identity has access to") c.argument('role', help="Role name or id the managed identity will be assigned") with self.argument_context(scope + ' identity assign') as c: - c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context(scope + ' identity remove') as c: - c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context(scope + ' deployment source config-zip') as c: c.argument('src', help='a zip file path for deployment') @@ -1100,9 +1100,9 @@ def load_arguments(self, _): c.argument('scope', help="The scope the managed identity has access to") c.argument('role', help="Role name or id the managed identity will be assigned") with self.argument_context('staticwebapp identity assign') as c: - c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context('staticwebapp identity remove') as c: - c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context('staticwebapp create') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx)) c.argument('tags', arg_type=tags_type) From a3354395704331e960b620a9c4c390043bf0617a Mon Sep 17 00:00:00 2001 From: SaurabhSharma-MSFT <38112130+SaurabhSharma-MSFT@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:26:24 -0800 Subject: [PATCH 2/2] Rephrased the parameter description --- .../azure/cli/command_modules/appservice/_params.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/appservice/_params.py b/src/azure-cli/azure/cli/command_modules/appservice/_params.py index 88dbd5a9f9e..c4854461e4d 100644 --- a/src/azure-cli/azure/cli/command_modules/appservice/_params.py +++ b/src/azure-cli/azure/cli/command_modules/appservice/_params.py @@ -287,9 +287,9 @@ def load_arguments(self, _): c.argument('scope', help="The scope the managed identity has access to") c.argument('role', help="Role name or id the managed identity will be assigned") with self.argument_context(scope + ' identity assign') as c: - c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context(scope + ' identity remove') as c: - c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context(scope + ' deployment source config-zip') as c: c.argument('src', help='a zip file path for deployment') @@ -1100,9 +1100,9 @@ def load_arguments(self, _): c.argument('scope', help="The scope the managed identity has access to") c.argument('role', help="Role name or id the managed identity will be assigned") with self.argument_context('staticwebapp identity assign') as c: - c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('assign_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context('staticwebapp identity remove') as c: - c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids in the form: '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) + c.argument('remove_identities', options_list=['--identities'], nargs='*', help="Space-separated identities to assign. For User Assigned Identities, pass ids as full qualified resource ids like '/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName'. Use '{0}' to refer to the system assigned identity. Default: '{0}'".format(MSI_LOCAL_ID)) with self.argument_context('staticwebapp create') as c: c.argument('location', arg_type=get_location_type(self.cli_ctx)) c.argument('tags', arg_type=tags_type)