public String getAffinity() {
        return this.affinity;
    }
<p>
The affinity setting for the instance on the Dedicated Host.
</p>

@return The affinity setting for the instance on the Dedicated Host.
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/LaunchTemplatePlacement.java