# LaunchTemplateSpec

Launch template property specification.

- Source: [`aws-eks-v2/lib/managed-nodegroup.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-eks-v2/lib/managed-nodegroup.ts#L156)
- Type last changed: v2.240.0 · 23 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_eks_v2 as eks_v2 } from 'aws-cdk-lib';
const launchTemplateSpec: eks_v2.LaunchTemplateSpec = {
  id: 'id',

  // the properties below are optional
  version: 'version',
};
```

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_eks_v2 as eks_v2

launch_template_spec = eks_v2.LaunchTemplateSpec(
    id="id",

    # the properties below are optional
    version="version"
)
```

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

LaunchTemplateSpec launchTemplateSpec = LaunchTemplateSpec.builder()
        .id("id")

        // the properties below are optional
        .version("version")
        .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.EKSv2;

var launchTemplateSpec = new LaunchTemplateSpec {
    Id = "id",

    // the properties below are optional
    Version = "version"
};
```

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"

launchTemplateSpec := &LaunchTemplateSpec{
	Id: jsii.String("id"),

	// the properties below are optional
	Version: jsii.String("version"),
}
```

## Properties

- `id`: string (required) — The Launch template ID.

- `version`: string — The launch template version to be used (optional).

  **Default:** the default version of the launch template
