class EncryptedResources
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.IAM.EncryptedResources |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsiam#EncryptedResources |
Java | software.amazon.awscdk.services.iam.EncryptedResources |
Python | aws_cdk.aws_iam.EncryptedResources |
TypeScript (source) | aws-cdk-lib » aws_iam » EncryptedResources |
Utility class for discovering and registering encrypted resource traits.
This class provides methods to retrieve IEncryptedResource instances from constructs, enabling automatic KMS key permission grants during IAM grant operations.
Example
// 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 encryptedResources = new iam.EncryptedResources();
Initializer
new EncryptedResources()
Methods
| Name | Description |
|---|---|
| static of(resource) | Retrieve the IEncryptedResource associated with a construct, if available. |
| static register(scope, cfnType, factory) | Register a factory for a specific CloudFormation resource type and scope. |
static of(resource)
public static of(resource: IEnvironmentAware): IEncryptedResource
Parameters
- resource
IEnvironmentAware
Returns
Retrieve the IEncryptedResource associated with a construct, if available.
static register(scope, cfnType, factory)
public static register(scope: IConstruct, cfnType: string, factory: IEncryptedResourceFactory): void
Parameters
- scope
IConstruct - cfnType
string - factory
IEncryptedResource Factory
Register a factory for a specific CloudFormation resource type and scope.

.NET
Go
Java
Python
TypeScript (