putApplicationPolicy method
Sets the permission policy for an application. For the list of actions supported for this operation, see Application Permissions .
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter applicationId :
The Amazon Resource Name (ARN) of the application.
Parameter statements :
An array of policy statements applied to the application.
Implementation
Future<PutApplicationPolicyResponse> putApplicationPolicy({
required String applicationId,
required List<ApplicationPolicyStatement> statements,
}) async {
final $payload = <String, dynamic>{
'statements': statements,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/applications/${Uri.encodeComponent(applicationId)}/policy',
exceptionFnMap: _exceptionFns,
);
return PutApplicationPolicyResponse.fromJson(response);
}