You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(client-cloudwatch-logs): Add support for account level subscription filter policies to PutAccountPolicy, DescribeAccountPolicies, and DeleteAccountPolicy APIs. Additionally, PutAccountPolicy has been modified with new optional "selectionCriteria" parameter for resource selection.
* <p>Creates an account-level data protection policy that applies to all log groups in the account. A data protection policy can help safeguard sensitive
31
+
* <p>Creates an account-level data protection policy or subscription filter policy that applies to all log groups
32
+
* or a subset of log groups in the account.</p>
33
+
* <p>
34
+
* <b>Data protection policy</b>
35
+
* </p>
36
+
* <p>A data protection policy can help safeguard sensitive
32
37
* data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only
33
-
* one account-level policy.</p>
38
+
* one account-level data protection policy.</p>
34
39
* <important>
35
40
* <p>Sensitive data is detected and masked when it is ingested into a log group. When you set a
36
41
* data protection policy, log events ingested into the log groups before that time are not masked.</p>
37
42
* </important>
38
43
* <p>If you use <code>PutAccountPolicy</code> to create a data protection policy for your whole account, it applies to both existing log groups
39
-
* and all log groups that are created later in this account. The account policy is applied to existing log groups
44
+
* and all log groups that are created later in this account. The account-level policy is applied to existing log groups
40
45
* with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked.</p>
41
46
* <p>By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks.
42
47
* A user who has the <code>logs:Unmask</code> permission can use a
* to create a data protection policy that applies to just one log group.
55
61
* If a log group has its own data protection policy and
56
62
* the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term
57
63
* specified in either policy is masked.</p>
64
+
* <p>
65
+
* <b>Subscription filter policy</b>
66
+
* </p>
67
+
* <p>A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services.
68
+
* Account-level subscription filter policies apply to both existing log groups and log groups that are created later in
69
+
* this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and
70
+
* Lambda. When log events are sent to the receiving service, they are Base64 encoded and
71
+
* compressed with the GZIP format.</p>
72
+
* <p>The following destinations are supported for subscription filters:</p>
73
+
* <ul>
74
+
* <li>
75
+
* <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
76
+
* </li>
77
+
* <li>
78
+
* <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
79
+
* </li>
80
+
* <li>
81
+
* <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
82
+
* </li>
83
+
* <li>
84
+
* <p>A logical destination in a different account created with <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html">PutDestination</a>, for cross-account
85
+
* delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
86
+
* </li>
87
+
* </ul>
88
+
* <p>Each account can have one account-level subscription filter policy.
89
+
* If you are updating an existing filter, you must specify the correct name in <code>PolicyName</code>.
90
+
* To perform a <code>PutAccountPolicy</code> subscription filter operation for any destination except a Lambda
91
+
* function, you must also have the <code>iam:PassRole</code> permission.</p>
58
92
* @example
59
93
* Use a bare-bones client and the command you need to make an API call.
* <code>Description</code>, and <code>Version</code> fields. The <code>Name</code> is different than the
3920
3930
* operation's <code>policyName</code> parameter, and is used as a dimension when
3921
3931
* CloudWatch Logs reports audit findings metrics to CloudWatch.</p>
3922
-
* <p>The JSON specified in <code>policyDocument</code> can be up to 30,720 characters.</p>
3932
+
* <p>The JSON specified in <code>policyDocument</code> can be up to 30,720 characters long.</p>
3933
+
* <p>
3934
+
* <b>Subscription filter policy</b>
3935
+
* </p>
3936
+
* <p>A subscription filter policy can include the following attributes in a JSON block:</p>
3937
+
* <ul>
3938
+
* <li>
3939
+
* <p>
3940
+
* <b>DestinationArn</b> The ARN of the destination
3941
+
* to deliver log events to. Supported destinations are:</p>
3942
+
* <ul>
3943
+
* <li>
3944
+
* <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
3945
+
* </li>
3946
+
* <li>
3947
+
* <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
3948
+
* </li>
3949
+
* <li>
3950
+
* <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
3951
+
* </li>
3952
+
* <li>
3953
+
* <p>A logical destination in a different account created with <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDestination.html">PutDestination</a>, for cross-account
3954
+
* delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
3955
+
* </li>
3956
+
* </ul>
3957
+
* </li>
3958
+
* <li>
3959
+
* <p>
3960
+
* <b>RoleArn</b> The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log
3961
+
* events to the destination stream. You don't need to provide the ARN when you are working with
3962
+
* a logical destination for cross-account delivery.</p>
3963
+
* </li>
3964
+
* <li>
3965
+
* <p>
3966
+
* <b>FilterPattern</b> A filter pattern for subscribing to a
3967
+
* filtered stream of log events.</p>
3968
+
* </li>
3969
+
* <li>
3970
+
* <p>
3971
+
* <b>Distribution</b>The method used to distribute log data to the destination.
3972
+
* By default, log data is
3973
+
* grouped by log stream, but the grouping can be set to <code>Random</code> for a more even distribution.
3974
+
* This property is only applicable when the destination is an Kinesis Data Streams data stream.</p>
3975
+
* </li>
3976
+
* </ul>
3923
3977
*/
3924
3978
policyDocument: string|undefined;
3925
3979
3926
3980
/**
3927
3981
* @public
3928
-
* <p>Currently the only valid value for this parameter is <code>DATA_PROTECTION_POLICY</code>.</p>
3982
+
* <p>The type of policy that you're creating or updating.</p>
* <p>Use this parameter to apply the subscription filter policy to a subset of log groups in the account.
3997
+
* Currently, the only supported filter is <code>LogGroupName NOT IN []</code>. The <code>selectionCriteria</code>
3998
+
* string can be up to 25KB in length. The length is determined by using its UTF-8 bytes.</p>
3999
+
* <p>Using the <code>selectionCriteria</code> parameter is useful to help prevent infinite loops.
4000
+
* For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions-recursion-prevention.html">Log recursion prevention</a>.</p>
4001
+
* <p>Specifing <code>selectionCriteria</code> is valid only when you specify <code> SUBSCRIPTION_FILTER_POLICY</code>
0 commit comments