Soru

Zorluk: OrtaManage Data Movement using AzCopy and Storage Explorer

You are configuring a script on an Azure virtual machine (VM) to automate the daily upload of log files to a blob container in an Azure storage account named stlogs. The VM is configured with a system-assigned managed identity that has been granted the Storage Blob Data Contributor role on the storage account. The script must run without any interactive prompts. Which command must be executed in the script to authenticate AzCopy before running the copy command?

  1. azcopy login --identityCevap
  2. B
    azcopy login
  3. C
    azcopy login --service-principal --tenant-id <tenant-id> --username <username>
  4. D
    Append a Shared Access Signature (SAS) token to the destination URL that is configured with a one-year expiration window.

Cevap

The command 'azcopy login --identity' must be executed.
The command 'azcopy login --identity' instructs AzCopy to authenticate using the virtual machine's system-assigned managed identity. This enables secure, non-interactive authentication suitable for automated scripts without exposing or managing credentials.

Adım Adım Çözüm

1
Identify the authentication requirements for the non-interactive script running on the Azure VM.
The script must authenticate without user prompt, utilizing the pre-configured system-assigned managed identity.
Managed identities allow Azure resources to authenticate to cloud services without embedding credentials in code.
2
Select the correct AzCopy login parameter that targets the managed identity endpoint.
The '--identity' parameter specifies that AzCopy should obtain an Access Token from the local managed identity endpoint.
Without this parameter, AzCopy defaults to interactive user login or requires service principal credentials.

Anahtar Kavram

AzCopy authentication using managed identities for automated, non-interactive workflows.
Bu soruyu puanla