createAnonymousWebExperienceUrl method

Future<CreateAnonymousWebExperienceUrlResponse> createAnonymousWebExperienceUrl({
  1. required String applicationId,
  2. required String webExperienceId,
  3. int? sessionDurationInMinutes,
})

Creates a unique URL for anonymous Amazon Q Business web experience. This URL can only be used once and must be used within 5 minutes after it's generated.

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

Parameter applicationId : The identifier of the Amazon Q Business application environment attached to the web experience.

Parameter webExperienceId : The identifier of the web experience.

Parameter sessionDurationInMinutes : The duration of the session associated with the unique URL for the web experience.

Implementation

Future<CreateAnonymousWebExperienceUrlResponse>
    createAnonymousWebExperienceUrl({
  required String applicationId,
  required String webExperienceId,
  int? sessionDurationInMinutes,
}) async {
  _s.validateNumRange(
    'sessionDurationInMinutes',
    sessionDurationInMinutes,
    15,
    60,
  );
  final $payload = <String, dynamic>{
    if (sessionDurationInMinutes != null)
      'sessionDurationInMinutes': sessionDurationInMinutes,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/experiences/${Uri.encodeComponent(webExperienceId)}/anonymous-url',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAnonymousWebExperienceUrlResponse.fromJson(response);
}