Class CfnSpotFleet.SpotPlacementProperty.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnSpotFleet.SpotPlacementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSpotFleet.SpotPlacementProperty>
- Enclosing interface:
CfnSpotFleet.SpotPlacementProperty
@Stability(Stable)
public static final class CfnSpotFleet.SpotPlacementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSpotFleet.SpotPlacementProperty>
A builder for
CfnSpotFleet.SpotPlacementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionavailabilityZone(String availabilityZone) Sets the value ofCfnSpotFleet.SpotPlacementProperty.getAvailabilityZone()build()Builds the configured instance.Sets the value ofCfnSpotFleet.SpotPlacementProperty.getGroupName()Sets the value ofCfnSpotFleet.SpotPlacementProperty.getTenancy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
availabilityZone
@Stability(Stable) public CfnSpotFleet.SpotPlacementProperty.Builder availabilityZone(String availabilityZone) Sets the value ofCfnSpotFleet.SpotPlacementProperty.getAvailabilityZone()- Parameters:
availabilityZone- The Availability Zone. To specify multiple Availability Zones, separate them using commas; for example, "us-west-2a, us-west-2b".- Returns:
this
-
groupName
Sets the value ofCfnSpotFleet.SpotPlacementProperty.getGroupName()- Parameters:
groupName- The name of the placement group.- Returns:
this
-
tenancy
Sets the value ofCfnSpotFleet.SpotPlacementProperty.getTenancy()- Parameters:
tenancy- The tenancy of the instance (if the instance is running in a VPC). An instance with a tenancy ofdedicatedruns on single-tenant hardware. Thehosttenancy is not supported for Spot Instances.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSpotFleet.SpotPlacementProperty>- Returns:
- a new instance of
CfnSpotFleet.SpotPlacementProperty - Throws:
NullPointerException- if any required attribute was not provided
-