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/s3.py
| def get_bucket_abac(
self,
bucket: "capo_s3.types.bucket_name.BucketName",
*,
config_overrides: Optional[S3ClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_s3.types.get_bucket_abac_request.GetBucketAbacRequest]",
) -> OperationResponse[
"capo_s3.types.get_bucket_abac_output.GetBucketAbacOutput"
]:
import capo_s3._operations.amazon_s3.get_bucket_abac
output, http_response = (
capo_s3._operations.amazon_s3.get_bucket_abac.get_bucket_abac(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|