putApplicationPolicy method
Future<PutApplicationPolicyResponse>
putApplicationPolicy({
- required String applicationId,
- required List<
ApplicationPolicyStatement> statements,
Sets the permission policy for an application. For the list of actions supported for this operation, see Application Permissions .
May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException. May throw InternalServerErrorException. May throw ForbiddenException.
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 {
ArgumentError.checkNotNull(applicationId, 'applicationId');
ArgumentError.checkNotNull(statements, 'statements');
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);
}