@aws-sdk/client-cloudwatch-logs 3.347.0 → 3.348.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.
Files changed (43) hide show
  1. package/README.md +24 -0
  2. package/dist-cjs/CloudWatchLogs.js +6 -0
  3. package/dist-cjs/commands/DeleteAccountPolicyCommand.js +46 -0
  4. package/dist-cjs/commands/DescribeAccountPoliciesCommand.js +46 -0
  5. package/dist-cjs/commands/PutAccountPolicyCommand.js +46 -0
  6. package/dist-cjs/commands/index.js +3 -0
  7. package/dist-cjs/endpoint/ruleset.js +3 -3
  8. package/dist-cjs/models/models_0.js +10 -1
  9. package/dist-cjs/protocols/Aws_json1_1.js +147 -2
  10. package/dist-es/CloudWatchLogs.js +6 -0
  11. package/dist-es/commands/DeleteAccountPolicyCommand.js +42 -0
  12. package/dist-es/commands/DescribeAccountPoliciesCommand.js +42 -0
  13. package/dist-es/commands/PutAccountPolicyCommand.js +42 -0
  14. package/dist-es/commands/index.js +3 -0
  15. package/dist-es/endpoint/ruleset.js +3 -3
  16. package/dist-es/models/models_0.js +9 -0
  17. package/dist-es/protocols/Aws_json1_1.js +138 -0
  18. package/dist-types/CloudWatchLogs.d.ts +21 -0
  19. package/dist-types/CloudWatchLogsClient.d.ts +5 -2
  20. package/dist-types/commands/CreateLogGroupCommand.d.ts +1 -1
  21. package/dist-types/commands/DeleteAccountPolicyCommand.d.ts +86 -0
  22. package/dist-types/commands/DescribeAccountPoliciesCommand.d.ts +98 -0
  23. package/dist-types/commands/DescribeLogGroupsCommand.d.ts +3 -0
  24. package/dist-types/commands/FilterLogEventsCommand.d.ts +1 -1
  25. package/dist-types/commands/PutAccountPolicyCommand.d.ts +121 -0
  26. package/dist-types/commands/PutDataProtectionPolicyCommand.d.ts +6 -0
  27. package/dist-types/commands/PutLogEventsCommand.d.ts +3 -0
  28. package/dist-types/commands/PutSubscriptionFilterCommand.d.ts +2 -1
  29. package/dist-types/commands/StartQueryCommand.d.ts +2 -2
  30. package/dist-types/commands/index.d.ts +3 -0
  31. package/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  32. package/dist-types/models/models_0.d.ts +194 -11
  33. package/dist-types/protocols/Aws_json1_1.d.ts +27 -0
  34. package/dist-types/ts3.4/CloudWatchLogs.d.ts +51 -0
  35. package/dist-types/ts3.4/CloudWatchLogsClient.d.ts +18 -0
  36. package/dist-types/ts3.4/commands/DeleteAccountPolicyCommand.d.ts +34 -0
  37. package/dist-types/ts3.4/commands/DescribeAccountPoliciesCommand.d.ts +42 -0
  38. package/dist-types/ts3.4/commands/PutAccountPolicyCommand.d.ts +38 -0
  39. package/dist-types/ts3.4/commands/index.d.ts +3 -0
  40. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +1 -1
  41. package/dist-types/ts3.4/models/models_0.d.ts +43 -0
  42. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +36 -0
  43. package/package.json +4 -4
package/README.md CHANGED
@@ -276,6 +276,14 @@ CreateLogStream
276
276
 
277
277
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/createlogstreamcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/createlogstreamcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/createlogstreamcommandoutput.html)
278
278
 
279
+ </details>
280
+ <details>
281
+ <summary>
282
+ DeleteAccountPolicy
283
+ </summary>
284
+
285
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/deleteaccountpolicycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/deleteaccountpolicycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/deleteaccountpolicycommandoutput.html)
286
+
279
287
  </details>
280
288
  <details>
281
289
  <summary>
@@ -348,6 +356,14 @@ DeleteSubscriptionFilter
348
356
 
349
357
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/deletesubscriptionfiltercommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/deletesubscriptionfiltercommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/deletesubscriptionfiltercommandoutput.html)
350
358
 
359
+ </details>
360
+ <details>
361
+ <summary>
362
+ DescribeAccountPolicies
363
+ </summary>
364
+
365
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/describeaccountpoliciescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/describeaccountpoliciescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/describeaccountpoliciescommandoutput.html)
366
+
351
367
  </details>
352
368
  <details>
353
369
  <summary>
@@ -492,6 +508,14 @@ ListTagsLogGroup
492
508
 
493
509
  [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/listtagsloggroupcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/listtagsloggroupcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/listtagsloggroupcommandoutput.html)
494
510
 
511
+ </details>
512
+ <details>
513
+ <summary>
514
+ PutAccountPolicy
515
+ </summary>
516
+
517
+ [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/classes/putaccountpolicycommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/putaccountpolicycommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-cloudwatch-logs/interfaces/putaccountpolicycommandoutput.html)
518
+
495
519
  </details>
496
520
  <details>
497
521
  <summary>
@@ -8,6 +8,7 @@ const CancelExportTaskCommand_1 = require("./commands/CancelExportTaskCommand");
8
8
  const CreateExportTaskCommand_1 = require("./commands/CreateExportTaskCommand");
9
9
  const CreateLogGroupCommand_1 = require("./commands/CreateLogGroupCommand");
10
10
  const CreateLogStreamCommand_1 = require("./commands/CreateLogStreamCommand");
11
+ const DeleteAccountPolicyCommand_1 = require("./commands/DeleteAccountPolicyCommand");
11
12
  const DeleteDataProtectionPolicyCommand_1 = require("./commands/DeleteDataProtectionPolicyCommand");
12
13
  const DeleteDestinationCommand_1 = require("./commands/DeleteDestinationCommand");
13
14
  const DeleteLogGroupCommand_1 = require("./commands/DeleteLogGroupCommand");
@@ -17,6 +18,7 @@ const DeleteQueryDefinitionCommand_1 = require("./commands/DeleteQueryDefinition
17
18
  const DeleteResourcePolicyCommand_1 = require("./commands/DeleteResourcePolicyCommand");
18
19
  const DeleteRetentionPolicyCommand_1 = require("./commands/DeleteRetentionPolicyCommand");
19
20
  const DeleteSubscriptionFilterCommand_1 = require("./commands/DeleteSubscriptionFilterCommand");
21
+ const DescribeAccountPoliciesCommand_1 = require("./commands/DescribeAccountPoliciesCommand");
20
22
  const DescribeDestinationsCommand_1 = require("./commands/DescribeDestinationsCommand");
21
23
  const DescribeExportTasksCommand_1 = require("./commands/DescribeExportTasksCommand");
22
24
  const DescribeLogGroupsCommand_1 = require("./commands/DescribeLogGroupsCommand");
@@ -35,6 +37,7 @@ const GetLogRecordCommand_1 = require("./commands/GetLogRecordCommand");
35
37
  const GetQueryResultsCommand_1 = require("./commands/GetQueryResultsCommand");
36
38
  const ListTagsForResourceCommand_1 = require("./commands/ListTagsForResourceCommand");
37
39
  const ListTagsLogGroupCommand_1 = require("./commands/ListTagsLogGroupCommand");
40
+ const PutAccountPolicyCommand_1 = require("./commands/PutAccountPolicyCommand");
38
41
  const PutDataProtectionPolicyCommand_1 = require("./commands/PutDataProtectionPolicyCommand");
39
42
  const PutDestinationCommand_1 = require("./commands/PutDestinationCommand");
40
43
  const PutDestinationPolicyCommand_1 = require("./commands/PutDestinationPolicyCommand");
@@ -57,6 +60,7 @@ const commands = {
57
60
  CreateExportTaskCommand: CreateExportTaskCommand_1.CreateExportTaskCommand,
58
61
  CreateLogGroupCommand: CreateLogGroupCommand_1.CreateLogGroupCommand,
59
62
  CreateLogStreamCommand: CreateLogStreamCommand_1.CreateLogStreamCommand,
63
+ DeleteAccountPolicyCommand: DeleteAccountPolicyCommand_1.DeleteAccountPolicyCommand,
60
64
  DeleteDataProtectionPolicyCommand: DeleteDataProtectionPolicyCommand_1.DeleteDataProtectionPolicyCommand,
61
65
  DeleteDestinationCommand: DeleteDestinationCommand_1.DeleteDestinationCommand,
62
66
  DeleteLogGroupCommand: DeleteLogGroupCommand_1.DeleteLogGroupCommand,
@@ -66,6 +70,7 @@ const commands = {
66
70
  DeleteResourcePolicyCommand: DeleteResourcePolicyCommand_1.DeleteResourcePolicyCommand,
67
71
  DeleteRetentionPolicyCommand: DeleteRetentionPolicyCommand_1.DeleteRetentionPolicyCommand,
68
72
  DeleteSubscriptionFilterCommand: DeleteSubscriptionFilterCommand_1.DeleteSubscriptionFilterCommand,
73
+ DescribeAccountPoliciesCommand: DescribeAccountPoliciesCommand_1.DescribeAccountPoliciesCommand,
69
74
  DescribeDestinationsCommand: DescribeDestinationsCommand_1.DescribeDestinationsCommand,
70
75
  DescribeExportTasksCommand: DescribeExportTasksCommand_1.DescribeExportTasksCommand,
71
76
  DescribeLogGroupsCommand: DescribeLogGroupsCommand_1.DescribeLogGroupsCommand,
@@ -84,6 +89,7 @@ const commands = {
84
89
  GetQueryResultsCommand: GetQueryResultsCommand_1.GetQueryResultsCommand,
85
90
  ListTagsForResourceCommand: ListTagsForResourceCommand_1.ListTagsForResourceCommand,
86
91
  ListTagsLogGroupCommand: ListTagsLogGroupCommand_1.ListTagsLogGroupCommand,
92
+ PutAccountPolicyCommand: PutAccountPolicyCommand_1.PutAccountPolicyCommand,
87
93
  PutDataProtectionPolicyCommand: PutDataProtectionPolicyCommand_1.PutDataProtectionPolicyCommand,
88
94
  PutDestinationCommand: PutDestinationCommand_1.PutDestinationCommand,
89
95
  PutDestinationPolicyCommand: PutDestinationPolicyCommand_1.PutDestinationPolicyCommand,
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteAccountPolicyCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class DeleteAccountPolicyCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteAccountPolicyCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudWatchLogsClient";
28
+ const commandName = "DeleteAccountPolicyCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: (_) => _,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_json1_1_1.se_DeleteAccountPolicyCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.de_DeleteAccountPolicyCommand)(output, context);
44
+ }
45
+ }
46
+ exports.DeleteAccountPolicyCommand = DeleteAccountPolicyCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DescribeAccountPoliciesCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class DescribeAccountPoliciesCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DescribeAccountPoliciesCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudWatchLogsClient";
28
+ const commandName = "DescribeAccountPoliciesCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: (_) => _,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_json1_1_1.se_DescribeAccountPoliciesCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.de_DescribeAccountPoliciesCommand)(output, context);
44
+ }
45
+ }
46
+ exports.DescribeAccountPoliciesCommand = DescribeAccountPoliciesCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutAccountPolicyCommand = exports.$Command = void 0;
4
+ const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
5
+ const middleware_serde_1 = require("@aws-sdk/middleware-serde");
6
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class PutAccountPolicyCommand extends smithy_client_1.Command {
10
+ static getEndpointParameterInstructions() {
11
+ return {
12
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
13
+ Endpoint: { type: "builtInParams", name: "endpoint" },
14
+ Region: { type: "builtInParams", name: "region" },
15
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
16
+ };
17
+ }
18
+ constructor(input) {
19
+ super();
20
+ this.input = input;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
24
+ this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutAccountPolicyCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudWatchLogsClient";
28
+ const commandName = "PutAccountPolicyCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: (_) => _,
34
+ outputFilterSensitiveLog: (_) => _,
35
+ };
36
+ const { requestHandler } = configuration;
37
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
38
+ }
39
+ serialize(input, context) {
40
+ return (0, Aws_json1_1_1.se_PutAccountPolicyCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.de_PutAccountPolicyCommand)(output, context);
44
+ }
45
+ }
46
+ exports.PutAccountPolicyCommand = PutAccountPolicyCommand;
@@ -6,6 +6,7 @@ tslib_1.__exportStar(require("./CancelExportTaskCommand"), exports);
6
6
  tslib_1.__exportStar(require("./CreateExportTaskCommand"), exports);
7
7
  tslib_1.__exportStar(require("./CreateLogGroupCommand"), exports);
8
8
  tslib_1.__exportStar(require("./CreateLogStreamCommand"), exports);
9
+ tslib_1.__exportStar(require("./DeleteAccountPolicyCommand"), exports);
9
10
  tslib_1.__exportStar(require("./DeleteDataProtectionPolicyCommand"), exports);
10
11
  tslib_1.__exportStar(require("./DeleteDestinationCommand"), exports);
11
12
  tslib_1.__exportStar(require("./DeleteLogGroupCommand"), exports);
@@ -15,6 +16,7 @@ tslib_1.__exportStar(require("./DeleteQueryDefinitionCommand"), exports);
15
16
  tslib_1.__exportStar(require("./DeleteResourcePolicyCommand"), exports);
16
17
  tslib_1.__exportStar(require("./DeleteRetentionPolicyCommand"), exports);
17
18
  tslib_1.__exportStar(require("./DeleteSubscriptionFilterCommand"), exports);
19
+ tslib_1.__exportStar(require("./DescribeAccountPoliciesCommand"), exports);
18
20
  tslib_1.__exportStar(require("./DescribeDestinationsCommand"), exports);
19
21
  tslib_1.__exportStar(require("./DescribeExportTasksCommand"), exports);
20
22
  tslib_1.__exportStar(require("./DescribeLogGroupsCommand"), exports);
@@ -33,6 +35,7 @@ tslib_1.__exportStar(require("./GetLogRecordCommand"), exports);
33
35
  tslib_1.__exportStar(require("./GetQueryResultsCommand"), exports);
34
36
  tslib_1.__exportStar(require("./ListTagsForResourceCommand"), exports);
35
37
  tslib_1.__exportStar(require("./ListTagsLogGroupCommand"), exports);
38
+ tslib_1.__exportStar(require("./PutAccountPolicyCommand"), exports);
36
39
  tslib_1.__exportStar(require("./PutDataProtectionPolicyCommand"), exports);
37
40
  tslib_1.__exportStar(require("./PutDestinationCommand"), exports);
38
41
  tslib_1.__exportStar(require("./PutDestinationPolicyCommand"), exports);
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
- const s = "fn", t = "argv", u = "ref";
5
- const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "error", g = "endpoint", h = "stringEquals", i = { "required": true, "default": false, "type": "Boolean" }, j = { [u]: "Region" }, k = { [u]: "Endpoint" }, l = { [s]: "booleanEquals", [t]: [{ [u]: "UseFIPS" }, true] }, m = { [s]: "booleanEquals", [t]: [{ [u]: "UseDualStack" }, true] }, n = {}, o = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: d }, "supportsFIPS"] }] }, p = { [s]: "booleanEquals", [t]: [true, { [s]: "getAttr", [t]: [{ [u]: d }, "supportsDualStack"] }] }, q = [l], r = [m];
6
- const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseDualStack: i, UseFIPS: i, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ [s]: "aws.partition", [t]: [j], assign: d }], type: e, rules: [{ conditions: [{ [s]: "isSet", [t]: [k] }], type: e, rules: [{ conditions: q, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: f }, { type: e, rules: [{ conditions: r, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: f }, { endpoint: { url: k, properties: n, headers: n }, type: g }] }] }, { conditions: [l, m], type: e, rules: [{ conditions: [o, p], type: e, rules: [{ endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: g }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: f }] }, { conditions: q, type: e, rules: [{ conditions: [o], type: e, rules: [{ type: e, rules: [{ conditions: [{ [s]: h, [t]: [j, "us-gov-east-1"] }], endpoint: { url: "https://logs.us-gov-east-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "us-gov-west-1"] }], endpoint: { url: "https://logs.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: g }, { endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: f }] }, { conditions: r, type: e, rules: [{ conditions: [p], type: e, rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: g }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { endpoint: { url: "https://logs.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] };
4
+ const s = "required", t = "fn", u = "argv", v = "ref";
5
+ const a = "isSet", b = "tree", c = "error", d = "endpoint", e = "PartitionResult", f = "stringEquals", g = { [s]: false, "type": "String" }, h = { [s]: true, "default": false, "type": "Boolean" }, i = { [v]: "Endpoint" }, j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }, k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }, l = {}, m = { [v]: "Region" }, n = { [t]: "booleanEquals", [u]: [true, { [t]: "getAttr", [u]: [{ [v]: e }, "supportsFIPS"] }] }, o = { [t]: "booleanEquals", [u]: [true, { [t]: "getAttr", [u]: [{ [v]: e }, "supportsDualStack"] }] }, p = [j], q = [k], r = [m];
6
+ const _data = { version: "1.0", parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, rules: [{ conditions: [{ [t]: a, [u]: [i] }], type: b, rules: [{ conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, { type: b, rules: [{ conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, { endpoint: { url: i, properties: l, headers: l }, type: d }] }] }, { type: b, rules: [{ conditions: [{ [t]: a, [u]: r }], type: b, rules: [{ conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], type: b, rules: [{ conditions: [j, k], type: b, rules: [{ conditions: [n, o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }] }, { conditions: p, type: b, rules: [{ conditions: [n], type: b, rules: [{ type: b, rules: [{ conditions: [{ [t]: f, [u]: [m, "us-gov-east-1"] }], endpoint: { url: "https://logs.us-gov-east-1.amazonaws.com", properties: l, headers: l }, type: d }, { conditions: [{ [t]: f, [u]: [m, "us-gov-west-1"] }], endpoint: { url: "https://logs.us-gov-west-1.amazonaws.com", properties: l, headers: l }, type: d }, { endpoint: { url: "https://logs-fips.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "FIPS is enabled but this partition does not support FIPS", type: c }] }, { conditions: q, type: b, rules: [{ conditions: [o], type: b, rules: [{ type: b, rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: l, headers: l }, type: d }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: c }] }, { type: b, rules: [{ endpoint: { url: "https://logs.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, type: d }] }] }] }, { error: "Invalid Configuration: Missing Region", type: c }] }] };
7
7
  exports.ruleSet = _data;
@@ -1,7 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TooManyTagsException = exports.MalformedQueryException = exports.UnrecognizedClientException = exports.InvalidSequenceTokenException = exports.Distribution = exports.QueryStatus = exports.StandardUnit = exports.OrderBy = exports.ExportTaskStatusCode = exports.DataProtectionStatus = exports.DataAlreadyAcceptedException = exports.ResourceAlreadyExistsException = exports.LimitExceededException = exports.InvalidOperationException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.OperationAbortedException = exports.InvalidParameterException = void 0;
3
+ exports.TooManyTagsException = exports.MalformedQueryException = exports.UnrecognizedClientException = exports.InvalidSequenceTokenException = exports.Distribution = exports.QueryStatus = exports.StandardUnit = exports.OrderBy = exports.InheritedProperty = exports.ExportTaskStatusCode = exports.DataProtectionStatus = exports.DataAlreadyAcceptedException = exports.ResourceAlreadyExistsException = exports.LimitExceededException = exports.InvalidOperationException = exports.ServiceUnavailableException = exports.ResourceNotFoundException = exports.OperationAbortedException = exports.InvalidParameterException = exports.Scope = exports.PolicyType = void 0;
4
4
  const CloudWatchLogsServiceException_1 = require("./CloudWatchLogsServiceException");
5
+ exports.PolicyType = {
6
+ DATA_PROTECTION_POLICY: "DATA_PROTECTION_POLICY",
7
+ };
8
+ exports.Scope = {
9
+ ALL: "ALL",
10
+ };
5
11
  class InvalidParameterException extends CloudWatchLogsServiceException_1.CloudWatchLogsServiceException {
6
12
  constructor(opts) {
7
13
  super({
@@ -121,6 +127,9 @@ exports.ExportTaskStatusCode = {
121
127
  PENDING_CANCEL: "PENDING_CANCEL",
122
128
  RUNNING: "RUNNING",
123
129
  };
130
+ exports.InheritedProperty = {
131
+ ACCOUNT_DATA_PROTECTION: "ACCOUNT_DATA_PROTECTION",
132
+ };
124
133
  exports.OrderBy = {
125
134
  LastEventTime: "LastEventTime",
126
135
  LogStreamName: "LogStreamName",
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CancelExportTaskCommand = exports.de_AssociateKmsKeyCommand = exports.se_UntagResourceCommand = exports.se_UntagLogGroupCommand = exports.se_TestMetricFilterCommand = exports.se_TagResourceCommand = exports.se_TagLogGroupCommand = exports.se_StopQueryCommand = exports.se_StartQueryCommand = exports.se_PutSubscriptionFilterCommand = exports.se_PutRetentionPolicyCommand = exports.se_PutResourcePolicyCommand = exports.se_PutQueryDefinitionCommand = exports.se_PutMetricFilterCommand = exports.se_PutLogEventsCommand = exports.se_PutDestinationPolicyCommand = exports.se_PutDestinationCommand = exports.se_PutDataProtectionPolicyCommand = exports.se_ListTagsLogGroupCommand = exports.se_ListTagsForResourceCommand = exports.se_GetQueryResultsCommand = exports.se_GetLogRecordCommand = exports.se_GetLogGroupFieldsCommand = exports.se_GetLogEventsCommand = exports.se_GetDataProtectionPolicyCommand = exports.se_FilterLogEventsCommand = exports.se_DisassociateKmsKeyCommand = exports.se_DescribeSubscriptionFiltersCommand = exports.se_DescribeResourcePoliciesCommand = exports.se_DescribeQueryDefinitionsCommand = exports.se_DescribeQueriesCommand = exports.se_DescribeMetricFiltersCommand = exports.se_DescribeLogStreamsCommand = exports.se_DescribeLogGroupsCommand = exports.se_DescribeExportTasksCommand = exports.se_DescribeDestinationsCommand = exports.se_DeleteSubscriptionFilterCommand = exports.se_DeleteRetentionPolicyCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteQueryDefinitionCommand = exports.se_DeleteMetricFilterCommand = exports.se_DeleteLogStreamCommand = exports.se_DeleteLogGroupCommand = exports.se_DeleteDestinationCommand = exports.se_DeleteDataProtectionPolicyCommand = exports.se_CreateLogStreamCommand = exports.se_CreateLogGroupCommand = exports.se_CreateExportTaskCommand = exports.se_CancelExportTaskCommand = exports.se_AssociateKmsKeyCommand = void 0;
4
- exports.de_UntagResourceCommand = exports.de_UntagLogGroupCommand = exports.de_TestMetricFilterCommand = exports.de_TagResourceCommand = exports.de_TagLogGroupCommand = exports.de_StopQueryCommand = exports.de_StartQueryCommand = exports.de_PutSubscriptionFilterCommand = exports.de_PutRetentionPolicyCommand = exports.de_PutResourcePolicyCommand = exports.de_PutQueryDefinitionCommand = exports.de_PutMetricFilterCommand = exports.de_PutLogEventsCommand = exports.de_PutDestinationPolicyCommand = exports.de_PutDestinationCommand = exports.de_PutDataProtectionPolicyCommand = exports.de_ListTagsLogGroupCommand = exports.de_ListTagsForResourceCommand = exports.de_GetQueryResultsCommand = exports.de_GetLogRecordCommand = exports.de_GetLogGroupFieldsCommand = exports.de_GetLogEventsCommand = exports.de_GetDataProtectionPolicyCommand = exports.de_FilterLogEventsCommand = exports.de_DisassociateKmsKeyCommand = exports.de_DescribeSubscriptionFiltersCommand = exports.de_DescribeResourcePoliciesCommand = exports.de_DescribeQueryDefinitionsCommand = exports.de_DescribeQueriesCommand = exports.de_DescribeMetricFiltersCommand = exports.de_DescribeLogStreamsCommand = exports.de_DescribeLogGroupsCommand = exports.de_DescribeExportTasksCommand = exports.de_DescribeDestinationsCommand = exports.de_DeleteSubscriptionFilterCommand = exports.de_DeleteRetentionPolicyCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteQueryDefinitionCommand = exports.de_DeleteMetricFilterCommand = exports.de_DeleteLogStreamCommand = exports.de_DeleteLogGroupCommand = exports.de_DeleteDestinationCommand = exports.de_DeleteDataProtectionPolicyCommand = exports.de_CreateLogStreamCommand = exports.de_CreateLogGroupCommand = exports.de_CreateExportTaskCommand = void 0;
3
+ exports.se_UntagLogGroupCommand = exports.se_TestMetricFilterCommand = exports.se_TagResourceCommand = exports.se_TagLogGroupCommand = exports.se_StopQueryCommand = exports.se_StartQueryCommand = exports.se_PutSubscriptionFilterCommand = exports.se_PutRetentionPolicyCommand = exports.se_PutResourcePolicyCommand = exports.se_PutQueryDefinitionCommand = exports.se_PutMetricFilterCommand = exports.se_PutLogEventsCommand = exports.se_PutDestinationPolicyCommand = exports.se_PutDestinationCommand = exports.se_PutDataProtectionPolicyCommand = exports.se_PutAccountPolicyCommand = exports.se_ListTagsLogGroupCommand = exports.se_ListTagsForResourceCommand = exports.se_GetQueryResultsCommand = exports.se_GetLogRecordCommand = exports.se_GetLogGroupFieldsCommand = exports.se_GetLogEventsCommand = exports.se_GetDataProtectionPolicyCommand = exports.se_FilterLogEventsCommand = exports.se_DisassociateKmsKeyCommand = exports.se_DescribeSubscriptionFiltersCommand = exports.se_DescribeResourcePoliciesCommand = exports.se_DescribeQueryDefinitionsCommand = exports.se_DescribeQueriesCommand = exports.se_DescribeMetricFiltersCommand = exports.se_DescribeLogStreamsCommand = exports.se_DescribeLogGroupsCommand = exports.se_DescribeExportTasksCommand = exports.se_DescribeDestinationsCommand = exports.se_DescribeAccountPoliciesCommand = exports.se_DeleteSubscriptionFilterCommand = exports.se_DeleteRetentionPolicyCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteQueryDefinitionCommand = exports.se_DeleteMetricFilterCommand = exports.se_DeleteLogStreamCommand = exports.se_DeleteLogGroupCommand = exports.se_DeleteDestinationCommand = exports.se_DeleteDataProtectionPolicyCommand = exports.se_DeleteAccountPolicyCommand = exports.se_CreateLogStreamCommand = exports.se_CreateLogGroupCommand = exports.se_CreateExportTaskCommand = exports.se_CancelExportTaskCommand = exports.se_AssociateKmsKeyCommand = void 0;
4
+ exports.de_TestMetricFilterCommand = exports.de_TagResourceCommand = exports.de_TagLogGroupCommand = exports.de_StopQueryCommand = exports.de_StartQueryCommand = exports.de_PutSubscriptionFilterCommand = exports.de_PutRetentionPolicyCommand = exports.de_PutResourcePolicyCommand = exports.de_PutQueryDefinitionCommand = exports.de_PutMetricFilterCommand = exports.de_PutLogEventsCommand = exports.de_PutDestinationPolicyCommand = exports.de_PutDestinationCommand = exports.de_PutDataProtectionPolicyCommand = exports.de_PutAccountPolicyCommand = exports.de_ListTagsLogGroupCommand = exports.de_ListTagsForResourceCommand = exports.de_GetQueryResultsCommand = exports.de_GetLogRecordCommand = exports.de_GetLogGroupFieldsCommand = exports.de_GetLogEventsCommand = exports.de_GetDataProtectionPolicyCommand = exports.de_FilterLogEventsCommand = exports.de_DisassociateKmsKeyCommand = exports.de_DescribeSubscriptionFiltersCommand = exports.de_DescribeResourcePoliciesCommand = exports.de_DescribeQueryDefinitionsCommand = exports.de_DescribeQueriesCommand = exports.de_DescribeMetricFiltersCommand = exports.de_DescribeLogStreamsCommand = exports.de_DescribeLogGroupsCommand = exports.de_DescribeExportTasksCommand = exports.de_DescribeDestinationsCommand = exports.de_DescribeAccountPoliciesCommand = exports.de_DeleteSubscriptionFilterCommand = exports.de_DeleteRetentionPolicyCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteQueryDefinitionCommand = exports.de_DeleteMetricFilterCommand = exports.de_DeleteLogStreamCommand = exports.de_DeleteLogGroupCommand = exports.de_DeleteDestinationCommand = exports.de_DeleteDataProtectionPolicyCommand = exports.de_DeleteAccountPolicyCommand = exports.de_CreateLogStreamCommand = exports.de_CreateLogGroupCommand = exports.de_CreateExportTaskCommand = exports.de_CancelExportTaskCommand = exports.de_AssociateKmsKeyCommand = exports.se_UntagResourceCommand = void 0;
5
+ exports.de_UntagResourceCommand = exports.de_UntagLogGroupCommand = void 0;
5
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
7
  const protocol_http_1 = require("@smithy/protocol-http");
7
8
  const CloudWatchLogsServiceException_1 = require("../models/CloudWatchLogsServiceException");
@@ -41,6 +42,13 @@ const se_CreateLogStreamCommand = async (input, context) => {
41
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
43
  };
43
44
  exports.se_CreateLogStreamCommand = se_CreateLogStreamCommand;
45
+ const se_DeleteAccountPolicyCommand = async (input, context) => {
46
+ const headers = sharedHeaders("DeleteAccountPolicy");
47
+ let body;
48
+ body = JSON.stringify((0, smithy_client_1._json)(input));
49
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
+ };
51
+ exports.se_DeleteAccountPolicyCommand = se_DeleteAccountPolicyCommand;
44
52
  const se_DeleteDataProtectionPolicyCommand = async (input, context) => {
45
53
  const headers = sharedHeaders("DeleteDataProtectionPolicy");
46
54
  let body;
@@ -104,6 +112,13 @@ const se_DeleteSubscriptionFilterCommand = async (input, context) => {
104
112
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
113
  };
106
114
  exports.se_DeleteSubscriptionFilterCommand = se_DeleteSubscriptionFilterCommand;
115
+ const se_DescribeAccountPoliciesCommand = async (input, context) => {
116
+ const headers = sharedHeaders("DescribeAccountPolicies");
117
+ let body;
118
+ body = JSON.stringify((0, smithy_client_1._json)(input));
119
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
120
+ };
121
+ exports.se_DescribeAccountPoliciesCommand = se_DescribeAccountPoliciesCommand;
107
122
  const se_DescribeDestinationsCommand = async (input, context) => {
108
123
  const headers = sharedHeaders("DescribeDestinations");
109
124
  let body;
@@ -230,6 +245,13 @@ const se_ListTagsLogGroupCommand = async (input, context) => {
230
245
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
246
  };
232
247
  exports.se_ListTagsLogGroupCommand = se_ListTagsLogGroupCommand;
248
+ const se_PutAccountPolicyCommand = async (input, context) => {
249
+ const headers = sharedHeaders("PutAccountPolicy");
250
+ let body;
251
+ body = JSON.stringify((0, smithy_client_1._json)(input));
252
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
253
+ };
254
+ exports.se_PutAccountPolicyCommand = se_PutAccountPolicyCommand;
233
255
  const se_PutDataProtectionPolicyCommand = async (input, context) => {
234
256
  const headers = sharedHeaders("PutDataProtectionPolicy");
235
257
  let body;
@@ -549,6 +571,45 @@ const de_CreateLogStreamCommandError = async (output, context) => {
549
571
  });
550
572
  }
551
573
  };
574
+ const de_DeleteAccountPolicyCommand = async (output, context) => {
575
+ if (output.statusCode >= 300) {
576
+ return de_DeleteAccountPolicyCommandError(output, context);
577
+ }
578
+ await collectBody(output.body, context);
579
+ const response = {
580
+ $metadata: deserializeMetadata(output),
581
+ };
582
+ return response;
583
+ };
584
+ exports.de_DeleteAccountPolicyCommand = de_DeleteAccountPolicyCommand;
585
+ const de_DeleteAccountPolicyCommandError = async (output, context) => {
586
+ const parsedOutput = {
587
+ ...output,
588
+ body: await parseErrorBody(output.body, context),
589
+ };
590
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
591
+ switch (errorCode) {
592
+ case "InvalidParameterException":
593
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
594
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
595
+ case "OperationAbortedException":
596
+ case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
597
+ throw await de_OperationAbortedExceptionRes(parsedOutput, context);
598
+ case "ResourceNotFoundException":
599
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
600
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
601
+ case "ServiceUnavailableException":
602
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
603
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
604
+ default:
605
+ const parsedBody = parsedOutput.body;
606
+ return throwDefaultError({
607
+ output,
608
+ parsedBody,
609
+ errorCode,
610
+ });
611
+ }
612
+ };
552
613
  const de_DeleteDataProtectionPolicyCommand = async (output, context) => {
553
614
  if (output.statusCode >= 300) {
554
615
  return de_DeleteDataProtectionPolicyCommandError(output, context);
@@ -897,6 +958,48 @@ const de_DeleteSubscriptionFilterCommandError = async (output, context) => {
897
958
  });
898
959
  }
899
960
  };
961
+ const de_DescribeAccountPoliciesCommand = async (output, context) => {
962
+ if (output.statusCode >= 300) {
963
+ return de_DescribeAccountPoliciesCommandError(output, context);
964
+ }
965
+ const data = await parseBody(output.body, context);
966
+ let contents = {};
967
+ contents = (0, smithy_client_1._json)(data);
968
+ const response = {
969
+ $metadata: deserializeMetadata(output),
970
+ ...contents,
971
+ };
972
+ return response;
973
+ };
974
+ exports.de_DescribeAccountPoliciesCommand = de_DescribeAccountPoliciesCommand;
975
+ const de_DescribeAccountPoliciesCommandError = async (output, context) => {
976
+ const parsedOutput = {
977
+ ...output,
978
+ body: await parseErrorBody(output.body, context),
979
+ };
980
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
981
+ switch (errorCode) {
982
+ case "InvalidParameterException":
983
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
984
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
985
+ case "OperationAbortedException":
986
+ case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
987
+ throw await de_OperationAbortedExceptionRes(parsedOutput, context);
988
+ case "ResourceNotFoundException":
989
+ case "com.amazonaws.cloudwatchlogs#ResourceNotFoundException":
990
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
991
+ case "ServiceUnavailableException":
992
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
993
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
994
+ default:
995
+ const parsedBody = parsedOutput.body;
996
+ return throwDefaultError({
997
+ output,
998
+ parsedBody,
999
+ errorCode,
1000
+ });
1001
+ }
1002
+ };
900
1003
  const de_DescribeDestinationsCommand = async (output, context) => {
901
1004
  if (output.statusCode >= 300) {
902
1005
  return de_DescribeDestinationsCommandError(output, context);
@@ -1590,6 +1693,48 @@ const de_ListTagsLogGroupCommandError = async (output, context) => {
1590
1693
  });
1591
1694
  }
1592
1695
  };
1696
+ const de_PutAccountPolicyCommand = async (output, context) => {
1697
+ if (output.statusCode >= 300) {
1698
+ return de_PutAccountPolicyCommandError(output, context);
1699
+ }
1700
+ const data = await parseBody(output.body, context);
1701
+ let contents = {};
1702
+ contents = (0, smithy_client_1._json)(data);
1703
+ const response = {
1704
+ $metadata: deserializeMetadata(output),
1705
+ ...contents,
1706
+ };
1707
+ return response;
1708
+ };
1709
+ exports.de_PutAccountPolicyCommand = de_PutAccountPolicyCommand;
1710
+ const de_PutAccountPolicyCommandError = async (output, context) => {
1711
+ const parsedOutput = {
1712
+ ...output,
1713
+ body: await parseErrorBody(output.body, context),
1714
+ };
1715
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1716
+ switch (errorCode) {
1717
+ case "InvalidParameterException":
1718
+ case "com.amazonaws.cloudwatchlogs#InvalidParameterException":
1719
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1720
+ case "LimitExceededException":
1721
+ case "com.amazonaws.cloudwatchlogs#LimitExceededException":
1722
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1723
+ case "OperationAbortedException":
1724
+ case "com.amazonaws.cloudwatchlogs#OperationAbortedException":
1725
+ throw await de_OperationAbortedExceptionRes(parsedOutput, context);
1726
+ case "ServiceUnavailableException":
1727
+ case "com.amazonaws.cloudwatchlogs#ServiceUnavailableException":
1728
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1729
+ default:
1730
+ const parsedBody = parsedOutput.body;
1731
+ return throwDefaultError({
1732
+ output,
1733
+ parsedBody,
1734
+ errorCode,
1735
+ });
1736
+ }
1737
+ };
1593
1738
  const de_PutDataProtectionPolicyCommand = async (output, context) => {
1594
1739
  if (output.statusCode >= 300) {
1595
1740
  return de_PutDataProtectionPolicyCommandError(output, context);
@@ -5,6 +5,7 @@ import { CancelExportTaskCommand, } from "./commands/CancelExportTaskCommand";
5
5
  import { CreateExportTaskCommand, } from "./commands/CreateExportTaskCommand";
6
6
  import { CreateLogGroupCommand, } from "./commands/CreateLogGroupCommand";
7
7
  import { CreateLogStreamCommand, } from "./commands/CreateLogStreamCommand";
8
+ import { DeleteAccountPolicyCommand, } from "./commands/DeleteAccountPolicyCommand";
8
9
  import { DeleteDataProtectionPolicyCommand, } from "./commands/DeleteDataProtectionPolicyCommand";
9
10
  import { DeleteDestinationCommand, } from "./commands/DeleteDestinationCommand";
10
11
  import { DeleteLogGroupCommand, } from "./commands/DeleteLogGroupCommand";
@@ -14,6 +15,7 @@ import { DeleteQueryDefinitionCommand, } from "./commands/DeleteQueryDefinitionC
14
15
  import { DeleteResourcePolicyCommand, } from "./commands/DeleteResourcePolicyCommand";
15
16
  import { DeleteRetentionPolicyCommand, } from "./commands/DeleteRetentionPolicyCommand";
16
17
  import { DeleteSubscriptionFilterCommand, } from "./commands/DeleteSubscriptionFilterCommand";
18
+ import { DescribeAccountPoliciesCommand, } from "./commands/DescribeAccountPoliciesCommand";
17
19
  import { DescribeDestinationsCommand, } from "./commands/DescribeDestinationsCommand";
18
20
  import { DescribeExportTasksCommand, } from "./commands/DescribeExportTasksCommand";
19
21
  import { DescribeLogGroupsCommand, } from "./commands/DescribeLogGroupsCommand";
@@ -32,6 +34,7 @@ import { GetLogRecordCommand, } from "./commands/GetLogRecordCommand";
32
34
  import { GetQueryResultsCommand, } from "./commands/GetQueryResultsCommand";
33
35
  import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
34
36
  import { ListTagsLogGroupCommand, } from "./commands/ListTagsLogGroupCommand";
37
+ import { PutAccountPolicyCommand, } from "./commands/PutAccountPolicyCommand";
35
38
  import { PutDataProtectionPolicyCommand, } from "./commands/PutDataProtectionPolicyCommand";
36
39
  import { PutDestinationCommand, } from "./commands/PutDestinationCommand";
37
40
  import { PutDestinationPolicyCommand, } from "./commands/PutDestinationPolicyCommand";
@@ -54,6 +57,7 @@ const commands = {
54
57
  CreateExportTaskCommand,
55
58
  CreateLogGroupCommand,
56
59
  CreateLogStreamCommand,
60
+ DeleteAccountPolicyCommand,
57
61
  DeleteDataProtectionPolicyCommand,
58
62
  DeleteDestinationCommand,
59
63
  DeleteLogGroupCommand,
@@ -63,6 +67,7 @@ const commands = {
63
67
  DeleteResourcePolicyCommand,
64
68
  DeleteRetentionPolicyCommand,
65
69
  DeleteSubscriptionFilterCommand,
70
+ DescribeAccountPoliciesCommand,
66
71
  DescribeDestinationsCommand,
67
72
  DescribeExportTasksCommand,
68
73
  DescribeLogGroupsCommand,
@@ -81,6 +86,7 @@ const commands = {
81
86
  GetQueryResultsCommand,
82
87
  ListTagsForResourceCommand,
83
88
  ListTagsLogGroupCommand,
89
+ PutAccountPolicyCommand,
84
90
  PutDataProtectionPolicyCommand,
85
91
  PutDestinationCommand,
86
92
  PutDestinationPolicyCommand,
@@ -0,0 +1,42 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { de_DeleteAccountPolicyCommand, se_DeleteAccountPolicyCommand } from "../protocols/Aws_json1_1";
5
+ export { $Command };
6
+ export class DeleteAccountPolicyCommand extends $Command {
7
+ static getEndpointParameterInstructions() {
8
+ return {
9
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
10
+ Endpoint: { type: "builtInParams", name: "endpoint" },
11
+ Region: { type: "builtInParams", name: "region" },
12
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
13
+ };
14
+ }
15
+ constructor(input) {
16
+ super();
17
+ this.input = input;
18
+ }
19
+ resolveMiddleware(clientStack, configuration, options) {
20
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
21
+ this.middlewareStack.use(getEndpointPlugin(configuration, DeleteAccountPolicyCommand.getEndpointParameterInstructions()));
22
+ const stack = clientStack.concat(this.middlewareStack);
23
+ const { logger } = configuration;
24
+ const clientName = "CloudWatchLogsClient";
25
+ const commandName = "DeleteAccountPolicyCommand";
26
+ const handlerExecutionContext = {
27
+ logger,
28
+ clientName,
29
+ commandName,
30
+ inputFilterSensitiveLog: (_) => _,
31
+ outputFilterSensitiveLog: (_) => _,
32
+ };
33
+ const { requestHandler } = configuration;
34
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
35
+ }
36
+ serialize(input, context) {
37
+ return se_DeleteAccountPolicyCommand(input, context);
38
+ }
39
+ deserialize(output, context) {
40
+ return de_DeleteAccountPolicyCommand(output, context);
41
+ }
42
+ }