> **Experimental**
>
> `@aws-cdk/aws-imagebuilder-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# ComponentStepIfCondition

Represents an `if` condition in the component document.

Obtainable from: ComponentStepIfCondition.fromObject

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/component.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/@aws-cdk/aws-imagebuilder-alpha/lib/component.ts#L647)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as imagebuilder_alpha from '@aws-cdk/aws-imagebuilder-alpha';

declare const ifObject: any;
const componentStepIfCondition = imagebuilder_alpha.ComponentStepIfCondition.fromObject({
  ifObjectKey: ifObject,
});
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_imagebuilder_alpha as imagebuilder_alpha

# if_object: Any

component_step_if_condition = imagebuilder_alpha.ComponentStepIfCondition.from_object({
    "if_object_key": if_object
})
```

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

Object ifObject;

ComponentStepIfCondition componentStepIfCondition = ComponentStepIfCondition.fromObject(Map.of(
        "ifObjectKey", ifObject));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.ImageBuilder.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.ImageBuilder.Alpha;

var ifObject;

var componentStepIfCondition = ComponentStepIfCondition.FromObject(new Dictionary<string, object> {
    { "ifObjectKey", ifObject }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import imagebuilder_alpha "github.com/aws/aws-cdk-go/awsimagebuilderalpha"

var ifObject interface{}

componentStepIfCondition := imagebuilder_alpha.ComponentStepIfCondition_FromObject(map[string]interface{}{
	"ifObjectKey": ifObject,
})
```

## Properties

- `ifCondition`: any — The rendered input value.

## Methods

- `fromObject(ifObject: { [key: string]: any }): ComponentStepIfCondition // chainable` (static) — Creates the `if` value from an object, for the component step.

  **Parameters**

  - `ifObject` — The object containing the `if` condition.
