Interface CfnLaunchTemplate.PlacementProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnLaunchTemplate.PlacementProperty.Jsii$Proxy
Enclosing class:
CfnLaunchTemplate

@Stability(Stable) public static interface CfnLaunchTemplate.PlacementProperty extends software.amazon.jsii.JsiiSerializable
Specifies the placement of an instance.

Placement is a property of AWS::EC2::LaunchTemplate LaunchTemplateData .

Example:

 // 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.*;
 PlacementProperty placementProperty = PlacementProperty.builder()
         .affinity("affinity")
         .availabilityZone("availabilityZone")
         .groupId("groupId")
         .groupName("groupName")
         .hostId("hostId")
         .hostResourceGroupArn("hostResourceGroupArn")
         .partitionNumber(123)
         .spreadDomain("spreadDomain")
         .tenancy("tenancy")
         .build();
 
  • Method Details

    • getAffinity

      @Stability(Stable) @Nullable default String getAffinity()
      The affinity setting for an instance on a Dedicated Host.
    • getAvailabilityZone

      @Stability(Stable) @Nullable default String getAvailabilityZone()
      The Availability Zone for the instance.
    • getGroupId

      @Stability(Stable) @Nullable default String getGroupId()
      The Group Id of a placement group.

      You must specify the Placement Group Group Id to launch an instance in a shared placement group.

    • getGroupName

      @Stability(Stable) @Nullable default String getGroupName()
      The name of the placement group for the instance.
    • getHostId

      @Stability(Stable) @Nullable default String getHostId()
      The ID of the Dedicated Host for the instance.
    • getHostResourceGroupArn

      @Stability(Stable) @Nullable default String getHostResourceGroupArn()
      The ARN of the host resource group in which to launch the instances.

      If you specify a host resource group ARN, omit the Tenancy parameter or set it to host .

    • getPartitionNumber

      @Stability(Stable) @Nullable default Number getPartitionNumber()
      The number of the partition the instance should launch in.

      Valid only if the placement group strategy is set to partition .

    • getSpreadDomain

      @Stability(Stable) @Nullable default String getSpreadDomain()
      Reserved for future use.
    • getTenancy

      @Stability(Stable) @Nullable default String getTenancy()
      The tenancy of the instance.

      An instance with a tenancy of dedicated runs on single-tenant hardware.

    • builder

      @Stability(Stable) static CfnLaunchTemplate.PlacementProperty.Builder builder()
      Returns:
      a CfnLaunchTemplate.PlacementProperty.Builder of CfnLaunchTemplate.PlacementProperty