Adds an access policy to the specified store.
Parameters:
-
s3_access_point_arn
(S3AccessPointArn)
–
The S3 access point ARN where you want to put the access policy.
-
s3_access_policy
(S3AccessPolicy)
–
The resource policy that controls S3 access to the store.
Raises:
Source code in docs_src/capo_omics/_services/async_omics.py
| async def put_s3_access_policy(
self,
s3_access_point_arn: "capo_omics.types.s3_access_point_arn.S3AccessPointArn",
s3_access_policy: "capo_omics.types.s3_access_policy.S3AccessPolicy",
*,
config_overrides: Optional[AsyncOmicsClientConfig] = None,
) -> "capo_omics.types.put_s3_access_policy_response.PutS3AccessPolicyResponse":
"""<p>Adds an access policy to the specified store.</p>
Args:
s3_access_point_arn: <p>The S3 access point ARN where you want to put the access policy.</p>
s3_access_policy: <p>The resource policy that controls S3 access to the store.</p>
Raises:
capo_omics.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_omics.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred. Try the request again.</p>
capo_omics.errors.not_supported_operation_exception.NotSupportedOperationException: <p> The operation is not supported by Amazon Omics, or the API does not exist. </p>
capo_omics.errors.request_timeout_exception.RequestTimeoutException: <p>The request timed out.</p>
capo_omics.errors.resource_not_found_exception.ResourceNotFoundException: <p>The target resource was not found in the current Region.</p>
capo_omics.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_omics.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_omics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_omics.types.put_s3_access_policy_request.PutS3AccessPolicyRequest]",
) -> AsyncOperationResponse[
"capo_omics.types.put_s3_access_policy_response.PutS3AccessPolicyResponse"
]:
import capo_omics._operations.omics.put_s3_access_policy
(
output,
http_response,
) = await capo_omics._operations.omics.put_s3_access_policy.async_put_s3_access_policy(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutS3AccessPolicy")
)
input_: capo_omics.types.put_s3_access_policy_request.PutS3AccessPolicyRequest = {
"s3_access_point_arn": s3_access_point_arn,
"s3_access_policy": s3_access_policy,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|