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 Fiter node (preceding node), double click the Action node, and set the following parameters to complete the task:

To describe specific set of instances' properties, click Advanced Parameters and add the following 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 the Action node, and set the following parameters to complete the task:

To describe a specific set of instance properties, such as SkipFinalSnapshot or FinalDBSnapshotIdentifier, click Advanced Parameters and add the following 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 the Action node, and set the following parameters to complete the task:

To describe specific set of instances and its properties, click Advanced Parameters and add the following JSON:

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

Use the 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 required parameters in Additional Parameters as follows:

Here's a sample query you need to provide 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?