# LaunchTemplateSpecificationProperty

An object representing a node group launch template specification.

The launch template can't include [`SubnetId`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html) , [`IamInstanceProfile`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html) , [`RequestSpotInstances`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html) , [`HibernationOptions`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html) , or [`TerminateInstances`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_TerminateInstances.html) , or the node group deployment or update will fail. For more information about launch templates, see [`CreateLaunchTemplate`](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateLaunchTemplate.html) in the Amazon EC2 API Reference. For more information about using launch templates with Amazon EKS, see [Customizing managed nodes with launch templates](https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html) in the *Amazon EKS User Guide* .

You must specify either the launch template ID or the launch template name in the request, but not both.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## 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 as eks } from 'aws-cdk-lib';
const launchTemplateSpecificationProperty: eks.CfnNodegroup.LaunchTemplateSpecificationProperty = {
  id: 'id',
  name: 'name',
  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 as eks

launch_template_specification_property = eks.CfnNodegroup.LaunchTemplateSpecificationProperty(
    id="id",
    name="name",
    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.*;

LaunchTemplateSpecificationProperty launchTemplateSpecificationProperty = LaunchTemplateSpecificationProperty.builder()
        .id("id")
        .name("name")
        .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.EKS;

var launchTemplateSpecificationProperty = new LaunchTemplateSpecificationProperty {
    Id = "id",
    Name = "name",
    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"

launchTemplateSpecificationProperty := &LaunchTemplateSpecificationProperty{
	Id: jsii.String("id"),
	Name: jsii.String("name"),
	Version: jsii.String("version"),
}
```

## Properties

- `id`: string — The ID of the launch template.

  You must specify either the launch template ID or the launch template name in the request, but not both. After node group creation, you cannot use a different ID.

- `name`: string — The name of the launch template.

  You must specify either the launch template name or the launch template ID in the request, but not both. After node group creation, you cannot use a different name.

- `version`: string — The version number of the launch template to use.

  If no version is specified, then the template's default version is used. You can use a different version for node group updates.
