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