Skip to content

Conversation

@JesseLovelace
Copy link
Member

Adds a sample for transferring data from Azure

@snippet-bot
Copy link

snippet-bot bot commented Dec 22, 2022

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Dec 22, 2022
// Create the transfer job
TransferJob response =
storageTransfer.createTransferJob(
TransferProto.CreateTransferJobRequest.newBuilder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting to inline the "TransferProto" to make it more readable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies if I wasn't clear enough. Could you include TransferProto.CreateTransferJobRequest in the import statement so that you could directly access CreateTransferJobRequest.newBuilder() in this line?

Comment on lines 67 to 68
.setAzureCredentials(AzureCredentials.newBuilder()
.setSasToken(azureSasToken).build())
Copy link
Contributor

@Sita04 Sita04 Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly lint AzureCredentials:

.setAzureCredentials(AzureCredentials.newBuilder()
    .setSasToken(azureSasToken)
    .build())
.setContainer...


// Your Azure Storage Account name
String azureStorageAccountName = "myAzureAccountName";
String azureStorageAccount = "myAzureAccoun";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"my-azure-account"

Copy link
Contributor

@Sita04 Sita04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with few nits.

@JesseLovelace JesseLovelace merged commit 2090e82 into main Jan 10, 2023
@JesseLovelace JesseLovelace deleted the azuresamples branch January 10, 2023 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants