Skip to content
v2.274.0

SpotPlacementProperty Struct ​

Describes Spot Instance placement.

Example ​

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 spotPlacementProperty: ec2.CfnSpotFleet.SpotPlacementProperty = {
  availabilityZone: 'availabilityZone',
  availabilityZoneId: 'availabilityZoneId',
  groupName: 'groupName',
  tenancy: 'tenancy',
};

Properties ​

availabilityZonestringavailability_zonestravailabilityZoneStringAvailabilityZonestringAvailabilityZone*string#
The Availability Zone.

To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".

availabilityZoneIdstringavailability_zone_idstravailabilityZoneIdStringAvailabilityZoneIdstringAvailabilityZoneId*string#
The ID of the Availability Zone. For example, `use2-az1` .

[Spot Fleet only] To specify multiple Availability Zones, separate them using commas; for example, " use2-az1 , use2-bz1 ".

Either AvailabilityZone or AvailabilityZoneId must be specified in the request, but not both.

groupNamestringgroup_namestrgroupNameStringGroupNamestringGroupName*string#
The name of the placement group.
tenancystringtenancystrtenancyStringTenancystringTenancy*string#
The tenancy of the instance (if the instance is running in a VPC).

An instance with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is not supported for Spot Instances.