Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/sdk/core/ @alzimmermsft @jianghaolu @srnagar @hemanttanwar
/sdk/cosmos/ @moderakh @christopheranderson @kushagraThapar
/sdk/eventhubs/ @conniey @srnagar @mssfang
/sdk/identity/ @jianghaolu @g2vinay
/sdk/identity/ @jianghaolu @g2vinay @hemanttanwar
/sdk/keyvault/ @g2vinay @samvaity
/sdk/servicebus/ @yvgopal @nemakam
/sdk/tracing/ @samvaity @alzimmermsft
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
<version>0.0.3-beta</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>azure-mgmt-containerregistry</artifactId>
<version>1.0.0-beta</version>
Expand Down Expand Up @@ -71,8 +71,6 @@
<artifactId>azure-arm-client-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
<!--Below version for test jar needs to be removed, this will be done as part of v1-runtime 1.6.7-->
<version>1.6.5</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,10 @@ public Run call(RunInner inner) {
public Observable<Run> getAsync(String resourceGroupName, String registryName, String runId) {
RunsInner client = this.inner();
return client.getAsync(resourceGroupName, registryName, runId)
.flatMap(new Func1<RunInner, Observable<Run>>() {
.map(new Func1<RunInner, Run>() {
@Override
public Observable<Run> call(RunInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((Run)wrapModel(inner));
}
public Run call(RunInner inner) {
return wrapModel(inner);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,10 @@ public Task call(TaskInner inner) {
public Observable<Task> getAsync(String resourceGroupName, String registryName, String taskName) {
TasksInner client = this.inner();
return client.getAsync(resourceGroupName, registryName, taskName)
.flatMap(new Func1<TaskInner, Observable<Task>>() {
.map(new Func1<TaskInner, Task>() {
@Override
public Observable<Task> call(TaskInner inner) {
if (inner == null) {
return Observable.empty();
} else {
return Observable.just((Task)wrapModel(inner));
}
public Task call(TaskInner inner) {
return wrapModel(inner);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
package com.azure.security.keyvault.keys;

import com.azure.core.credentials.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.policy.HttpLogDetailLevel;
import com.azure.core.http.rest.Response;
import com.azure.core.http.rest.VoidResponse;
import com.azure.core.util.Context;
Expand Down
2 changes: 1 addition & 1 deletion storage/client/blob/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ https://aka.ms/azure-sdk-preview1-java.

**Breaking changes: New API design**
- Operations are now scoped to a particular client:
- `StorageClient`: StorageURL's functionality was migrated to StorageClient. This client handles account-level operations. This includes managing service properties and listing the containers within an account.
- `BlobServiceClient`: StorageURL's functionality was migrated to BlobServiceClient. This client handles account-level operations. This includes managing service properties and listing the containers within an account.
- `ContainerClient`: ContainerURL's functionality was migrated to ContainerClient. The client handles operations for a particular container. This includes creating or deleting that container, as well as listing the blobs within that container.
- `BlobClient`: BlobURL's functionality was migrated to BlobClient, TransferManager download functionality was migrated to BlobClient and TransferManager upload functionality was migrated to BlockBlobClient. The client handles most operations, excluding upload, for an individual blob, including downloading data and working with blob properties.
There are subclients (BlockBlobClient, PageBlobClient, AppendBlobClient) available for their respective blob types on the service.
Expand Down
54 changes: 27 additions & 27 deletions storage/client/blob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Blob storage is designed for:

The following sections provide several code snippets covering some of the most common Azure Storage Blob tasks, including:

- [Create storage client](#create-storage-client)
- [Create container client](#create-container-client)
- [Create blob client](#create-blob-client)
- [Create BlobServiceClient](#create-blobserviceclient)
- [Create ContainerClient](#create-containerclient)
- [Create BlobClient](#create-blobclient)
- [Create a container](#create-a-container)
- [Upload a blob from InputStream](#uploading-a-blob-from-a-stream)
- [Upload a blob from File](#uploading-a-blob-from-file)
Expand All @@ -108,70 +108,70 @@ The following sections provide several code snippets covering some of the most c
- [Enumerating blobs](#enumerating-blobs)
- [Authenticate with Azure.Identity](#authenticate-with-azureidentity)

### Create storage client
### Create BlobServiceClient

Create a storage client using the [`sasToken`](#get-credentials) generated above.
Create a BlobServiceClient using the [`sasToken`](#get-credentials) generated above.
```java
StorageClient storageClient = StorageClient.builder()
BlobServiceClient blobServiceClient = new BlobServiceClientBuilder()
.endpoint("<your-storage-blob-url>")
.credential("<your-sasToken>")
.build();
.buildClient();
```

### Create container client
### Create ContainerClient

Create a container client if storage client exists.
Create a ContainerClient if a BlobServiceClient exists.
```java
ContainerClient containerClient = storageClient.getContainerClient("mycontainer");
ContainerClient containerClient = blobServiceClient.getContainerClient("mycontainer");
```

or

Create the container client from the builder [`sasToken`](#get-credentials) generated above.
Create the ContainerClient from the builder [`sasToken`](#get-credentials) generated above.
```java
ContainerClient containerClient = ContainerClient.builder()
ContainerClient containerClient = new ContainerClientBuilder()
.endpoint("<your-storage-blob-url>")
.credential("<your-sasToken>")
.containerName("mycontainer")
.build();
.buildClient();
```

### Create blob client
### Create BlobClient

Create a blob client if container client exists.
Create a BlobClient if container client exists.
```java
BlobClient blobClient = containerClient.getBlobClient("myblob");
```

or

Create the blob client from the builder [`sasToken`](#get-credentials) generated above.
Create the BlobClient from the builder [`sasToken`](#get-credentials) generated above.
```java
BlobClient blobClient = BlobClient.builder()
BlobClient blobClient = new BlobClientBuilder()
.endpoint("<your-storage-blob-url>")
.credential("<your-sasToken>")
.containerName("mycontainer")
.blobName("myblob")
.build();
.buildBlobClient();
```

### Create a container

Create a container from storage client.
Create a container from a BlobServiceClient.
```java
storageClient.createContainer("mycontainer");
blobServiceClient.createContainer("mycontainer");
```

or

Create a container using container client.
Create a container using ContainerClient.
```java
containerClient.create();
```

### Uploading a blob from a stream

Upload data stream to a blob using blockBlobClient generated from containerClient.
Upload data stream to a blob using BlockBlobClient generated from a ContainerClient.

```java
BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob");
Expand All @@ -183,7 +183,7 @@ try (ByteArrayInputStream dataStream = new ByteArrayInputStream(dataSample.getBy

### Uploading a blob from `File`

Upload a file to a blob using blockBlobClient generated from containerClient.
Upload a file to a blob using BlockBlobClient generated from ContainerClient.

```java
BlockBlobClient blockBlobClient = containerClient.getBlockBlobClient("myblockblob");
Expand All @@ -192,7 +192,7 @@ blobClient.uploadFromFile("local-file.jpg");

### Downloading a blob to output stream

Download blob to output stream using blobClient.
Download blob to output stream using BlobClient.

```java
try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream("downloaded-file.jpg")) {
Expand All @@ -202,14 +202,14 @@ try(ByteArrayOutputStream outputStream = new ByteArrayOutputStream("downloaded-f

### Downloading a blob to local path

Download blob to local file using blobClient.
Download blob to local file using BlobClient.
```java
blobClient.downloadToFile("downloaded-file.jpg");
```

### Enumerating blobs

Enumerating all blobs using `ContainerClient`
Enumerating all blobs using ContainerClient
```java
containerClient.listBlobsFlat()
.forEach(
Expand All @@ -222,7 +222,7 @@ containerClient.listBlobsFlat()
The [Azure Identity library][identity] provides Azure Active Directory support for authenticating with Azure Storage.

```java
StorageClient storageClient = StorageClient.storageClientBuilder()
BlobServiceClient storageClient = BlobServiceClient.storageClientBuilder()
.endpoint(endpoint)
.credential(new DefaultAzureCredential())
.buildClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Anonymous credentials are to be used with with HTTP(S) requests that read blobs from public containers or requests
* that use a Shared Access Signature (SAS). This is because Anonymous credentials will not set an Authorization header.
* Pass an instance of this class as the credentials parameter when creating a new pipeline (typically with
* {@link StorageClient}).
* {@link BlobServiceClient}).
*/
public final class AnonymousCredentialPolicy implements HttpPipelinePolicy {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* <p>
* This client contains operations on a blob. Operations on a container are available on {@link ContainerAsyncClient},
* and operations on the service are available on {@link StorageAsyncClient}.
* and operations on the service are available on {@link BlobServiceAsyncClient}.
*
* <p>
* Please refer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* <p>
* This client contains operations on a blob. Operations on a container are available on {@link ContainerClient},
* and operations on the service are available on {@link StorageClient}.
* and operations on the service are available on {@link BlobServiceClient}.
*
* <p>
* Please refer to the <a href=https://docs.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs>Azure Docs</a>
Expand Down
Loading