updateExperience method

Future<void> updateExperience({
  1. required String id,
  2. required String indexId,
  3. ExperienceConfiguration? configuration,
  4. String? description,
  5. String? name,
  6. String? roleArn,
})

Updates your Amazon Kendra experience such as a search application. For more information on creating a search application experience, see Building a search experience with no code.

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

Parameter id : The identifier of your Amazon Kendra experience you want to update.

Parameter indexId : The identifier of the index for your Amazon Kendra experience.

Parameter configuration : Configuration information you want to update for your Amazon Kendra experience.

Parameter description : A new description for your Amazon Kendra experience.

Parameter name : A new name for your Amazon Kendra experience.

Parameter roleArn : The Amazon Resource Name (ARN) of an IAM role with permission to access the Query API, QuerySuggestions API, SubmitFeedback API, and IAM Identity Center that stores your users and groups information. For more information, see IAM roles for Amazon Kendra.

Implementation

Future<void> updateExperience({
  required String id,
  required String indexId,
  ExperienceConfiguration? configuration,
  String? description,
  String? name,
  String? roleArn,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSKendraFrontendService.UpdateExperience'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      'IndexId': indexId,
      if (configuration != null) 'Configuration': configuration,
      if (description != null) 'Description': description,
      if (name != null) 'Name': name,
      if (roleArn != null) 'RoleArn': roleArn,
    },
  );
}