public ListPoliciesForTargetRequest withTargetId(String targetId) {
        setTargetId(targetId);
        return this;
    }
<p>
The unique identifier (ID) of the root, organizational unit, or account whose policies you want to list.
</p>
<p>
The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a target ID string requires one of the
following:
</p>
<ul>
<li>
<p>
<b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
</p>
</li>
<li>
<p>
<b>Account</b> - A string that consists of exactly 12 digits.
</p>
</li>
<li>
<p>
<b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or
digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32
additional lowercase letters or digits.
</p>
</li>
</ul>

@param targetId
       The unique identifier (ID) of the root, organizational unit, or account whose policies you want to
       list.</p>
       <p>
       The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a target ID string requires one of the
       following:
       </p>
       <ul>
       <li>
       <p>
       <b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.
       </p>
       </li>
       <li>
       <p>
       <b>Account</b> - A string that consists of exactly 12 digits.
       </p>
       </li>
       <li>
       <p>
       <b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase
       letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and
       from 8 to 32 additional lowercase letters or digits.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-organizations/src/main/java/com/amazonaws/services/organizations/model/ListPoliciesForTargetRequest.java