# StateMachineGrantsProps

Properties for StateMachineGrants.

- Source: [`aws-stepfunctions/lib/state-machine-grants.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions/lib/state-machine-grants.ts#L8)
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

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

declare const stateMachineRef: interfaces_stepfunctions.IStateMachineRef;
const stateMachineGrantsProps: stepfunctions.StateMachineGrantsProps = {
  resource: stateMachineRef,
};
```

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_stepfunctions as stepfunctions
from aws_cdk.interfaces import aws_stepfunctions as interfaces_stepfunctions

# state_machine_ref: interfaces_stepfunctions.IStateMachineRef

state_machine_grants_props = stepfunctions.StateMachineGrantsProps(
    resource=state_machine_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.stepfunctions.*;
import software.amazon.awscdk.interfaces.stepfunctions.*;

IStateMachineRef stateMachineRef;

StateMachineGrantsProps stateMachineGrantsProps = StateMachineGrantsProps.builder()
        .resource(stateMachineRef)
        .build();
```

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

IStateMachineRef stateMachineRef;

var stateMachineGrantsProps = new StateMachineGrantsProps {
    Resource = stateMachineRef
};
```

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 stateMachineRef IStateMachineRef

stateMachineGrantsProps := &StateMachineGrantsProps{
	Resource: stateMachineRef,
}
```

## Properties

- `resource`: [IStateMachineRef](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_stepfunctions.IStateMachineRef.html) (required) — The resource on which actions will be allowed.
