put_project_data_retention_storage
async
¶
put_project_data_retention_storage(
project_identifier: ProjectIdentifier,
model_provider: DataRetentionStorageModelProvider,
storage_destination: DataRetentionStorageDestination,
*,
config_overrides: Optional[AsyncBedrockClientConfig] = 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/async_bedrock.py
4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 | |