Method: projects.locations.bareMetalClusters.enroll

Enrolls an existing bare metal user cluster and its node pools to the Anthos On-Prem API within a given project and location. Through enrollment, an existing cluster will become Anthos On-Prem API managed. The corresponding GCP resources will be created and all future modifications to the cluster and/or its node pools will be expected to be performed through the API.

HTTP request

POST https://gkeonprem.googleapis.com/v1/{parent=projects/*/locations/*}/bareMetalClusters:enroll

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent of the project and location where the cluster is enrolled in. Format: "projects/{project}/locations/{location}"

Request body

The request body contains data with the following structure:

JSON representation
{
  "bareMetalClusterId": string,
  "localName": string,
  "adminClusterMembership": string
}
Fields
bareMetalClusterId

string

User provided OnePlatform identifier that is used as part of the resource name. This must be unique among all bare metal clusters within a project and location and will return a 409 if the cluster already exists.

(https://tools.ietf.org/html/rfc1123) format.

localName

string

Optional. The object name of the bare metal cluster custom resource on the associated admin cluster. This field is used to support conflicting resource names when enrolling existing clusters to the API. When not provided, this field will resolve to the bareMetalClusterId. Otherwise, it must match the object name of the bare metal cluster custom resource. It is not modifiable outside / beyond the enrollment operation.

adminClusterMembership

string

Required. The admin cluster this bare metal user cluster belongs to. This is the full resource name of the admin cluster's fleet membership. In the future, references to other resource types might be allowed if admin clusters are modeled as their own resources.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.