removePermission method
- required ActionGroup actionGroup,
- required String profilingGroupName,
- required String revisionId,
Removes permissions from a profiling group's resource-based policy that
are provided using an action group. The one supported action group that
can be removed is agentPermission
which grants
ConfigureAgent
and PostAgent
permissions. For
more information, see Resource-based
policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User
Guide,
ConfigureAgent
, and
PostAgentProfile
.
May throw InternalServerException. May throw ConflictException. May throw ValidationException. May throw ThrottlingException. May throw ResourceNotFoundException.
Parameter actionGroup
:
Specifies an action group that contains the permissions to remove from a
profiling group's resource-based policy. One action group is supported,
agentPermissions
, which grants ConfigureAgent
and PostAgentProfile
permissions.
Parameter profilingGroupName
:
The name of the profiling group.
Parameter revisionId
:
A universally unique identifier (UUID) for the revision of the
resource-based policy from which you want to remove permissions.
Implementation
Future<RemovePermissionResponse> removePermission({
required ActionGroup actionGroup,
required String profilingGroupName,
required String revisionId,
}) async {
ArgumentError.checkNotNull(actionGroup, 'actionGroup');
ArgumentError.checkNotNull(profilingGroupName, 'profilingGroupName');
_s.validateStringLength(
'profilingGroupName',
profilingGroupName,
1,
255,
isRequired: true,
);
ArgumentError.checkNotNull(revisionId, 'revisionId');
final $query = <String, List<String>>{
'revisionId': [revisionId],
};
final response = await _protocol.send(
payload: null,
method: 'DELETE',
requestUri:
'/profilingGroups/${Uri.encodeComponent(profilingGroupName)}/policy/${Uri.encodeComponent(actionGroup.toValue())}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return RemovePermissionResponse.fromJson(response);
}