updateAuthenticationProfile method

Future<void> updateAuthenticationProfile({
  1. required String authenticationProfileId,
  2. required String instanceId,
  3. List<String>? allowedIps,
  4. List<String>? blockedIps,
  5. String? description,
  6. String? name,
  7. int? periodicSessionDuration,
  8. int? sessionInactivityDuration,
  9. bool? sessionInactivityHandlingEnabled,
})

This API is in preview release for Connect Customer and is subject to change. To request access to this API, contact Amazon Web Services Support.

Updates the selected authentication profile.

May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter authenticationProfileId : A unique identifier for the authentication profile.

Parameter instanceId : The identifier of the Connect Customer instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

Parameter allowedIps : A list of IP address range strings that are allowed to access the instance. For more information on how to configure IP addresses, seeConfigure session timeouts in the Connect Customer Administrator Guide.

Parameter blockedIps : A list of IP address range strings that are blocked from accessing the instance. For more information on how to configure IP addresses, For more information on how to configure IP addresses, see Configure IP-based access control in the Connect Customer Administrator Guide.

Parameter description : The description for the authentication profile.

Parameter name : The name for the authentication profile.

Parameter periodicSessionDuration : The short lived session duration configuration for users logged in to Connect Customer, in minutes. This value determines the maximum possible time before an agent is authenticated. For more information, For more information on how to configure IP addresses, see Configure session timeouts in the Connect Customer Administrator Guide.

Parameter sessionInactivityDuration : The period, in minutes, before an agent is automatically signed out of the contact center when they go inactive.

Parameter sessionInactivityHandlingEnabled : Determines if automatic logout on user inactivity is enabled.

Implementation

Future<void> updateAuthenticationProfile({
  required String authenticationProfileId,
  required String instanceId,
  List<String>? allowedIps,
  List<String>? blockedIps,
  String? description,
  String? name,
  int? periodicSessionDuration,
  int? sessionInactivityDuration,
  bool? sessionInactivityHandlingEnabled,
}) async {
  _s.validateNumRange(
    'periodicSessionDuration',
    periodicSessionDuration,
    10,
    60,
  );
  _s.validateNumRange(
    'sessionInactivityDuration',
    sessionInactivityDuration,
    15,
    720,
  );
  final $payload = <String, dynamic>{
    if (allowedIps != null) 'AllowedIps': allowedIps,
    if (blockedIps != null) 'BlockedIps': blockedIps,
    if (description != null) 'Description': description,
    if (name != null) 'Name': name,
    if (periodicSessionDuration != null)
      'PeriodicSessionDuration': periodicSessionDuration,
    if (sessionInactivityDuration != null)
      'SessionInactivityDuration': sessionInactivityDuration,
    if (sessionInactivityHandlingEnabled != null)
      'SessionInactivityHandlingEnabled': sessionInactivityHandlingEnabled,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/authentication-profiles/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(authenticationProfileId)}',
    exceptionFnMap: _exceptionFns,
  );
}