Giter Site home page Giter Site logo

storage-dotnet-blob-soft-delete's Introduction

services platforms author
storage
dotnet
michaelhauss

Azure Storage Blob Soft Delete

This project uploads, overwrites, snapshots, deletes, and restores a blob named “HelloWorld” when soft delete is turned on.

Features

This project framework provides the following features:

  • Blob soft delete

Getting Started

Prerequisites

  • .NET Framework

Running this sample

By default, this sample is configured to run against the storage emulator. You can also modify it to run against your Azure Storage account.

To run the sample using the storage emulator (default option):

  1. Start the Azure storage emulator (once only) by pressing the Start button or the Windows key and searching for it by typing "Azure storage emulator". Select it from the list of applications to start it.
  2. Set breakpoints and run the project using F10.

To run the sample using a storage account

  1. Create a storage account through the Azure Portal
  2. Open the app.config file and change the value of the "StorageConnectionString" key (currently "UseDevelopmentStorage=True;") to the connection string for your storage account. https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account for more information
  3. Set breakpoints and run the project using F10.

Currently the storage emulator does not support soft delete. You will need to run the sample using a storage account

The sample is configured to clean up resources after running. If you'd like to inspect the results, set breakpoints or comment

Demo

The application should produce output similar to the following:

Upload:
- HelloWorld (is soft deleted: False, is snapshot: False)

Overwrite:
- HelloWorld (is soft deleted: True, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: False)

Snapshot:
- HelloWorld (is soft deleted: True, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: False)

Delete (including snapshots):
- HelloWorld (is soft deleted: True, is snapshot: True)
- HelloWorld (is soft deleted: True, is snapshot: True)
- HelloWorld (is soft deleted: True, is snapshot: False)

Undelete:
- HelloWorld (is soft deleted: False, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: False)

Copy a snapshot over the base blob:
- HelloWorld (is soft deleted: False, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: True)
- HelloWorld (is soft deleted: True, is snapshot: True)
- HelloWorld (is soft deleted: False, is snapshot: False)

Resources

storage-dotnet-blob-soft-delete's People

Contributors

michaelhauss avatar microsoftopensource avatar msftgits avatar zzkaii avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.