public AutomationExecution withTargetLocations(TargetLocation... targetLocations) {
        if (this.targetLocations == null) {
            setTargetLocations(new com.amazonaws.internal.SdkInternalList<TargetLocation>(targetLocations.length));
        }
        for (TargetLocation ele : targetLocations) {
            this.targetLocations.add(ele);
        }
        return this;
    }
<p>
The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run the
Automation.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTargetLocations(java.util.Collection)} or {@link #withTargetLocations(java.util.Collection)} if you
want to override the existing values.
</p>

@param targetLocations
       The combination of Amazon Web Services Regions and/or Amazon Web Services accounts where you want to run
       the Automation.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/AutomationExecution.java