public UpdateAccessRequest withPolicy(String policy) {
        setPolicy(policy);
        return this;
    }
<p>
A session policy for your user so that you can use the same Identity and Access Management (IAM) role across
multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket. Variables that you
can use inside this policy include <code>${Transfer:UserName}</code>, <code>${Transfer:HomeDirectory}</code>, and
<code>${Transfer:HomeBucket}</code>.
</p>
<note>
<p>
This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use session
policies.
</p>
<p>
For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource Name (ARN)
of the policy. You save the policy as a JSON blob and pass it in the <code>Policy</code> argument.
</p>
<p>
For an example of a session policy, see <a
href="https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html">Example session policy</a>.
</p>
<p>
For more information, see <a
href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the <i>Amazon
Web ServicesSecurity Token Service API Reference</i>.
</p>
</note>

@param policy
       A session policy for your user so that you can use the same Identity and Access Management (IAM) role
       across multiple users. This policy scopes down a user's access to portions of their Amazon S3 bucket.
       Variables that you can use inside this policy include <code>${Transfer:UserName}</code>,
       <code>${Transfer:HomeDirectory}</code>, and <code>${Transfer:HomeBucket}</code>.</p> <note>
       <p>
       This policy applies only when the domain of <code>ServerId</code> is Amazon S3. Amazon EFS does not use
       session policies.
       </p>
       <p>
       For session policies, Transfer Family stores the policy as a JSON blob, instead of the Amazon Resource
       Name (ARN) of the policy. You save the policy as a JSON blob and pass it in the <code>Policy</code>
       argument.
       </p>
       <p>
       For an example of a session policy, see <a
       href="https://docs.aws.amazon.com/transfer/latest/userguide/session-policy.html">Example session
       policy</a>.
       </p>
       <p>
       For more information, see <a
       href="https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html">AssumeRole</a> in the
       <i>Amazon Web ServicesSecurity Token Service API Reference</i>.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-transfer/src/main/java/com/amazonaws/services/transfer/model/UpdateAccessRequest.java