Work with Azure Blob storage Flashcards

1
Q

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

A

c) Version 12.x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

a) To manipulate Azure Storage blobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which class in the Azure Storage client library allows manipulation of containers and their blobs?

a) BlobClient
b) BlobContainerClient
c) BlobServiceClient
d) BlobUriBuilder

A

b) BlobContainerClient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

c) It manipulates storage service resources and blob containers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

a) Azure.Storage.Blobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

c) It provides configuration options for connecting to Azure Blob Storage

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which class in the Azure Storage client library provides a convenient way to modify URI contents?

a) BlobClient
b) BlobContainerClient
c) BlobServiceClient
d) BlobUriBuilder

A

d) BlobUriBuilder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

c) It provides classes for blob type-specific operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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

A

b) Azure.Storage.Blobs.Models

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

c) It manipulates Azure Storage containers and their blobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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

A

b) Creating a client object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

c) Authentication to Azure via a Microsoft Entra security principal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

c) An Azure RBAC role granting blob data access

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

b) Configuring account properties at the storage account level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

c) A URI endpoint and DefaultAzureCredential

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Which client object allows interaction with a specific Azure container resource?

a) BlobClient
b) BlobServiceClient
c) BlobContainerClient
d) ContainerEndpointClient

A

c) BlobContainerClient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

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

a) By appending the container name to the URI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is an essential input for creating a BlobContainerClient directly?

a) Container metadata
b) BlobClientOptions
c) Blob access level
d) Azure RBAC token

A

b) BlobClientOptions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

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

A

c) Interact with specific blob resources

20
Q

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

a) BlobContainerClient or BlobServiceClient

21
Q

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

A

b) When working with a single, specific container

22
Q

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

A

c) The BlobClient object for a specified blob

23
Q

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

A

d) Create, upload, list, download blobs, and delete containers

24
Q

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

A

c) az login

25
Q

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

A

b) Having an Azure account with an active subscription

26
Q

When creating a storage account using Azure CLI, which parameter specifies the account’s location?

a) –location
b) –region
c) –locale
d) –zone

A

a) –location

27
Q

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

A

c) Use managed identities for authorization when possible

28
Q

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

A

b) dotnet add package Azure.Storage.Blobs

29
Q

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

A

c) To interact with a storage account and manage containers

30
Q

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();

A

b) await blobClient.UploadAsync(uploadFileStream)

31
Q

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()

A

c) GetBlobsAsync()

32
Q

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

A

d) az group delete –name

33
Q

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

A

b) To store name-value pairs for custom purposes

34
Q

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

A

b) GetPropertiesAsync

35
Q

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

a) They must follow C# identifier conventions and valid HTTP header names

36
Q

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

A

c) The values are concatenated and returned as a single value

37
Q

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

A

b) SetMetadataAsync

38
Q

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

A

b) They are Base64-encoded or URL-encoded

39
Q

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

A

b) x-ms-meta-name:string-value

40
Q

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

A

c) Metadata names must adhere to C# identifier naming rules

41
Q

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

A

b) 8 KB

42
Q

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

A

c) By overwriting all existing metadata with a PUT request

43
Q

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

A

d) A status code 400 (Bad Request) is returned

44
Q

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

a) GET/HEAD https://myaccount.blob.core.windows.net/mycontainer?restype=container

45
Q

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

A

b) ETag

46
Q

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

A

b) Metadata headers start with x-ms-meta-; property headers use standard HTTP names