Usage Examples of Resource Node

Updated 4 days ago by Totalcloud

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

1. Pick All EC2s Instances

Click on the 'Edit' option available when you click on the Resource node, to achieve this:

To call describeSecurityGroups API, click on Add-ons hyperlink available above the Save Node and select Security Groups check box. There are several such add-ons available.
To describe specific set of instances' properties out of all the lot, click on Advanced Filters hyperlink available above the Save Node and add the parameters to the JSON.

2. Pick all Redshift clusters

Click on the 'Edit' option available when you click on the Resource node, to achieve this:

To call describe-cluster-security-groups API, click on Add-ons hyperlink available above the Save Node and select Cluster SecurityGroups check box. There are several such add-ons available.
To pass additional parameters, like MaxRecords: 90 , TagKeys: Env, and TagValues: Test, to the Redshift clusters, use the Advanced Filters hyperlink available above the Save Node and add the parameters to the JSON.

3. Pick all CloudWatch Alarms

Click on the 'Edit' option available when you click on the Resource node, to achieve this:

To call list-metrics or GetMetricData API, click on Add-ons hyperlink available above the Save Node. There are several such add-ons available.
To pass additional parameters, like MaxRecords or StateValue, use the Advanced Filters hyperlink available above the Save Node and add the required parameters to the JSON.

4. Gets a list of all CodeBuild Build IDs

Click on the 'Edit' option available when you click on the Resource node, to achieve this:

To pass additional parameters, use the Advanced Filters hyperlink available above the Save Node and add the required parameters as shown in the JSON below.
{
"data": [{
"value": "webapp-engine:7833e2fc-bbf6-40e8-ba51-4fdc6127b933"
},
{
"value": "webapp-engine:d6002f41-847b-4b64-b93a-576d832096a0"
},
{
"value": "webapp-engine:ae0a2c43-1574-4b80-ab8f-013423c9a3d3"
},
{
"value": "webapp-engine:ab82a509-f612-4652-83a1-554594ab33fe"
},
{
"value": "webapp-engine:c056bc31-cc7a-47c2-b2f4-d2127810b54a"
},
{
"value": "webapp-engine:b031a372-2a79-4c52-8b7f-c602695a7873"
},
],
"type": "array",
"partial": false
}
To call BatchGetBuilds API, click on Add-ons hyperlink available above the Save Node. There are several such add-ons available. Here's how the JSON looks:
{
"data": {
"value": "webapp-engine:7833e2fc-bbf6-40e8-ba51-4fdc6127b933",
"addOns": {
"batchGetBuilds": [{
"id": "webapp-engine:7833e2fc-bbf6-40e8-ba51-4fdc6127b933",
"arn": "arn:aws:codebuild:us-east-1:833539367270:build/webapp-engine:7833e2fc-bbf6-40e8-ba51-4fdc6127b933",
"startTime": "2019-05-13T07:33:57.132Z",
"endTime": "2019-05-13T07:41:47.206Z",
"currentPhase": "COMPLETED",
"buildStatus": "SUCCEEDED",
"sourceVersion": "63ba0d0ed14de5dfc1e8e6ff9924339531147daa",
"resolvedSourceVersion": "63ba0d0ed14de5dfc1e8e6ff9924339531147daa",
"projectName": "webapp-engine",
"phases": [{
"phaseType": "SUBMITTED",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:33:57.132Z",
"endTime": "2019-05-13T07:33:57.643Z",
"durationInSeconds": 0
},
{
"phaseType": "QUEUED",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:33:57.643Z",
"endTime": "2019-05-13T07:33:59.108Z",
"durationInSeconds": 1
},
{
"phaseType": "PROVISIONING",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:33:59.108Z",
"endTime": "2019-05-13T07:34:14.245Z",
"durationInSeconds": 15,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "DOWNLOAD_SOURCE",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:34:14.245Z",
"endTime": "2019-05-13T07:34:24.149Z",
"durationInSeconds": 9,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "INSTALL",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:34:24.149Z",
"endTime": "2019-05-13T07:35:21.140Z",
"durationInSeconds": 56,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "PRE_BUILD",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:35:21.140Z",
"endTime": "2019-05-13T07:35:21.375Z",
"durationInSeconds": 0,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "BUILD",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:35:21.375Z",
"endTime": "2019-05-13T07:41:44.512Z",
"durationInSeconds": 383,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "POST_BUILD",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:41:44.512Z",
"endTime": "2019-05-13T07:41:44.754Z",
"durationInSeconds": 0,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "UPLOAD_ARTIFACTS",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:41:44.754Z",
"endTime": "2019-05-13T07:41:44.954Z",
"durationInSeconds": 0,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "FINALIZING",
"phaseStatus": "SUCCEEDED",
"startTime": "2019-05-13T07:41:44.954Z",
"endTime": "2019-05-13T07:41:47.206Z",
"durationInSeconds": 2,
"contexts": [{
"statusCode": "",
"message": ""
}]
},
{
"phaseType": "COMPLETED",
"startTime": "2019-05-13T07:41:47.206Z"
}
],
"source": {
"type": "GITHUB",
"location": "https://github.com/totalcloud/webapp-engine.git",
"gitCloneDepth": 0,
"reportBuildStatus": true,
"insecureSsl": false
},
"secondarySources": [],
"artifacts": {
"location": ""
},
"secondaryArtifacts": [],
"cache": {
"type": "NO_CACHE"
},
"environment": {
"type": "LINUX_CONTAINER",
"image": "aws/codebuild/nodejs:10.14.1",
"computeType": "BUILD_GENERAL1_SMALL",
"environmentVariables": [],
"privilegedMode": false,
"imagePullCredentialsType": "CODEBUILD"
},
"serviceRole": "arn:aws:iam::833539367270:role/service-role/codebuild-webapp-engine-service-role",
"logs": {
"groupName": "/aws/codebuild/webapp-engine",
"streamName": "7833e2fc-bbf6-40e8-ba51-4fdc6127b933",
"deepLink": "https://console.aws.amazon.com/cloudwatch/home?region=us-east-1#logEvent:group=/aws/codebuild/webapp-engine;stream=7833e2fc-bbf6-40e8-ba51-4fdc6127b933",
"cloudWatchLogs": {
"status": "ENABLED"
},
"s3Logs": {
"status": "DISABLED",
"encryptionDisabled": false
}
},
"timeoutInMinutes": 15,
"queuedTimeoutInMinutes": 480,
"buildComplete": true,
"initiator": "GitHub-Hookshot/ae20175",
"encryptionKey": "arn:aws:kms:us-east-1:833539367270:alias/aws/s3"
}]
}
},
"type": "array",
"partial": true,
"url": "https://s3.amazonaws.com/tc-report/a7b9b919-ad5f-4bfd-a629-2fc01acc809f.json"
}


How did we do?