fetchResourceSemantics method

Future<FetchResourceSemanticsResponse> fetchResourceSemantics({
  1. String? fullResourceName,
  2. String? $fields,
})

Returns the semantics associated with the specified resource.

Request parameters:

fullResourceName - Required. The full resource name of the GCP resource to retrieve semantics for. Examples: "//compute.googleapis.com/projects/123/zones/us-central1-a/instances/my-instance" "//storage.googleapis.com/projects/_/buckets/my_bucket"

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

Completes with a FetchResourceSemanticsResponse.

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<FetchResourceSemanticsResponse> fetchResourceSemantics({
  core.String? fullResourceName,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'fullResourceName': ?fullResourceName == null ? null : [fullResourceName],
    'fields': ?$fields == null ? null : [$fields],
  };

  const url_ = 'v3:fetchResourceSemantics';

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