Adds permissions to a profiling group's resource-based policy
that are provided using an action group. If a profiling group doesn't have
a resource-based policy, one is created for it using the permissions in the action group and
the roles and users in the principals parameter.
The first time you call PutPermission on a profiling group, do not specify a revisionId because
it doesn't have a resource-based policy. Subsequent calls must provide a revisionId to specify
which revision of the resource-based policy to add the permissions to.
The response contains the profiling group's JSON-formatted resource policy.
example
Use a bare-bones client and the command you need to make an API call.
Adds permissions to a profiling group's resource-based policy that are provided using an action group. If a profiling group doesn't have a resource-based policy, one is created for it using the permissions in the action group and the roles and users in the
principals
parameter.The one supported action group that can be added is
agentPermission
which grantsConfigureAgent
andPostAgent
permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide,ConfigureAgent
, andPostAgentProfile
.The first time you call
PutPermission
on a profiling group, do not specify arevisionId
because it doesn't have a resource-based policy. Subsequent calls must provide arevisionId
to specify which revision of the resource-based policy to add the permissions to.The response contains the profiling group's JSON-formatted resource policy.
Use a bare-bones client and the command you need to make an API call.
import { CodeGuruProfilerClient, PutPermissionCommand } from "@aws-sdk/client-codeguruprofiler"; // ES Modules import // const { CodeGuruProfilerClient, PutPermissionCommand } = require("@aws-sdk/client-codeguruprofiler"); // CommonJS import const client = new CodeGuruProfilerClient(config); const command = new PutPermissionCommand(input); const response = await client.send(command);
PutPermissionCommandInput for command's
input
shape.PutPermissionCommandOutput for command's
response
shape.config for CodeGuruProfilerClient's
config
shape.