createCustomPermissions method
Creates a custom permissions profile.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalFailureException.
May throw InvalidParameterValueException.
May throw LimitExceededException.
May throw PreconditionNotMetException.
May throw ResourceExistsException.
May throw ResourceNotFoundException.
May throw ResourceUnavailableException.
May throw ThrottlingException.
Parameter awsAccountId :
The ID of the Amazon Web Services account that you want to create the
custom permissions profile in.
Parameter customPermissionsName :
The name of the custom permissions profile that you want to create.
Parameter capabilities :
A set of actions to include in the custom permissions profile.
Parameter governance :
The governance configuration for the custom permissions profile. When
governance controls are defined for a category, any capabilities in that
category not explicitly set to ALLOW in
Capabilities are denied. Even newly added capabilities in the
category are implicitly disabled when Amazon Quick releases them.
Parameter tags :
The tags to associate with the custom permissions profile.
Implementation
Future<CreateCustomPermissionsResponse> createCustomPermissions({
required String awsAccountId,
required String customPermissionsName,
Capabilities? capabilities,
Governance? governance,
List<Tag>? tags,
}) async {
final $payload = <String, dynamic>{
'CustomPermissionsName': customPermissionsName,
if (capabilities != null) 'Capabilities': capabilities,
if (governance != null) 'Governance': governance,
if (tags != null) 'Tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(awsAccountId)}/custom-permissions',
exceptionFnMap: _exceptionFns,
);
return CreateCustomPermissionsResponse.fromJson(response);
}