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 .
Parameters:
-
profiling_group_name
(ProfilingGroupName)
–
The name of the profiling group.
-
action_group
(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.
-
revision_id
(RevisionId)
–
A universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions.
Raises:
Source code in docs_src/capo_codeguruprofiler/_services/code_guru_profiler.py
| def remove_permission(
self,
profiling_group_name: "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName",
action_group: "capo_codeguruprofiler.types.action_group.ActionGroup",
revision_id: "capo_codeguruprofiler.types.revision_id.RevisionId",
*,
config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
) -> "capo_codeguruprofiler.types.remove_permission_response.RemovePermissionResponse":
"""<p> 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 <code>agentPermission</code> which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User Guide</i>, <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html"> <code>ConfigureAgent</code> </a>, and <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html"> <code>PostAgentProfile</code> </a>. </p>
Args:
profiling_group_name: <p>The name of the profiling group.</p>
action_group: <p> Specifies an action group that contains the permissions to remove from a profiling group's resource-based policy. One action group is supported, <code>agentPermissions</code>, which grants <code>ConfigureAgent</code> and <code>PostAgentProfile</code> permissions. </p>
revision_id: <p> A universally unique identifier (UUID) for the revision of the resource-based policy from which you want to remove permissions. </p>
Raises:
capo_codeguruprofiler.errors.conflict_exception.ConflictException: <p>The requested operation would cause a conflict with the current state of a service resource associated with the request. Resolve the conflict before retrying this request. </p>
capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
capo_codeguruprofiler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_codeguruprofiler.types.remove_permission_request.RemovePermissionRequest]",
) -> OperationResponse[
"capo_codeguruprofiler.types.remove_permission_response.RemovePermissionResponse"
]:
import capo_codeguruprofiler._operations.code_guru_profiler.remove_permission
output, http_response = (
capo_codeguruprofiler._operations.code_guru_profiler.remove_permission.remove_permission(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RemovePermission")
)
input_: capo_codeguruprofiler.types.remove_permission_request.RemovePermissionRequest = {
"profiling_group_name": profiling_group_name,
"action_group": action_group,
"revision_id": revision_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|