Developers like to learn by looking at code, and so the Azure SDK comes with a myriad of code samples in the form of short code snippets, sample applications, and how-to guides. This document describes where to find all these resources.
The Azure SDK repository is organized in the following folder structure, with the main sample locations highlighted using bold font.
/samples
(this folder)
README.md
(this file)
/sdk
(folder containing sources, samples, test for all SDK packages)
/<service>
(e.g. storage)
/<package>
(e.g. azure-storage-blob)
README.md
(package READMEs contain hello world samples)
/src/samples
(package-specific samples)
/src/main/java
/src/test
Each package folder contains a package-specific README.md
file. Most of these README
files contain Hello World
code samples illustrating basic usage of the the APIs contained in the package. For example, you can find Hello World
samples for the azure-storage-blobs
package here.
Each package folder contains a subfolder called /src/samples
with additional code samples. These samples can be either short programs contained in *.java
files, or more complete how-to guides (code samples and some commentary) contained in *.md
files. You can find shortcuts to main how-to guides in the How-To Guides List section below.
Sometimes we want to illustrate how several APIs or even packages work together in a context of a more complete program. For these cases, we created sample applications that you can look at, download, compile, and execute. These application samples are located on https://docs.microsoft.com/samples/.
This section lists how-to guides for the most commonly used APIs and most common scenarios, i.e. this section does not attempt to be a complete directory of guides contained in this repository.
- How to create Netty Http Client
- How to create OK Http Client
- How to use Azure Core Tracing Opentelemetry
- How to configure, access, and analyze logging information (TODO)
- How to get, set,update and delete Keys Synchronously
- How to get, set,update and delete Keys Asynchronously
- How to list, recover and purge deleted Keys Synchronously
- How to list, recover and purge deleted Keys Asynchronously
- How to backup and restore Keys Synchronously
- How to backup and restore Keys Asynchronously
- How to get, set,update and delete Secrets Synchronously
- How to get, set,update and delete Secrets Asynchronously
- How to Managing Deleted Secrets Synchronously
- How to Managing Deleted Secrets Asynchronously
- How to backup and restore Secrets Synchronously
- How to backup and restore Secrets Asynchronously
- How to Upload, download and list blob
- How to Upload, download large file
- How to Handle the exceptions
- How to Create, list and delete containers