简体   繁体   English

使用 boto3 查询 AWS Cloudwatch 日志组订阅

[英]Querying AWS Cloudwatch Log Group Subscriptions Using boto3

Within AWS CloudWatch it is possible to add Subscriptions to a Log group so that logs within the group can flow to Kinesis, Firehose, etc. These subscriptions can be viewed in the console:在 AWS CloudWatch 中,可以将Subscriptions添加到Log group ,以便组内的日志可以流向 Kinesis、Firehose 等。可以在控制台中查看这些订阅:

在此处输入图像描述

How can the 'Subscriptions' values be queried using boto3?如何使用 boto3 查询“订阅”值?

I have tried the following我尝试了以下

import boto3
client = boto3.client('logs', region_name='us-east-1')
client.describe_log_groups()

But that only returns the following attributes (note: specific values have been redacted):但这只返回以下属性(注意:特定值已被编辑):

{'logGroups': [{'logGroupName': '<myGroupNameValue>',   
   'creationTime': <myCreationTimeValue>,    'metricFilterCount': 0,
   'arn': '<myArnValue>', 
   'storedBytes': <myStoredBytesValue>},
   ...]}

The returned json does not include a 'subscriptions' key/value pair.返回的 json 不包含“订阅”键/值对。

Thank you in advance for your consideration and response预先感谢您的考虑和回复

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM