# ProfilingGroupGrants

Collection of grant methods for a IProfilingGroupRef.

Obtainable from: ProfilingGroupGrants.fromProfilingGroup

- Source: Generated at build time
- Type last changed: v2.244.0 · 19 Mar 2026

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_codeguruprofiler as codeguruprofiler } from 'aws-cdk-lib';
import { aws_codeguruprofiler as interfaces_codeguruprofiler } from 'aws-cdk-lib/interfaces';

declare const profilingGroupRef: interfaces_codeguruprofiler.IProfilingGroupRef;
const profilingGroupGrants = codeguruprofiler.ProfilingGroupGrants.fromProfilingGroup(profilingGroupRef);
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_codeguruprofiler as codeguruprofiler
from aws_cdk.interfaces import aws_codeguruprofiler as interfaces_codeguruprofiler

# profiling_group_ref: interfaces_codeguruprofiler.IProfilingGroupRef

profiling_group_grants = codeguruprofiler.ProfilingGroupGrants.from_profiling_group(profiling_group_ref)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.codeguruprofiler.*;
import software.amazon.awscdk.interfaces.codeguruprofiler.*;

IProfilingGroupRef profilingGroupRef;

ProfilingGroupGrants profilingGroupGrants = ProfilingGroupGrants.fromProfilingGroup(profilingGroupRef);
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeGuruProfiler;
using Amazon.CDK.Interfaces.CodeGuruProfiler;

IProfilingGroupRef profilingGroupRef;

var profilingGroupGrants = ProfilingGroupGrants.FromProfilingGroup(profilingGroupRef);
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"

var profilingGroupRef IProfilingGroupRef

profilingGroupGrants := awscdk.Aws_codeguruprofiler.ProfilingGroupGrants_FromProfilingGroup(profilingGroupRef)
```

## Methods

- `actions(grantee: IGrantable, actions: string[], options?: PermissionsOptions): Grant` — Grant the given identity custom permissions.

- `fromProfilingGroup(resource: IProfilingGroupRef): ProfilingGroupGrants // chainable` (static) — Creates grants for ProfilingGroupGrants.

- `publish(grantee: IGrantable): Grant` — Grant access to publish profiling information to the Profiling Group to the given identity.

  This will grant the following permissions:

   - codeguru-profiler:ConfigureAgent
   - codeguru-profiler:PostAgentProfile

- `read(grantee: IGrantable): Grant` — Grant access to read profiling information from the Profiling Group to the given identity.

  This will grant the following permissions:

   - codeguru-profiler:GetProfile
   - codeguru-profiler:DescribeProfilingGroup
