public AssumeRoleWithSAMLRequest withDurationSeconds(Integer durationSeconds) {
        setDurationSeconds(durationSeconds);
        return this;
    }
<p>
The duration, in seconds, of the role session. Your role session lasts for the duration that you specify for the
<code>DurationSeconds</code> parameter, or until the time specified in the SAML authentication response's
<code>SessionNotOnOrAfter</code> value, whichever is shorter. You can provide a <code>DurationSeconds</code>
value from 900 seconds (15 minutes) up to the maximum session duration setting for the role. This setting can
have a value from 1 hour to 12 hours. If you specify a value higher than this setting, the operation fails. For
example, if you specify a session duration of 12 hours, but your administrator set the maximum session duration
to 6 hours, your operation fails. To learn how to view the maximum value for your role, see <a
href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session">View
the Maximum Session Duration Setting for a Role</a> in the <i>IAM User Guide</i>.
</p>
<p>
By default, the value is set to <code>3600</code> seconds.
</p>
<note>
<p>
The <code>DurationSeconds</code> parameter is separate from the duration of a console session that you might
request using the returned credentials. The request to the federation endpoint for a console sign-in token takes
a <code>SessionDuration</code> parameter that specifies the maximum length of the console session. For more
information, see <a
href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html"
>Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console</a> in the
<i>IAM User Guide</i>.
</p>
</note>

@param durationSeconds
       The duration, in seconds, of the role session. Your role session lasts for the duration that you specify
       for the <code>DurationSeconds</code> parameter, or until the time specified in the SAML authentication
       response's <code>SessionNotOnOrAfter</code> value, whichever is shorter. You can provide a
       <code>DurationSeconds</code> value from 900 seconds (15 minutes) up to the maximum session duration
       setting for the role. This setting can have a value from 1 hour to 12 hours. If you specify a value higher
       than this setting, the operation fails. For example, if you specify a session duration of 12 hours, but
       your administrator set the maximum session duration to 6 hours, your operation fails. To learn how to view
       the maximum value for your role, see <a href=
       "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session"
       >View the Maximum Session Duration Setting for a Role</a> in the <i>IAM User Guide</i>.</p>
       <p>
       By default, the value is set to <code>3600</code> seconds.
       </p>
       <note>
       <p>
       The <code>DurationSeconds</code> parameter is separate from the duration of a console session that you
       might request using the returned credentials. The request to the federation endpoint for a console sign-in
       token takes a <code>SessionDuration</code> parameter that specifies the maximum length of the console
       session. For more information, see <a href=
       "https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html"
       >Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console</a> in
       the <i>IAM User Guide</i>.
       </p>
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sts/src/main/java/com/amazonaws/services/securitytoken/model/AssumeRoleWithSAMLRequest.java