# DefaultEncryptedResourceFactories

Default factories for encrypted resources.

- Source: [`aws-iam/lib/grant.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-iam/lib/grant.ts#L668)
- Type last changed: v2.239.0 · 19 Feb 2026

## 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 defaultEncryptedResourceFactories = new iam.DefaultEncryptedResourceFactories();
```

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

default_encrypted_resource_factories = iam.DefaultEncryptedResourceFactories()
```

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

DefaultEncryptedResourceFactories defaultEncryptedResourceFactories = new DefaultEncryptedResourceFactories();
```

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 defaultEncryptedResourceFactories = new DefaultEncryptedResourceFactories();
```

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"

defaultEncryptedResourceFactories := awscdk.Aws_iam.NewDefaultEncryptedResourceFactories()
```

## Initializer

TypeScript:

```ts
new DefaultEncryptedResourceFactories()
```

Python:

```python
DefaultEncryptedResourceFactories()
```

Java:

```java
new DefaultEncryptedResourceFactories()
```

C# / .NET:

```csharp
new DefaultEncryptedResourceFactories()
```

Golang:

```go
NewDefaultEncryptedResourceFactories()
```

## Methods

- `get(type: string): IEncryptedResourceFactory` (static) — Get the default factory for a given CloudFormation resource type.

  **Parameters**

  - `type` — the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').

- `has(type: string): boolean` (static) — Check if a default factory is registered for a given CloudFormation resource type.

  **Parameters**

  - `type` — the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').

- `set(type: string, factory: IEncryptedResourceFactory): void` (static) — Register a default factory for a given CloudFormation resource type.

  **Parameters**

  - `type` — the CloudFormation resource type (e.g., 'AWS::DynamoDB::Table').
  - `factory` — the factory to register for this resource type.
