Code Monkey home page Code Monkey logo

storage-blobs-java-quickstart's Introduction

How to run this project

Prerequisites

To complete this tutorial:

If you don't have an Azure subscription, create a free account before you begin.

Create a storage account using the Azure portal

First, create a new general-purpose storage account to use for this tutorial.

  • Go to the Azure portal and log in using your Azure account.
  • On the Hub menu, select New > Storage > Storage account - blob, file, table, queue.
  • Enter a name for your storage account. The name must be between 3 and 24 characters in length and may contain numbers and lowercase letters only. It must also be unique.
  • Set Deployment model to Resource manager.
  • Set Account kind to General purpose.
  • Set Performance to Standard.
  • Set Replication to Locally Redundant storage (LRS).
  • Set Storage service encryption to Disabled.
  • Set Secure transfer required to Disabled.
  • Select your subscription.
  • For resource group, create a new one and give it a unique name.
  • Select the Location to use for your storage account.
  • Check Pin to dashboard and click Create to create your storage account.

After your storage account is created, it is pinned to the dashboard. Click on it to open it. Under SETTINGS, click Access keys. Select a key and copy the CONNECTION STRING to the clipboard, then paste it into Notepad for later use.

Modify the connection string in the AzureApp.java file

Open this solution, and in the AzureApp.java file, change the value for connection string to the one retrieved from the portal.

At this point, you can run this application. It creates its own file to upload and download, and then cleans up after itself by deleting everything at the end.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

storage-blobs-java-quickstart's People

Contributors

georgewallace avatar mhopkins-msft avatar microsoftopensource avatar msftgits avatar roygara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

storage-blobs-java-quickstart's Issues

CloudStorageAccount does not work for AzueGov

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Storage accounts on GovCloud use a different DNS and CloudStorageAccount has hard coded data
private static final String DEFAULT_DNS = "core.windows.net";

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

Error while running the application

Please provide us with the following information:

This issue is for a: (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Changed the code to have my Azure blo account and key

Any log messages given by the failure

Azure Blob storage quick start sample
Creating container: asit
Error returned from the service. Http code: 500 and error code: SERVICE_INTERNAL_ERROR
The program has completed successfully.
Press the 'Enter' key while in the console to delete the sample files, example container, and exit the application.

Deleting the container
Service error. Http code: 500 and error code: SERVICE_INTERNAL_ERROR
Deleting the source, and downloaded files

Expected/desired behavior

The application should have executed successfully.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Windows 10

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

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.