putChannelPolicy method
Creates an IAM policy for the channel. IAM policies are used to control access to your channel.
Parameter channelName :
The channel name associated with this Channel Policy.
Parameter policy :
Adds an IAM role that determines the permissions of your channel.
Implementation
Future<void> putChannelPolicy({
required String channelName,
required String policy,
}) async {
final $payload = <String, dynamic>{
'Policy': policy,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/channel/${Uri.encodeComponent(channelName)}/policy',
exceptionFnMap: _exceptionFns,
);
}