getHealth method

Future<Operation> getHealth(
  1. String project,
  2. String zone,
  3. String parentName,
  4. String reservationSlot, {
  5. String? requestId,
  6. String? $fields,
})

Get health info on a reservation slot.

Request parameters:

project - Project ID for this request.

zone - Name of the zone for this request. Zone name should conform to RFC1035.

parentName - The name of the parent reservation, parent block and parent sub-block. In the format of reservations/{reservation_name}/reservationBlocks/{reservation_block_name}/reservationSubBlocks/{reservation_sub_block_name} Value must have pattern reservations/(\[a-z\](?:\[-a-z0-9\]{0,61}\[a-z0-9\])?|\[1-9\]\[0-9\]{0,19})/reservationBlocks/(\[a-z\](?:\[-a-z0-9\]{0,61}\[a-z0-9\])?|\[1-9\]\[0-9\]{0,19})/reservationSubBlocks/(\[a-z\](?:\[-a-z0-9\]{0,61}\[a-z0-9\])?|\[1-9\]\[0-9\]{0,19}).

reservationSlot - The name of the reservation slot. Name should conform to RFC1035 or be a resource ID.

requestId - An optional request ID to identify requests.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Operation.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<Operation> getHealth(
  core.String project,
  core.String zone,
  core.String parentName,
  core.String reservationSlot, {
  core.String? requestId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'requestId': ?requestId == null ? null : [requestId],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'projects/' +
      commons.escapeVariable('$project') +
      '/zones/' +
      commons.escapeVariable('$zone') +
      '/' +
      core.Uri.encodeFull('$parentName') +
      '/reservationSlots/' +
      commons.escapeVariable('$reservationSlot') +
      '/getHealth';

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}