diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index 9f3ce8eafcc..45b129c820a 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -12,6 +12,7 @@ To release a new version, please select a new version number (usually plus 1 to Pending +++++++ * [BREAKING CHANGE] Since the service no longer supports updating source resource id for role binding, so remove --source-resource-id of `aks trustedaccess rolebinding update` command +* change rolebinding create command parameter roles to comma-seperated 0.5.93 ++++++ diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py index 39c923358ac..3f1f8ba3262 100644 --- a/src/aks-preview/azext_aks_preview/_help.py +++ b/src/aks-preview/azext_aks_preview/_help.py @@ -1837,7 +1837,7 @@ examples: - name: Create a new trusted access role binding - text: az aks trustedaccess rolebinding create -g myResourceGroup --cluster-name myCluster -n bindingName -s /subscriptions/0000/resourceGroups/myResourceGroup/providers/Microsoft.Demo/samples --roles Microsoft.Demo/samples/reader Microsoft.Demo/samples/writer + text: az aks trustedaccess rolebinding create -g myResourceGroup --cluster-name myCluster -n bindingName -s /subscriptions/0000/resourceGroups/myResourceGroup/providers/Microsoft.Demo/samples --roles Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer """ helps['aks trustedaccess rolebinding update'] = """ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index d834db88fb1..f72a259bc5b 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -703,11 +703,11 @@ def load_arguments(self, _): '--name', '-n'], required=True, help='The role binding name.') with self.argument_context('aks trustedaccess rolebinding create') as c: - c.argument('roles', nargs='*', help='space-separated roles: Microsoft.Demo/samples/reader Microsoft.Demo/samples/writer ...') + c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...') c.argument('source_resource_id', options_list=['--source-resource-id', '-s'], help='The source resource id of the binding') with self.argument_context('aks trustedaccess rolebinding update') as c: - c.argument('roles', nargs='*', help='space-separated roles: Microsoft.Demo/samples/reader Microsoft.Demo/samples/writer ...') + c.argument('roles', help='comma-separated roles: Microsoft.Demo/samples/reader,Microsoft.Demo/samples/writer,...') def _get_default_install_location(exe_name): diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py index 16e601a906a..da4a0c58d42 100644 --- a/src/aks-preview/azext_aks_preview/custom.py +++ b/src/aks-preview/azext_aks_preview/custom.py @@ -2225,7 +2225,8 @@ def aks_trustedaccess_role_binding_create(cmd, client, resource_group_name, clus resource_type=CUSTOM_MGMT_AKS_PREVIEW, operation_group="trusted_access_role_bindings", ) - roleBinding = TrustedAccessRoleBinding(source_resource_id=source_resource_id, roles=roles) + roleList = roles.split(',') + roleBinding = TrustedAccessRoleBinding(source_resource_id=source_resource_id, roles=roleList) return client.create_or_update(resource_group_name, cluster_name, role_binding_name, roleBinding)