Resource Node

Updated 1 day ago by Totalcloud

What is a Resource Node?

Resource node picks a particular set of resource(s) belonging to a particular AWS service (EC2, IAM role, RDS, ECS, Autoscaling, AppSync, etc.) launched in a specific AWS Region. It is generally the second node of a workflow.

Working with Resource Node

To define a Resource node in a Workflow, follow the steps below:

  1. Go to workflow editor, after starting a new workflow or picking a new template
  2. If you start a new workflow:
    1. Click on the Resource icon available on the left navigation menu.
    2. Double click on the Resource node to access the parameters input window.
  3. If you pick an existing template:
    1. Double click on existing Resource node already available to access the parameters input window.
  4. Select appropriate inputs in each drop down menu to define your requirement.

Example:

Here's an example of a Resource node that helps you pick your AWS CloudWatch Alarms belonging to N. Virginia region.

  1. Click on Save Node button after you set the parameters according to your requirement.
If you wish to delete this node, double click on the node and click on Delete Node button.

What happens in Resource Node?

Resource node typically runs after the Trigger node. This node looks for parameter definitions set by you. The output of this node is a JSON containing all the resources and their attributes, which is same as the data returned by AWS APIs. This data then becomes input to the next connecting node. Click here to view the Sample Output of this node.

Advanced Filters

Use Advanced Filters to pass additional parameters to filter the resources further. This would effectively modify the way the Resource node fetches resources and passes more filtered values to the next node. This provides added flexibility to what is already available in TotalCloud Workflow nodes.

Example: When you select EC2 Instances of a particular region in the Resource node, the workflow will fetch all the instances in the region. If you have hundreds of instances in this region, instead of fetching 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 instances 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"
]
}

Click here to know how to work with Advanced Filters in Resource node.

Add-ons

Add-ons allow you to enrich the resources data with additional qualities. This enriched data can be used in further nodes, like Filter nodes, to selectively retain the resources required.

Example: Say, we fetch EC2 instances' data in the Resource node. This data has attributes of instances alone. If we want to filter instance that have open port of 22, we must know Security Groups associated with each instance. So for the EC2 instance resources, Security Groups becomes a Add-on. Similarly, Volumes can be Add-ons to instances and Bucket's policies can be Add-ons to S3 Buckets.

The attributes of Add-ons are same as returned by the corresponding AWS API. For example: The data of describeSecurityGroups is available as output in addOns.Securitygroups when you select EC2 instances as resource and Security Groups as Add-ons in the Resource node.

Click here to know how to work with Add-ons and referencing them in Filter node.

Usage Examples

For your convenience, we have populated several usage examples of how to use this node and how to set their parameters. Check out some usage examples here.


How did we do?