get method
Retrieves information about the specified reservation block.
Request parameters:
project
- Project ID for this request.
zone
- Name of the zone for this request. Zone name should conform to
RFC1035.
reservation
- The name of the reservation. Name should conform to
RFC1035 or be a resource ID.
reservationBlock
- The name of the reservation block. Name should
conform to RFC1035 or be a resource ID.
view
- View of the Block.
Possible string values are:
- "BASIC" : This view includes basic information about the reservation block
- "BLOCK_VIEW_UNSPECIFIED" : The default / unset value. The API will default to the BASIC view.
- "FULL" : Includes detailed topology view.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ReservationBlocksGetResponse.
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<ReservationBlocksGetResponse> get(
core.String project,
core.String zone,
core.String reservation,
core.String reservationBlock, {
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ =
'projects/' +
commons.escapeVariable('$project') +
'/zones/' +
commons.escapeVariable('$zone') +
'/reservations/' +
commons.escapeVariable('$reservation') +
'/reservationBlocks/' +
commons.escapeVariable('$reservationBlock');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ReservationBlocksGetResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}