Copy Blob

Estimated reading: 4 minutes

The Copy Blob activity copies a specified blob from one Azure Blob Storage location to another. It allows you to provide the source and destination container and blob details, and control the time allowed for the copy operation and whether the activity waits for the copy operation to reach the required ready state.

Fields in Activity Canvas

Source

Source Container Name: Specifies the name of the Azure Blob Storage container that contains the source blob. Enter the value as a String.

Source Blob Name: Specifies the name or path of the source blob to copy. Enter the value as a String.

Destination

Destination Container Name: Specifies the name of the Azure Blob Storage container where the copied blob is created. Enter the value as a String.

Destination Blob Name: Specifies the name or path to assign to the copied blob in the destination container. Enter the value as a String.

Wait For Completion: Specifies whether the activity waits for the copy operation to reach the required ready state before continuing execution.
Yes (True): The activity waits for the copy operation to reach the required ready state.
No (False): The activity continues execution without waiting for the copy operation to reach the ready state.

Properties

MISC

Display Name: Specifies the display name of the activity shown on the design canvas. The default value is CopyBlob.

Skip On Error: Specifies whether the workflow continues execution when the copy operation fails.
False: The workflow stops execution and throws an error.
True: The workflow ignores the error and continues with the next activity.

Timeout: Specifies the maximum time, in milliseconds, allowed for the copy operation before a timeout error is thrown. The default value is 30000 milliseconds.

Version: Displays the package version of the activity.

OPTIONS

Wait For Completion: Specifies whether the activity waits for the copy operation to reach the required ready state before proceeding to the next activity.
True: The activity waits until the copy operation reaches the required ready state.
False: The activity proceeds to the next activity without waiting for the copy operation to reach the ready state.

OUTPUT

Destination Blob: Create a variable to store information about the destination blob. The variable is populated after the copy operation executes successfully and can be used to access the destination blob details in subsequent workflow steps.

Result: Returns a Boolean value indicating the execution status of the activity.
True: The activity executed successfully.
False: The activity failed due to an unexpected error.

Example

The following example illustrates how to use the Copy Blob activity to copy a blob from one Azure Blob Storage container to another. In this example, the sample.pdf blob is copied from the SourceContainer container to the DestinationContainer container with the destination blob name copied-sample.pdf.

Steps to Execute the Bot

1. Drag and drop an Azure Scope activity into the workflow.
2. Enter the Account Name and Account Key to establish a connection with Azure Blob Storage.
3. Drag and drop the Copy Blob activity inside the Azure Scope.
4. Click the Copy Blob activity.
5. In Source Container Name, enter the name of the container containing the source blob as a String. Here, it is “SourceContainer”.
6. In Source Blob Name, enter the name or path of the source blob as a String. Here, it is “sample.pdf”.
7. In Destination Container Name, enter the name of the container where the copied blob should be created as a String. Here, it is “DestinationContainer”.
8. In Destination Blob Name, enter the name or path for the copied blob as a String. Here, it is “copied-sample.pdf”.
9. Set Wait For Ready to True to wait for the copy operation to reach the required ready state before continuing the workflow.
10. Create a variable and assign it to the Result output to store the execution status.
11. Drag and drop a Write Log activity below the Azure Scope activity.
12. Enter the result variable followed by .ToString in the Input field of the Write Log activity. For example, Result.ToString.
13. Set the Log Level to Info.
14. Execute the workflow.

The bot executes the activity and copies the specified blob from the source container to the destination container with the specified destination blob name. The Result output returns True when the activity executes successfully.

Note: The source and destination containers can be the same or different containers within the supported Azure Blob Storage configuration.

Share this Doc

Copy Blob

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online