@aws-sdk/client-cloudtrail 3.454.0 → 3.458.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 (31) hide show
  1. package/README.md +62 -46
  2. package/dist-cjs/CloudTrail.js +4 -0
  3. package/dist-cjs/commands/DisableFederationCommand.js +51 -0
  4. package/dist-cjs/commands/EnableFederationCommand.js +51 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +50 -2
  7. package/dist-cjs/protocols/Aws_json1_1.js +200 -2
  8. package/dist-es/CloudTrail.js +4 -0
  9. package/dist-es/commands/DisableFederationCommand.js +47 -0
  10. package/dist-es/commands/EnableFederationCommand.js +47 -0
  11. package/dist-es/commands/index.js +2 -0
  12. package/dist-es/models/models_0.js +45 -0
  13. package/dist-es/protocols/Aws_json1_1.js +195 -1
  14. package/dist-types/CloudTrail.d.ts +14 -0
  15. package/dist-types/CloudTrailClient.d.ts +4 -2
  16. package/dist-types/commands/DeleteEventDataStoreCommand.d.ts +15 -2
  17. package/dist-types/commands/DisableFederationCommand.d.ts +135 -0
  18. package/dist-types/commands/EnableFederationCommand.d.ts +149 -0
  19. package/dist-types/commands/GetEventDataStoreCommand.d.ts +2 -0
  20. package/dist-types/commands/UpdateEventDataStoreCommand.d.ts +2 -0
  21. package/dist-types/commands/index.d.ts +2 -0
  22. package/dist-types/models/models_0.d.ts +177 -0
  23. package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
  24. package/dist-types/ts3.4/CloudTrail.d.ts +34 -0
  25. package/dist-types/ts3.4/CloudTrailClient.d.ts +12 -0
  26. package/dist-types/ts3.4/commands/DisableFederationCommand.d.ts +39 -0
  27. package/dist-types/ts3.4/commands/EnableFederationCommand.d.ts +38 -0
  28. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  29. package/dist-types/ts3.4/models/models_0.d.ts +58 -0
  30. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
  31. package/package.json +3 -3
@@ -1,8 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InvalidCloudWatchLogsRoleArnException = exports.InvalidCloudWatchLogsLogGroupArnException = exports.InsufficientSnsTopicPolicyException = exports.InsufficientS3BucketPolicyException = exports.CloudWatchLogsDeliveryUnavailableException = exports.CloudTrailInvalidClientTokenIdException = exports.OrganizationsNotInUseException = exports.OrganizationNotInAllFeaturesModeException = exports.KmsKeyNotFoundException = exports.KmsException = exports.InvalidKmsKeyIdException = exports.InvalidEventSelectorsException = exports.InsufficientEncryptionPolicyException = exports.InsufficientDependencyServiceAccessPermissionException = exports.EventDataStoreMaxLimitExceededException = exports.EventDataStoreAlreadyExistsException = exports.EventDataStoreStatus = exports.CloudTrailAccessNotEnabledException = exports.InvalidSourceException = exports.InvalidEventDataStoreCategoryException = exports.DestinationType = exports.ChannelMaxLimitExceededException = exports.ChannelExistsForEDSException = exports.ChannelAlreadyExistsException = exports.CannotDelegateManagementAccountException = exports.QueryIdNotFoundException = exports.InvalidParameterException = exports.InactiveQueryException = exports.QueryStatus = exports.BillingMode = exports.UnsupportedOperationException = exports.TagsLimitExceededException = exports.ResourceTypeNotSupportedException = exports.ResourceNotFoundException = exports.OperationNotPermittedException = exports.NotOrganizationMasterAccountException = exports.NoManagementAccountSLRExistsException = exports.InvalidTrailNameException = exports.InvalidTagParameterException = exports.InactiveEventDataStoreException = exports.EventDataStoreNotFoundException = exports.EventDataStoreARNInvalidException = exports.ConflictException = exports.CloudTrailARNInvalidException = exports.ChannelNotFoundException = exports.ChannelARNInvalidException = exports.AccountRegisteredException = exports.AccountNotRegisteredException = exports.AccountNotFoundException = exports.AccountHasOngoingImportException = void 0;
4
- exports.MaxConcurrentQueriesException = exports.InvalidQueryStatementException = exports.InvalidImportSourceException = exports.InvalidEventDataStoreStatusException = exports.DelegatedAdminAccountLimitExceededException = exports.ResourcePolicyNotValidException = exports.InvalidInsightSelectorsException = exports.LookupAttributeKey = exports.EventCategory = exports.InvalidLookupAttributesException = exports.InvalidEventCategoryException = exports.InvalidQueryStatusException = exports.InvalidDateRangeException = exports.InvalidTokenException = exports.InvalidTimeRangeException = exports.ImportFailureStatus = exports.InvalidNextTokenException = exports.InvalidMaxResultsException = exports.InsightNotEnabledException = exports.InsightType = exports.ImportNotFoundException = exports.ImportStatus = exports.ReadWriteType = exports.DeliveryStatus = exports.NotOrganizationManagementAccountException = exports.TrailNotFoundException = exports.InvalidHomeRegionException = exports.ResourcePolicyNotFoundException = exports.ResourceARNNotValidException = exports.EventDataStoreTerminationProtectedException = exports.EventDataStoreHasOngoingImportException = exports.TrailNotProvidedException = exports.TrailAlreadyExistsException = exports.ThrottlingException = exports.S3BucketDoesNotExistException = exports.MaximumNumberOfTrailsExceededException = exports.KmsKeyDisabledException = exports.InvalidSnsTopicNameException = exports.InvalidS3PrefixException = exports.InvalidS3BucketNameException = exports.InvalidParameterCombinationException = void 0;
3
+ exports.InvalidCloudWatchLogsLogGroupArnException = exports.InsufficientSnsTopicPolicyException = exports.InsufficientS3BucketPolicyException = exports.CloudWatchLogsDeliveryUnavailableException = exports.CloudTrailInvalidClientTokenIdException = exports.OrganizationsNotInUseException = exports.OrganizationNotInAllFeaturesModeException = exports.KmsKeyNotFoundException = exports.KmsException = exports.InvalidKmsKeyIdException = exports.InvalidEventSelectorsException = exports.InsufficientEncryptionPolicyException = exports.InsufficientDependencyServiceAccessPermissionException = exports.EventDataStoreMaxLimitExceededException = exports.EventDataStoreAlreadyExistsException = exports.EventDataStoreStatus = exports.CloudTrailAccessNotEnabledException = exports.InvalidSourceException = exports.InvalidEventDataStoreCategoryException = exports.DestinationType = exports.ChannelMaxLimitExceededException = exports.ChannelExistsForEDSException = exports.ChannelAlreadyExistsException = exports.CannotDelegateManagementAccountException = exports.QueryIdNotFoundException = exports.InvalidParameterException = exports.InactiveQueryException = exports.QueryStatus = exports.BillingMode = exports.UnsupportedOperationException = exports.TagsLimitExceededException = exports.ResourceTypeNotSupportedException = exports.ResourceNotFoundException = exports.OperationNotPermittedException = exports.NotOrganizationMasterAccountException = exports.NoManagementAccountSLRExistsException = exports.InvalidTrailNameException = exports.InvalidTagParameterException = exports.InactiveEventDataStoreException = exports.EventDataStoreNotFoundException = exports.EventDataStoreARNInvalidException = exports.ConflictException = exports.CloudTrailARNInvalidException = exports.ChannelNotFoundException = exports.ChannelARNInvalidException = exports.AccountRegisteredException = exports.AccountNotRegisteredException = exports.AccountNotFoundException = exports.AccountHasOngoingImportException = exports.AccessDeniedException = void 0;
4
+ exports.MaxConcurrentQueriesException = exports.InvalidQueryStatementException = exports.InvalidImportSourceException = exports.InvalidEventDataStoreStatusException = exports.DelegatedAdminAccountLimitExceededException = exports.ResourcePolicyNotValidException = exports.InvalidInsightSelectorsException = exports.LookupAttributeKey = exports.EventCategory = exports.InvalidLookupAttributesException = exports.InvalidEventCategoryException = exports.InvalidQueryStatusException = exports.InvalidDateRangeException = exports.InvalidTokenException = exports.InvalidTimeRangeException = exports.ImportFailureStatus = exports.InvalidNextTokenException = exports.InvalidMaxResultsException = exports.InsightNotEnabledException = exports.InsightType = exports.ImportNotFoundException = exports.ImportStatus = exports.ReadWriteType = exports.FederationStatus = exports.ConcurrentModificationException = exports.DeliveryStatus = exports.NotOrganizationManagementAccountException = exports.TrailNotFoundException = exports.InvalidHomeRegionException = exports.ResourcePolicyNotFoundException = exports.ResourceARNNotValidException = exports.EventDataStoreTerminationProtectedException = exports.EventDataStoreHasOngoingImportException = exports.EventDataStoreFederationEnabledException = exports.TrailNotProvidedException = exports.TrailAlreadyExistsException = exports.ThrottlingException = exports.S3BucketDoesNotExistException = exports.MaximumNumberOfTrailsExceededException = exports.KmsKeyDisabledException = exports.InvalidSnsTopicNameException = exports.InvalidS3PrefixException = exports.InvalidS3BucketNameException = exports.InvalidParameterCombinationException = exports.InvalidCloudWatchLogsRoleArnException = void 0;
5
5
  const CloudTrailServiceException_1 = require("./CloudTrailServiceException");
6
+ class AccessDeniedException extends CloudTrailServiceException_1.CloudTrailServiceException {
7
+ constructor(opts) {
8
+ super({
9
+ name: "AccessDeniedException",
10
+ $fault: "client",
11
+ ...opts,
12
+ });
13
+ this.name = "AccessDeniedException";
14
+ this.$fault = "client";
15
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
16
+ this.Message = opts.Message;
17
+ }
18
+ }
19
+ exports.AccessDeniedException = AccessDeniedException;
6
20
  class AccountHasOngoingImportException extends CloudTrailServiceException_1.CloudTrailServiceException {
7
21
  constructor(opts) {
8
22
  super({
@@ -811,6 +825,20 @@ class TrailNotProvidedException extends CloudTrailServiceException_1.CloudTrailS
811
825
  }
812
826
  }
813
827
  exports.TrailNotProvidedException = TrailNotProvidedException;
828
+ class EventDataStoreFederationEnabledException extends CloudTrailServiceException_1.CloudTrailServiceException {
829
+ constructor(opts) {
830
+ super({
831
+ name: "EventDataStoreFederationEnabledException",
832
+ $fault: "client",
833
+ ...opts,
834
+ });
835
+ this.name = "EventDataStoreFederationEnabledException";
836
+ this.$fault = "client";
837
+ Object.setPrototypeOf(this, EventDataStoreFederationEnabledException.prototype);
838
+ this.Message = opts.Message;
839
+ }
840
+ }
841
+ exports.EventDataStoreFederationEnabledException = EventDataStoreFederationEnabledException;
814
842
  class EventDataStoreHasOngoingImportException extends CloudTrailServiceException_1.CloudTrailServiceException {
815
843
  constructor(opts) {
816
844
  super({
@@ -920,6 +948,26 @@ exports.DeliveryStatus = {
920
948
  SUCCESS: "SUCCESS",
921
949
  UNKNOWN: "UNKNOWN",
922
950
  };
951
+ class ConcurrentModificationException extends CloudTrailServiceException_1.CloudTrailServiceException {
952
+ constructor(opts) {
953
+ super({
954
+ name: "ConcurrentModificationException",
955
+ $fault: "client",
956
+ ...opts,
957
+ });
958
+ this.name = "ConcurrentModificationException";
959
+ this.$fault = "client";
960
+ Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
961
+ this.Message = opts.Message;
962
+ }
963
+ }
964
+ exports.ConcurrentModificationException = ConcurrentModificationException;
965
+ exports.FederationStatus = {
966
+ DISABLED: "DISABLED",
967
+ DISABLING: "DISABLING",
968
+ ENABLED: "ENABLED",
969
+ ENABLING: "ENABLING",
970
+ };
923
971
  exports.ReadWriteType = {
924
972
  All: "All",
925
973
  ReadOnly: "ReadOnly",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateEventDataStoreCommand = exports.de_CreateChannelCommand = exports.de_CancelQueryCommand = exports.de_AddTagsCommand = exports.se_UpdateTrailCommand = exports.se_UpdateEventDataStoreCommand = exports.se_UpdateChannelCommand = exports.se_StopLoggingCommand = exports.se_StopImportCommand = exports.se_StopEventDataStoreIngestionCommand = exports.se_StartQueryCommand = exports.se_StartLoggingCommand = exports.se_StartImportCommand = exports.se_StartEventDataStoreIngestionCommand = exports.se_RestoreEventDataStoreCommand = exports.se_RemoveTagsCommand = exports.se_RegisterOrganizationDelegatedAdminCommand = exports.se_PutResourcePolicyCommand = exports.se_PutInsightSelectorsCommand = exports.se_PutEventSelectorsCommand = exports.se_LookupEventsCommand = exports.se_ListTrailsCommand = exports.se_ListTagsCommand = exports.se_ListQueriesCommand = exports.se_ListPublicKeysCommand = exports.se_ListImportsCommand = exports.se_ListImportFailuresCommand = exports.se_ListEventDataStoresCommand = exports.se_ListChannelsCommand = exports.se_GetTrailStatusCommand = exports.se_GetTrailCommand = exports.se_GetResourcePolicyCommand = exports.se_GetQueryResultsCommand = exports.se_GetInsightSelectorsCommand = exports.se_GetImportCommand = exports.se_GetEventSelectorsCommand = exports.se_GetEventDataStoreCommand = exports.se_GetChannelCommand = exports.se_DescribeTrailsCommand = exports.se_DescribeQueryCommand = exports.se_DeregisterOrganizationDelegatedAdminCommand = exports.se_DeleteTrailCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteEventDataStoreCommand = exports.se_DeleteChannelCommand = exports.se_CreateTrailCommand = exports.se_CreateEventDataStoreCommand = exports.se_CreateChannelCommand = exports.se_CancelQueryCommand = exports.se_AddTagsCommand = void 0;
4
- exports.de_UpdateTrailCommand = exports.de_UpdateEventDataStoreCommand = exports.de_UpdateChannelCommand = exports.de_StopLoggingCommand = exports.de_StopImportCommand = exports.de_StopEventDataStoreIngestionCommand = exports.de_StartQueryCommand = exports.de_StartLoggingCommand = exports.de_StartImportCommand = exports.de_StartEventDataStoreIngestionCommand = exports.de_RestoreEventDataStoreCommand = exports.de_RemoveTagsCommand = exports.de_RegisterOrganizationDelegatedAdminCommand = exports.de_PutResourcePolicyCommand = exports.de_PutInsightSelectorsCommand = exports.de_PutEventSelectorsCommand = exports.de_LookupEventsCommand = exports.de_ListTrailsCommand = exports.de_ListTagsCommand = exports.de_ListQueriesCommand = exports.de_ListPublicKeysCommand = exports.de_ListImportsCommand = exports.de_ListImportFailuresCommand = exports.de_ListEventDataStoresCommand = exports.de_ListChannelsCommand = exports.de_GetTrailStatusCommand = exports.de_GetTrailCommand = exports.de_GetResourcePolicyCommand = exports.de_GetQueryResultsCommand = exports.de_GetInsightSelectorsCommand = exports.de_GetImportCommand = exports.de_GetEventSelectorsCommand = exports.de_GetEventDataStoreCommand = exports.de_GetChannelCommand = exports.de_DescribeTrailsCommand = exports.de_DescribeQueryCommand = exports.de_DeregisterOrganizationDelegatedAdminCommand = exports.de_DeleteTrailCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteEventDataStoreCommand = exports.de_DeleteChannelCommand = exports.de_CreateTrailCommand = void 0;
3
+ exports.de_CancelQueryCommand = exports.de_AddTagsCommand = exports.se_UpdateTrailCommand = exports.se_UpdateEventDataStoreCommand = exports.se_UpdateChannelCommand = exports.se_StopLoggingCommand = exports.se_StopImportCommand = exports.se_StopEventDataStoreIngestionCommand = exports.se_StartQueryCommand = exports.se_StartLoggingCommand = exports.se_StartImportCommand = exports.se_StartEventDataStoreIngestionCommand = exports.se_RestoreEventDataStoreCommand = exports.se_RemoveTagsCommand = exports.se_RegisterOrganizationDelegatedAdminCommand = exports.se_PutResourcePolicyCommand = exports.se_PutInsightSelectorsCommand = exports.se_PutEventSelectorsCommand = exports.se_LookupEventsCommand = exports.se_ListTrailsCommand = exports.se_ListTagsCommand = exports.se_ListQueriesCommand = exports.se_ListPublicKeysCommand = exports.se_ListImportsCommand = exports.se_ListImportFailuresCommand = exports.se_ListEventDataStoresCommand = exports.se_ListChannelsCommand = exports.se_GetTrailStatusCommand = exports.se_GetTrailCommand = exports.se_GetResourcePolicyCommand = exports.se_GetQueryResultsCommand = exports.se_GetInsightSelectorsCommand = exports.se_GetImportCommand = exports.se_GetEventSelectorsCommand = exports.se_GetEventDataStoreCommand = exports.se_GetChannelCommand = exports.se_EnableFederationCommand = exports.se_DisableFederationCommand = exports.se_DescribeTrailsCommand = exports.se_DescribeQueryCommand = exports.se_DeregisterOrganizationDelegatedAdminCommand = exports.se_DeleteTrailCommand = exports.se_DeleteResourcePolicyCommand = exports.se_DeleteEventDataStoreCommand = exports.se_DeleteChannelCommand = exports.se_CreateTrailCommand = exports.se_CreateEventDataStoreCommand = exports.se_CreateChannelCommand = exports.se_CancelQueryCommand = exports.se_AddTagsCommand = void 0;
4
+ exports.de_UpdateTrailCommand = exports.de_UpdateEventDataStoreCommand = exports.de_UpdateChannelCommand = exports.de_StopLoggingCommand = exports.de_StopImportCommand = exports.de_StopEventDataStoreIngestionCommand = exports.de_StartQueryCommand = exports.de_StartLoggingCommand = exports.de_StartImportCommand = exports.de_StartEventDataStoreIngestionCommand = exports.de_RestoreEventDataStoreCommand = exports.de_RemoveTagsCommand = exports.de_RegisterOrganizationDelegatedAdminCommand = exports.de_PutResourcePolicyCommand = exports.de_PutInsightSelectorsCommand = exports.de_PutEventSelectorsCommand = exports.de_LookupEventsCommand = exports.de_ListTrailsCommand = exports.de_ListTagsCommand = exports.de_ListQueriesCommand = exports.de_ListPublicKeysCommand = exports.de_ListImportsCommand = exports.de_ListImportFailuresCommand = exports.de_ListEventDataStoresCommand = exports.de_ListChannelsCommand = exports.de_GetTrailStatusCommand = exports.de_GetTrailCommand = exports.de_GetResourcePolicyCommand = exports.de_GetQueryResultsCommand = exports.de_GetInsightSelectorsCommand = exports.de_GetImportCommand = exports.de_GetEventSelectorsCommand = exports.de_GetEventDataStoreCommand = exports.de_GetChannelCommand = exports.de_EnableFederationCommand = exports.de_DisableFederationCommand = exports.de_DescribeTrailsCommand = exports.de_DescribeQueryCommand = exports.de_DeregisterOrganizationDelegatedAdminCommand = exports.de_DeleteTrailCommand = exports.de_DeleteResourcePolicyCommand = exports.de_DeleteEventDataStoreCommand = exports.de_DeleteChannelCommand = exports.de_CreateTrailCommand = exports.de_CreateEventDataStoreCommand = exports.de_CreateChannelCommand = void 0;
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
7
  const CloudTrailServiceException_1 = require("../models/CloudTrailServiceException");
@@ -90,6 +90,20 @@ const se_DescribeTrailsCommand = async (input, context) => {
90
90
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
91
  };
92
92
  exports.se_DescribeTrailsCommand = se_DescribeTrailsCommand;
93
+ const se_DisableFederationCommand = async (input, context) => {
94
+ const headers = sharedHeaders("DisableFederation");
95
+ let body;
96
+ body = JSON.stringify((0, smithy_client_1._json)(input));
97
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
+ };
99
+ exports.se_DisableFederationCommand = se_DisableFederationCommand;
100
+ const se_EnableFederationCommand = async (input, context) => {
101
+ const headers = sharedHeaders("EnableFederation");
102
+ let body;
103
+ body = JSON.stringify((0, smithy_client_1._json)(input));
104
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
+ };
106
+ exports.se_EnableFederationCommand = se_EnableFederationCommand;
93
107
  const se_GetChannelCommand = async (input, context) => {
94
108
  const headers = sharedHeaders("GetChannel");
95
109
  let body;
@@ -808,9 +822,15 @@ const de_DeleteEventDataStoreCommandError = async (output, context) => {
808
822
  case "ChannelExistsForEDSException":
809
823
  case "com.amazonaws.cloudtrail#ChannelExistsForEDSException":
810
824
  throw await de_ChannelExistsForEDSExceptionRes(parsedOutput, context);
825
+ case "ConflictException":
826
+ case "com.amazonaws.cloudtrail#ConflictException":
827
+ throw await de_ConflictExceptionRes(parsedOutput, context);
811
828
  case "EventDataStoreARNInvalidException":
812
829
  case "com.amazonaws.cloudtrail#EventDataStoreARNInvalidException":
813
830
  throw await de_EventDataStoreARNInvalidExceptionRes(parsedOutput, context);
831
+ case "EventDataStoreFederationEnabledException":
832
+ case "com.amazonaws.cloudtrail#EventDataStoreFederationEnabledException":
833
+ throw await de_EventDataStoreFederationEnabledExceptionRes(parsedOutput, context);
814
834
  case "EventDataStoreHasOngoingImportException":
815
835
  case "com.amazonaws.cloudtrail#EventDataStoreHasOngoingImportException":
816
836
  throw await de_EventDataStoreHasOngoingImportExceptionRes(parsedOutput, context);
@@ -1120,6 +1140,153 @@ const de_DescribeTrailsCommandError = async (output, context) => {
1120
1140
  });
1121
1141
  }
1122
1142
  };
1143
+ const de_DisableFederationCommand = async (output, context) => {
1144
+ if (output.statusCode >= 300) {
1145
+ return de_DisableFederationCommandError(output, context);
1146
+ }
1147
+ const data = await parseBody(output.body, context);
1148
+ let contents = {};
1149
+ contents = (0, smithy_client_1._json)(data);
1150
+ const response = {
1151
+ $metadata: deserializeMetadata(output),
1152
+ ...contents,
1153
+ };
1154
+ return response;
1155
+ };
1156
+ exports.de_DisableFederationCommand = de_DisableFederationCommand;
1157
+ const de_DisableFederationCommandError = async (output, context) => {
1158
+ const parsedOutput = {
1159
+ ...output,
1160
+ body: await parseErrorBody(output.body, context),
1161
+ };
1162
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1163
+ switch (errorCode) {
1164
+ case "AccessDeniedException":
1165
+ case "com.amazonaws.cloudtrail#AccessDeniedException":
1166
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1167
+ case "CloudTrailAccessNotEnabledException":
1168
+ case "com.amazonaws.cloudtrail#CloudTrailAccessNotEnabledException":
1169
+ throw await de_CloudTrailAccessNotEnabledExceptionRes(parsedOutput, context);
1170
+ case "ConcurrentModificationException":
1171
+ case "com.amazonaws.cloudtrail#ConcurrentModificationException":
1172
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1173
+ case "EventDataStoreARNInvalidException":
1174
+ case "com.amazonaws.cloudtrail#EventDataStoreARNInvalidException":
1175
+ throw await de_EventDataStoreARNInvalidExceptionRes(parsedOutput, context);
1176
+ case "EventDataStoreNotFoundException":
1177
+ case "com.amazonaws.cloudtrail#EventDataStoreNotFoundException":
1178
+ throw await de_EventDataStoreNotFoundExceptionRes(parsedOutput, context);
1179
+ case "InactiveEventDataStoreException":
1180
+ case "com.amazonaws.cloudtrail#InactiveEventDataStoreException":
1181
+ throw await de_InactiveEventDataStoreExceptionRes(parsedOutput, context);
1182
+ case "InsufficientDependencyServiceAccessPermissionException":
1183
+ case "com.amazonaws.cloudtrail#InsufficientDependencyServiceAccessPermissionException":
1184
+ throw await de_InsufficientDependencyServiceAccessPermissionExceptionRes(parsedOutput, context);
1185
+ case "InvalidParameterException":
1186
+ case "com.amazonaws.cloudtrail#InvalidParameterException":
1187
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1188
+ case "NoManagementAccountSLRExistsException":
1189
+ case "com.amazonaws.cloudtrail#NoManagementAccountSLRExistsException":
1190
+ throw await de_NoManagementAccountSLRExistsExceptionRes(parsedOutput, context);
1191
+ case "NotOrganizationMasterAccountException":
1192
+ case "com.amazonaws.cloudtrail#NotOrganizationMasterAccountException":
1193
+ throw await de_NotOrganizationMasterAccountExceptionRes(parsedOutput, context);
1194
+ case "OperationNotPermittedException":
1195
+ case "com.amazonaws.cloudtrail#OperationNotPermittedException":
1196
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1197
+ case "OrganizationNotInAllFeaturesModeException":
1198
+ case "com.amazonaws.cloudtrail#OrganizationNotInAllFeaturesModeException":
1199
+ throw await de_OrganizationNotInAllFeaturesModeExceptionRes(parsedOutput, context);
1200
+ case "OrganizationsNotInUseException":
1201
+ case "com.amazonaws.cloudtrail#OrganizationsNotInUseException":
1202
+ throw await de_OrganizationsNotInUseExceptionRes(parsedOutput, context);
1203
+ case "UnsupportedOperationException":
1204
+ case "com.amazonaws.cloudtrail#UnsupportedOperationException":
1205
+ throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1206
+ default:
1207
+ const parsedBody = parsedOutput.body;
1208
+ return throwDefaultError({
1209
+ output,
1210
+ parsedBody,
1211
+ errorCode,
1212
+ });
1213
+ }
1214
+ };
1215
+ const de_EnableFederationCommand = async (output, context) => {
1216
+ if (output.statusCode >= 300) {
1217
+ return de_EnableFederationCommandError(output, context);
1218
+ }
1219
+ const data = await parseBody(output.body, context);
1220
+ let contents = {};
1221
+ contents = (0, smithy_client_1._json)(data);
1222
+ const response = {
1223
+ $metadata: deserializeMetadata(output),
1224
+ ...contents,
1225
+ };
1226
+ return response;
1227
+ };
1228
+ exports.de_EnableFederationCommand = de_EnableFederationCommand;
1229
+ const de_EnableFederationCommandError = async (output, context) => {
1230
+ const parsedOutput = {
1231
+ ...output,
1232
+ body: await parseErrorBody(output.body, context),
1233
+ };
1234
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1235
+ switch (errorCode) {
1236
+ case "AccessDeniedException":
1237
+ case "com.amazonaws.cloudtrail#AccessDeniedException":
1238
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1239
+ case "CloudTrailAccessNotEnabledException":
1240
+ case "com.amazonaws.cloudtrail#CloudTrailAccessNotEnabledException":
1241
+ throw await de_CloudTrailAccessNotEnabledExceptionRes(parsedOutput, context);
1242
+ case "ConcurrentModificationException":
1243
+ case "com.amazonaws.cloudtrail#ConcurrentModificationException":
1244
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1245
+ case "EventDataStoreARNInvalidException":
1246
+ case "com.amazonaws.cloudtrail#EventDataStoreARNInvalidException":
1247
+ throw await de_EventDataStoreARNInvalidExceptionRes(parsedOutput, context);
1248
+ case "EventDataStoreFederationEnabledException":
1249
+ case "com.amazonaws.cloudtrail#EventDataStoreFederationEnabledException":
1250
+ throw await de_EventDataStoreFederationEnabledExceptionRes(parsedOutput, context);
1251
+ case "EventDataStoreNotFoundException":
1252
+ case "com.amazonaws.cloudtrail#EventDataStoreNotFoundException":
1253
+ throw await de_EventDataStoreNotFoundExceptionRes(parsedOutput, context);
1254
+ case "InactiveEventDataStoreException":
1255
+ case "com.amazonaws.cloudtrail#InactiveEventDataStoreException":
1256
+ throw await de_InactiveEventDataStoreExceptionRes(parsedOutput, context);
1257
+ case "InsufficientDependencyServiceAccessPermissionException":
1258
+ case "com.amazonaws.cloudtrail#InsufficientDependencyServiceAccessPermissionException":
1259
+ throw await de_InsufficientDependencyServiceAccessPermissionExceptionRes(parsedOutput, context);
1260
+ case "InvalidParameterException":
1261
+ case "com.amazonaws.cloudtrail#InvalidParameterException":
1262
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1263
+ case "NoManagementAccountSLRExistsException":
1264
+ case "com.amazonaws.cloudtrail#NoManagementAccountSLRExistsException":
1265
+ throw await de_NoManagementAccountSLRExistsExceptionRes(parsedOutput, context);
1266
+ case "NotOrganizationMasterAccountException":
1267
+ case "com.amazonaws.cloudtrail#NotOrganizationMasterAccountException":
1268
+ throw await de_NotOrganizationMasterAccountExceptionRes(parsedOutput, context);
1269
+ case "OperationNotPermittedException":
1270
+ case "com.amazonaws.cloudtrail#OperationNotPermittedException":
1271
+ throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1272
+ case "OrganizationNotInAllFeaturesModeException":
1273
+ case "com.amazonaws.cloudtrail#OrganizationNotInAllFeaturesModeException":
1274
+ throw await de_OrganizationNotInAllFeaturesModeExceptionRes(parsedOutput, context);
1275
+ case "OrganizationsNotInUseException":
1276
+ case "com.amazonaws.cloudtrail#OrganizationsNotInUseException":
1277
+ throw await de_OrganizationsNotInUseExceptionRes(parsedOutput, context);
1278
+ case "UnsupportedOperationException":
1279
+ case "com.amazonaws.cloudtrail#UnsupportedOperationException":
1280
+ throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
1281
+ default:
1282
+ const parsedBody = parsedOutput.body;
1283
+ return throwDefaultError({
1284
+ output,
1285
+ parsedBody,
1286
+ errorCode,
1287
+ });
1288
+ }
1289
+ };
1123
1290
  const de_GetChannelCommand = async (output, context) => {
1124
1291
  if (output.statusCode >= 300) {
1125
1292
  return de_GetChannelCommandError(output, context);
@@ -3094,6 +3261,15 @@ const de_UpdateTrailCommandError = async (output, context) => {
3094
3261
  });
3095
3262
  }
3096
3263
  };
3264
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3265
+ const body = parsedOutput.body;
3266
+ const deserialized = (0, smithy_client_1._json)(body);
3267
+ const exception = new models_0_1.AccessDeniedException({
3268
+ $metadata: deserializeMetadata(parsedOutput),
3269
+ ...deserialized,
3270
+ });
3271
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
3272
+ };
3097
3273
  const de_AccountHasOngoingImportExceptionRes = async (parsedOutput, context) => {
3098
3274
  const body = parsedOutput.body;
3099
3275
  const deserialized = (0, smithy_client_1._json)(body);
@@ -3220,6 +3396,15 @@ const de_CloudWatchLogsDeliveryUnavailableExceptionRes = async (parsedOutput, co
3220
3396
  });
3221
3397
  return (0, smithy_client_1.decorateServiceException)(exception, body);
3222
3398
  };
3399
+ const de_ConcurrentModificationExceptionRes = async (parsedOutput, context) => {
3400
+ const body = parsedOutput.body;
3401
+ const deserialized = (0, smithy_client_1._json)(body);
3402
+ const exception = new models_0_1.ConcurrentModificationException({
3403
+ $metadata: deserializeMetadata(parsedOutput),
3404
+ ...deserialized,
3405
+ });
3406
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
3407
+ };
3223
3408
  const de_ConflictExceptionRes = async (parsedOutput, context) => {
3224
3409
  const body = parsedOutput.body;
3225
3410
  const deserialized = (0, smithy_client_1._json)(body);
@@ -3256,6 +3441,15 @@ const de_EventDataStoreARNInvalidExceptionRes = async (parsedOutput, context) =>
3256
3441
  });
3257
3442
  return (0, smithy_client_1.decorateServiceException)(exception, body);
3258
3443
  };
3444
+ const de_EventDataStoreFederationEnabledExceptionRes = async (parsedOutput, context) => {
3445
+ const body = parsedOutput.body;
3446
+ const deserialized = (0, smithy_client_1._json)(body);
3447
+ const exception = new models_0_1.EventDataStoreFederationEnabledException({
3448
+ $metadata: deserializeMetadata(parsedOutput),
3449
+ ...deserialized,
3450
+ });
3451
+ return (0, smithy_client_1.decorateServiceException)(exception, body);
3452
+ };
3259
3453
  const de_EventDataStoreHasOngoingImportExceptionRes = async (parsedOutput, context) => {
3260
3454
  const body = parsedOutput.body;
3261
3455
  const deserialized = (0, smithy_client_1._json)(body);
@@ -3937,6 +4131,8 @@ const de_GetEventDataStoreResponse = (output, context) => {
3937
4131
  BillingMode: smithy_client_1.expectString,
3938
4132
  CreatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
3939
4133
  EventDataStoreArn: smithy_client_1.expectString,
4134
+ FederationRoleArn: smithy_client_1.expectString,
4135
+ FederationStatus: smithy_client_1.expectString,
3940
4136
  KmsKeyId: smithy_client_1.expectString,
3941
4137
  MultiRegionEnabled: smithy_client_1.expectBoolean,
3942
4138
  Name: smithy_client_1.expectString,
@@ -4147,6 +4343,8 @@ const de_UpdateEventDataStoreResponse = (output, context) => {
4147
4343
  BillingMode: smithy_client_1.expectString,
4148
4344
  CreatedTimestamp: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
4149
4345
  EventDataStoreArn: smithy_client_1.expectString,
4346
+ FederationRoleArn: smithy_client_1.expectString,
4347
+ FederationStatus: smithy_client_1.expectString,
4150
4348
  KmsKeyId: smithy_client_1.expectString,
4151
4349
  MultiRegionEnabled: smithy_client_1.expectBoolean,
4152
4350
  Name: smithy_client_1.expectString,
@@ -12,6 +12,8 @@ import { DeleteTrailCommand } from "./commands/DeleteTrailCommand";
12
12
  import { DeregisterOrganizationDelegatedAdminCommand, } from "./commands/DeregisterOrganizationDelegatedAdminCommand";
13
13
  import { DescribeQueryCommand, } from "./commands/DescribeQueryCommand";
14
14
  import { DescribeTrailsCommand, } from "./commands/DescribeTrailsCommand";
15
+ import { DisableFederationCommand, } from "./commands/DisableFederationCommand";
16
+ import { EnableFederationCommand, } from "./commands/EnableFederationCommand";
15
17
  import { GetChannelCommand } from "./commands/GetChannelCommand";
16
18
  import { GetEventDataStoreCommand, } from "./commands/GetEventDataStoreCommand";
17
19
  import { GetEventSelectorsCommand, } from "./commands/GetEventSelectorsCommand";
@@ -59,6 +61,8 @@ const commands = {
59
61
  DeregisterOrganizationDelegatedAdminCommand,
60
62
  DescribeQueryCommand,
61
63
  DescribeTrailsCommand,
64
+ DisableFederationCommand,
65
+ EnableFederationCommand,
62
66
  GetChannelCommand,
63
67
  GetEventDataStoreCommand,
64
68
  GetEventSelectorsCommand,
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_DisableFederationCommand, se_DisableFederationCommand } from "../protocols/Aws_json1_1";
6
+ export { $Command };
7
+ export class DisableFederationCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, DisableFederationCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "CloudTrailClient";
26
+ const commandName = "DisableFederationCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "CloudTrail_20131101",
35
+ operation: "DisableFederation",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_DisableFederationCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_DisableFederationCommand(output, context);
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ import { getEndpointPlugin } from "@smithy/middleware-endpoint";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
+ import { de_EnableFederationCommand, se_EnableFederationCommand } from "../protocols/Aws_json1_1";
6
+ export { $Command };
7
+ export class EnableFederationCommand extends $Command {
8
+ static getEndpointParameterInstructions() {
9
+ return {
10
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
11
+ Endpoint: { type: "builtInParams", name: "endpoint" },
12
+ Region: { type: "builtInParams", name: "region" },
13
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
14
+ };
15
+ }
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ }
20
+ resolveMiddleware(clientStack, configuration, options) {
21
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
22
+ this.middlewareStack.use(getEndpointPlugin(configuration, EnableFederationCommand.getEndpointParameterInstructions()));
23
+ const stack = clientStack.concat(this.middlewareStack);
24
+ const { logger } = configuration;
25
+ const clientName = "CloudTrailClient";
26
+ const commandName = "EnableFederationCommand";
27
+ const handlerExecutionContext = {
28
+ logger,
29
+ clientName,
30
+ commandName,
31
+ inputFilterSensitiveLog: (_) => _,
32
+ outputFilterSensitiveLog: (_) => _,
33
+ [SMITHY_CONTEXT_KEY]: {
34
+ service: "CloudTrail_20131101",
35
+ operation: "EnableFederation",
36
+ },
37
+ };
38
+ const { requestHandler } = configuration;
39
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
40
+ }
41
+ serialize(input, context) {
42
+ return se_EnableFederationCommand(input, context);
43
+ }
44
+ deserialize(output, context) {
45
+ return de_EnableFederationCommand(output, context);
46
+ }
47
+ }
@@ -10,6 +10,8 @@ export * from "./DeleteTrailCommand";
10
10
  export * from "./DeregisterOrganizationDelegatedAdminCommand";
11
11
  export * from "./DescribeQueryCommand";
12
12
  export * from "./DescribeTrailsCommand";
13
+ export * from "./DisableFederationCommand";
14
+ export * from "./EnableFederationCommand";
13
15
  export * from "./GetChannelCommand";
14
16
  export * from "./GetEventDataStoreCommand";
15
17
  export * from "./GetEventSelectorsCommand";
@@ -1,4 +1,17 @@
1
1
  import { CloudTrailServiceException as __BaseException } from "./CloudTrailServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
+ this.Message = opts.Message;
13
+ }
14
+ }
2
15
  export class AccountHasOngoingImportException extends __BaseException {
3
16
  constructor(opts) {
4
17
  super({
@@ -751,6 +764,19 @@ export class TrailNotProvidedException extends __BaseException {
751
764
  this.Message = opts.Message;
752
765
  }
753
766
  }
767
+ export class EventDataStoreFederationEnabledException extends __BaseException {
768
+ constructor(opts) {
769
+ super({
770
+ name: "EventDataStoreFederationEnabledException",
771
+ $fault: "client",
772
+ ...opts,
773
+ });
774
+ this.name = "EventDataStoreFederationEnabledException";
775
+ this.$fault = "client";
776
+ Object.setPrototypeOf(this, EventDataStoreFederationEnabledException.prototype);
777
+ this.Message = opts.Message;
778
+ }
779
+ }
754
780
  export class EventDataStoreHasOngoingImportException extends __BaseException {
755
781
  constructor(opts) {
756
782
  super({
@@ -853,6 +879,25 @@ export const DeliveryStatus = {
853
879
  SUCCESS: "SUCCESS",
854
880
  UNKNOWN: "UNKNOWN",
855
881
  };
882
+ export class ConcurrentModificationException extends __BaseException {
883
+ constructor(opts) {
884
+ super({
885
+ name: "ConcurrentModificationException",
886
+ $fault: "client",
887
+ ...opts,
888
+ });
889
+ this.name = "ConcurrentModificationException";
890
+ this.$fault = "client";
891
+ Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
892
+ this.Message = opts.Message;
893
+ }
894
+ }
895
+ export const FederationStatus = {
896
+ DISABLED: "DISABLED",
897
+ DISABLING: "DISABLING",
898
+ ENABLED: "ENABLED",
899
+ ENABLING: "ENABLING",
900
+ };
856
901
  export const ReadWriteType = {
857
902
  All: "All",
858
903
  ReadOnly: "ReadOnly",