Returns the attribute-based access control (ABAC) property of the general purpose bucket. If ABAC is enabled on your bucket, you can use tags on the bucket for access control. For more information, see Enabling ABAC in general purpose buckets.
Parameters:
-
bucket
(BucketName)
–
The name of the general purpose bucket.
-
expected_bucket_owner
(Optional[AccountId], default:
None
)
–
The Amazon Web Services account ID of the general purpose bucket's owner.
Raises:
Source code in docs_src/capo_s3/_services/async_s3.py
| async def get_bucket_abac(
self,
bucket: "capo_s3.types.bucket_name.BucketName",
*,
config_overrides: Optional[AsyncS3ClientConfig] = None,
expected_bucket_owner: Optional["capo_s3.types.account_id.AccountId"] = None,
) -> "capo_s3.types.get_bucket_abac_output.GetBucketAbacOutput":
"""<p>Returns the attribute-based access control (ABAC) property of the general purpose bucket. If ABAC is enabled on your bucket, you can use tags on the bucket for access control. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/buckets-tagging-enable-abac.html">Enabling ABAC in general purpose buckets</a>.</p>
Args:
bucket: <p>The name of the general purpose bucket.</p>
expected_bucket_owner: <p>The Amazon Web Services account ID of the general purpose bucket's owner. </p>
Raises:
capo_s3.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_s3.types.get_bucket_abac_request.GetBucketAbacRequest]",
) -> AsyncOperationResponse[
"capo_s3.types.get_bucket_abac_output.GetBucketAbacOutput"
]:
import capo_s3._operations.amazon_s3.get_bucket_abac
(
output,
http_response,
) = await capo_s3._operations.amazon_s3.get_bucket_abac.async_get_bucket_abac(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetBucketAbac")
)
input_: capo_s3.types.get_bucket_abac_request.GetBucketAbacRequest = {
"bucket": bucket
}
if expected_bucket_owner is not None:
input_["expected_bucket_owner"] = expected_bucket_owner
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|