putApplicationSessionConfiguration method

Future<void> putApplicationSessionConfiguration({
  1. required String applicationArn,
  2. UserBackgroundSessionApplicationStatus? userBackgroundSessionApplicationStatus,
})

Updates the session configuration for an application in IAM Identity Center.

The session configuration determines how users can access an application. This includes whether user background sessions are enabled. User background sessions allow users to start a job on a supported Amazon Web Services managed application without having to remain signed in to an active session while the job runs.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter applicationArn : The Amazon Resource Name (ARN) of the application for which to update the session configuration.

Parameter userBackgroundSessionApplicationStatus : The status of user background sessions for the application.

Implementation

Future<void> putApplicationSessionConfiguration({
  required String applicationArn,
  UserBackgroundSessionApplicationStatus?
      userBackgroundSessionApplicationStatus,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'SWBExternalService.PutApplicationSessionConfiguration'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ApplicationArn': applicationArn,
      if (userBackgroundSessionApplicationStatus != null)
        'UserBackgroundSessionApplicationStatus':
            userBackgroundSessionApplicationStatus.value,
    },
  );
}