# WithoutPolicyUpdatesOptions

Options for the `withoutPolicyUpdates()` modifier of a Role.

Used as argument in: [Role.withoutPolicyUpdates](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.Role.html#withoutpolicyupdates)

- Source: [`aws-iam/lib/role.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-iam/lib/role.ts#L928)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
const withoutPolicyUpdatesOptions: iam.WithoutPolicyUpdatesOptions = {
  addGrantsToResources: false,
};
```

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_iam as iam

without_policy_updates_options = iam.WithoutPolicyUpdatesOptions(
    add_grants_to_resources=False
)
```

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.iam.*;

WithoutPolicyUpdatesOptions withoutPolicyUpdatesOptions = WithoutPolicyUpdatesOptions.builder()
        .addGrantsToResources(false)
        .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.IAM;

var withoutPolicyUpdatesOptions = new WithoutPolicyUpdatesOptions {
    AddGrantsToResources = false
};
```

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"

withoutPolicyUpdatesOptions := &WithoutPolicyUpdatesOptions{
	AddGrantsToResources: jsii.Boolean(false),
}
```

## Properties

- `addGrantsToResources`: boolean = false — Add grants to resources instead of dropping them.

  If this is `false` or not specified, grant permissions added to this role are ignored.
  It is your own responsibility to make sure the role has the required permissions.

  If this is `true`, any grant permissions will be added to the resource instead.
