create_auth_code
async
¶
create_auth_code(
instance_id: InstanceId,
scope: AuthScope,
session_inactivity_duration_minutes: SessionInactivityDurationMinutes,
*,
config_overrides: Optional[AsyncConnectClientConfig] = None,
max_session_duration_minutes: Optional[MaxSessionDurationMinutes] = None,
) -> CreateAuthCodeResponse
Creates an authorization code for the specified Connect Customer instance. The authorization code can be used to establish a session with scoped permissions defined by the specified scope parameters.
Parameters:
-
instance_id(InstanceId) –The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.
-
scope(AuthScope) –The scope for the authorization code. Defines the permissions and access boundaries for the session.
-
max_session_duration_minutes(Optional[MaxSessionDurationMinutes], default:None) –The maximum duration of the session, in minutes. Minimum value of 1440 (24 hours). Maximum value of 43200 (30 days). If no value is provided, the session will expire after 400 days.
-
session_inactivity_duration_minutes(SessionInactivityDurationMinutes) –The duration of inactivity, in minutes, after which the session expires. Minimum value of 1440 (24 hours). Maximum value of 20160 (14 days).
Raises:
-
AccessDeniedException–You do not have sufficient permissions to perform this action.
-
InternalServiceException–Request processing failed because of an error or failure with the service.
-
InvalidParameterException–One or more of the specified parameters are not valid.
-
InvalidRequestException–The request is not valid.
-
ResourceNotFoundException–The specified resource was not found.
-
ThrottlingException–The throttling limit has been exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_connect/_services/async_connect.py
3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 | |