putFileSystemPolicy method
Creates or replaces the IAM resource policy for an S3 File System to control access permissions.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter fileSystemId :
The ID or Amazon Resource Name (ARN) of the S3 File System to apply the
resource policy to.
Parameter policy :
The JSON-formatted resource policy to apply to the file system. The policy
defines the permissions for accessing the file system. The policy must be
a valid JSON document that follows IAM policy syntax.
Implementation
Future<void> putFileSystemPolicy({
required String fileSystemId,
required String policy,
}) async {
final $payload = <String, dynamic>{
'policy': policy,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/file-systems/${Uri.encodeComponent(fileSystemId)}/policy',
exceptionFnMap: _exceptionFns,
);
}