# InitCommandWaitDuration

Represents a duration to wait after a command has finished, in case of a reboot (Windows only).

Obtainable from: InitCommandWaitDuration.forever, InitCommandWaitDuration.none, InitCommandWaitDuration.of

- Source: [`aws-ec2/lib/cfn-init-elements.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-ec2/lib/cfn-init-elements.ts#L175)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const initCommandWaitDuration = ec2.InitCommandWaitDuration.forever();
```

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_ec2 as ec2

init_command_wait_duration = ec2.InitCommandWaitDuration.forever()
```

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

InitCommandWaitDuration initCommandWaitDuration = InitCommandWaitDuration.forever();
```

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

var initCommandWaitDuration = InitCommandWaitDuration.Forever();
```

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"

initCommandWaitDuration := awscdk.Aws_ec2.InitCommandWaitDuration_Forever()
```

## Initializer

TypeScript:

```ts
new InitCommandWaitDuration()
```

Python:

```python
InitCommandWaitDuration()
```

Java:

```java
new InitCommandWaitDuration()
```

C# / .NET:

```csharp
new InitCommandWaitDuration()
```

Golang:

```go
NewInitCommandWaitDuration()
```

## Methods

- `forever(): InitCommandWaitDuration // chainable` (static) — cfn-init will exit and resume only after a reboot.

- `none(): InitCommandWaitDuration // chainable` (static) — Do not wait for this command.

- `of(duration: Duration): InitCommandWaitDuration // chainable` (static) — Wait for a specified duration after a command.
