queryVersionConfig method

Future<QueryVmwareVersionConfigResponse> queryVersionConfig(
  1. String parent, {
  2. String? createConfig_adminClusterMembership,
  3. String? createConfig_adminClusterName,
  4. String? upgradeConfig_clusterName,
  5. String? $fields,
})

Queries the VMware user cluster version config.

Request parameters:

parent - Required. The parent of the project and location to query for version config. Format: "projects/{project}/locations/{location}" Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+$.

createConfig_adminClusterMembership - The admin cluster membership. This is the full resource name of the admin cluster's fleet membership. Format: "projects/{project}/locations/{location}/memberships/{membership}"

createConfig_adminClusterName - The admin cluster resource name. This is the full resource name of the admin cluster resource. Format: "projects/{project}/locations/{location}/vmwareAdminClusters/{vmware_admin_cluster}"

upgradeConfig_clusterName - The user cluster resource name. This is the full resource name of the user cluster resource. Format: "projects/{project}/locations/{location}/vmwareClusters/{vmware_cluster}"

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

Completes with a QueryVmwareVersionConfigResponse.

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<QueryVmwareVersionConfigResponse> queryVersionConfig(
  core.String parent, {
  core.String? createConfig_adminClusterMembership,
  core.String? createConfig_adminClusterName,
  core.String? upgradeConfig_clusterName,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (createConfig_adminClusterMembership != null)
      'createConfig.adminClusterMembership': [
        createConfig_adminClusterMembership
      ],
    if (createConfig_adminClusterName != null)
      'createConfig.adminClusterName': [createConfig_adminClusterName],
    if (upgradeConfig_clusterName != null)
      'upgradeConfig.clusterName': [upgradeConfig_clusterName],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/' +
      core.Uri.encodeFull('$parent') +
      '/vmwareClusters:queryVersionConfig';

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