@aws-sdk/client-cloudtrail 3.259.0 → 3.262.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 (79) hide show
  1. package/README.md +13 -12
  2. package/dist-cjs/CloudTrail.js +90 -0
  3. package/dist-cjs/commands/CreateChannelCommand.js +46 -0
  4. package/dist-cjs/commands/DeleteChannelCommand.js +46 -0
  5. package/dist-cjs/commands/DeleteResourcePolicyCommand.js +46 -0
  6. package/dist-cjs/commands/GetResourcePolicyCommand.js +46 -0
  7. package/dist-cjs/commands/PutResourcePolicyCommand.js +46 -0
  8. package/dist-cjs/commands/UpdateChannelCommand.js +46 -0
  9. package/dist-cjs/commands/index.js +6 -0
  10. package/dist-cjs/endpoint/ruleset.js +1 -1
  11. package/dist-cjs/models/models_0.js +181 -30
  12. package/dist-cjs/protocols/Aws_json1_1.js +602 -2
  13. package/dist-es/CloudTrail.js +90 -0
  14. package/dist-es/commands/CreateChannelCommand.js +42 -0
  15. package/dist-es/commands/DeleteChannelCommand.js +42 -0
  16. package/dist-es/commands/DeleteResourcePolicyCommand.js +42 -0
  17. package/dist-es/commands/GetResourcePolicyCommand.js +42 -0
  18. package/dist-es/commands/PutResourcePolicyCommand.js +42 -0
  19. package/dist-es/commands/UpdateChannelCommand.js +42 -0
  20. package/dist-es/commands/index.js +6 -0
  21. package/dist-es/endpoint/ruleset.js +1 -1
  22. package/dist-es/models/models_0.js +152 -22
  23. package/dist-es/protocols/Aws_json1_1.js +589 -1
  24. package/dist-types/CloudTrail.d.ts +238 -164
  25. package/dist-types/CloudTrailClient.d.ts +21 -14
  26. package/dist-types/commands/AddTagsCommand.d.ts +7 -9
  27. package/dist-types/commands/CancelQueryCommand.d.ts +6 -3
  28. package/dist-types/commands/CreateChannelCommand.d.ts +39 -0
  29. package/dist-types/commands/DeleteChannelCommand.d.ts +37 -0
  30. package/dist-types/commands/DeleteEventDataStoreCommand.d.ts +10 -7
  31. package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +39 -0
  32. package/dist-types/commands/DeregisterOrganizationDelegatedAdminCommand.d.ts +2 -1
  33. package/dist-types/commands/DescribeQueryCommand.d.ts +3 -2
  34. package/dist-types/commands/DescribeTrailsCommand.d.ts +2 -1
  35. package/dist-types/commands/GetChannelCommand.d.ts +1 -3
  36. package/dist-types/commands/GetEventDataStoreCommand.d.ts +2 -1
  37. package/dist-types/commands/GetEventSelectorsCommand.d.ts +10 -11
  38. package/dist-types/commands/GetImportCommand.d.ts +1 -3
  39. package/dist-types/commands/GetInsightSelectorsCommand.d.ts +6 -6
  40. package/dist-types/commands/GetQueryResultsCommand.d.ts +3 -2
  41. package/dist-types/commands/GetResourcePolicyCommand.d.ts +39 -0
  42. package/dist-types/commands/GetTrailStatusCommand.d.ts +5 -1
  43. package/dist-types/commands/ListChannelsCommand.d.ts +1 -3
  44. package/dist-types/commands/ListEventDataStoresCommand.d.ts +2 -1
  45. package/dist-types/commands/ListImportFailuresCommand.d.ts +1 -3
  46. package/dist-types/commands/ListImportsCommand.d.ts +2 -3
  47. package/dist-types/commands/ListPublicKeysCommand.d.ts +7 -4
  48. package/dist-types/commands/ListQueriesCommand.d.ts +7 -5
  49. package/dist-types/commands/ListTagsCommand.d.ts +1 -1
  50. package/dist-types/commands/LookupEventsCommand.d.ts +5 -5
  51. package/dist-types/commands/PutEventSelectorsCommand.d.ts +28 -31
  52. package/dist-types/commands/PutInsightSelectorsCommand.d.ts +5 -4
  53. package/dist-types/commands/PutResourcePolicyCommand.d.ts +41 -0
  54. package/dist-types/commands/RegisterOrganizationDelegatedAdminCommand.d.ts +2 -1
  55. package/dist-types/commands/RemoveTagsCommand.d.ts +1 -1
  56. package/dist-types/commands/RestoreEventDataStoreCommand.d.ts +4 -3
  57. package/dist-types/commands/StartImportCommand.d.ts +17 -13
  58. package/dist-types/commands/StartLoggingCommand.d.ts +4 -1
  59. package/dist-types/commands/StartQueryCommand.d.ts +3 -1
  60. package/dist-types/commands/StopImportCommand.d.ts +1 -3
  61. package/dist-types/commands/StopLoggingCommand.d.ts +7 -7
  62. package/dist-types/commands/UpdateChannelCommand.d.ts +37 -0
  63. package/dist-types/commands/UpdateEventDataStoreCommand.d.ts +11 -6
  64. package/dist-types/commands/UpdateTrailCommand.d.ts +6 -6
  65. package/dist-types/commands/index.d.ts +6 -0
  66. package/dist-types/models/models_0.d.ts +1428 -835
  67. package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
  68. package/dist-types/ts3.4/CloudTrail.d.ts +102 -0
  69. package/dist-types/ts3.4/CloudTrailClient.d.ts +36 -0
  70. package/dist-types/ts3.4/commands/CreateChannelCommand.d.ts +37 -0
  71. package/dist-types/ts3.4/commands/DeleteChannelCommand.d.ts +37 -0
  72. package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +41 -0
  73. package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +38 -0
  74. package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +38 -0
  75. package/dist-types/ts3.4/commands/UpdateChannelCommand.d.ts +37 -0
  76. package/dist-types/ts3.4/commands/index.d.ts +6 -0
  77. package/dist-types/ts3.4/models/models_0.d.ts +181 -22
  78. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +72 -0
  79. package/package.json +6 -6
package/README.md CHANGED
@@ -11,20 +11,21 @@ AWS SDK for JavaScript CloudTrail Client for Node.js, Browser and React Native.
11
11
 
12
12
  <fullname>CloudTrail</fullname>
13
13
 
14
- <p>This is the CloudTrail API Reference. It provides descriptions of actions, data types, common parameters, and common errors for CloudTrail.</p>
15
- <p>CloudTrail is a web service that records Amazon Web Services API calls for your Amazon Web Services account and delivers log files to an Amazon S3 bucket.
16
- The recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response elements returned by the service.</p>
14
+ <p>This is the CloudTrail API Reference. It provides descriptions of actions, data
15
+ types, common parameters, and common errors for CloudTrail.</p>
16
+ <p>CloudTrail is a web service that records Amazon Web Services API calls for your
17
+ Amazon Web Services account and delivers log files to an Amazon S3 bucket. The
18
+ recorded information includes the identity of the user, the start time of the Amazon Web Services API call, the source IP address, the request parameters, and the response
19
+ elements returned by the service.</p>
17
20
  <note>
18
- <p>As an alternative to the API,
19
- you can use one of the Amazon Web Services SDKs, which consist of libraries and sample code for various
20
- programming languages and platforms (Java, Ruby, .NET, iOS, Android, etc.). The SDKs
21
- provide programmatic access to CloudTrail. For example, the SDKs
22
- handle cryptographically signing requests, managing errors, and retrying requests
23
- automatically. For more information about the Amazon Web Services SDKs, including how to download and install
24
- them, see <a href="http://aws.amazon.com/tools/">Tools to Build on Amazon Web Services</a>.</p>
21
+ <p>As an alternative to the API, you can use one of the Amazon Web Services SDKs, which
22
+ consist of libraries and sample code for various programming languages and platforms
23
+ (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide programmatic access to CloudTrail. For example, the SDKs handle cryptographically signing requests,
24
+ managing errors, and retrying requests automatically. For more information about the
25
+ Amazon Web Services SDKs, including how to download and install them, see <a href="http://aws.amazon.com/tools/">Tools to Build on Amazon Web Services</a>.</p>
25
26
  </note>
26
- <p>See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail User
27
- Guide</a> for information about the data that is included with each Amazon Web Services API call listed in the log files.</p>
27
+ <p>See the <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html">CloudTrail
28
+ User Guide</a> for information about the data that is included with each Amazon Web Services API call listed in the log files.</p>
28
29
 
29
30
  ## Installing
30
31
 
@@ -4,9 +4,12 @@ exports.CloudTrail = void 0;
4
4
  const CloudTrailClient_1 = require("./CloudTrailClient");
5
5
  const AddTagsCommand_1 = require("./commands/AddTagsCommand");
6
6
  const CancelQueryCommand_1 = require("./commands/CancelQueryCommand");
7
+ const CreateChannelCommand_1 = require("./commands/CreateChannelCommand");
7
8
  const CreateEventDataStoreCommand_1 = require("./commands/CreateEventDataStoreCommand");
8
9
  const CreateTrailCommand_1 = require("./commands/CreateTrailCommand");
10
+ const DeleteChannelCommand_1 = require("./commands/DeleteChannelCommand");
9
11
  const DeleteEventDataStoreCommand_1 = require("./commands/DeleteEventDataStoreCommand");
12
+ const DeleteResourcePolicyCommand_1 = require("./commands/DeleteResourcePolicyCommand");
10
13
  const DeleteTrailCommand_1 = require("./commands/DeleteTrailCommand");
11
14
  const DeregisterOrganizationDelegatedAdminCommand_1 = require("./commands/DeregisterOrganizationDelegatedAdminCommand");
12
15
  const DescribeQueryCommand_1 = require("./commands/DescribeQueryCommand");
@@ -17,6 +20,7 @@ const GetEventSelectorsCommand_1 = require("./commands/GetEventSelectorsCommand"
17
20
  const GetImportCommand_1 = require("./commands/GetImportCommand");
18
21
  const GetInsightSelectorsCommand_1 = require("./commands/GetInsightSelectorsCommand");
19
22
  const GetQueryResultsCommand_1 = require("./commands/GetQueryResultsCommand");
23
+ const GetResourcePolicyCommand_1 = require("./commands/GetResourcePolicyCommand");
20
24
  const GetTrailCommand_1 = require("./commands/GetTrailCommand");
21
25
  const GetTrailStatusCommand_1 = require("./commands/GetTrailStatusCommand");
22
26
  const ListChannelsCommand_1 = require("./commands/ListChannelsCommand");
@@ -30,6 +34,7 @@ const ListTrailsCommand_1 = require("./commands/ListTrailsCommand");
30
34
  const LookupEventsCommand_1 = require("./commands/LookupEventsCommand");
31
35
  const PutEventSelectorsCommand_1 = require("./commands/PutEventSelectorsCommand");
32
36
  const PutInsightSelectorsCommand_1 = require("./commands/PutInsightSelectorsCommand");
37
+ const PutResourcePolicyCommand_1 = require("./commands/PutResourcePolicyCommand");
33
38
  const RegisterOrganizationDelegatedAdminCommand_1 = require("./commands/RegisterOrganizationDelegatedAdminCommand");
34
39
  const RemoveTagsCommand_1 = require("./commands/RemoveTagsCommand");
35
40
  const RestoreEventDataStoreCommand_1 = require("./commands/RestoreEventDataStoreCommand");
@@ -38,6 +43,7 @@ const StartLoggingCommand_1 = require("./commands/StartLoggingCommand");
38
43
  const StartQueryCommand_1 = require("./commands/StartQueryCommand");
39
44
  const StopImportCommand_1 = require("./commands/StopImportCommand");
40
45
  const StopLoggingCommand_1 = require("./commands/StopLoggingCommand");
46
+ const UpdateChannelCommand_1 = require("./commands/UpdateChannelCommand");
41
47
  const UpdateEventDataStoreCommand_1 = require("./commands/UpdateEventDataStoreCommand");
42
48
  const UpdateTrailCommand_1 = require("./commands/UpdateTrailCommand");
43
49
  class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
@@ -69,6 +75,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
69
75
  return this.send(command, optionsOrCb);
70
76
  }
71
77
  }
78
+ createChannel(args, optionsOrCb, cb) {
79
+ const command = new CreateChannelCommand_1.CreateChannelCommand(args);
80
+ if (typeof optionsOrCb === "function") {
81
+ this.send(command, optionsOrCb);
82
+ }
83
+ else if (typeof cb === "function") {
84
+ if (typeof optionsOrCb !== "object")
85
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
86
+ this.send(command, optionsOrCb || {}, cb);
87
+ }
88
+ else {
89
+ return this.send(command, optionsOrCb);
90
+ }
91
+ }
72
92
  createEventDataStore(args, optionsOrCb, cb) {
73
93
  const command = new CreateEventDataStoreCommand_1.CreateEventDataStoreCommand(args);
74
94
  if (typeof optionsOrCb === "function") {
@@ -97,6 +117,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
97
117
  return this.send(command, optionsOrCb);
98
118
  }
99
119
  }
120
+ deleteChannel(args, optionsOrCb, cb) {
121
+ const command = new DeleteChannelCommand_1.DeleteChannelCommand(args);
122
+ if (typeof optionsOrCb === "function") {
123
+ this.send(command, optionsOrCb);
124
+ }
125
+ else if (typeof cb === "function") {
126
+ if (typeof optionsOrCb !== "object")
127
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
128
+ this.send(command, optionsOrCb || {}, cb);
129
+ }
130
+ else {
131
+ return this.send(command, optionsOrCb);
132
+ }
133
+ }
100
134
  deleteEventDataStore(args, optionsOrCb, cb) {
101
135
  const command = new DeleteEventDataStoreCommand_1.DeleteEventDataStoreCommand(args);
102
136
  if (typeof optionsOrCb === "function") {
@@ -111,6 +145,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
111
145
  return this.send(command, optionsOrCb);
112
146
  }
113
147
  }
148
+ deleteResourcePolicy(args, optionsOrCb, cb) {
149
+ const command = new DeleteResourcePolicyCommand_1.DeleteResourcePolicyCommand(args);
150
+ if (typeof optionsOrCb === "function") {
151
+ this.send(command, optionsOrCb);
152
+ }
153
+ else if (typeof cb === "function") {
154
+ if (typeof optionsOrCb !== "object")
155
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
156
+ this.send(command, optionsOrCb || {}, cb);
157
+ }
158
+ else {
159
+ return this.send(command, optionsOrCb);
160
+ }
161
+ }
114
162
  deleteTrail(args, optionsOrCb, cb) {
115
163
  const command = new DeleteTrailCommand_1.DeleteTrailCommand(args);
116
164
  if (typeof optionsOrCb === "function") {
@@ -251,6 +299,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
251
299
  return this.send(command, optionsOrCb);
252
300
  }
253
301
  }
302
+ getResourcePolicy(args, optionsOrCb, cb) {
303
+ const command = new GetResourcePolicyCommand_1.GetResourcePolicyCommand(args);
304
+ if (typeof optionsOrCb === "function") {
305
+ this.send(command, optionsOrCb);
306
+ }
307
+ else if (typeof cb === "function") {
308
+ if (typeof optionsOrCb !== "object")
309
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
310
+ this.send(command, optionsOrCb || {}, cb);
311
+ }
312
+ else {
313
+ return this.send(command, optionsOrCb);
314
+ }
315
+ }
254
316
  getTrail(args, optionsOrCb, cb) {
255
317
  const command = new GetTrailCommand_1.GetTrailCommand(args);
256
318
  if (typeof optionsOrCb === "function") {
@@ -433,6 +495,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
433
495
  return this.send(command, optionsOrCb);
434
496
  }
435
497
  }
498
+ putResourcePolicy(args, optionsOrCb, cb) {
499
+ const command = new PutResourcePolicyCommand_1.PutResourcePolicyCommand(args);
500
+ if (typeof optionsOrCb === "function") {
501
+ this.send(command, optionsOrCb);
502
+ }
503
+ else if (typeof cb === "function") {
504
+ if (typeof optionsOrCb !== "object")
505
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
506
+ this.send(command, optionsOrCb || {}, cb);
507
+ }
508
+ else {
509
+ return this.send(command, optionsOrCb);
510
+ }
511
+ }
436
512
  registerOrganizationDelegatedAdmin(args, optionsOrCb, cb) {
437
513
  const command = new RegisterOrganizationDelegatedAdminCommand_1.RegisterOrganizationDelegatedAdminCommand(args);
438
514
  if (typeof optionsOrCb === "function") {
@@ -545,6 +621,20 @@ class CloudTrail extends CloudTrailClient_1.CloudTrailClient {
545
621
  return this.send(command, optionsOrCb);
546
622
  }
547
623
  }
624
+ updateChannel(args, optionsOrCb, cb) {
625
+ const command = new UpdateChannelCommand_1.UpdateChannelCommand(args);
626
+ if (typeof optionsOrCb === "function") {
627
+ this.send(command, optionsOrCb);
628
+ }
629
+ else if (typeof cb === "function") {
630
+ if (typeof optionsOrCb !== "object")
631
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
632
+ this.send(command, optionsOrCb || {}, cb);
633
+ }
634
+ else {
635
+ return this.send(command, optionsOrCb);
636
+ }
637
+ }
548
638
  updateEventDataStore(args, optionsOrCb, cb) {
549
639
  const command = new UpdateEventDataStoreCommand_1.UpdateEventDataStoreCommand(args);
550
640
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreateChannelCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class CreateChannelCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, CreateChannelCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "CreateChannelCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.CreateChannelRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.CreateChannelResponseFilterSensitiveLog,
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.serializeAws_json1_1CreateChannelCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1CreateChannelCommand)(output, context);
44
+ }
45
+ }
46
+ exports.CreateChannelCommand = CreateChannelCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteChannelCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class DeleteChannelCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, DeleteChannelCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "DeleteChannelCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.DeleteChannelRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.DeleteChannelResponseFilterSensitiveLog,
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.serializeAws_json1_1DeleteChannelCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1DeleteChannelCommand)(output, context);
44
+ }
45
+ }
46
+ exports.DeleteChannelCommand = DeleteChannelCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteResourcePolicyCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class DeleteResourcePolicyCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, DeleteResourcePolicyCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "DeleteResourcePolicyCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.DeleteResourcePolicyRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.DeleteResourcePolicyResponseFilterSensitiveLog,
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.serializeAws_json1_1DeleteResourcePolicyCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1DeleteResourcePolicyCommand)(output, context);
44
+ }
45
+ }
46
+ exports.DeleteResourcePolicyCommand = DeleteResourcePolicyCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetResourcePolicyCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class GetResourcePolicyCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, GetResourcePolicyCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "GetResourcePolicyCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.GetResourcePolicyRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.GetResourcePolicyResponseFilterSensitiveLog,
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.serializeAws_json1_1GetResourcePolicyCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1GetResourcePolicyCommand)(output, context);
44
+ }
45
+ }
46
+ exports.GetResourcePolicyCommand = GetResourcePolicyCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutResourcePolicyCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class PutResourcePolicyCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, PutResourcePolicyCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "PutResourcePolicyCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.PutResourcePolicyRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.PutResourcePolicyResponseFilterSensitiveLog,
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.serializeAws_json1_1PutResourcePolicyCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1PutResourcePolicyCommand)(output, context);
44
+ }
45
+ }
46
+ exports.PutResourcePolicyCommand = PutResourcePolicyCommand;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateChannelCommand = 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
+ const models_0_1 = require("../models/models_0");
8
+ const Aws_json1_1_1 = require("../protocols/Aws_json1_1");
9
+ class UpdateChannelCommand extends smithy_client_1.Command {
10
+ constructor(input) {
11
+ super();
12
+ this.input = input;
13
+ }
14
+ static getEndpointParameterInstructions() {
15
+ return {
16
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
17
+ Endpoint: { type: "builtInParams", name: "endpoint" },
18
+ Region: { type: "builtInParams", name: "region" },
19
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
20
+ };
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, UpdateChannelCommand.getEndpointParameterInstructions()));
25
+ const stack = clientStack.concat(this.middlewareStack);
26
+ const { logger } = configuration;
27
+ const clientName = "CloudTrailClient";
28
+ const commandName = "UpdateChannelCommand";
29
+ const handlerExecutionContext = {
30
+ logger,
31
+ clientName,
32
+ commandName,
33
+ inputFilterSensitiveLog: models_0_1.UpdateChannelRequestFilterSensitiveLog,
34
+ outputFilterSensitiveLog: models_0_1.UpdateChannelResponseFilterSensitiveLog,
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.serializeAws_json1_1UpdateChannelCommand)(input, context);
41
+ }
42
+ deserialize(output, context) {
43
+ return (0, Aws_json1_1_1.deserializeAws_json1_1UpdateChannelCommand)(output, context);
44
+ }
45
+ }
46
+ exports.UpdateChannelCommand = UpdateChannelCommand;
@@ -3,9 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./AddTagsCommand"), exports);
5
5
  tslib_1.__exportStar(require("./CancelQueryCommand"), exports);
6
+ tslib_1.__exportStar(require("./CreateChannelCommand"), exports);
6
7
  tslib_1.__exportStar(require("./CreateEventDataStoreCommand"), exports);
7
8
  tslib_1.__exportStar(require("./CreateTrailCommand"), exports);
9
+ tslib_1.__exportStar(require("./DeleteChannelCommand"), exports);
8
10
  tslib_1.__exportStar(require("./DeleteEventDataStoreCommand"), exports);
11
+ tslib_1.__exportStar(require("./DeleteResourcePolicyCommand"), exports);
9
12
  tslib_1.__exportStar(require("./DeleteTrailCommand"), exports);
10
13
  tslib_1.__exportStar(require("./DeregisterOrganizationDelegatedAdminCommand"), exports);
11
14
  tslib_1.__exportStar(require("./DescribeQueryCommand"), exports);
@@ -16,6 +19,7 @@ tslib_1.__exportStar(require("./GetEventSelectorsCommand"), exports);
16
19
  tslib_1.__exportStar(require("./GetImportCommand"), exports);
17
20
  tslib_1.__exportStar(require("./GetInsightSelectorsCommand"), exports);
18
21
  tslib_1.__exportStar(require("./GetQueryResultsCommand"), exports);
22
+ tslib_1.__exportStar(require("./GetResourcePolicyCommand"), exports);
19
23
  tslib_1.__exportStar(require("./GetTrailCommand"), exports);
20
24
  tslib_1.__exportStar(require("./GetTrailStatusCommand"), exports);
21
25
  tslib_1.__exportStar(require("./ListChannelsCommand"), exports);
@@ -29,6 +33,7 @@ tslib_1.__exportStar(require("./ListTrailsCommand"), exports);
29
33
  tslib_1.__exportStar(require("./LookupEventsCommand"), exports);
30
34
  tslib_1.__exportStar(require("./PutEventSelectorsCommand"), exports);
31
35
  tslib_1.__exportStar(require("./PutInsightSelectorsCommand"), exports);
36
+ tslib_1.__exportStar(require("./PutResourcePolicyCommand"), exports);
32
37
  tslib_1.__exportStar(require("./RegisterOrganizationDelegatedAdminCommand"), exports);
33
38
  tslib_1.__exportStar(require("./RemoveTagsCommand"), exports);
34
39
  tslib_1.__exportStar(require("./RestoreEventDataStoreCommand"), exports);
@@ -37,5 +42,6 @@ tslib_1.__exportStar(require("./StartLoggingCommand"), exports);
37
42
  tslib_1.__exportStar(require("./StartQueryCommand"), exports);
38
43
  tslib_1.__exportStar(require("./StopImportCommand"), exports);
39
44
  tslib_1.__exportStar(require("./StopLoggingCommand"), exports);
45
+ tslib_1.__exportStar(require("./UpdateChannelCommand"), exports);
40
46
  tslib_1.__exportStar(require("./UpdateEventDataStoreCommand"), exports);
41
47
  tslib_1.__exportStar(require("./UpdateTrailCommand"), exports);
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ruleSet = void 0;
4
4
  const s = "fn", t = "argv", u = "ref";
5
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://cloudtrail-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://cloudtrail.us-gov-east-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "us-gov-west-1"] }], endpoint: { url: "https://cloudtrail.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: g }, { endpoint: { url: "https://cloudtrail-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://cloudtrail.{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://cloudtrail.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] };
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: [{ type: e, rules: [{ endpoint: { url: "https://cloudtrail-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://cloudtrail.us-gov-east-1.amazonaws.com", properties: n, headers: n }, type: g }, { conditions: [{ [s]: h, [t]: [j, "us-gov-west-1"] }], endpoint: { url: "https://cloudtrail.us-gov-west-1.amazonaws.com", properties: n, headers: n }, type: g }, { endpoint: { url: "https://cloudtrail-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: [{ type: e, rules: [{ endpoint: { url: "https://cloudtrail.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: g }] }] }, { error: "DualStack is enabled but this partition does not support DualStack", type: f }] }, { type: e, rules: [{ endpoint: { url: "https://cloudtrail.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: g }] }] }] };
7
7
  exports.ruleSet = _data;