Azure Activities now in Public Preview

Update

This package is now available on the official feed!

image

Description

UiPath.Azure.Activities package offers activities for Microsoft’s cloud, Azure.

This initial set of 50+ activities enables IT Departments to easily automate important Azure operations in their workflows like managing Resource Groups, Storage Accounts, Blob Containers, Blobs, Tables, and Virtual Machines.

Examples of scenarios that can be automated using these Azure activities are described in How To Use section below.

Activities List

Cloud \ Azure
Azure Scope
– Connects to Azure and provides a scope for other Azure activities.

Cloud \ Azure \ Key Vaults
Get Secrets
Retrieves a list of secrets.

Cloud \ Azure \ Resource Groups
Create Resource Group
Creates a new resource group or updates an existing one.
Get Resource Group – Retrieves the details of a resource group.
Get Resource Group List – Retrieves the list of resource groups in the current subscription.
Delete Resource Group – Permanently deletes the specified resource group and all the resources in it.

Cloud \ Azure \ Storage \ Storage Accounts
Create Storage Account
– Creates a new storage account or updates an existing one.
Delete Storage Account – Deletes the specified storage account.
Get Storage Account – Retrieves the details of the specified storage account.
Get Storage Account List – Retrieves a list of storage accounts in the current subscription.
Get Storage Account Key – Retrieves the storage account key for the specified storage account.
Regenerate Storage Account Key - Generates a new storage account key.

Cloud \ Azure \ Storage \ Blob Containers
Create Blob Container
– Creates a new blob container under the specified storage account or updates an existing one.
Delete Blob Container – Deletes the specified blob container.
Get Blob Container – Retrieves the details for the specified blob container.
Get Blob Container List – Retrieves the blob containers from the specified storage account.
For Each Blob Container – Performs an activity or a series of activities on each blob container in the specified storage account.
Get Blob – Retrieves the details about a specified blob.
Get Blob List – Retrieves the list of blobs in the specified container.
For Each Blob in Container – Performs an activity or a series of activities on each blob in a specified container.
Upload Blob from File – Creates a new blob or updates an existing one from the specified file.
Append to Blob - Appends a block from a specified file to an existing Append blob.
Download Blob to File - Downloads a blob to a specified file.
Copy Blob - Copies a blob to another blob container within the storage account.
Delete Blob - Deletes the specified blob.

Cloud \ Azure \ Storage \ Tables
Create Table
– Creates a new table under the specified storage account.
Get Table – Retrieves the details for the specified table.
Get Table List – Retrieves the tables from the specified storage account.
Delete Table – Deletes the specified table.
Insert Rows – Inserts new rows in the specified table or replaces them if they already exist.
Get Row – Retrieves the specified table row.
Delete Rows – Deletes the specified rows.
Get Rows by Filter – Retrieves the list of rows matching the filter criteria.
For Each Row In Table – Retrieves the list of rows matching the filter criteria.

Cloud \ Azure \ Virtual Machines \ Disks
Attach VM Data Disk
– Attaches an existing data disk to the specified virtual machine.
Detach VM Data Disk – Detaches the specified data disk from the virtual machine.
Get VM Disk List – Retrieves all disks associated with the specified virtual machine.
Get Disk List – Retrieves all disks in the current subscription.
Get Disk – Retrieves the details of a specified disk.

Cloud \ Azure \ Virtual Machines
Create VM
– Creates a new virtual machine from a disk or image.
Get VM – Retrieves the details of a specified virtual machine.
Get VM List – Retrieves a list of virtual machines within the current subscription.
Get VM Custom Image List – Retrieves a list of custom virtual machines images within the current subscription.
Get VM Custom Image – Retrieves the details about a custom virtual machine image.
Get VM Image by Publisher – Retrieves the details about a custom virtual machine image from a specified publisher.
Start VM – Starts the specified virtual machine.
Stop VM – Stops a virtual machine by deallocating the hardware and network resources Azure previously provisioned for it.
Shutdown VM - Shuts down the Operating System of the specified virtual machine.
Restart VM – Restarts a virtual machine.
Delete VM – Deletes the specified virtual machine.
Get RDP Files – Retrieves the RDP (Remote Desktop Protocol) file(s) for a specified virtual machine.
Configure Robot – Connects the Robot in a given virtual machine to UiPath Orchestrator.
Run Script in VM – Runs a script on the specified virtual machine.

How to install

UiPath.Azure.Activities package is available in Beta feed. Please follow the steps below to install the package in UiPath Studio:

If you haven’t already, add the UiPath Beta feed to your Studio Manage Package window.

In the Beta feed, check ‘Include Prerelease’, search for “UiPath.Azure.Activities”, and install the latest version.
** Important - We must reiterate, make sure you check the ‘Include Prerelease’ checkbox :blush:

Azure Activities should be visible now in UiPath Studio, as shown below:

How to use

The sample workflows below show how to use Azure activities in practice.

:loudspeaker: :loudspeaker: :loudspeaker: Using activities outside Azure Scope (starting with UiPath.Azure.Activities v1.1.0!)

We are happy to announce that with UiPath.Azure.Activities v.1.1.0 many activities related to Blob Containers and Blobs were enhanced so they can work both outside and within an Azure Scope activity. For Blob Containers activities to work outside scope, you must provide a value for StorageAccountKey parameter and for the parameters in Outside Scope Usage category, as below:

More details about Azure activities pack 1.1.0 are available here:

The workflow from below shows how to use Blob Containers and Blob activities outside Azure Scope activity:

Azure_1.1.0_Blobs (v1.1.0, outside scope).zip (40.4 KB)

Secure Cloud Storage for Accounting Reports

This UiPath process contains three workflows:

  • AccountingDataUploader : creates a new Azure Storage Account and uploads annual report files as block blobs.
  • AccountingDataQuerying : downloads the blobs representing reports from year 2018.
  • VerifyAccountingDataSecurity : checks that the blobs cannot be accessed publicly if one has their URIs.

SecureCloudDataStorage.zip (56.2 KB)

Audit Log Management

This UiPath process creates a new Azure Storage Account, creates a new Table called AggregatedLogs , iterates through all CSV files in a local logs folder and upload each file as a structured table row. Finally, it queries the AggregatedLogs table for all the entries with security issues, retrieves the resulting rows, and save the results as a CSV file on the local machine.

AuditLogManagement.zip (200.9 KB)

Virtual Machines Management

This UiPath process contains two workflows exemplifying how to create new virtual machines and how to power off those virtual machines which are not needed to be running (to save money).

  • CreateVirtualMachines : creates three virtual machines in a specified Resource Group. Two of them have tag AlwaysOn = False and one has AlwaysOn = True.
  • StopVirtualMachines : stops all running virtual machines from a given Resource Group if they have tag AlwaysOn = False.

VmGreenComputing.zip (43.3 KB)

Deploy an App on a Virtual Machine

This UiPath process deploys a Web app that involves some steps that might otherwise be performed manually, and then opens the deployed Web app in Internet Explorer on the machine that’s running the workflow. This process was tested on Windows 10 and Windows Server 2016. It consists of the following workflows:

  • UploadApp : creates a new resource group, creates a new storage account, creates a new blob container, and uploads app.js file as a block blob in this container.
  • ProvisionVMAndInstallNode : creates a new virtual machine and runs a Node install script on it.
  • ManualDeploymentViaRdp : retrieves the RDP files for the virtual machine, connects via RDP to the virtual machine in order to deploy the app. Finally, it opens the Web app in Internet Explorer on the machine that’s running the workflow.

DeployVMWithManualSteps.zip (80.8 KB)

To exemplify, let’s go step by step through the process of creating the UploadApp workflow:

  1. First, add an Azure Scope activity and set the values for the input parameters like in the screenshot below. In DeployVMWithManualSteps.zip you can see that I got the values for these parameters from System Environment Variables and I passed them to UploadApp workflow as In Arguments. Here is a short description of the activity’s parameters:
  • ClientID (String) - The client (application) ID.
  • ClientSecret (SecureString) - The client (application) secret.
  • SubscriptionID (String) - The subscription ID.
  • TenantID (String) - The tenant ID.
  • Environment (Enum) - The environment, either Azure Global or national clouds that are unique and separate environments from Azure Global.
  1. Add Create Resource Group activity which can be used to create a new resource group or update an existing one. In our case, we create a new one in “westeurope” Azure Region.

  2. Then, create a new Azure Storage Account using Create Storage Account activity. The parameters of this activity are:

  • Name (String) - The name of the storage account. The provided name must be unique across Azure.
  • ResourceGroupName (String) - The name of the resource group to which the storage account belongs to.
  • Region (String) - The Azure region for the storage account. If not specified, the region from the resource group will be used.
  • SecureTransferRequired (Boolean) - Specifies whether a secure transfer is required or not.
  • SkuType (Enum) - The SKU type for the storage account.
  • AccountKind (Enum) - The storage account kind.
  • AccessTier (Enum) - The storage account access tier.
  • Tags (DataTable) - The tags for the resource. It shall contain two columns, the first one representing the name and the second its value.
  • WaitForCompletion (Boolean) - If set to ‘true’, the activity waits to complete before moving to the next activity.
  1. Now let’s create a Blob Container. For this, use Get Storage Account Key activity to get the storage account key for the storage account created in the previous step. Then use this key in Create Blob Container activity to create a new blob container under the specified storage account. The parameters of Create Blob Container activity are:
  • ContainerName (String) - The name of the container.
  • StorageAccount (StorageAccount) - The storage account.
  • StorageAccountKey (SecureString) - The storage account key.
  • PublicAccessLevel (Enum) - Indicates whether data in the container may be accessed publicly and the level of access.
  • Metadata (DataTable) - Metadata for the container. It shall contain two columns, the first one representing the name and the second its value.

  1. Finally, add Upload Blob from File activity to upload app.js file as a block blob in the Blob Container created in the previous step. The parameters of this activity are:
  • BlobContainer (BlobContainer) - The blob container.
  • BlobName (String) - The name of the blob.
  • Type (Enum) - The type of the blob.
  • UploadVHDFileAsPageBlob (Boolean) - Specify whether to upload .vhd files as page blob (recommended).
  • FileToUpload (String) - The full path to the file to be uploaded.
  • ContentType (String) - The content type.
  • Metadata (DataTable) - Metadata for the blob. It shall contain two columns, the first one representing the name and the second its value.
  • Timeout (seconds) - Specifies the amount of time (in seconds) to wait for the activity to run before an error is thrown. If not set, the activity runs until completion.

That’s all folks! Enjoy :blush:
S5_UploadBlobFromFile

34 Likes

@ovidiuponoran Amazing!!!

Will you please let me know that any demo tutorials is added on uipath academy to get understand this.

4 Likes

Thanks @Sriram07. I will let you know!

2 Likes

Any plans for keyvault secret retrieval?

2 Likes

unbelievable :star_struck:

3 Likes

@nkuik, we will take into consideration to offer such an activity for the Official release (most probably next month). Thanks for your input!

2 Likes

You are rocking… :clap::clap::clap::clap::clap::clap:

Regards
Balamurugan.S

2 Likes

Much needed, great work!

2 Likes

Definitely Essential Package, any activities regards to Azure File share ?

Hi @loka_shemanth.

Do you have any specific use cases where these activities related to Azure File share would be useful?
We can consider to implement such activities for a next version of the package.

Yes, we are using Azure file share to store output data and input data for few use cases,
Scenarios
1.get files from azure file share
2.get folder (directory) from azure file share
3.delete specific file
4.delete folder from Azure File share

Activities related to these nature would be very helpful.

Currently I’m using Azcopy with powershell command line to achieve this

1 Like

Hi @nkuik.

Azure activities package is available now on the Official Feed.
We added a new activity Key Vaults \ Get Secrets.

1 Like

Wow! This is insane. I am imagining even more easily automated Azure VMs and infrastructure. This is very cool. Great work!

1 Like

@ ovidiuponoran: how we can upload multiple files and download multiple files to and from Azure blob using UIpath. with your documentation we can do only single files only.

@Nareshynn, in this first version of the Azure package only single blob upload and download is supported. If the community and clients require additional activities, we will add them in a future version of the package.

@ovidiuponoran: Thanks for quick response. we are trying to download multiple files from Blob to onprem and we can able to succeed if there is no sub folders in blob Container. But it is getting failing when there is subfolders in blob Container. here we are using for each blob container logic. can you please check.

1 Like

@Nareshynn, you shall use For Each Blob in Container rather than For Each Blob Container in order to iterate through the blobs in a container.

Hi Nareshynn,

It seems that we have a bug in the ForEachBlobInContainer activity when dealing with subfolders - it will be addressed in the next release.

Meanwhile, you can use the GetBlobList activity and iterate over the output with the standard ForEach activity (set its TypeArgument to UiPath.Azure.Models.Blob):

image

and the result:

image

Thank you for helping us find this issue!

we are trying as for each blob in container only. but we are not getting any result.

Nareshynn, please see my reply above, it should help with the issue