updateCustomPermissions method
Updates a custom permissions profile.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw PreconditionNotMetException.
May throw ResourceNotFoundException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that contains the custom
permissions profile that you want to update.
Parameter customPermissionsName :
The name of the custom permissions profile that you want to update.
Parameter capabilities :
A set of actions to include in the custom permissions profile.
Parameter governance :
The governance configuration for the custom permissions profile. The
UpdateCustomPermissions operation replaces all existing
Capabilities and Governance values. If you omit
this parameter, Amazon Quick removes governance from the profile and the
existing custom permission behavior applies.
Implementation
Future<UpdateCustomPermissionsResponse> updateCustomPermissions({
required String awsAccountId,
required String customPermissionsName,
Capabilities? capabilities,
Governance? governance,
}) async {
final $payload = <String, dynamic>{
if (capabilities != null) 'Capabilities': capabilities,
if (governance != null) 'Governance': governance,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/custom-permissions/${Uri.encodeComponent(customPermissionsName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateCustomPermissionsResponse.fromJson(response);
}