Usage Examples of Action Nodes

Updated 1 week ago by Totalcloud

Here are some examples on how to leverage Action nodes and it's additional features in your workflows to meet your different cloud management requirements:

1. Stop EC2 instances belonging to a particular tag

Filter EC2 instances with a particular tag in Resource node and Filter node (preceding node), double click on the Action node, and set the below parameters to achieve this:

To describe specific set of instances' properties out of all the lot, click on Advanced Filters hyperlink available and add the below JSON:

{    "InstanceIds": 
[
"i-058b043d35h0fb483", "i-0cf6fc15556038c13"
]
}

2. Terminate RDS instances belonging to a particular tag

Filter RDS instances with a particular tag in Resource node and Filter node (preceding node), double click on the Action node, and set the below parameters to achieve this:

To describe specific set of instances' properties out of all the lot, like SkipFinalSnapshot or FinalDBSnapshotIdentifier, click on Advanced Filters hyperlink available and add the below JSON:

{
"DBInstanceIdentifier": "required",
"SkipFinalSnapshot": "<optional>",
"FinalDBSnapshotIdentifier": "<optional>"
}

3. Delete unattached EBS volumes

Select EC2 instances in Resource node, filter unattached instances in Filter node (preceding node), double click on the Action node, and set the below parameters to achieve this:

To describe specific set of instances and its properties out of all the lot, click on Advanced Filters hyperlink available and add the below JSON:

{
"VolumeIds": [
"vol-0463cb2f8ad5175dd",
"vol-0bc49a537de7d51c"
]
}
4. Copy snapshots from one region to another region

Use Copy Snapshot action in Action node, with Filter node preceding. This will copy snapshots of all the EC2 volumes from one destination to another destination by passing apt parameters in the Additional Features. Observe the parameters in the image below:

Here's a sample query you need to pass in Additional parameters to define the source and destination of the snapshots.

{

/*---------- required params ----------*/

"SourceRegion": "us-east-1",
"SourceSnapshotId": "snap-1234567890abcdef0",


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

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


"Description": "My_snapshot_22_05_2019", /* Description can be auto generated with timestamp */
"DestinationRegion": "us-west-1",
"Encrypted": "true",
"KmsKeyId": "MAP",
"PresignedUrl": "https://presignedurldemo.s3.eu-west-1.amazonaws.com/image.png?Z&X-Amz-Expires=1800&X-Amz-Signature=12b74b0788aa0"
}


How did we do?