putTableBucketPolicy method
Creates a new table bucket policy or replaces an existing table bucket policy for a table bucket. For more information, see Adding a table bucket policy in the Amazon Simple Storage Service User Guide.
- Permissions
-
You must have the
s3tables:PutTableBucketPolicypermission to use this operation.
May throw BadRequestException.
May throw ConflictException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter resourcePolicy :
The JSON that defines the policy.
Parameter tableBucketARN :
The Amazon Resource Name (ARN) of the table bucket.
Implementation
Future<void> putTableBucketPolicy({
required String resourcePolicy,
required String tableBucketARN,
}) async {
final $payload = <String, dynamic>{
'resourcePolicy': resourcePolicy,
};
await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/buckets/${Uri.encodeComponent(tableBucketARN)}/policy',
exceptionFnMap: _exceptionFns,
);
}