# CfnModuleDefaultVersionProps

Properties for defining a `CfnModuleDefaultVersion`.

Used as props by: [CfnModuleDefaultVersion](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudformation.CfnModuleDefaultVersion.html)

- Source: Generated at build time
- Type last changed: v2.227.0 · 21 Nov 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudformation as cloudformation } from 'aws-cdk-lib';
const cfnModuleDefaultVersionProps: cloudformation.CfnModuleDefaultVersionProps = {
  arn: 'arn',
  moduleName: 'moduleName',
  versionId: 'versionId',
};
```

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_cloudformation as cloudformation

cfn_module_default_version_props = cloudformation.CfnModuleDefaultVersionProps(
    arn="arn",
    module_name="moduleName",
    version_id="versionId"
)
```

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

CfnModuleDefaultVersionProps cfnModuleDefaultVersionProps = CfnModuleDefaultVersionProps.builder()
        .arn("arn")
        .moduleName("moduleName")
        .versionId("versionId")
        .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.CloudFormation;

var cfnModuleDefaultVersionProps = new CfnModuleDefaultVersionProps {
    Arn = "arn",
    ModuleName = "moduleName",
    VersionId = "versionId"
};
```

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"

cfnModuleDefaultVersionProps := &CfnModuleDefaultVersionProps{
	Arn: jsii.String("arn"),
	ModuleName: jsii.String("moduleName"),
	VersionId: jsii.String("versionId"),
}
```

## Properties

- `arn`: string | [IModuleVersionRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_cloudformation.IModuleVersionRef.html) — The Amazon Resource Name (ARN) of the module version to set as the default version.

  Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .

- `moduleName`: string — The name of the module.

  Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .

- `versionId`: string — The ID for the specific version of the module.

  Conditional: You must specify either `Arn` , or `ModuleName` and `VersionId` .
