// 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
// (https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html)
// in the Amazon CodeGuru Profiler User Guide, ConfigureAgent
// (https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html),
// and PostAgentProfile
// (https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html).
// 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.
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.
// 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 // ( https : // docs . aws . amazon . com / codeguru / latest / profiler - ug / resource - based - policies . html ) // in the Amazon CodeGuru Profiler User Guide ConfigureAgent // ( https : // docs . aws . amazon . com / codeguru / latest / profiler - api / API_ConfigureAgent . html ) // and PostAgentProfile // ( https : // docs . aws . amazon . com / codeguru / latest / profiler - api / API_PostAgentProfile . html ) . // 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 .
func (c *Client) PutPermission(ctx context.Context, params *PutPermissionInput, optFns ...func(*Options)) (*PutPermissionOutput, error) {
	if params == nil {
		params = &PutPermissionInput{}
	}
	result, metadata, err := c.invokeOperation(ctx, "PutPermission", params, optFns, addOperationPutPermissionMiddlewares)
	if err != nil {
		return nil, err
	}
	out := result.(*PutPermissionOutput)
	out.ResultMetadata = metadata
	return out, nil
}
func ( c * Client ) PutPermission ( ctx context . Context , params * PutPermissionInput , optFns ... func ( * Options ) ) ( * PutPermissionOutput , error ) { if params == nil { params = & PutPermissionInput { } } result , metadata , err := c . invokeOperation ( ctx , " " , params , optFns , addOperationPutPermissionMiddlewares ) if err != nil { return nil , err } out := result . ( * PutPermissionOutput ) out . ResultMetadata = metadata return out , nil }
Adds permissions to a profiling group's resource-based policy that are provided
using an action group.
Adds permissions to a profiling group ' s resource - based policy that are provided using an action group .