Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PutPermissionCommand

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 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 .

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.

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);
see

PutPermissionCommandInput for command's input shape.

see

PutPermissionCommandOutput for command's response shape.

see

config for CodeGuruProfilerClient's config shape.

Hierarchy

Implements

Index

Constructors

Properties

Constructors

constructor

Properties

Readonly input

input: PutPermissionCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<PutPermissionCommandInput, PutPermissionCommandOutput>