SpotPlacementProperty Struct
Describes Spot Instance placement.
| Source | |
|---|---|
| Type last changed |
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',
};
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
spot_placement_property = ec2.CfnSpotFleet.SpotPlacementProperty(
availability_zone="availabilityZone",
availability_zone_id="availabilityZoneId",
group_name="groupName",
tenancy="tenancy"
)
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.*;
SpotPlacementProperty spotPlacementProperty = SpotPlacementProperty.builder()
.availabilityZone("availabilityZone")
.availabilityZoneId("availabilityZoneId")
.groupName("groupName")
.tenancy("tenancy")
.build();
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 spotPlacementProperty = new SpotPlacementProperty {
AvailabilityZone = "availabilityZone",
AvailabilityZoneId = "availabilityZoneId",
GroupName = "groupName",
Tenancy = "tenancy"
};
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"
spotPlacementProperty := &SpotPlacementProperty{
AvailabilityZone: jsii.String("availabilityZone"),
AvailabilityZoneId: jsii.String("availabilityZoneId"),
GroupName: jsii.String("groupName"),
Tenancy: jsii.String("tenancy"),
}
Properties
availabilityZoneoptionalstringavailability_zoneoptionalstravailabilityZoneoptionalStringAvailabilityZoneoptionalstringAvailabilityZoneoptional*string #The Availability Zone.
To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".
availabilityZoneIdoptionalstringavailability_zone_idoptionalstravailabilityZoneIdoptionalStringAvailabilityZoneIdoptionalstringAvailabilityZoneIdoptional*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.
groupNameoptionalstringgroup_nameoptionalstrgroupNameoptionalStringGroupNameoptionalstringGroupNameoptional*string #The name of the placement group.
tenancyoptionalstringtenancyoptionalstrtenancyoptionalStringTenancyoptionalstringTenancyoptional*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.