set_user_pool_client_session_configuration
async
¶
set_user_pool_client_session_configuration(
user_pool_id: UserPoolIdType,
client_id: ClientIdType,
sso_session: ClientSSOSessionConfigType,
*,
config_overrides: Optional[AsyncCognitoIdentityProviderClientConfig] = None,
) -> SetUserPoolClientSessionConfigurationResponse
Sets the session configuration for a user pool app client. The configurable client-level setting is the maximum validity period for silent reuse of an SSO session. This operation performs a full replacement of the client-level session configuration; every request parameter is required, and session tracking must be enabled for the user pool. The user pool must be in the Essentials or Plus tier. Otherwise, this operation returns a FeatureUnavailableInTierException.
Parameters:
-
user_pool_id(UserPoolIdType) –The ID of the user pool that contains the app client.
-
client_id(ClientIdType) –The ID of the app client that you want to configure.
-
sso_session(ClientSSOSessionConfigType) –The SSO session settings for the app client.
Raises:
-
ConcurrentModificationException–This exception is thrown if two or more modifications are happening concurrently.
-
FeatureUnavailableInTierException–This exception is thrown when a feature that you attempted to use or configure isn't included in your user pool's current feature plan. This can occur when:
-
You configure a feature that your feature plan doesn't support.
-
You make a request that uses a feature that requires a higher feature plan.
To resolve this issue, upgrade your user pool to a feature plan that includes the feature.
-
-
InternalErrorException–This exception is thrown when Amazon Cognito encounters an internal error.
-
InvalidParameterException–This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
-
NotAuthorizedException–This exception is thrown when a user isn't authorized.
-
OperationNotEnabledException–This exception is thrown when an operation is not available in the current region or for the current user pool configuration. This can occur when attempting to perform operations that are not supported in secondary replica regions.
-
ResourceNotFoundException–This exception is thrown when the Amazon Cognito service can't find the requested resource.
-
TooManyRequestsException–This exception is thrown when the user has made too many requests for a given operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Example set the SSO session validity for an app client The following example configures an app client to silently reuse an SSO session for up to 43200 minutes (30 days) since the last authentication before requiring the user to sign in again.
>>> await client.set_user_pool_client_session_configuration(user_pool_id='us-east-1_EXAMPLE', client_id='1example23456789', sso_session={'MaxValidityMinutes': 43200})
Source code in docs_src/capo_cognito_identity_provider/_services/async_cognito_identity_provider.py
10464 10465 10466 10467 10468 10469 10470 10471 10472 10473 10474 10475 10476 10477 10478 10479 10480 10481 10482 10483 10484 10485 10486 10487 10488 10489 10490 10491 10492 10493 10494 10495 10496 10497 10498 10499 10500 10501 10502 10503 10504 10505 10506 10507 10508 10509 10510 10511 10512 10513 10514 10515 10516 10517 10518 10519 10520 10521 10522 10523 10524 10525 10526 10527 10528 10529 10530 10531 10532 10533 10534 10535 10536 10537 10538 10539 10540 10541 10542 10543 10544 10545 10546 10547 10548 10549 10550 | |