Skip to content
v2.278.0

WithoutPolicyUpdatesOptions Struct ​

Options for the withoutPolicyUpdates() modifier of a Role.

Example ​

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
# 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
// 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();
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
};
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 ​

addGrantsToResourcesoptionalbooleanadd_grants_to_resourcesoptionalbooladdGrantsToResourcesoptionalBooleanAddGrantsToResourcesoptionalboolAddGrantsToResourcesoptional*bool = false #
Add grants to resources instead of dropping them.
notes

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.