Amazon AWS CloudWatch
30 min
this connector allows turbine to connect with aws cloudwatch prerequisites this connector authenticates with aws cloudwatch using the following input values requirements aws access key id a long term aws access key id with access to iam aws secret key id a long term secret access key associated with the above accesskey id capabilities this connector provides the following capabilities get log events get query results list log groups list log streams list queries start query stop query configurations aws cloudwatch asset authenticates using aws credentials configuration parameters parameter description type required access key a specific long term aws access key id string required secret key a specific long term aws secret access key string required region name the aws region where you want to create new connections string optional role arn role arn string optional session token use if a session token is provided when switching roles string optional external id external id to assume iam role optional value used for assuming roles can be added, or removed in trusted relationships of target role string optional role session name defaults to sessionfromswimlane \<hash> when no value is provided string optional actions get log events the log group to get log events from input argument name type required description loggroupname string optional the name of the log group provide either loggroupname or loggroupidentifier not both loggroupidentifier string optional specify either the name or arn of the log group to view events from provide either loggroupname or loggroupidentifier not both logstreamname string required the name of the log stream starttime string optional the start of the time range, expressed as the number of milliseconds after jan 1, 1970 00 00 00 utc endtime string optional the end of the time range, expressed as the number of milliseconds after jan 1, 1970 00 00 00 utc nexttoken string optional the token for the next set of items to return limit string optional the maximum number of log events returned startfromhead boolean optional if the value is true, the earliest log events are returned first unmask boolean optional specify true to display the log event fields with all sensitive data unmasked and visible output parameter type description events array output field events timestamp number output field timestamp message string response message ingestiontime number time value nextforwardtoken string output field nextforwardtoken nextbackwardtoken string output field nextbackwardtoken example \[ { "events" \[ {} ], "nextforwardtoken" "string", "nextbackwardtoken" "string" } ] get query results returns the results from the specified query input argument name type required description queryid string required the id number of the query output parameter type description results array result of the operation 0 object output field 0 field string output field field value string value for the parameter statistics object output field statistics recordsmatched number output field recordsmatched recordsscanned number output field recordsscanned bytesscanned number output field bytesscanned status string status value example \[ { "results" \[ \[] ], "statistics" { "recordsmatched" 123, "recordsscanned" 123, "bytesscanned" 123 }, "status" "scheduled" } ] list log groups lists the specified log groups you can list all your log groups or filter the results by prefix the results are ascii sorted by log group name input argument name type required description accountidentifiers array optional unique identifier loggroupnameprefix string optional name of the resource loggroupnamepattern string optional name of the resource nexttoken string optional parameter for list log groups limit number optional parameter for list log groups includelinkedaccounts boolean optional parameter for list log groups output parameter type description loggroups array output field loggroups loggroupname string name of the resource creationtime number time value retentionindays number output field retentionindays metricfiltercount number count value arn string output field arn storedbytes number output field storedbytes kmskeyid string unique identifier dataprotectionstatus string response data nexttoken string output field nexttoken example \[ { "loggroups" \[ {} ], "nexttoken" "string" } ] list log streams lists the log streams for the specified log group you can list all the log streams or filter the results by prefix input argument name type required description loggroupname string optional the name of the log group loggroupidentifier string optional specify either the name or arn of the log group to view if the log group is in a source account and you are using a monitoring account, you must use the log group arn logstreamnameprefix string optional the prefix to match orderby string optional the results are ordered by given input, example logstreamname, lasteventtime, logstreamname descending boolean optional if the value is true, results are returned in descending order nexttoken string optional the token for the next set of items to return limit number optional the maximum number of items returned if you don’t specify a value, the default is up to 50 items output parameter type description logstreams array output field logstreams logstreamname string name of the resource creationtime number time value firsteventtimestamp number output field firsteventtimestamp lasteventtimestamp number output field lasteventtimestamp lastingestiontime number time value uploadsequencetoken string output field uploadsequencetoken arn string output field arn storedbytes number output field storedbytes nexttoken string output field nexttoken example \[ { "logstreams" \[ {} ], "nexttoken" "string" } ] list queries returns a list of cloudwatch logs insights queries that are scheduled, running, or have been run recently in this account input argument name type required description loggroupname string optional name of the resource status string optional status value maxresults number optional result of the operation nexttoken string optional parameter for list queries output parameter type description queries array output field queries queryid string unique identifier querystring string output field querystring status string status value createtime number time value loggroupname string name of the resource nexttoken string output field nexttoken example \[ { "queries" \[ {} ], "nexttoken" "string" } ] start query schedules a query of a log group using cloudwatch logs insights you specify the log group and time range to query and the query string to use input argument name type required description loggroupname string optional the log group on which to perform the query loggroupnames array optional the list of log groups to be queried you can include up to 50 log groups loggroupidentifiers array optional the list of log groups to query you can include up to 50 log groups starttime number required the beginning of the time range to query endtime number required the end of the time range to query querystring string required the query string to use limit number optional the maximum number of log events to return in the query output parameter type description queryid string unique identifier example \[ { "queryid" "string" } ] stop query stops a cloudwatch logs insights query that is in progress if the query has already ended, the operation returns an error indicating that the specified query is not running input argument name type required description query id string required the id number of the query to stop to find this id number, use describequeries output parameter type description success boolean whether the operation was successful example \[ { "success" true } ] notes for more information on aws identity and access management(iam) aws cloudwatch https //docs aws amazon com/amazoncloudwatch/latest/apireference/making api requests htmlaws cloudwatch actions https //docs aws amazon com/amazoncloudwatch/latest/apireference/api operations html