# PlacementTypeProperty

The Amazon EC2 Availability Zone configuration of the cluster (job flow).

- Source: [`aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/emr/emr-create-cluster.ts#L1505)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
const placementTypeProperty: stepfunctions_tasks.EmrCreateCluster.PlacementTypeProperty = {
  availabilityZone: 'availabilityZone',
  availabilityZones: ['availabilityZones'],
};
```

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_stepfunctions_tasks as stepfunctions_tasks

placement_type_property = stepfunctions_tasks.EmrCreateCluster.PlacementTypeProperty(
    availability_zone="availabilityZone",
    availability_zones=["availabilityZones"]
)
```

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.stepfunctions.tasks.*;

PlacementTypeProperty placementTypeProperty = PlacementTypeProperty.builder()
        .availabilityZone("availabilityZone")
        .availabilityZones(List.of("availabilityZones"))
        .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.StepFunctions.Tasks;

var placementTypeProperty = new PlacementTypeProperty {
    AvailabilityZone = "availabilityZone",
    AvailabilityZones = new [] { "availabilityZones" }
};
```

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"

placementTypeProperty := &PlacementTypeProperty{
	AvailabilityZone: jsii.String("availabilityZone"),
	AvailabilityZones: []*string{
		jsii.String("availabilityZones"),
	},
}
```

## Properties

- `availabilityZone`: string — The Amazon EC2 Availability Zone for the cluster.

  **Default:** EMR selected default

  AvailabilityZone is used for uniform instance groups, while AvailabilityZones
  (plural) is used for instance fleets.

- `availabilityZones`: string[] — When multiple Availability Zones are specified, Amazon EMR evaluates them and launches instances in the optimal Availability Zone.

  **Default:** EMR selected default

  AvailabilityZones is used for instance fleets, while AvailabilityZone (singular) is used for uniform instance groups.
