queryVersionConfig method
Queries the bare metal 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}/bareMetalAdminClusters/{bare_metal_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}/bareMetalClusters/{bare_metal_cluster}"
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a QueryBareMetalVersionConfigResponse.
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<QueryBareMetalVersionConfigResponse> 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') +
'/bareMetalClusters:queryVersionConfig';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return QueryBareMetalVersionConfigResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}