The GKE Hub service handles the registration of many Kubernetes clusters to Google Cloud, and the management of multi-cluster features over those clusters.
The GKE Hub service operates on the following resources:
GKE Hub is currently available in the global region and all regions in https://cloud.google.com/compute/docs/regions-zones. Feature is only available in global region while membership is global region and all the regions.
Membership management may be non-trivial: it is recommended to use one of the Google-provided client libraries or tools where possible when working with Membership resources.
Equality
Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection>
objects compare equal. Objects that compare equal share the same underlying resources.
Performance
Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.
Thread Safety
Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.
Constructors
GkeHubClient(GkeHubClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GkeHubClient const &
|
GkeHubClient(GkeHubClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GkeHubClient &&
|
GkeHubClient(std::shared_ptr< GkeHubConnection >, Options)
Parameters | |
---|---|
Name | Description |
connection |
std::shared_ptr< GkeHubConnection >
|
opts |
Options
|
Operators
operator=(GkeHubClient const &)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GkeHubClient const &
|
Returns | |
---|---|
Type | Description |
GkeHubClient & |
operator=(GkeHubClient &&)
Copy and move support
Parameter | |
---|---|
Name | Description |
|
GkeHubClient &&
|
Returns | |
---|---|
Type | Description |
GkeHubClient & |
Functions
ListMemberships(std::string const &, Options)
Lists Memberships in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent (project and location) where the Memberships will be listed. Specified in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::gkehub::v1::Membership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListMemberships(google::cloud::gkehub::v1::ListMembershipsRequest, Options)
Lists Memberships in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::ListMembershipsRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::gkehub::v1::Membership > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListFeatures(std::string const &, Options)
Lists Features in a given project and location.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent (project and location) where the Features will be listed. Specified in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::gkehub::v1::Feature > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
ListFeatures(google::cloud::gkehub::v1::ListFeaturesRequest, Options)
Lists Features in a given project and location.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::ListFeaturesRequest
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StreamRange< google::cloud::gkehub::v1::Feature > |
a StreamRange to iterate of the results. See the documentation of this type for details. In brief, this class has |
GetMembership(std::string const &, Options)
Gets the details of a Membership.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Membership resource name in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::gkehub::v1::Membership > |
the result of the RPC. The response message type (google.cloud.gkehub.v1.Membership) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetMembership(google::cloud::gkehub::v1::GetMembershipRequest const &, Options)
Gets the details of a Membership.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::GetMembershipRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::gkehub::v1::Membership > |
the result of the RPC. The response message type (google.cloud.gkehub.v1.Membership) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetFeature(std::string const &, Options)
Gets details of a single Feature.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Feature resource name in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::gkehub::v1::Feature > |
the result of the RPC. The response message type (google.cloud.gkehub.v1.Feature) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
GetFeature(google::cloud::gkehub::v1::GetFeatureRequest const &, Options)
Gets details of a single Feature.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::GetFeatureRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::gkehub::v1::Feature > |
the result of the RPC. The response message type (google.cloud.gkehub.v1.Feature) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |
CreateMembership(std::string const &, google::cloud::gkehub::v1::Membership const &, std::string const &, Options)
Creates a new Membership.
This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent (project and location) where the Memberships will be created. Specified in the format |
resource |
google::cloud::gkehub::v1::Membership const &
Required. The membership to create. |
membership_id |
std::string const &
Required. Client chosen ID for the membership.
|
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Membership > > |
A |
CreateMembership(google::cloud::gkehub::v1::CreateMembershipRequest const &, Options)
Creates a new Membership.
This is currently only supported for GKE clusters on Google Cloud. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::CreateMembershipRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Membership > > |
A |
CreateFeature(std::string const &, google::cloud::gkehub::v1::Feature const &, std::string const &, Options)
Adds a new Feature.
Parameters | |
---|---|
Name | Description |
parent |
std::string const &
Required. The parent (project and location) where the Feature will be created. Specified in the format |
resource |
google::cloud::gkehub::v1::Feature const &
The Feature resource to create. |
feature_id |
std::string const &
The ID of the feature to create. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Feature > > |
A |
CreateFeature(google::cloud::gkehub::v1::CreateFeatureRequest const &, Options)
Adds a new Feature.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::CreateFeatureRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Feature > > |
A |
DeleteMembership(std::string const &, Options)
Removes a Membership.
This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Membership resource name in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::OperationMetadata > > |
A |
DeleteMembership(google::cloud::gkehub::v1::DeleteMembershipRequest const &, Options)
Removes a Membership.
This is currently only supported for GKE clusters on Google Cloud. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::DeleteMembershipRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::OperationMetadata > > |
A |
DeleteFeature(std::string const &, Options)
Removes a Feature.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Feature resource name in the format |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::OperationMetadata > > |
A |
DeleteFeature(google::cloud::gkehub::v1::DeleteFeatureRequest const &, Options)
Removes a Feature.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::DeleteFeatureRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::OperationMetadata > > |
A |
UpdateMembership(std::string const &, google::cloud::gkehub::v1::Membership const &, google::protobuf::FieldMask const &, Options)
Updates an existing Membership.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Membership resource name in the format |
resource |
google::cloud::gkehub::v1::Membership const &
Required. Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match |
update_mask |
google::protobuf::FieldMask const &
Required. Mask of fields to update. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Membership > > |
A |
UpdateMembership(google::cloud::gkehub::v1::UpdateMembershipRequest const &, Options)
Updates an existing Membership.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::UpdateMembershipRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Membership > > |
A |
UpdateFeature(std::string const &, google::cloud::gkehub::v1::Feature const &, google::protobuf::FieldMask const &, Options)
Updates an existing Feature.
Parameters | |
---|---|
Name | Description |
name |
std::string const &
Required. The Feature resource name in the format |
resource |
google::cloud::gkehub::v1::Feature const &
Only fields specified in update_mask are updated. If you specify a field in the update_mask but don't specify its value here that field will be deleted. If you are updating a map field, set the value of a key to null or empty string to delete the key from the map. It's not possible to update a key's value to the empty string. If you specify the update_mask to be a special path "*", fully replaces all user-modifiable fields to match |
update_mask |
google::protobuf::FieldMask const &
Mask of fields to update. |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Feature > > |
A |
UpdateFeature(google::cloud::gkehub::v1::UpdateFeatureRequest const &, Options)
Updates an existing Feature.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::UpdateFeatureRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
future< StatusOr< google::cloud::gkehub::v1::Feature > > |
A |
GenerateConnectManifest(google::cloud::gkehub::v1::GenerateConnectManifestRequest const &, Options)
Generates the manifest for deployment of the GKE connect agent.
This method is used internally by Google-provided libraries. Most clients should not need to call this method directly.
Parameters | |
---|---|
Name | Description |
request |
google::cloud::gkehub::v1::GenerateConnectManifestRequest const &
Unary RPCs, such as the one wrapped by this function, receive a single |
opts |
Options
Optional. Override the class-level options, such as retry and backoff policies. |
Returns | |
---|---|
Type | Description |
StatusOr< google::cloud::gkehub::v1::GenerateConnectManifestResponse > |
the result of the RPC. The response message type (google.cloud.gkehub.v1.GenerateConnectManifestResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the |