You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/azure-cli/azure/cli/command_modules/acr/_help.py
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,9 @@
37
37
- name: Queue a local context as a Linux build on arm/v7 architecture, tag it, and push it to the registry.
38
38
text: >
39
39
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry . --platform linux/arm/v7
40
+
- name: Queue a local context as a Linux build, tag it, and push it to the ABAC-based Repository Permission enabled registry and use the caller's Entra identity to authenticate with the source registry.
41
+
text: >
42
+
az acr build -t sample/hello-world:{{.Run.ID}} -r myregistry . --source-registry-auth-id [caller]
40
43
"""
41
44
42
45
helps['acr check-health'] ="""
@@ -806,6 +809,9 @@
806
809
- name: Queue a remote OCI Artifact context and runs the task.
807
810
text: >
808
811
az acr run -r myregistry oci://myregistry.azurecr.io/myartifact:mytag -f hello-world.yaml
812
+
- name: Queue a run to execute a container command in an ABAC-based Repository Permission enabled registry and use the caller's Entra identity to authenticate with the source registry.
813
+
text: >
814
+
az acr run -r myregistry --cmd '$Registry/myimage' /dev/null --source-registry-auth-id [caller]
- name: Create a task without the source location in an ABAC-based Repository Permission registry and specify a system-assigned MI used for auth with the source registry.
- name: Create a task without the source location in an ABAC-based Repository Permission registry and specify a user-assigned MI used for auth with the source registry.
c.argument('set_secret', help="Secret value in '--set name[=value]' format. Multiples supported by passing --set multiple times.", action='append', validator=validate_set_secret)
307
307
c.argument('agent_pool_name', options_list=['--agent-pool'], help='The name of the agent pool.', is_preview=True)
308
308
c.argument('log_template', options_list=['--log-template'], help="The repository and tag template for run log artifact using the format: 'log/repo:tag' (e.g., 'acr/logs:{{.Run.ID}}'). Only applicable to CMK enabled registry.", is_preview=True)
309
+
c.argument('source_registry_auth_id', arg_type=get_enum_type(["[caller]", "none"]), help="Assigns the identity used for source registry login. Use '[caller]' for caller identity.")
c.argument('secret_arg', options_list=['--secret-build-arg'], help="Secret build argument in '--secret-build-arg name[=value]' format. Multiples are supported by passing '--secret-build-arg name[=value]' multiple times. This parameter value is not surfaced to the ACR team and is more suitable for sensitive information.", action='append', validator=validate_secret_arg)
326
327
c.argument('agent_pool_name', options_list=['--agent-pool'], help='The name of the agent pool.', is_preview=True)
327
328
c.argument('log_template', options_list=['--log-template'], help="The repository and tag template for run log artifact using the format: 'log/repo:tag' (e.g., 'acr/logs:{{.Run.ID}}'). Only applicable to CMK enabled registry.", is_preview=True)
329
+
c.argument('source_registry_auth_id', arg_type=get_enum_type(["[caller]", "none"]), help="Assigns the identity used for source registry login. Use '[caller]' for caller identity.")
c.argument('source_registry_auth_id', help="Assigns the managed identity used for source registry login. Use '[system]' to refer to the system-assigned identity or a client ID to refer to a user-assigned managed identity.")
380
+
381
+
withself.argument_context('acr task update') asc:
382
+
c.argument('source_registry_auth_id', help="Assigns the managed identity used for source registry login. Use '[system]' to refer to the system-assigned identity or a client ID to refer to a user-assigned managed identity.")
c.argument('identities', options_list=['--identities'], nargs='*', help="Assigns managed identities to the task. Use '[system]' to refer to the system-assigned identity or a resource ID to refer to a user-assigned identity.")
raiseCLIError('Error: Conflicting Authentication Parameters for Task Access to Source Registry. Task authentication mode for source registry access is set to "None," but an identity was provided for authentication. Remove the identity or update the authentication mode to resolve this conflict.')
307
+
298
308
source_registry_credentials=None
309
+
# Need to differentiate between the string "None" and the None value for auth_mode
logger.warning("The --auth-mode flag is deprecated for specifying access to an ABAC-enabled source registry. Please use --source-registry-auth-id to specify an Entra identity for use in accessing an ABAC-enabled source registry." )
0 commit comments