exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 8 question 2 discussion

Actual exam question from Microsoft's AZ-204
Question #: 2
Topic #: 8
[All AZ-204 Questions]

DRAG DROP -
You need to ensure disaster recovery requirements are met.
What code should you add at line PC16?
To answer, drag the appropriate code fragments to the correct locations. Each code fragment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
rdemontis
Highly Voted 4 years, 1 month ago
Answers in box 1 and 2 arent' correct. They should be SingleTranferConext and ShouldOverwriteCallbackAsync because we are copying a single blob (see CopyAsync method). We are inside a foreach loop that scan each file in the share.
upvoted 62 times
ray01
4 years ago
Correct 1. https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.datamovement.singletransfercontext?view=azure-dotnet 2. According to a link above, there is only "ShouldOverwriteCallbackAsync" available for "SingleTranferConext " 3. https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.storage.datamovement.transfermanager.copyasync?view=azure-dotnet#Microsoft_Azure_Storage_DataMovement_TransferManager_CopyAsync_Microsoft_Azure_Storage_Blob_CloudBlob_Microsoft_Azure_Storage_Blob_CloudBlob_System_Boolean_Microsoft_Azure_Storage_DataMovement_CopyOptions_Microsoft_Azure_Storage_DataMovement_SingleTransferContext_ The question is should it be server side copy or not? I would say "true".
upvoted 11 times
overhill
5 months, 1 week ago
incorrect Directory also has it
upvoted 1 times
...
...
d0bermannn
3 years, 8 months ago
yes, foreach construction applied
upvoted 2 times
...
...
clarionprogrammer
Highly Voted 4 years ago
SingleTranferConext ShouldOverwriteCallbackAsync true
upvoted 30 times
ZodiaC
3 years, 9 months ago
ITS FALSE 10000000000%
upvoted 3 times
ZodiaC
3 years, 9 months ago
Srry im didnt read well
upvoted 8 times
NombreFalso
2 years, 2 months ago
It's all good buddy
upvoted 2 times
...
...
...
anastakasim
4 years ago
The last box is "true"? really?
upvoted 2 times
...
...
4bd3116
Most Recent 7 months, 2 weeks ago
var context = new SingleTransferContext { ShouldOverwriteCallbackAsync = (source, destination) => Task.FromResult(true) }; await TransferManager.CopyAsync(blob, GetDRBlob(blob), isServiceCopy: true, context: context, options: new CopyOptions());
upvoted 2 times
...
[Removed]
1 year, 10 months ago
About isServiceCopy: A flag indicating whether the copy is service-side asynchronous copy or not. If this flag is set to true, service-side asychronous copy will be used; if this flag is set to false, file is downloaded from source first, then uploaded to destination.
upvoted 4 times
...
Kluk_Kluk
2 years, 1 month ago
https://learn.microsoft.com/en-us/azure/storage/common/storage-use-data-movement-library#track-transfer-progress
upvoted 1 times
Kluk_Kluk
2 years, 1 month ago
"To achieve this scenario, we need to create a TransferContext object. The TransferContext object comes in two forms: SingleTransferContext and DirectoryTransferContext. The former is for transferring a single file and the latter is for transferring a directory of files."
upvoted 1 times
Kluk_Kluk
2 years, 1 month ago
the foreach in the lines above PC16 indicates single file transfer
upvoted 4 times
...
...
...
OPT_001122
2 years, 4 months ago
1.SingleTranferConext 2.ShouldOverwriteCallbackAsync 3.true (If this flag is set to true, service-side asychronous copy will be used)
upvoted 3 times
...
coffecold
2 years, 6 months ago
Old version 11 code Microsoft.Azure.Storage.DataMovement Version 12 : Azure.Storage.Blobs You would probably use : StartCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken)
upvoted 2 times
...
gmishra88
2 years, 6 months ago
For the non Microsoft stable tied horses, Task.FromResult(true) creates a task that returns true.
upvoted 6 times
coffecold
2 years, 6 months ago
usage : See https://github.com/Azure/azure-storage-net-data-movement/blob/master/samples/DataMovementSamples/DataMovementSamples/Samples.cs
upvoted 1 times
...
...
gmishra88
2 years, 6 months ago
Also Microsoft, you do not need to know .Net to be able to write AZ-204.
upvoted 3 times
...
SivajiTheBoss
3 years, 1 month ago
Correct Answer: 1.SingleTranferConext (because it is inside loop) 2.ShouldOverwriteCallbackAsync (for singleTransferContext this is only option) 3.true (If this flag is set to true, service-side asychronous copy will be used)
upvoted 6 times
...
leonidn
3 years, 3 months ago
SingleTransferContext because we transfer blob by blob because line PC16 is in the ForEach. IsServiceCopy true to allow service side asynchronous processing instead of downloading/uploading blobs. ShouldOverwriteCallbackAsync because ShouldTransferCallbackAsync is not a property of SingleTransferContext.
upvoted 4 times
...
asdasdasg2
3 years, 3 months ago
No one is talking about how the line on the first answer box is invalid no matter that answer you put. I believe it's a copy paste error and the line should be: var context = new [ ]; with answer SingleTransferContext
upvoted 2 times
asdasdasg2
3 years, 3 months ago
i realize that is confusing, i meant that the line in the hot area should be : var context = new ____ ();
upvoted 2 times
...
...
BrettusMaximus
3 years, 12 months ago
isServiceCopy: True Boolean A flag indicating whether the copy is service-side asynchronous copy or not. If this flag is set to true, service-side asychronous copy will be used; if this flag is set to false, file is downloaded from source first, then uploaded to destination
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago