# LastLaunchedProperty

Defines criteria to exclude AMIs from lifecycle actions based on the last time they were used to launch an instance.

- Source: Generated at build time
- Type last changed: v2.110.0 · 17 Nov 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_imagebuilder as imagebuilder } from 'aws-cdk-lib';
const lastLaunchedProperty: imagebuilder.CfnLifecyclePolicy.LastLaunchedProperty = {
  unit: 'unit',
  value: 123,
};
```

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_imagebuilder as imagebuilder

last_launched_property = imagebuilder.CfnLifecyclePolicy.LastLaunchedProperty(
    unit="unit",
    value=123
)
```

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

LastLaunchedProperty lastLaunchedProperty = LastLaunchedProperty.builder()
        .unit("unit")
        .value(123)
        .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.ImageBuilder;

var lastLaunchedProperty = new LastLaunchedProperty {
    Unit = "unit",
    Value = 123
};
```

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"

lastLaunchedProperty := &LastLaunchedProperty{
	Unit: jsii.String("unit"),
	Value: jsii.Number(123),
}
```

## Properties

- `unit`: string (required) — Defines the unit of time that the lifecycle policy uses to calculate elapsed time since the last instance launched from the AMI.

  For example: days, weeks, months, or years.

- `value`: number (required) — The integer number of units for the time period.

  For example `6` (months).
