updatePlugin method

Future<void> updatePlugin({
  1. required String applicationId,
  2. required String pluginId,
  3. PluginAuthConfiguration? authConfiguration,
  4. CustomPluginConfiguration? customPluginConfiguration,
  5. String? displayName,
  6. String? serverUrl,
  7. PluginState? state,
})

Updates an Amazon Q Business plugin.

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

Parameter applicationId : The identifier of the application the plugin is attached to.

Parameter pluginId : The identifier of the plugin.

Parameter authConfiguration : The authentication configuration the plugin is using.

Parameter customPluginConfiguration : The configuration for a custom plugin.

Parameter displayName : The name of the plugin.

Parameter serverUrl : The source URL used for plugin configuration.

Parameter state : The status of the plugin.

Implementation

Future<void> updatePlugin({
  required String applicationId,
  required String pluginId,
  PluginAuthConfiguration? authConfiguration,
  CustomPluginConfiguration? customPluginConfiguration,
  String? displayName,
  String? serverUrl,
  PluginState? state,
}) async {
  final $payload = <String, dynamic>{
    if (authConfiguration != null) 'authConfiguration': authConfiguration,
    if (customPluginConfiguration != null)
      'customPluginConfiguration': customPluginConfiguration,
    if (displayName != null) 'displayName': displayName,
    if (serverUrl != null) 'serverUrl': serverUrl,
    if (state != null) 'state': state.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/applications/${Uri.encodeComponent(applicationId)}/plugins/${Uri.encodeComponent(pluginId)}',
    exceptionFnMap: _exceptionFns,
  );
}