@aws-sdk/client-cloudwatch-logs 3.485.0 → 3.489.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,7 @@ class AccessDeniedException extends CloudWatchLogsServiceException_1.CloudWatchL
17
17
  exports.AccessDeniedException = AccessDeniedException;
18
18
  exports.PolicyType = {
19
19
  DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY",
20
+ SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY",
20
21
  };
21
22
  exports.Scope = {
22
23
  ALL: "ALL",
@@ -13,6 +13,7 @@ export class AccessDeniedException extends __BaseException {
13
13
  }
14
14
  export const PolicyType = {
15
15
  DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY",
16
+ SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY",
16
17
  };
17
18
  export const Scope = {
18
19
  ALL: "ALL",
@@ -26,9 +26,20 @@ declare const DeleteAccountPolicyCommand_base: {
26
26
  };
27
27
  /**
28
28
  * @public
29
- * <p>Deletes a CloudWatch Logs account policy.</p>
30
- * <p>To use this operation, you must be signed on with the <code>logs:DeleteDataProtectionPolicy</code> and
31
- * <code>logs:DeleteAccountPolicy</code> permissions.</p>
29
+ * <p>Deletes a CloudWatch Logs account policy. This stops the policy from applying to all log groups
30
+ * or a subset of log groups in the account. Log-group level policies will still be in effect.</p>
31
+ * <p>To use this operation, you must be signed on with the correct permissions depending on the type of policy
32
+ * that you are deleting.</p>
33
+ * <ul>
34
+ * <li>
35
+ * <p>To delete a data protection policy, you must have the <code>logs:DeleteDataProtectionPolicy</code> and
36
+ * <code>logs:DeleteAccountPolicy</code> permissions.</p>
37
+ * </li>
38
+ * <li>
39
+ * <p>To delete a subscription filter policy, you must have the <code>logs:DeleteSubscriptionFilter</code> and
40
+ * <code>logs:DeleteAccountPolicy</code> permissions.</p>
41
+ * </li>
42
+ * </ul>
32
43
  * @example
33
44
  * Use a bare-bones client and the command you need to make an API call.
34
45
  * ```javascript
@@ -37,7 +48,7 @@ declare const DeleteAccountPolicyCommand_base: {
37
48
  * const client = new CloudWatchLogsClient(config);
38
49
  * const input = { // DeleteAccountPolicyRequest
39
50
  * policyName: "STRING_VALUE", // required
40
- * policyType: "DATA_PROTECTION_POLICY", // required
51
+ * policyType: "DATA_PROTECTION_POLICY" || "SUBSCRIPTION_FILTER_POLICY", // required
41
52
  * };
42
53
  * const command = new DeleteAccountPolicyCommand(input);
43
54
  * const response = await client.send(command);
@@ -34,7 +34,7 @@ declare const DescribeAccountPoliciesCommand_base: {
34
34
  * // const { CloudWatchLogsClient, DescribeAccountPoliciesCommand } = require("@aws-sdk/client-cloudwatch-logs"); // CommonJS import
35
35
  * const client = new CloudWatchLogsClient(config);
36
36
  * const input = { // DescribeAccountPoliciesRequest
37
- * policyType: "DATA_PROTECTION_POLICY", // required
37
+ * policyType: "DATA_PROTECTION_POLICY" || "SUBSCRIPTION_FILTER_POLICY", // required
38
38
  * policyName: "STRING_VALUE",
39
39
  * accountIdentifiers: [ // AccountIds
40
40
  * "STRING_VALUE",
@@ -48,8 +48,9 @@ declare const DescribeAccountPoliciesCommand_base: {
48
48
  * // policyName: "STRING_VALUE",
49
49
  * // policyDocument: "STRING_VALUE",
50
50
  * // lastUpdatedTime: Number("long"),
51
- * // policyType: "DATA_PROTECTION_POLICY",
51
+ * // policyType: "DATA_PROTECTION_POLICY" || "SUBSCRIPTION_FILTER_POLICY",
52
52
  * // scope: "ALL",
53
+ * // selectionCriteria: "STRING_VALUE",
53
54
  * // accountId: "STRING_VALUE",
54
55
  * // },
55
56
  * // ],
@@ -26,15 +26,20 @@ declare const PutAccountPolicyCommand_base: {
26
26
  };
27
27
  /**
28
28
  * @public
29
- * <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
29
+ * <p>Creates an account-level data protection policy or subscription filter policy that applies to all log groups
30
+ * or a subset of log groups in the account.</p>
31
+ * <p>
32
+ * <b>Data protection policy</b>
33
+ * </p>
34
+ * <p>A data protection policy can help safeguard sensitive
30
35
  * data that's ingested by your log groups by auditing and masking the sensitive log data. Each account can have only
31
- * one account-level policy.</p>
36
+ * one account-level data protection policy.</p>
32
37
  * <important>
33
38
  * <p>Sensitive data is detected and masked when it is ingested into a log group. When you set a
34
39
  * data protection policy, log events ingested into the log groups before that time are not masked.</p>
35
40
  * </important>
36
41
  * <p>If you use <code>PutAccountPolicy</code> to create a data protection policy for your whole account, it applies to both existing log groups
37
- * and all log groups that are created later in this account. The account policy is applied to existing log groups
42
+ * and all log groups that are created later in this account. The account-level policy is applied to existing log groups
38
43
  * with eventual consistency. It might take up to 5 minutes before sensitive data in existing log groups begins to be masked.</p>
39
44
  * <p>By default, when a user views a log event that includes masked data, the sensitive data is replaced by asterisks.
40
45
  * A user who has the <code>logs:Unmask</code> permission can use a
@@ -45,14 +50,43 @@ declare const PutAccountPolicyCommand_base: {
45
50
  * console by running a CloudWatch Logs Insights query with the <code>unmask</code> query command.</p>
46
51
  * <p>For more information, including a list of types of data that can be audited and masked, see
47
52
  * <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html">Protect sensitive log data with masking</a>.</p>
48
- * <p>To use the <code>PutAccountPolicy</code> operation, you must be signed on with the <code>logs:PutDataProtectionPolicy</code>
53
+ * <p>To use the <code>PutAccountPolicy</code> operation for a data protection policy, you must be signed on with
54
+ * the <code>logs:PutDataProtectionPolicy</code>
49
55
  * and <code>logs:PutAccountPolicy</code> permissions.</p>
50
- * <p>The <code>PutAccountPolicy</code> operation applies to all log groups in the account. You can also use
56
+ * <p>The <code>PutAccountPolicy</code> operation applies to all log groups in the account. You can use
51
57
  * <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutDataProtectionPolicy.html">PutDataProtectionPolicy</a>
52
58
  * to create a data protection policy that applies to just one log group.
53
59
  * If a log group has its own data protection policy and
54
60
  * the account also has an account-level data protection policy, then the two policies are cumulative. Any sensitive term
55
61
  * specified in either policy is masked.</p>
62
+ * <p>
63
+ * <b>Subscription filter policy</b>
64
+ * </p>
65
+ * <p>A subscription filter policy sets up a real-time feed of log events from CloudWatch Logs to other Amazon Web Services services.
66
+ * Account-level subscription filter policies apply to both existing log groups and log groups that are created later in
67
+ * this account. Supported destinations are Kinesis Data Streams, Kinesis Data Firehose, and
68
+ * Lambda. When log events are sent to the receiving service, they are Base64 encoded and
69
+ * compressed with the GZIP format.</p>
70
+ * <p>The following destinations are supported for subscription filters:</p>
71
+ * <ul>
72
+ * <li>
73
+ * <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
74
+ * </li>
75
+ * <li>
76
+ * <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
77
+ * </li>
78
+ * <li>
79
+ * <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
80
+ * </li>
81
+ * <li>
82
+ * <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
83
+ * delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
84
+ * </li>
85
+ * </ul>
86
+ * <p>Each account can have one account-level subscription filter policy.
87
+ * If you are updating an existing filter, you must specify the correct name in <code>PolicyName</code>.
88
+ * To perform a <code>PutAccountPolicy</code> subscription filter operation for any destination except a Lambda
89
+ * function, you must also have the <code>iam:PassRole</code> permission.</p>
56
90
  * @example
57
91
  * Use a bare-bones client and the command you need to make an API call.
58
92
  * ```javascript
@@ -62,8 +96,9 @@ declare const PutAccountPolicyCommand_base: {
62
96
  * const input = { // PutAccountPolicyRequest
63
97
  * policyName: "STRING_VALUE", // required
64
98
  * policyDocument: "STRING_VALUE", // required
65
- * policyType: "DATA_PROTECTION_POLICY", // required
99
+ * policyType: "DATA_PROTECTION_POLICY" || "SUBSCRIPTION_FILTER_POLICY", // required
66
100
  * scope: "ALL",
101
+ * selectionCriteria: "STRING_VALUE",
67
102
  * };
68
103
  * const command = new PutAccountPolicyCommand(input);
69
104
  * const response = await client.send(command);
@@ -72,8 +107,9 @@ declare const PutAccountPolicyCommand_base: {
72
107
  * // policyName: "STRING_VALUE",
73
108
  * // policyDocument: "STRING_VALUE",
74
109
  * // lastUpdatedTime: Number("long"),
75
- * // policyType: "DATA_PROTECTION_POLICY",
110
+ * // policyType: "DATA_PROTECTION_POLICY" || "SUBSCRIPTION_FILTER_POLICY",
76
111
  * // scope: "ALL",
112
+ * // selectionCriteria: "STRING_VALUE",
77
113
  * // accountId: "STRING_VALUE",
78
114
  * // },
79
115
  * // };
@@ -64,6 +64,9 @@ declare const StartLiveTailCommand_base: {
64
64
  * <p>You can end a session before it times out by closing the session stream or by closing the client that is receiving the
65
65
  * stream. The session also ends if the established connection between the client and the server breaks.</p>
66
66
  * </important>
67
+ * <p>For examples of using an SDK to start a Live Tail session, see
68
+ * <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/example_cloudwatch-logs_StartLiveTail_section.html">
69
+ * Start a Live Tail session using an Amazon Web Services SDK</a>.</p>
67
70
  * @example
68
71
  * Use a bare-bones client and the command you need to make an API call.
69
72
  * ```javascript
@@ -18,6 +18,7 @@ export declare class AccessDeniedException extends __BaseException {
18
18
  */
19
19
  export declare const PolicyType: {
20
20
  readonly DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY";
21
+ readonly SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY";
21
22
  };
22
23
  /**
23
24
  * @public
@@ -65,6 +66,11 @@ export interface AccountPolicy {
65
66
  * <p>The scope of the account policy.</p>
66
67
  */
67
68
  scope?: Scope;
69
+ /**
70
+ * @public
71
+ * <p>The log group selection criteria for this subscription filter policy.</p>
72
+ */
73
+ selectionCriteria?: string;
68
74
  /**
69
75
  * @public
70
76
  * <p>The Amazon Web Services account ID that the policy applies to.</p>
@@ -785,7 +791,7 @@ export interface CreateLogGroupRequest {
785
791
  * </ul>
786
792
  * <p>If you omit this parameter, the default of <code>STANDARD</code> is used.</p>
787
793
  * <important>
788
- * <p>After a log group is created, its class can't be changed.</p>
794
+ * <p>The value of <code>logGroupClass</code> can't be changed after a log group is created.</p>
789
795
  * </important>
790
796
  * <p>For details about the features supported by each class, see
791
797
  * <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CloudWatch_Logs_Log_Classes.html">Log classes</a>
@@ -853,7 +859,7 @@ export interface DeleteAccountPolicyRequest {
853
859
  policyName: string | undefined;
854
860
  /**
855
861
  * @public
856
- * <p>The type of policy to delete. Currently, the only valid value is <code>DATA_PROTECTION_POLICY</code>.</p>
862
+ * <p>The type of policy to delete.</p>
857
863
  */
858
864
  policyType: PolicyType | undefined;
859
865
  }
@@ -1197,7 +1203,7 @@ export interface DescribeAccountPoliciesRequest {
1197
1203
  /**
1198
1204
  * @public
1199
1205
  * <p>Use this parameter to limit the returned policies to only the policies that match the policy type that you
1200
- * specify. Currently, the only valid value is <code>DATA_PROTECTION_POLICY</code>.</p>
1206
+ * specify.</p>
1201
1207
  */
1202
1208
  policyType: PolicyType | undefined;
1203
1209
  /**
@@ -3374,8 +3380,11 @@ export interface PutAccountPolicyRequest {
3374
3380
  policyName: string | undefined;
3375
3381
  /**
3376
3382
  * @public
3377
- * <p>Specify the data protection policy, in JSON.</p>
3378
- * <p>This policy must include two JSON blocks:</p>
3383
+ * <p>Specify the policy, in JSON.</p>
3384
+ * <p>
3385
+ * <b>Data protection policy</b>
3386
+ * </p>
3387
+ * <p>A data protection policy must include two JSON blocks:</p>
3379
3388
  * <ul>
3380
3389
  * <li>
3381
3390
  * <p>The first block must include both a <code>DataIdentifer</code> array and an
@@ -3408,12 +3417,56 @@ export interface PutAccountPolicyRequest {
3408
3417
  * <code>Description</code>, and <code>Version</code> fields. The <code>Name</code> is different than the
3409
3418
  * operation's <code>policyName</code> parameter, and is used as a dimension when
3410
3419
  * CloudWatch Logs reports audit findings metrics to CloudWatch.</p>
3411
- * <p>The JSON specified in <code>policyDocument</code> can be up to 30,720 characters.</p>
3420
+ * <p>The JSON specified in <code>policyDocument</code> can be up to 30,720 characters long.</p>
3421
+ * <p>
3422
+ * <b>Subscription filter policy</b>
3423
+ * </p>
3424
+ * <p>A subscription filter policy can include the following attributes in a JSON block:</p>
3425
+ * <ul>
3426
+ * <li>
3427
+ * <p>
3428
+ * <b>DestinationArn</b> The ARN of the destination
3429
+ * to deliver log events to. Supported destinations are:</p>
3430
+ * <ul>
3431
+ * <li>
3432
+ * <p>An Kinesis Data Streams data stream in the same account as the subscription policy, for same-account delivery.</p>
3433
+ * </li>
3434
+ * <li>
3435
+ * <p>An Kinesis Data Firehose data stream in the same account as the subscription policy, for same-account delivery.</p>
3436
+ * </li>
3437
+ * <li>
3438
+ * <p>A Lambda function in the same account as the subscription policy, for same-account delivery.</p>
3439
+ * </li>
3440
+ * <li>
3441
+ * <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
3442
+ * delivery. Kinesis Data Streams and Kinesis Data Firehose are supported as logical destinations.</p>
3443
+ * </li>
3444
+ * </ul>
3445
+ * </li>
3446
+ * <li>
3447
+ * <p>
3448
+ * <b>RoleArn</b> The ARN of an IAM role that grants CloudWatch Logs permissions to deliver ingested log
3449
+ * events to the destination stream. You don't need to provide the ARN when you are working with
3450
+ * a logical destination for cross-account delivery.</p>
3451
+ * </li>
3452
+ * <li>
3453
+ * <p>
3454
+ * <b>FilterPattern</b> A filter pattern for subscribing to a
3455
+ * filtered stream of log events.</p>
3456
+ * </li>
3457
+ * <li>
3458
+ * <p>
3459
+ * <b>Distribution</b>The method used to distribute log data to the destination.
3460
+ * By default, log data is
3461
+ * grouped by log stream, but the grouping can be set to <code>Random</code> for a more even distribution.
3462
+ * This property is only applicable when the destination is an Kinesis Data Streams data stream.</p>
3463
+ * </li>
3464
+ * </ul>
3412
3465
  */
3413
3466
  policyDocument: string | undefined;
3414
3467
  /**
3415
3468
  * @public
3416
- * <p>Currently the only valid value for this parameter is <code>DATA_PROTECTION_POLICY</code>.</p>
3469
+ * <p>The type of policy that you're creating or updating.</p>
3417
3470
  */
3418
3471
  policyType: PolicyType | undefined;
3419
3472
  /**
@@ -3423,6 +3476,17 @@ export interface PutAccountPolicyRequest {
3423
3476
  * of <code>ALL</code> is used.</p>
3424
3477
  */
3425
3478
  scope?: Scope;
3479
+ /**
3480
+ * @public
3481
+ * <p>Use this parameter to apply the subscription filter policy to a subset of log groups in the account.
3482
+ * Currently, the only supported filter is <code>LogGroupName NOT IN []</code>. The <code>selectionCriteria</code>
3483
+ * string can be up to 25KB in length. The length is determined by using its UTF-8 bytes.</p>
3484
+ * <p>Using the <code>selectionCriteria</code> parameter is useful to help prevent infinite loops.
3485
+ * For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Subscriptions-recursion-prevention.html">Log recursion prevention</a>.</p>
3486
+ * <p>Specifing <code>selectionCriteria</code> is valid only when you specify <code> SUBSCRIPTION_FILTER_POLICY</code>
3487
+ * for <code>policyType</code>.</p>
3488
+ */
3489
+ selectionCriteria?: string;
3426
3490
  }
3427
3491
  /**
3428
3492
  * @public
@@ -4005,6 +4069,7 @@ export interface StartLiveTailRequest {
4005
4069
  * @public
4006
4070
  * <p>If you specify this parameter, then only log events in the log streams that you specify here are
4007
4071
  * included in the Live Tail session.</p>
4072
+ * <p>If you specify this field, you can't also specify the <code>logStreamNamePrefixes</code> field.</p>
4008
4073
  * <note>
4009
4074
  * <p>You can specify this parameter only if you specify only one log group in <code>logGroupIdentifiers</code>.</p>
4010
4075
  * </note>
@@ -4015,6 +4080,7 @@ export interface StartLiveTailRequest {
4015
4080
  * <p>If you specify this parameter, then only log events in the log streams that have names that start with the
4016
4081
  * prefixes that you specify here are
4017
4082
  * included in the Live Tail session.</p>
4083
+ * <p>If you specify this field, you can't also specify the <code>logStreamNames</code> field.</p>
4018
4084
  * <note>
4019
4085
  * <p>You can specify this parameter only if you specify only one log group in <code>logGroupIdentifiers</code>.</p>
4020
4086
  * </note>
@@ -9,6 +9,7 @@ export declare class AccessDeniedException extends __BaseException {
9
9
  }
10
10
  export declare const PolicyType: {
11
11
  readonly DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY";
12
+ readonly SUBSCRIPTION_FILTER_POLICY: "SUBSCRIPTION_FILTER_POLICY";
12
13
  };
13
14
  export type PolicyType = (typeof PolicyType)[keyof typeof PolicyType];
14
15
  export declare const Scope: {
@@ -21,6 +22,7 @@ export interface AccountPolicy {
21
22
  lastUpdatedTime?: number;
22
23
  policyType?: PolicyType;
23
24
  scope?: Scope;
25
+ selectionCriteria?: string;
24
26
  accountId?: string;
25
27
  }
26
28
  export interface PatternToken {
@@ -827,6 +829,7 @@ export interface PutAccountPolicyRequest {
827
829
  policyDocument: string | undefined;
828
830
  policyType: PolicyType | undefined;
829
831
  scope?: Scope;
832
+ selectionCriteria?: string;
830
833
  }
831
834
  export interface PutAccountPolicyResponse {
832
835
  accountPolicy?: AccountPolicy;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-cloudwatch-logs",
3
3
  "description": "AWS SDK for JavaScript Cloudwatch Logs Client for Node.js, Browser and React Native",
4
- "version": "3.485.0",
4
+ "version": "3.489.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,19 +20,19 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.485.0",
23
+ "@aws-sdk/client-sts": "3.489.0",
24
24
  "@aws-sdk/core": "3.485.0",
25
- "@aws-sdk/credential-provider-node": "3.485.0",
26
- "@aws-sdk/middleware-host-header": "3.485.0",
27
- "@aws-sdk/middleware-logger": "3.485.0",
28
- "@aws-sdk/middleware-recursion-detection": "3.485.0",
29
- "@aws-sdk/middleware-signing": "3.485.0",
30
- "@aws-sdk/middleware-user-agent": "3.485.0",
31
- "@aws-sdk/region-config-resolver": "3.485.0",
32
- "@aws-sdk/types": "3.485.0",
33
- "@aws-sdk/util-endpoints": "3.485.0",
34
- "@aws-sdk/util-user-agent-browser": "3.485.0",
35
- "@aws-sdk/util-user-agent-node": "3.485.0",
25
+ "@aws-sdk/credential-provider-node": "3.489.0",
26
+ "@aws-sdk/middleware-host-header": "3.489.0",
27
+ "@aws-sdk/middleware-logger": "3.489.0",
28
+ "@aws-sdk/middleware-recursion-detection": "3.489.0",
29
+ "@aws-sdk/middleware-signing": "3.489.0",
30
+ "@aws-sdk/middleware-user-agent": "3.489.0",
31
+ "@aws-sdk/region-config-resolver": "3.489.0",
32
+ "@aws-sdk/types": "3.489.0",
33
+ "@aws-sdk/util-endpoints": "3.489.0",
34
+ "@aws-sdk/util-user-agent-browser": "3.489.0",
35
+ "@aws-sdk/util-user-agent-node": "3.489.0",
36
36
  "@smithy/config-resolver": "^2.0.23",
37
37
  "@smithy/core": "^1.2.2",
38
38
  "@smithy/eventstream-serde-browser": "^2.0.16",