Get Container List

Estimated reading: 3 minutes

The Get Container List activity retrieves a list of available containers from an Azure Storage account. It allows users to filter containers by name prefix, specify the maximum number of containers to retrieve, and optionally retrieve only containers that contain blobs. The retrieved container list can be used in subsequent automation workflow activities.

Properties

INPUT

Has Files: Specifies whether to retrieve only containers that contain blobs.
Checked (True): Retrieves only containers that contain blobs.
Unchecked (False): Retrieves all containers, including empty containers.

Maximum Items: Specifies the maximum number of containers to retrieve. This is an optional integer property.

Name Starts With: Specifies an optional string prefix used to filter containers by name. Only containers whose names begin with the specified prefix are included in the results.

MISC

Display Name: Specifies the display name of the activity. The default value is GetContainerList.

Skip On Error: Specifies whether the workflow continues execution when the activity encounters an error.
True: The workflow skips the error and continues with the next activity.
False: The workflow stops execution and throws an error.
None: The default value is False.

Version: Displays the package version of the activity. 

OUTPUT

Container List: Returns the list of containers retrieved from the Azure Storage account as a collection of custom class objects. The output can be stored in a variable and used in subsequent workflow activities.

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

Example

The following example illustrates how to use the Get Container List activity to retrieve containers from Azure Blob Storage, filter them by name, and limit the number of results.

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 Get Container List activity inside the Azure Scope.
4. Click the Get Container List activity.
5. To retrieve only containers that contain blobs, check Has Files. Leave it unchecked to include empty containers.
6. To filter containers by name, enter a prefix in Name Starts With. For example, enter test to retrieve containers whose names begin with test.
7. To limit the number of containers returned, enter the required count in Maximum Items.
8. Create a variable of the appropriate collection type and assign it to the Container List output.
9. Create a Boolean variable, such as Success, and assign it to the Result output.
10. Drag and drop a Write Log activity below the Azure Scope activity.
11. Enter Success.ToString in the Input field of the Write Log activity.
12. Set the Log Level to Info.
13. Execute the workflow.

After execution, the Container List output contains the containers matching the configured criteria. The returned collection can be used in subsequent activities to process the containers as required.

Share this Doc

Get Container List

Or copy link

CONTENTS
Robility Chatbot
Robility Assistant
Online