Skip to content

Commit

Permalink
README consolidation and link fixes (Azure#4890)
Browse files Browse the repository at this point in the history
* Add Samples section. Remove en-us from links.

* Remove en-us.

* Fix samples links in storage.

* Move samples to correct location.

* Fix broken links in README. Correct formatting.

* remove [package] from README because none of the others have it.

* Add syntax highlighting alias java to snippets.

* Undo * in appconfig

* Update shared key credential steps.

* Updating README with comments.
  • Loading branch information
conniey authored and pull[bot] committed Aug 8, 2019
1 parent 6107528 commit d6e67b6
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 175 deletions.
13 changes: 8 additions & 5 deletions sdk/appconfiguration/azure-data-appconfiguration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Modern programs, especially programs running in a cloud, generally have many com

Use the client library for App Configuration to create and manage application configuration settings.

[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_documentation] | [Product documentation][azconfig_docs]
[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_documentation]
| [Product documentation][azconfig_docs] | [Samples][samples]

## Getting started

Expand Down Expand Up @@ -172,7 +173,7 @@ When you interact with App Configuration using this Java client library, errors

## Next steps

[Quickstart: Create a Java Spring app with App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-java-spring-app)
[Quickstart: Create a Java Spring app with App Configuration][spring_quickstart]

## Contributing

Expand All @@ -186,11 +187,13 @@ If you would like to become an active contributor to this project please follow

<!-- LINKS -->
[api_documentation]: https://aka.ms/java-docs
[app_config_store]: https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store
[azconfig_docs]: https://docs.microsoft.com/en-us/azure/azure-app-configuration/
[app_config_store]: https://docs.microsoft.com/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store
[azconfig_docs]: https://docs.microsoft.com/azure/azure-app-configuration
[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_subscription]: https://azure.microsoft.com/en-us/free/
[azure_subscription]: https://azure.microsoft.com/free
[maven]: https://maven.apache.org/
[package]: https://search.maven.org/artifact/com.azure/azure-data-appconfiguration
[rest_api]: https://github.com/Azure/AppConfiguration#rest-api-reference
[samples]: src/samples/java/com/azure/data/appconfiguration
[source_code]: src
[spring_quickstart]: https://docs.microsoft.com/azure/azure-app-configuration/quickstart-java-spring-app
13 changes: 7 additions & 6 deletions sdk/keyvault/azure-keyvault-keys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ System.out.printf("Deleted Key's deletion date %s", deletedKey.deletedDate().toS
### List Keys
List the keys in the key vault by calling `listKeys`.
```Java
```java
// List operations don't return the keys with key material information. So, for each returned key we call getKey to get the key with its key material information.
for (KeyBase key : keyClient.listKeys()) {
Key keyWithMaterial = keyClient.getKey(key).value();
Expand All @@ -203,7 +203,7 @@ for (KeyBase key : keyClient.listKeys()) {
### Encrypt
Encrypt plain text by calling `encrypt`.
```
```java
CryptographyClient cryptoClient = new CryptographyClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.keyIdentifier("<Your-Key-Id-From-Keyvault")
Expand All @@ -220,7 +220,8 @@ System.out.printf("Returned cipherText size is %d bytes with algorithm %s \n", e
### Decrypt
Decrypt encrypted content by calling `decrypt`.
```
```java
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
EncryptResult encryptResult = cryptoClient.encrypt(EncryptionAlgorithm.RSA_OAEP, plainText);
Expand Down Expand Up @@ -293,7 +294,7 @@ keyAsyncClient.getKey("keyName").subscribe(keyResponse -> {
### Delete a Key Asynchronously
Delete an existing Key by calling `deleteKey`.
```Java
```java
keyAsyncClient.deleteKey("keyName").subscribe(deletedKeyResponse ->
System.out.printf("Deleted Key's deletion time %s \n", deletedKeyResponse.value().deletedDate().toString()));
```
Expand All @@ -311,7 +312,7 @@ keyAsyncClient.listKeys()
### Encrypt Asynchronously
Encrypt plain text by calling `encrypt`.
```
```java
CryptographyAsyncClient cryptoAsyncClient = new CryptographyClientBuilder()
.credential(new DefaultAzureCredentialBuilder().build())
.keyIdentifier("<Your-Key-Id-From-Keyvault>")
Expand All @@ -330,7 +331,7 @@ cryptoAsyncClient.encrypt(EncryptionAlgorithm.RSA_OAEP, plainText)
### Decrypt Asynchronously
Decrypt encrypted content by calling `decrypt`.
```
```java
byte[] plainText = new byte[100];
new Random(0x1234567L).nextBytes(plainText);
Expand Down
45 changes: 25 additions & 20 deletions sdk/storage/azure-storage-blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ storage is optimized for storing massive amounts of unstructured data.
Unstructured data is data that does not adhere to a particular data model or
definition, such as text or binary data.

[Source code][source] | [Package (Maven)][package] | [API reference documentation][docs] | [REST API documentation][rest_docs] | [Product documentation][product_docs]
[Source code][source] | [API reference documentation][docs] | [REST API documentation][rest_docs] | [Product documentation][product_docs] | [Samples][samples]

## Getting started

Expand Down Expand Up @@ -238,12 +238,12 @@ doesn't exist in your Storage Account, a `404` error is returned, indicating `No

Get started with our [Blob samples][samples]:

1. [Basic Examples](src/samples/java/BasicExample.java): Create storage, container, blob clients, Upload, download, and list blobs.
1. [File Transfer Examples](src/samples/java/FileTransferExample.java): Upload and download a large file through blobs.
1. [Storage Error Examples](src/samples/java/StorageErrorHandlingExample.java): Handle the exceptions from storage blob service side.
1. [List Container Examples](src/samples/java/ListContainersExample.java): Create, list and delete containers.
1. [Set metadata and HTTPHeaders Examples](src/samples/java/SetMetadataAndHTTPHeadersExample.java): Set metadata for container and blob, and set HTTPHeaders for blob.
1. [Azure Identity Examples](src/samples/java/AzureIdentityExample.java): Use DefaultAzureCredential to do the authentication.
1. [Basic Examples][samples_basic]: Create storage, container, blob clients, Upload, download, and list blobs.
1. [File Transfer Examples][samples_file_transfer]: Upload and download a large file through blobs.
1. [Storage Error Examples][samples_storage_error]: Handle the exceptions from storage blob service side.
1. [List Container Examples][samples_list_containers]: Create, list and delete containers.
1. [Set metadata and HTTPHeaders Examples][samples_metadata]: Set metadata for container and blob, and set HTTPHeaders for blob.
1. [Azure Identity Examples][samples_identity]: Use DefaultAzureCredential to do the authentication.

## Contributing

Expand All @@ -256,24 +256,29 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fstorage%2FAzure.Storage.Blobs%2FREADME.png)

<!-- LINKS -->
[source]: https://github.com/Azure/azure-sdk-for-java/tree/master/storage/client/blob/src
[package]: https://mvnrepository.com/artifact/com.azure/azure-storage-blob
[source]: src
[docs]: http://azure.github.io/azure-sdk-for-java/
[rest_docs]: https://docs.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api
[product_docs]: https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-overview
[sas_token]: https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1
[jdk]: https://docs.microsoft.com/en-us/java/azure/java-supported-jdk-runtime?view=azure-java-stable
[rest_docs]: https://docs.microsoft.com/rest/api/storageservices/blob-service-rest-api
[product_docs]: https://docs.microsoft.com/azure/storage/blobs/storage-blobs-overview
[sas_token]: https://docs.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1
[jdk]: https://docs.microsoft.com/java/azure/java-supported-jdk-runtime?view=azure-java-stable
[maven]: https://maven.apache.org/
[azure_subscription]: https://azure.microsoft.com/en-us/free/
[storage_account]: https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal
[storage_account_create_ps]: https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell
[storage_account_create_cli]: https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli
[storage_account_create_portal]: https://docs.microsoft.com/en-us/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal
[azure_subscription]: https://azure.microsoft.com/free/
[storage_account]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal
[storage_account_create_ps]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell
[storage_account_create_cli]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli
[storage_account_create_portal]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal
[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity/README.md
[error_codes]: https://docs.microsoft.com/en-us/rest/api/storageservices/blob-service-error-codes
[samples]: ./src/samples/
[error_codes]: https://docs.microsoft.com/rest/api/storageservices/blob-service-error-codes
[samples]: src/samples
[samples_basic]: src/samples/java/com/azure/storage/blob/BasicExample.java
[samples_file_transfer]: src/samples/java/com/azure/storage/blob/FileTransferExample.java
[samples_storage_error]: src/samples/java/com/azure/storage/blob/StorageErrorHandlingExample.java
[samples_list_containers]: src/samples/java/com/azure/storage/blob/ListContainersExample.java
[samples_metadata]: src/samples/java/com/azure/storage/blob/SetMetadataAndHTTPHeadersExample.java
[samples_identity]: src/samples/java/com/azure/storage/blob/AzureIdentityExample.java
[cla]: https://cla.microsoft.com
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
Expand Down
Loading

0 comments on commit d6e67b6

Please sign in to comment.