Amazon AWS CloudWatch
31 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 notes for more information on aws identity and access management(iam) https //docs aws amazon com/amazoncloudwatch/latest/apireference/making api requests html https //docs aws amazon com/amazoncloudwatch/latest/apireference/api operations html 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 input example {"loggroupname" "/aws/lambda/apphub bundles","loggroupidentifier" "xyzabc","logstreamname" "2018/12/04/\[$latest]d53f6d4b5fe14daa80dcdaab92c5c2a5","starttime" "1562078646","endtime" "1562078646","nexttoken" "123ab34c","limit" "100","startfromhead"\ true,"unmask"\ true} output parameter type description events array output field events events timestamp number output field events timestamp events message string response message events ingestiontime number time value nextforwardtoken string output field nextforwardtoken nextbackwardtoken string output field nextbackwardtoken output example {"events" \[{"timestamp" 123,"message" "string","ingestiontime" 123}],"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 input example {"queryid" "123abcd"} output parameter type description results array result of the operation results 0 object result of the operation results 0 field string result of the operation results 0 value string value for the parameter statistics object output field statistics statistics recordsmatched number output field statistics recordsmatched statistics recordsscanned number output field statistics recordsscanned statistics bytesscanned number output field statistics bytesscanned status string status value output 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 input example {"accountidentifiers" \["string"],"loggroupnameprefix" "string","loggroupnamepattern" "string","nexttoken" "string","limit" 123,"includelinkedaccounts"\ true} output parameter type description loggroups array output field loggroups loggroups loggroupname string name of the resource loggroups creationtime number time value loggroups retentionindays number output field loggroups retentionindays loggroups metricfiltercount number count value loggroups arn string output field loggroups arn loggroups storedbytes number output field loggroups storedbytes loggroups kmskeyid string unique identifier loggroups dataprotectionstatus string response data nexttoken string output field nexttoken output example {"loggroups" \[{"loggroupname" "string","creationtime" 123,"retentionindays" 123,"metricfiltercount" 123,"arn" "string","storedbytes" 123,"kmskeyid" "string","dataprotectionstatus" "activated"}],"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 input example {"loggroupname" "/aws/lambda/apphub bundles","loggroupidentifier" "xyz","logstreamnameprefix" "2018/12/04","orderby" "logstreamname","descending"\ true,"nexttoken" "axwab","limit" 123} output parameter type description logstreams array output field logstreams logstreams logstreamname string name of the resource logstreams creationtime number time value logstreams firsteventtimestamp number output field logstreams firsteventtimestamp logstreams lasteventtimestamp number output field logstreams lasteventtimestamp logstreams lastingestiontime number time value logstreams uploadsequencetoken string output field logstreams uploadsequencetoken logstreams arn string output field logstreams arn logstreams storedbytes number output field logstreams storedbytes nexttoken string output field nexttoken output example {"logstreams" \[{"logstreamname" "string","creationtime" 123,"firsteventtimestamp" 123,"lasteventtimestamp" 123,"lastingestiontime" 123,"uploadsequencetoken" "string","arn" "string","storedbytes" 123}],"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 input example {"loggroupname" "abcd","status" "scheduled","maxresults" 123,"nexttoken" "xyz"} output parameter type description queries array output field queries queries queryid string unique identifier queries querystring string output field queries querystring queries status string status value queries createtime number time value queries loggroupname string name of the resource nexttoken string output field nexttoken output example {"queries" \[{"queryid" "string","querystring" "string","status" "scheduled","createtime" 123,"loggroupname" "string"}],"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 input example {"loggroupname" "/aws/lambda/apphub bundles","loggroupnames" \["string1"],"loggroupidentifiers" \["string1"],"starttime" 123,"endtime" 123,"querystring" "string","limit" 123} output parameter type description queryid string unique identifier output 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 input example {"query id" "82be43d4 c53f 4b02 9812 37bf08c5c15f"} output parameter type description success boolean whether the operation was successful output example {"success"\ true} response headers header description example content type the media type of the resource application/json date the date and time at which the message was originated thu, 01 jan 2024 00 00 00 gmt