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

问题描述 投票:1回答:1

在AWS CloudWatch中,可以添加Subscriptions to a Log group,以便该组中的日志可以流到Kinesis,Firehose等。可以在控制台中查看这些订阅:

Subscriptions

如何使用boto3查询'Subscriptions'的值?

我尝试了以下操作

Log group

但是这只会返回以下属性(注意:已删除特定值):

enter image description here

返回的json不包含'subscriptions'键/值对。

提前感谢您的考虑和回复

amazon-web-services boto3 amazon-cloudwatch amazon-cloudwatchlogs
1个回答
0
投票

有一个import boto3 client = boto3.client('logs', region_name='us-east-1') client.describe_log_groups() API。{'logGroups': [{'logGroupName': '<myGroupNameValue>', 'creationTime': <myCreationTimeValue>, 'metricFilterCount': 0, 'arn': '<myArnValue>', 'storedBytes': <myStoredBytesValue>}, ...]}

对您有帮助吗?

© www.soinside.com 2019 - 2024. All rights reserved.