Work with Azure Blob storage Flashcards
What is the recommended version of the Azure Storage client library for new applications?
a) Version 10.x
b) Version 11.x
c) Version 12.x
d) Version 13.x
c) Version 12.x
What is the main purpose of the BlobClient
class in the Azure Storage client library?
a) To manipulate Azure Storage blobs
b) To configure storage account settings
c) To create a new storage account
d) To manage all storage services
a) To manipulate Azure Storage blobs
Which class in the Azure Storage client library allows manipulation of containers and their blobs?
a) BlobClient
b) BlobContainerClient
c) BlobServiceClient
d) BlobUriBuilder
b) BlobContainerClient
What is the role of the BlobServiceClient
class in Azure Blob storage?
a) It manages only the blob containers
b) It handles account configuration settings
c) It manipulates storage service resources and blob containers
d) It optimizes URI requests
c) It manipulates storage service resources and blob containers
Which Azure Storage client library package is used to operate on containers and blobs?
a) Azure.Storage.Blobs
b) Azure.Storage.Common
c) Azure.Storage.Files
d) Azure.Storage.Tables
a) Azure.Storage.Blobs
What is the purpose of the BlobClientOptions
class?
a) It provides configuration options for blob containers
b) It optimizes URI generation for blob access
c) It provides configuration options for connecting to Azure Blob Storage
d) It manages file storage permissions
c) It provides configuration options for connecting to Azure Blob Storage
Which class in the Azure Storage client library provides a convenient way to modify URI contents?
a) BlobClient
b) BlobContainerClient
c) BlobServiceClient
d) BlobUriBuilder
d) BlobUriBuilder
What does the Azure.Storage.Blobs.Specialized
package offer in the Azure Blob Storage client library?
a) It contains primary classes for blob operations
b) It includes utility classes and enumeration types
c) It provides classes for blob type-specific operations
d) It offers classes for managing files only
c) It provides classes for blob type-specific operations
In Azure Storage client library, which package contains utility classes and enumeration types?
a) Azure.Storage.Blobs.Specialized
b) Azure.Storage.Blobs.Models
c) Azure.Storage.Blobs
d) Azure.Storage.Models
b) Azure.Storage.Blobs.Models
What is the BlobContainerClient
class used for in Azure Blob Storage?
a) It configures storage account settings
b) It modifies URIs for storage resources
c) It manipulates Azure Storage containers and their blobs
d) It provides blob storage metadata only
c) It manipulates Azure Storage containers and their blobs
What is the first step when working with any Azure resource using the SDK?
a) Installing specific packages for the resource
b) Creating a client object
c) Setting up a local storage account
d) Configuring Microsoft Entra security
b) Creating a client object
What does DefaultAzureCredential handle in the creation of a client object?
a) Storage and encryption of data
b) Generation and refresh of authorization tokens
c) Authentication to Azure via a Microsoft Entra security principal
d) Allocation of blob storage containers
c) Authentication to Azure via a Microsoft Entra security principal
What access is required for a Microsoft Entra security principal to use a client object?
a) A subscription-based access level
b) A specific token-based access level
c) An Azure RBAC role granting blob data access
d) A predefined Microsoft Entra admin role
c) An Azure RBAC role granting blob data access
What is a BlobServiceClient object primarily used for?
a) Interacting with individual blob resources
b) Configuring account properties at the storage account level
c) Managing Azure credentials
d) Creating and managing custom tokens
b) Configuring account properties at the storage account level
What is required when creating a BlobServiceClient object?
a) A Microsoft Entra token
b) BlobClientOptions settings
c) A URI endpoint and DefaultAzureCredential
d) A specific storage key
c) A URI endpoint and DefaultAzureCredential
Which client object allows interaction with a specific Azure container resource?
a) BlobClient
b) BlobServiceClient
c) BlobContainerClient
d) ContainerEndpointClient
c) BlobContainerClient
How can a BlobContainerClient object be created without using BlobServiceClient?
a) By appending the container name to the URI
b) By using a local storage connection
c) By setting the storage account as public
d) By directly calling a Microsoft Entra security role
a) By appending the container name to the URI
What is an essential input for creating a BlobContainerClient directly?
a) Container metadata
b) BlobClientOptions
c) Blob access level
d) Azure RBAC token
b) BlobClientOptions
What does a BlobClient object allow you to do?
a) Manage access keys
b) Configure security roles
c) Interact with specific blob resources
d) Monitor storage capacity
c) Interact with specific blob resources
To create a BlobClient object for a specific blob, what other client object is typically used?
a) BlobContainerClient or BlobServiceClient
b) Only BlobServiceClient
c) Only BlobContainerClient
d) A custom-defined client
a) BlobContainerClient or BlobServiceClient
When would you choose to create a BlobContainerClient directly rather than through BlobServiceClient?
a) When working with multiple accounts
b) When working with a single, specific container
c) For performance optimization across regions
d) For simplified credential management
b) When working with a single, specific container
What will the method GetBlobClient return when called on a BlobContainerClient?
a) The container URI
b) The security principal credentials
c) The BlobClient object for a specified blob
d) The BlobServiceClient instance
c) The BlobClient object for a specified blob
In the .NET client library for Azure Blob storage, which of the following actions is possible through the Blob storage client library in a console app?
a) Create only a blob
b) Upload only a blob
c) Delete a blob but not a container
d) Create, upload, list, download blobs, and delete containers
d) Create, upload, list, download blobs, and delete containers
What Azure CLI command is used to sign in to an Azure account in the terminal?
a) az account sign-in
b) az sign-in
c) az login
d) az account login
c) az login
What is a prerequisite to creating Blob storage resources in Azure?
a) Installing Python
b) Having an Azure account with an active subscription
c) Installing Node.js
d) Using Microsoft Office
b) Having an Azure account with an active subscription
When creating a storage account using Azure CLI, which parameter specifies the account’s location?
a) –location
b) –region
c) –locale
d) –zone
a) –location
What is a key security recommendation for the connection string used to authorize access to Azure storage?
a) Save it in a public GitHub repository
b) Store it in the code for easy access
c) Use managed identities for authorization when possible
d) Only use account access keys in production
c) Use managed identities for authorization when possible
Which command is used to install the Azure Blob Storage client library in the .NET console app project?
a) dotnet install Azure.Blobs
b) dotnet add package Azure.Storage.Blobs
c) add Azure.Blobs
d) add package Azure.Storage.Blobs
b) dotnet add package Azure.Storage.Blobs
In the provided C# code snippet, what is the purpose of the BlobServiceClient class?
a) To delete an Azure resource group
b) To authenticate with a local SQL database
c) To interact with a storage account and manage containers
d) To upload files to Azure Functions
c) To interact with a storage account and manage containers
Which of the following code snippets in C# is used to upload a file to Blob storage?
a) await containerClient.DeleteAsync();
b) await blobClient.UploadAsync(uploadFileStream);
c) Console.ReadLine();
d) await blobServiceClient.UploadBlob();
b) await blobClient.UploadAsync(uploadFileStream)
When listing blobs in a container, which method is used in the provided code to retrieve blob names?
a) GetBlobContainerAsync()
b) ListBlobs()
c) GetBlobsAsync()
d) ListContainerBlobs()
c) GetBlobsAsync()
What Azure CLI command deletes all the resources created in a specific resource group?
a) az delete all –group
b) az delete group –name
c) az resource delete –group
d) az group delete –name
d) az group delete –name
What is the purpose of user-defined metadata in Azure Blob storage?
a) To control access to the blob
b) To store name-value pairs for custom purposes
c) To modify the blob’s behavior
d) To store system-generated properties
b) To store name-value pairs for custom purposes
Which method is used to retrieve a container’s properties in the Azure Blob storage .NET SDK?
a) GetMetadataAsync
b) GetPropertiesAsync
c) RetrieveContainerAsync
d) ReadBlobProperties
b) GetPropertiesAsync
What naming conventions must metadata names adhere to in Azure Blob storage?
a) They must follow C# identifier conventions and valid HTTP header names
b) They must contain only numeric characters
c) They must start with an uppercase letter
d) They can include any Unicode characters
a) They must follow C# identifier conventions and valid HTTP header names
What happens if two metadata headers with the same name are submitted for a resource in Azure Blob storage?
a) The first header is used, and the others are discarded
b) An error is thrown
c) The values are concatenated and returned as a single value
d) The resource is deleted
c) The values are concatenated and returned as a single value
What method is used to set metadata on a container in Azure Blob storage using the .NET SDK?
a) SetPropertiesAsync
b) SetMetadataAsync
c) SetContainerProperties
d) AddMetadata
b) SetMetadataAsync
In the Azure Blob storage .NET SDK, how are metadata values containing non-ASCII characters typically handled?
a) They are converted to lowercase
b) They are Base64-encoded or URL-encoded
c) They are discarded
d) They are converted to ASCII characters
b) They are Base64-encoded or URL-encoded
What is the format of a metadata header in Azure Blob Storage?
a) x-ms-header-name:value
b) x-ms-meta-name:string-value
c) header-meta-name=value
d) metadata:name=value
b) x-ms-meta-name:string-value
Which statement is true about metadata names in Azure Blob Storage?
a) Metadata names are case-sensitive when read
b) Metadata names can only contain numbers
c) Metadata names must adhere to C# identifier naming rules
d) Metadata names cannot exceed 16 KB in size
c) Metadata names must adhere to C# identifier naming rules
What is the maximum total size for all metadata name/value pairs on a blob or container?
a) 4 KB
b) 8 KB
c) 16 KB
d) 32 KB
b) 8 KB
How can metadata be updated on an Azure Blob or container?
a) Using a PATCH request
b) By partially updating the name-value pairs
c) By overwriting all existing metadata with a PUT request
d) Through GET operations
c) By overwriting all existing metadata with a PUT request
What happens when two metadata headers with the same name are submitted for a resource?
a) Both headers are accepted and concatenated
b) Only the first header is accepted
c) Only the second header is accepted
d) A status code 400 (Bad Request) is returned
d) A status code 400 (Bad Request) is returned
What is the URI syntax to retrieve metadata headers for a container?
a) GET/HEAD https://myaccount.blob.core.windows.net/mycontainer?restype=container
b) PUT https://myaccount.blob.core.windows.net/mycontainer?comp=metadata&restype=container
c) POST https://myaccount.blob.core.windows.net/mycontainer?restype=container
d) GET/HEAD https://myaccount.blob.core.windows.net/mycontainer/myblob?comp=metadata
a) GET/HEAD https://myaccount.blob.core.windows.net/mycontainer?restype=container
What are the standard HTTP headers supported on both containers and blobs?
a) Content-Type, Content-Length, Last-Modified
b) ETag, Last-Modified
c) Cache-Control, Origin
d) Content-MD5, Range
b) ETag, Last-Modified
What is the difference between metadata headers and property headers in Azure Blob Storage?
a) Metadata headers use standard HTTP names; property headers use custom names
b) Metadata headers start with x-ms-meta-; property headers use standard HTTP names
c) Property headers use x-ms-prop-; metadata headers use x-ms-meta-
d) There is no difference; both use the same naming conventions
b) Metadata headers start with x-ms-meta-; property headers use standard HTTP names