Download as pdf or txt
Download as pdf or txt
You are on page 1of 30

Module 03: Develop

solutions that use Blob


storage

© Copyright Microsoft Corporation. All rights reserved.


Explore Azure Blob storage

Module Manage the Azure Blob storage lifecycle


Agenda

Work with Azure Blob storage

© Copyright Microsoft Corporation. All rights reserved.


Lesson 1: Explore Azure Blob storage

© Copyright Microsoft Corporation. All rights reserved.


Introduction

After completing this module, you'll be able to:


• Identify the different types of storage accounts and the resource hierarchy for blob storage.
• Explain how data is securely stored and protected through redundancy.
• Create a block blob storage account by using the Azure Cloud Shell.

© Copyright Microsoft Corporation. All rights reserved.


Explore Azure Blob storage (1 / 2)
Disks
Persistent disks for
Azure IaaS VMs

Premium storage
disk options
Explore Azure Blob storage (2 / 2)

Performance level Storage account type Supported storage services

Standard Standard general-purpose v2 Blob, Queue, and Table storage, Azure Files

Premium Premium block blobs Blob storage

Premium Premium page blobs Page blobs only

© Copyright Microsoft Corporation. All rights reserved.


Discover Azure Blob storage resource types

Storage account Container Blob

Header.jpg

Images

Ad1.png
Media

Videos Intro.mp4
Explore Azure Storage security features

Azure Storage provides a comprehensive set of Azure Storage encryption for data at rest
security capabilities: • Azure Storage automatically encrypts your data
• Azure Active Directory (Azure AD) and Role-Based • Azure Storage encryption is enabled for all new and
Access Control (RBAC) are supported for Azure existing storage accounts and cannot be disabled.
Storage
• Storage accounts are encrypted regardless of their
• Data can be secured in transit between an application performance tier (standard or premium) or
and Azure deployment model
• Delegated access to the data objects in Azure Storage • Encryption does not affect Azure Storage
can be granted using a shared access signature performance.

© Copyright Microsoft Corporation. All rights reserved.


Evaluate Azure Storage redundancy options

Redundancy in the primary region Redundancy in a secondary region


• Azure Storage offers two options for how • Azure Storage offers two options for
your data is replicated in the primary copying your data to a secondary region:
region. ‒ Geo-redundant storage (GRS)
‒ Locally redundant storage (LRS) ‒ Geo-zone-redundant storage (GZRS)
‒ Zone-redundant storage (ZRS)

© Copyright Microsoft Corporation. All rights reserved.


Exercise: Create a block blob storage account

Task1 : Create account in the Task 2: Create account by Task 3: Clean up resources
Azure portal using Azure Cloud Shell

© Copyright Microsoft Corporation. All rights reserved.


Summary and knowledge check

© Copyright Microsoft Corporation. All rights reserved.


Lesson 2: Manage the Azure Blob storage
lifecycle

© Copyright Microsoft Corporation. All rights reserved.


Introduction

After completing this module, you'll be able to:


• Describe how each of the access tiers are optimized.
• Create and implement a lifecycle policy.
• Rehydrate blob data stored in an archive tier.

© Copyright Microsoft Corporation. All rights reserved.


Explore the Azure Blob storage lifecycle (1 / 2)

© Copyright Microsoft Corporation. All rights reserved.


Explore the Azure Blob storage lifecycle (2 / 3)

The lifecycle management policy lets you:


• Transition blobs to a cooler storage tier (hot to cool, hot to archive, or cool to archive) to optimize for
performance and cost
• Delete blobs at the end of their lifecycles
• Define rules to be run once per day at the storage account level
• Apply rules to containers or a subset of blobs (using prefixes as filters)

© Copyright Microsoft Corporation. All rights reserved.


Explore the Azure Blob storage lifecycle (3 / 3)

© Copyright Microsoft Corporation. All rights reserved.


Discover Blob storage lifecycle policies (1 / 2)

• A policy is a collection of rules Rules


• Each rule within the policy has • Each rule definition includes a filter set and
several parameters an action set.
• The filter set limits rule actions to a certain
• name
set of objects within a container or objects
• enabled names.
• type • The action set applies the tier or delete
• definition actions to the filtered set of objects.

© Copyright Microsoft Corporation. All rights reserved.


Discover Blob storage lifecycle policies (2 / 2)
Policy example
{ Parameter name Parameter type Required
"rules": [
{ name String True
"name": "rule1",
"enabled": true, enabled Boolean False
"type": "Lifecycle", type An enum value True
"definition": {...}
},
An object that
{ definition defines the lifecycle True
"name": "rule2", rule
"type": "Lifecycle",
"definition": {...}
}
]
}

© Copyright Microsoft Corporation. All rights reserved.


Implement Blob storage lifecycle policies

• Azure portal az storage account management-policy create \


--account-name <storage-account> \
• Azure portal List view --policy @policy.json \
--resource-group <resource-group>
• Azure portal Code view
• Command line
• PowerShell
• Azure CLI
• REST APIs

© Copyright Microsoft Corporation. All rights reserved.


Rehydrate blob data from the archive tier

Two options for rehydrating a blob that Rehydration priority


is stored in the archive tier: • Standard priority
• Copy an archived blob to an online tier • High priority
• Change a blob's access tier to an online tier

© Copyright Microsoft Corporation. All rights reserved.


Summary and knowledge check

© Copyright Microsoft Corporation. All rights reserved.


Lesson 3: Work with Azure Blob storage

© Copyright Microsoft Corporation. All rights reserved.


Introduction

After completing this module, you'll be able to:


• Create an application to create and manipulate data by using the Azure Storage client library for
Blob storage.
• Manage container properties and metadata by using .NET and REST.

© Copyright Microsoft Corporation. All rights reserved.


Explore Azure Blob storage client library

Class Description
BlobClient The BlobClient allows you to manipulate Azure Storage blobs.

BlobClientOptions Provides the client configuration options for connecting to Azure Blob Storage.

BlobContainerClient The BlobContainerClient allows you to manipulate Azure Storage containers and their
blobs.

BlobServiceClient The BlobServiceClient allows you to manipulate Azure Storage service resources and blob
containers. The storage account provides the top-level namespace for the Blob service.

BlobUriBuilder The BlobUriBuilder class provides a convenient way to modify the contents of a Uri
instance to point to different Azure Storage resources like an account, container, or blob.

© Copyright Microsoft Corporation. All rights reserved.


Exercise: Create Blob storage resources by using the .NET
client library

Task 1: Setting up Task 2: Prepare the .NET Task 3 : Build the full app
project • Create a container
• Upload blobs to a container
• List the blobs in a container
• Download blobs
• Delete a container

Task 4: Run the code Task 5: Clean up other


resources

© Copyright Microsoft Corporation. All rights reserved.


Manage container properties and metadata by using .NET

• Blob containers support system properties and user-defined metadata, in addition to the
data they contain.
• Retrieve container properties
• GetProperties
• GetPropertiesAsync

• Set metadata
• SetMetadata
• SetMetadataAsync

© Copyright Microsoft Corporation. All rights reserved.


Set and retrieve properties and metadata for blob resources
by using REST

• Metadata header format: x-ms-meta-name:string-value

• URI syntax to retrieve properties and metadata from containers and blobs

• URI syntax to set properties and metadata from containers and blobs

© Copyright Microsoft Corporation. All rights reserved.


Summary and knowledge check

© Copyright Microsoft Corporation. All rights reserved.


Lab 03: Retrieve Azure
Storage resources and
Lab 04: Constructing
metadata by using the Azure
a polyglot data
Storage SDK for .NET
solution
45
http://aka.ms/az204labs minutes

http://aka.ms/az204labs

© Copyright Microsoft Corporation. All rights reserved.


© Copyright Microsoft Corporation. All rights reserved.

You might also like