[英]Querying AWS Cloudwatch Log Group Subscriptions Using boto3
在 AWS CloudWatch 中,可以將Subscriptions
添加到Log group
,以便組內的日志可以流向 Kinesis、Firehose 等。可以在控制台中查看這些訂閱:
如何使用 boto3 查詢“訂閱”值?
我嘗試了以下
import boto3
client = boto3.client('logs', region_name='us-east-1')
client.describe_log_groups()
但這只返回以下屬性(注意:特定值已被編輯):
{'logGroups': [{'logGroupName': '<myGroupNameValue>',
'creationTime': <myCreationTimeValue>, 'metricFilterCount': 0,
'arn': '<myArnValue>',
'storedBytes': <myStoredBytesValue>},
...]}
返回的 json 不包含“訂閱”鍵/值對。
預先感謝您的考慮和回復
有一個describe_subscription_filters
API。https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/logs.html#CloudWatchLogs.Client.describe_subscription_filters
這對你有幫助嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.