# VirtualNodeGrants

Collection of grant methods for a IVirtualNodeRef.

Obtainable from: VirtualNodeGrants.fromVirtualNode

- 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_appmesh as appmesh } from 'aws-cdk-lib';
import { aws_appmesh as interfaces_appmesh } from 'aws-cdk-lib/interfaces';

declare const virtualNodeRef: interfaces_appmesh.IVirtualNodeRef;
const virtualNodeGrants = appmesh.VirtualNodeGrants.fromVirtualNode(virtualNodeRef);
```

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_appmesh as appmesh
from aws_cdk.interfaces import aws_appmesh as interfaces_appmesh

# virtual_node_ref: interfaces_appmesh.IVirtualNodeRef

virtual_node_grants = appmesh.VirtualNodeGrants.from_virtual_node(virtual_node_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.appmesh.*;
import software.amazon.awscdk.interfaces.appmesh.*;

IVirtualNodeRef virtualNodeRef;

VirtualNodeGrants virtualNodeGrants = VirtualNodeGrants.fromVirtualNode(virtualNodeRef);
```

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.AppMesh;
using Amazon.CDK.Interfaces.AppMesh;

IVirtualNodeRef virtualNodeRef;

var virtualNodeGrants = VirtualNodeGrants.FromVirtualNode(virtualNodeRef);
```

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 virtualNodeRef IVirtualNodeRef

virtualNodeGrants := awscdk.Aws_appmesh.VirtualNodeGrants_FromVirtualNode(virtualNodeRef)
```

## Methods

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

- `fromVirtualNode(resource: IVirtualNodeRef): VirtualNodeGrants // chainable` (static) — Creates grants for VirtualNodeGrants.

- `streamAggregatedResources(grantee: IGrantable): Grant` — Grants streamAggregatedResources permissions.
