update_event_data_store
async
¶
update_event_data_store(
event_data_store: EventDataStoreArn,
*,
config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
name: Optional[EventDataStoreName] = None,
advanced_event_selectors: Optional[AdvancedEventSelectors] = None,
multi_region_enabled: Optional[Boolean] = None,
organization_enabled: Optional[Boolean] = None,
retention_period: Optional[RetentionPeriod] = None,
termination_protection_enabled: Optional[TerminationProtectionEnabled] = None,
kms_key_id: Optional[EventDataStoreKmsKeyId] = None,
billing_mode: Optional[BillingMode] = None,
) -> UpdateEventDataStoreResponse
CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.
Updates an event data store. The required EventDataStore value is an ARN or the ID portion of the ARN. Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error. RetentionPeriod is in days, and valid values are integers between 7 and 3653 if the BillingMode is set to EXTENDABLE_RETENTION_PRICING, or between 7 and 2557 if BillingMode is set to FIXED_RETENTION_PRICING. By default, TerminationProtection is enabled.
For event data stores for CloudTrail events, AdvancedEventSelectors includes or excludes management, data, or network activity events in your event data store. For more information about AdvancedEventSelectors, see AdvancedEventSelectors.
For event data stores for CloudTrail Insights events, Config configuration items, Audit Manager evidence, or non-Amazon Web Services events, AdvancedEventSelectors includes events of that type in your event data store.
Parameters:
-
event_data_store(EventDataStoreArn) –The ARN (or the ID suffix of the ARN) of the event data store that you want to update.
-
name(Optional[EventDataStoreName], default:None) –The event data store name.
-
advanced_event_selectors(Optional[AdvancedEventSelectors], default:None) –The advanced event selectors used to select events for the event data store. You can configure up to five advanced event selectors for each event data store.
-
multi_region_enabled(Optional[Boolean], default:None) –Specifies whether an event data store collects events from all Regions, or only from the Region in which it was created.
-
organization_enabled(Optional[Boolean], default:None) –Specifies whether an event data store collects events logged for an organization in Organizations.
Only the management account for the organization can convert an organization event data store to a non-organization event data store, or convert a non-organization event data store to an organization event data store.
-
retention_period(Optional[RetentionPeriod], default:None) –The retention period of the event data store, in days. If
BillingModeis set toEXTENDABLE_RETENTION_PRICING, you can set a retention period of up to 3653 days, the equivalent of 10 years. IfBillingModeis set toFIXED_RETENTION_PRICING, you can set a retention period of up to 2557 days, the equivalent of seven years.CloudTrail Lake determines whether to retain an event by checking if the
eventTimeof the event is within the specified retention period. For example, if you set a retention period of 90 days, CloudTrail will remove events when theeventTimeis older than 90 days.If you decrease the retention period of an event data store, CloudTrail will remove any events with an
eventTimeolder than the new retention period. For example, if the previous retention period was 365 days and you decrease it to 100 days, CloudTrail will remove events with aneventTimeolder than 100 days. -
termination_protection_enabled(Optional[TerminationProtectionEnabled], default:None) –Indicates that termination protection is enabled and the event data store cannot be automatically deleted.
-
kms_key_id(Optional[EventDataStoreKmsKeyId], default:None) –Specifies the KMS key ID to use to encrypt the events delivered by CloudTrail. The value can be an alias name prefixed by
alias/, a fully specified ARN to an alias, a fully specified ARN to a key, or a globally unique identifier.Disabling or deleting the KMS key, or removing CloudTrail permissions on the key, prevents CloudTrail from logging events to the event data store, and prevents users from querying the data in the event data store that was encrypted with the key. After you associate an event data store with a KMS key, the KMS key cannot be removed or changed. Before you disable or delete a KMS key that you are using with an event data store, delete or back up your event data store.
CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, see Using multi-Region keys in the Key Management Service Developer Guide.
Examples:
-
alias/MyAliasName -
arn:aws:kms:us-east-2:123456789012:alias/MyAliasName -
arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012 -
12345678-1234-1234-1234-123456789012
-
-
billing_mode(Optional[BillingMode], default:None) –You can't change the billing mode from
EXTENDABLE_RETENTION_PRICINGtoFIXED_RETENTION_PRICING. IfBillingModeis set toEXTENDABLE_RETENTION_PRICINGand you want to useFIXED_RETENTION_PRICINGinstead, you'll need to stop ingestion on the event data store and create a new event data store that usesFIXED_RETENTION_PRICING.The billing mode for the event data store determines the cost for ingesting events and the default and maximum retention period for the event data store.
The following are the possible values:
-
EXTENDABLE_RETENTION_PRICING- This billing mode is generally recommended if you want a flexible retention period of up to 3653 days (about 10 years). The default retention period for this billing mode is 366 days. -
FIXED_RETENTION_PRICING- This billing mode is recommended if you expect to ingest more than 25 TB of event data per month and need a retention period of up to 2557 days (about 7 years). The default retention period for this billing mode is 2557 days.
For more information about CloudTrail pricing, see CloudTrail Pricing and Managing CloudTrail Lake costs.
-
Raises:
-
CloudTrailAccessNotEnabledException–This exception is thrown when trusted access has not been enabled between CloudTrail and Organizations. For more information, see How to enable or disable trusted access in the Organizations User Guide and Prepare For Creating a Trail For Your Organization in the CloudTrail User Guide.
-
ConflictException–This exception is thrown when the specified resource is not ready for an operation. This can occur when you try to run an operation on a resource before CloudTrail has time to fully load the resource, or because another operation is modifying the resource. If this exception occurs, wait a few minutes, and then try the operation again.
-
EventDataStoreAlreadyExistsException–An event data store with that name already exists.
-
EventDataStoreARNInvalidException–The specified event data store ARN is not valid or does not map to an event data store in your account.
-
EventDataStoreHasOngoingImportException–This exception is thrown when you try to update or delete an event data store that currently has an import in progress.
-
EventDataStoreNotFoundException–The specified event data store was not found.
-
InactiveEventDataStoreException–The event data store is inactive.
-
InsufficientDependencyServiceAccessPermissionException–This exception is thrown when the IAM identity that is used to create the organization resource lacks one or more required permissions for creating an organization resource in a required service.
-
InsufficientEncryptionPolicyException–For the
CreateTrailPutInsightSelectors,UpdateTrail,StartQuery, andStartImportoperations, this exception is thrown when the policy on the S3 bucket or KMS key does not have sufficient permissions for the operation.For all other operations, this exception is thrown when the policy for the KMS key does not have sufficient permissions for the operation.
-
InvalidEventSelectorsException–This exception is thrown when the
PutEventSelectorsoperation is called with a number of event selectors, advanced event selectors, or data resources that is not valid. The combination of event selectors or advanced event selectors and data resources is not valid. A trail can have up to 5 event selectors. If a trail uses advanced event selectors, a maximum of 500 total values for all conditions in all advanced event selectors is allowed. A trail is limited to 250 data resources. These data resources can be distributed across event selectors, but the overall total cannot exceed 250.You can:
-
Specify a valid number of event selectors (1 to 5) for a trail.
-
Specify a valid number of data resources (1 to 250) for an event selector. The limit of number of resources on an individual event selector is configurable up to 250. However, this upper limit is allowed only if the total number of data resources does not exceed 250 across all event selectors for a trail.
-
Specify up to 500 values for all conditions in all advanced event selectors for a trail.
-
Specify a valid value for a parameter. For example, specifying the
ReadWriteTypeparameter with a value ofread-onlyis not valid.
-
-
InvalidInsightSelectorsException–For
PutInsightSelectors, this exception is thrown when the formatting or syntax of theInsightSelectorsJSON statement is not valid, or the specifiedInsightTypein theInsightSelectorsstatement is not valid. Valid values forInsightTypeareApiCallRateInsightandApiErrorRateInsight. To enable Insights on an event data store, the destination event data store specified by theInsightsDestinationparameter must log Insights events and the source event data store specified by theEventDataStoreparameter must log management events.For
UpdateEventDataStore, this exception is thrown if Insights are enabled on the event data store and the updated advanced event selectors are not compatible with the configuredInsightSelectors. If theInsightSelectorsincludes anInsightTypeofApiCallRateInsight, the source event data store must logwritemanagement events. If theInsightSelectorsincludes anInsightTypeofApiErrorRateInsight, the source event data store must log management events. -
InvalidKmsKeyIdException–This exception is thrown when the KMS key ARN is not valid.
-
InvalidParameterException–The request includes a parameter that is not valid.
-
KmsException–This exception is thrown when there is an issue with the specified KMS key and the trail or event data store can't be updated.
-
KmsKeyNotFoundException–This exception is thrown when the KMS key does not exist, when the S3 bucket and the KMS key are not in the same Region, or when the KMS key associated with the Amazon SNS topic either does not exist or is not in the same Region.
-
NoManagementAccountSLRExistsException–This exception is thrown when the management account does not have a service-linked role.
-
NotOrganizationMasterAccountException–This exception is thrown when the Amazon Web Services account making the request to create or update an organization trail or event data store is not the management account for an organization in Organizations. For more information, see Prepare For Creating a Trail For Your Organization or Organization event data stores.
-
OperationNotPermittedException–This exception is thrown when the requested operation is not permitted.
-
OrganizationNotInAllFeaturesModeException–This exception is thrown when Organizations is not configured to support all features. All features must be enabled in Organizations to support creating an organization trail or event data store.
-
OrganizationsNotInUseException–This exception is thrown when the request is made from an Amazon Web Services account that is not a member of an organization. To make this request, sign in using the credentials of an account that belongs to an organization.
-
ThrottlingException–This exception is thrown when the request rate exceeds the limit.
-
UnsupportedOperationException–This exception is thrown when the requested operation is not supported.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 | |