putS3AccessPolicy method
Adds an access policy to the specified store.
May throw AccessDeniedException.
May throw InternalServerException.
May throw NotSupportedOperationException.
May throw RequestTimeoutException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter s3AccessPointArn :
The S3 access point ARN where you want to put the access policy.
Parameter s3AccessPolicy :
The resource policy that controls S3 access to the store.
Implementation
Future<PutS3AccessPolicyResponse> putS3AccessPolicy({
required String s3AccessPointArn,
required Object s3AccessPolicy,
}) async {
final $payload = <String, dynamic>{
's3AccessPolicy': jsonEncode(s3AccessPolicy),
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/s3accesspolicy/${Uri.encodeComponent(s3AccessPointArn)}',
exceptionFnMap: _exceptionFns,
);
return PutS3AccessPolicyResponse.fromJson(response);
}