Create Amazon OpenSearch Service subscription filter from cloudwatch log group to another account对应aws命令
要创建Amazon OpenSearch Service订阅过滤器,您可以使用以下AWS CLI命令:
aws logs put-subscription-filter \
--log-group-name <log-group-name> \
--filter-name <filter-name> \
--filter-pattern <filter-pattern> \
--destination-arn <destination-arn> \
--role-arn <role-arn> \
--distribution <distribution> \
--region <region>
其中,替换以下参数和值:
<log-group-name>:CloudWatch日志组的名称。<filter-name>:订阅过滤器的名称。<filter-pattern>:用于筛选要发送到目标的日志事件的过滤器模式。<destination-arn>:目标Amazon OpenSearch Service集群的ARN。<role-arn>:具有必要权限的IAM角色的ARN。<distribution>:指定日志事件分发方式的值,可以是ByLogStream或Random。<region>:目标Amazon OpenSearch Service集群所在的AWS区域。
请注意,您需要在运行此命令之前配置AWS CLI,并具有适当的权限才能成功执行该命令
AI 优化版
原文地址:https://www.cveoy.top/t/topic/hMXa 著作权归作者所有。请勿转载和采集!