put_project_data_retention_storage
¶
put_project_data_retention_storage(
project_identifier: ProjectIdentifier,
model_provider: DataRetentionStorageModelProvider,
storage_destination: DataRetentionStorageDestination,
*,
config_overrides: Optional[BedrockClientConfig] = None,
storage_configuration: Optional[DataRetentionStorageConfiguration] = None,
) -> PutProjectDataRetentionStorageResponse
Creates or replaces a project's retention storage record for a model provider. The project must be active in this AWS Region and owned by the calling account. A missing or unowned project returns ResourceNotFoundException; an archived project returns ValidationException.
Requires applicable project, account, or organization approval for a storage-capable trusted access program of the provider, with no applicable revocation. Otherwise, the operation returns ConflictException. Enrollment is not required to save the configuration.
The request replaces the complete stored configuration. The last successful write wins.
For customer_managed destinations, Amazon Bedrock validates the caller's and service's access to the bucket and key before saving the configuration. The bucket and key must be in the AWS Region where you register the configuration. Validation failures reject the write.
Parameters:
-
project_identifier(ProjectIdentifier) –The ID or ARN of a named project owned by the calling account in this AWS Region. The default project is not supported; use the account-level retention storage operations instead.
-
model_provider(DataRetentionStorageModelProvider) –The model provider whose retention storage configuration is addressed by this request.
-
storage_destination(DataRetentionStorageDestination) –Where retained data is delivered for this scope. customer_managed requires storageConfiguration; amazon_managed forbids it.
-
storage_configuration(Optional[DataRetentionStorageConfiguration], default:None) –Destination bucket and key. Required when storageDestination is customer_managed; rejected with ValidationException when amazon_managed.
Raises:
-
AccessDeniedException–The request is denied because of missing access permissions.
-
ConflictException–Error occurred because of a conflict while performing an operation.
-
InternalServerException–An internal server error occurred. Retry your request.
-
ResourceNotFoundException–The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
-
ThrottlingException–The number of requests exceeds the limit. Resubmit your request later.
-
ValidationException–Input validation failed. Check your request parameters and retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock/_services/bedrock.py
4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 | |