updateKxDataview method

Future<UpdateKxDataviewResponse> updateKxDataview({
  1. required String databaseName,
  2. required String dataviewName,
  3. required String environmentId,
  4. String? changesetId,
  5. String? clientToken,
  6. String? description,
  7. List<KxDataviewSegmentConfiguration>? segmentConfigurations,
})

Updates the specified dataview. The dataviews get automatically updated when any new changesets are ingested. Each update of the dataview creates a new version, including changeset details and cache configurations

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

Parameter databaseName : The name of the database.

Parameter dataviewName : The name of the dataview that you want to update.

Parameter environmentId : A unique identifier for the kdb environment, where you want to update the dataview.

Parameter changesetId : A unique identifier for the changeset.

Parameter clientToken : A token that ensures idempotency. This token expires in 10 minutes.

Parameter description : The description for a dataview.

Parameter segmentConfigurations : The configuration that contains the database path of the data that you want to place on each selected volume. Each segment must have a unique database path for each volume. If you do not explicitly specify any database path for a volume, they are accessible from the cluster through the default S3/object store segment.

Implementation

Future<UpdateKxDataviewResponse> updateKxDataview({
  required String databaseName,
  required String dataviewName,
  required String environmentId,
  String? changesetId,
  String? clientToken,
  String? description,
  List<KxDataviewSegmentConfiguration>? segmentConfigurations,
}) async {
  final $payload = <String, dynamic>{
    if (changesetId != null) 'changesetId': changesetId,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (description != null) 'description': description,
    if (segmentConfigurations != null)
      'segmentConfigurations': segmentConfigurations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/kx/environments/${Uri.encodeComponent(environmentId)}/databases/${Uri.encodeComponent(databaseName)}/dataviews/${Uri.encodeComponent(dataviewName)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateKxDataviewResponse.fromJson(response);
}