Skip to content
v2.275.0

GrantableResources Class ​

Utility methods to check for specific types of grantable resources.

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 grantableResources = new iam.GrantableResources();
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

grantable_resources = iam.GrantableResources()
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.*;

GrantableResources grantableResources = new GrantableResources();
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 grantableResources = new GrantableResources();
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"

grantableResources := awscdk.Aws_iam.NewGrantableResources()

Initializer ​

ts
new GrantableResources()
python
GrantableResources()
java
new GrantableResources()
csharp
new GrantableResources()
go
NewGrantableResources()

Methods ​

isEncryptedResource(resource: IEnvironmentAware): boolean@staticmethod def is_encrypted_resource(resource: IEnvironmentAware) -> boolpublic static Boolean isEncryptedResource(IEnvironmentAware resource)public static bool IsEncryptedResource(IEnvironmentAware resource)func IsEncryptedResource(Resource IEnvironmentAware) *boolstatic#
Whether this resource holds data that can be encrypted using a KMS key.
isResourceWithPolicy(resource: IEnvironmentAware): boolean@staticmethod def is_resource_with_policy(resource: IEnvironmentAware) -> boolpublic static Boolean isResourceWithPolicy(IEnvironmentAware resource)public static bool IsResourceWithPolicy(IEnvironmentAware resource)func IsResourceWithPolicy(Resource IEnvironmentAware) *boolstatic#
Whether this resource admits a resource policy.