Azure Activities now in Public Preview

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 \ 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.

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:

25 Likes

@ovidiuponoran Amazing!!!

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

3 Likes

Thanks @Sriram07. I will let you know!

2 Likes

Any plans for keyvault secret retrieval?

2 Likes

unbelievable :star_struck:

2 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