public AmiDistributionConfiguration withTargetAccountIds(String... targetAccountIds) {
        if (this.targetAccountIds == null) {
            setTargetAccountIds(new java.util.ArrayList<String>(targetAccountIds.length));
        }
        for (String ele : targetAccountIds) {
            this.targetAccountIds.add(ele);
        }
        return this;
    }
<p>
The ID of an account to which you want to distribute an image.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setTargetAccountIds(java.util.Collection)} or {@link #withTargetAccountIds(java.util.Collection)} if you
want to override the existing values.
</p>

@param targetAccountIds
       The ID of an account to which you want to distribute an image.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-imagebuilder/src/main/java/com/amazonaws/services/imagebuilder/model/AmiDistributionConfiguration.java