putTableBucketPolicy method

Future<void> putTableBucketPolicy({
  1. required String resourcePolicy,
  2. required String tableBucketARN,
})

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:PutTableBucketPolicy permission 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,
  );
}