set_user_pool_client_session_configuration
¶
set_user_pool_client_session_configuration(
user_pool_id: UserPoolIdType,
client_id: ClientIdType,
sso_session: ClientSSOSessionConfigType,
*,
config_overrides: Optional[CognitoIdentityProviderClientConfig] = 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.
>>> 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/cognito_identity_provider.py
10339 10340 10341 10342 10343 10344 10345 10346 10347 10348 10349 10350 10351 10352 10353 10354 10355 10356 10357 10358 10359 10360 10361 10362 10363 10364 10365 10366 10367 10368 10369 10370 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 10388 10389 10390 10391 10392 10393 10394 10395 10396 10397 10398 10399 10400 10401 10402 10403 10404 10405 10406 10407 10408 10409 10410 10411 10412 10413 10414 10415 10416 10417 10418 10419 10420 10421 10422 10423 10424 | |