Advanced Filters in the Resource Node

Updated 3 months ago by Totalcloud

Advanced Filter is an additional feature that allows passing additional parameters to the ​Resource node​. This modifies the way the Resource node fetches resources and passes more filtered values to the next node. This feature provides added flexibility to what is already available in TotalCloud Workflow nodes. You can access this feature in the Resource node right below the resource selection drop down menu.

You can refer the corresponding AWS API documentation page while passing the additional parameters. For example: The additional parameters supported for EC2 Volumes would be whatever AWS supports in describeVolumes API.

Let's consider a scenario to check what happens in this feature:

When you select EC2 Instances of a particular region in the Resource node, the workflow will pull all those instances in the region. If you have hundreds of instances in this region, instead of pulling all of them, you might want to specifically work with only 2 or 3 instances. In such cases, you can leverage this additional feature to mention the instance Ids in this field to fetch only these instances.

{ /*---------- optional params ----------*/

/*
* (Use keyword MAP in place of value if want to
* auto fill any value from previous data)
*/


"InstanceIds": [
"i-058b043d3b00fx483",
"i-0cf6fc1d256056c13"
]
}

Here are few more examples of using this feature:

Example 1: Adding MaxRecords and Tag Values to Redshift Cluster

Use this JSON in the Additional Filter window if you want to pick only those Redshift Clusters from Oregon region with MaxRecords: 90 , TagKeys: Env, and TagValues: Test. You can refer the AWS API doc to know more.

{
"ClusterIdentifier": "mycluster",
"MaxRecords": [
"90" ],
"TagKeys": [
"ENV"
],
"TagValues": [
"Test" ]
}
Example 2: Choosing EC2s with XEN hypervisor only

Use this feature to filter only those EC2 instances whose hypervisor is XEN. You can use hypervisor i.e. the hypervisor type (ovm | xen) available in the AWS API doc to know more.

{
  "Filters": [
    {
      "Name": "hypervisor",
      "Values": [
        "xen"
      ]
    }
  ]
}
If you want to enrich the resources data with additional qualities, use Add-ons.


How did we do?