getDBRPs method

Future<DBRPs> getDBRPs({
  1. String? zapTraceSpan,
  2. String? orgID,
  3. String? org,
  4. String? id,
  5. String? bucketID,
  6. bool? default_,
  7. String? db,
  8. String? rp,
})

List database retention policy mappings

Parameters:

  • String zapTraceSpan: OpenTracing span context

  • String orgID: Specifies the organization ID to filter on

  • String org: Specifies the organization name to filter on

  • String id: Specifies the mapping ID to filter on

  • String bucketID: Specifies the bucket ID to filter on

  • bool default_: Specifies filtering on default

  • String db: Specifies the database to filter on

  • String rp: Specifies the retention policy to filter on

Implementation

Future<DBRPs> getDBRPs(
    {String? zapTraceSpan,
    String? orgID,
    String? org,
    String? id,
    String? bucketID,
    bool? default_,
    String? db,
    String? rp}) async {
  final response = await getDBRPsWithHttpInfo(
      zapTraceSpan: zapTraceSpan,
      orgID: orgID,
      org: org,
      id: id,
      bucketID: bucketID,
      default_: default_,
      db: db,
      rp: rp);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(
      await _decodeBodyBytes(response),
      'DBRPs',
    ) as DBRPs;
  }
  throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}