# ConsumableResourceGrants

Collection of grant methods for a IConsumableResourceRef.

Obtainable from: ConsumableResourceGrants.fromConsumableResource

- Source: Generated at build time
- Type last changed: v2.273.0 · 8 Oct 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_batch as batch } from 'aws-cdk-lib';
import { aws_batch as interfaces_batch } from 'aws-cdk-lib/interfaces';

declare const consumableResourceRef: interfaces_batch.IConsumableResourceRef;
const consumableResourceGrants = batch.ConsumableResourceGrants.fromConsumableResource(consumableResourceRef);
```

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_batch as batch
from aws_cdk.interfaces import aws_batch as interfaces_batch

# consumable_resource_ref: interfaces_batch.IConsumableResourceRef

consumable_resource_grants = batch.ConsumableResourceGrants.from_consumable_resource(consumable_resource_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.batch.*;
import software.amazon.awscdk.interfaces.batch.*;

IConsumableResourceRef consumableResourceRef;

ConsumableResourceGrants consumableResourceGrants = ConsumableResourceGrants.fromConsumableResource(consumableResourceRef);
```

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

IConsumableResourceRef consumableResourceRef;

var consumableResourceGrants = ConsumableResourceGrants.FromConsumableResource(consumableResourceRef);
```

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 consumableResourceRef IConsumableResourceRef

consumableResourceGrants := awscdk.Aws_batch.ConsumableResourceGrants_FromConsumableResource(consumableResourceRef)
```

## Methods

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

- `fromConsumableResource(resource: IConsumableResourceRef): ConsumableResourceGrants // chainable` (static) — Creates grants for ConsumableResourceGrants.

- `read(grantee: IGrantable): Grant` — Grant permission to describe this consumable resource and list the jobs that use it.

  This will grant the following permissions:

   - batch:DescribeConsumableResource
   - batch:ListJobsByConsumableResource

- `update(grantee: IGrantable): Grant` — Grant permission to change the total quantity of this consumable resource.

  This will grant the following permissions:

   - batch:UpdateConsumableResource
