Class GkeHubClient (1.85.0)

GitHub RepositoryProduct Reference

Service Description: 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:

  • Membership
  • Feature

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.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   Membership response = gkeHubClient.getMembership(name);
 }
 

Note: close() needs to be called on the GkeHubClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListMemberships

Lists Memberships in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMemberships(ListMembershipsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMemberships(LocationName parent)

  • listMemberships(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipsPagedCallable()

  • listMembershipsCallable()

ListBoundMemberships

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listBoundMemberships(ListBoundMembershipsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listBoundMemberships(ScopeName scopeName)

  • listBoundMemberships(String scopeName)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listBoundMembershipsPagedCallable()

  • listBoundMembershipsCallable()

ListFeatures

Lists Features in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFeatures(ListFeaturesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFeatures(LocationName parent)

  • listFeatures(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFeaturesPagedCallable()

  • listFeaturesCallable()

GetMembership

Gets the details of a Membership.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembership(GetMembershipRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembership(MembershipName name)

  • getMembership(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipCallable()

GetFeature

Gets details of a single Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFeature(GetFeatureRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFeature(FeatureName name)

  • getFeature(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFeatureCallable()

CreateMembership

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipAsync(CreateMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createMembershipAsync(LocationName parent, Membership resource, String membershipId)

  • createMembershipAsync(String parent, Membership resource, String membershipId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipOperationCallable()

  • createMembershipCallable()

CreateFeature

Adds a new Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFeatureAsync(CreateFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createFeatureAsync(LocationName parent, Feature resource, String featureId)

  • createFeatureAsync(String parent, Feature resource, String featureId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFeatureOperationCallable()

  • createFeatureCallable()

DeleteMembership

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipAsync(DeleteMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteMembershipAsync(MembershipName name)

  • deleteMembershipAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipOperationCallable()

  • deleteMembershipCallable()

DeleteFeature

Removes a Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFeatureAsync(DeleteFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteFeatureAsync(FeatureName name)

  • deleteFeatureAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFeatureOperationCallable()

  • deleteFeatureCallable()

UpdateMembership

Updates an existing Membership.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipAsync(UpdateMembershipRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask)

  • updateMembershipAsync(String name, Membership resource, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipOperationCallable()

  • updateMembershipCallable()

UpdateFeature

Updates an existing Feature.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFeatureAsync(UpdateFeatureRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateFeatureAsync(FeatureName name, Feature resource, FieldMask updateMask)

  • updateFeatureAsync(String name, Feature resource, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFeatureOperationCallable()

  • updateFeatureCallable()

GenerateConnectManifest

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateConnectManifest(GenerateConnectManifestRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateConnectManifestCallable()

CreateFleet

Creates a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFleetAsync(CreateFleetRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createFleetAsync(LocationName parent, Fleet fleet)

  • createFleetAsync(String parent, Fleet fleet)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFleetOperationCallable()

  • createFleetCallable()

GetFleet

Returns the details of a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFleet(GetFleetRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFleet(FleetName name)

  • getFleet(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFleetCallable()

UpdateFleet

Updates a fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFleetAsync(UpdateFleetRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateFleetAsync(Fleet fleet, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFleetOperationCallable()

  • updateFleetCallable()

DeleteFleet

Removes a Fleet. There must be no memberships remaining in the Fleet.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFleetAsync(DeleteFleetRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteFleetAsync(FleetName name)

  • deleteFleetAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFleetOperationCallable()

  • deleteFleetCallable()

ListFleets

Returns all fleets within an organization or a project that the caller has access to.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFleets(ListFleetsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFleets(LocationName parent)

  • listFleets(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFleetsPagedCallable()

  • listFleetsCallable()

GetScopeNamespace

Returns the details of a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScopeNamespace(GetScopeNamespaceRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScopeNamespace(NamespaceName name)

  • getScopeNamespace(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeNamespaceCallable()

CreateScopeNamespace

Creates a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeNamespaceAsync(CreateScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId)

  • createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeNamespaceOperationCallable()

  • createScopeNamespaceCallable()

UpdateScopeNamespace

Updates a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeNamespaceAsync(UpdateScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateScopeNamespaceAsync(Namespace scopeNamespace, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeNamespaceOperationCallable()

  • updateScopeNamespaceCallable()

DeleteScopeNamespace

Deletes a fleet namespace.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteScopeNamespaceAsync(NamespaceName name)

  • deleteScopeNamespaceAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeNamespaceOperationCallable()

  • deleteScopeNamespaceCallable()

ListScopeNamespaces

Lists fleet namespaces.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopeNamespaces(ListScopeNamespacesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopeNamespaces(ScopeName parent)

  • listScopeNamespaces(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopeNamespacesPagedCallable()

  • listScopeNamespacesCallable()

GetScopeRBACRoleBinding

Returns the details of a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScopeRBACRoleBinding(RBACRoleBindingName name)

  • getScopeRBACRoleBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeRBACRoleBindingCallable()

CreateScopeRBACRoleBinding

Creates a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeRBACRoleBindingOperationCallable()

  • createScopeRBACRoleBindingCallable()

UpdateScopeRBACRoleBinding

Updates a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeRBACRoleBindingOperationCallable()

  • updateScopeRBACRoleBindingCallable()

DeleteScopeRBACRoleBinding

Deletes a Scope RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteScopeRBACRoleBindingAsync(RBACRoleBindingName name)

  • deleteScopeRBACRoleBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeRBACRoleBindingOperationCallable()

  • deleteScopeRBACRoleBindingCallable()

ListScopeRBACRoleBindings

Lists all Scope RBACRoleBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopeRBACRoleBindings(MembershipName parent)

  • listScopeRBACRoleBindings(ScopeName parent)

  • listScopeRBACRoleBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopeRBACRoleBindingsPagedCallable()

  • listScopeRBACRoleBindingsCallable()

GetScope

Returns the details of a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getScope(GetScopeRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getScope(ScopeName name)

  • getScope(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getScopeCallable()

CreateScope

Creates a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createScopeAsync(CreateScopeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createScopeAsync(LocationName parent, Scope scope, String scopeId)

  • createScopeAsync(String parent, Scope scope, String scopeId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createScopeOperationCallable()

  • createScopeCallable()

UpdateScope

Updates a scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateScopeAsync(UpdateScopeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateScopeAsync(Scope scope, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateScopeOperationCallable()

  • updateScopeCallable()

DeleteScope

Deletes a Scope.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteScopeAsync(DeleteScopeRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteScopeAsync(ScopeName name)

  • deleteScopeAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteScopeOperationCallable()

  • deleteScopeCallable()

ListScopes

Lists Scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listScopes(ListScopesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listScopes(LocationName parent)

  • listScopes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listScopesPagedCallable()

  • listScopesCallable()

ListPermittedScopes

Lists permitted Scopes.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listPermittedScopes(ListPermittedScopesRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listPermittedScopes(LocationName parent)

  • listPermittedScopes(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPermittedScopesPagedCallable()

  • listPermittedScopesCallable()

GetMembershipBinding

Returns the details of a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembershipBinding(GetMembershipBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembershipBinding(MembershipBindingName name)

  • getMembershipBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipBindingCallable()

CreateMembershipBinding

Creates a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipBindingAsync(CreateMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId)

  • createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipBindingOperationCallable()

  • createMembershipBindingCallable()

UpdateMembershipBinding

Updates a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipBindingAsync(UpdateMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateMembershipBindingAsync(MembershipBinding membershipBinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipBindingOperationCallable()

  • updateMembershipBindingCallable()

DeleteMembershipBinding

Deletes a MembershipBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipBindingAsync(DeleteMembershipBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteMembershipBindingAsync(MembershipBindingName name)

  • deleteMembershipBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipBindingOperationCallable()

  • deleteMembershipBindingCallable()

ListMembershipBindings

Lists MembershipBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMembershipBindings(ListMembershipBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMembershipBindings(MembershipName parent)

  • listMembershipBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipBindingsPagedCallable()

  • listMembershipBindingsCallable()

GetMembershipRBACRoleBinding

Returns the details of a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMembershipRBACRoleBinding(RBACRoleBindingName name)

  • getMembershipRBACRoleBinding(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMembershipRBACRoleBindingCallable()

CreateMembershipRBACRoleBinding

Creates a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

  • createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createMembershipRBACRoleBindingOperationCallable()

  • createMembershipRBACRoleBindingCallable()

UpdateMembershipRBACRoleBinding

Updates a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateMembershipRBACRoleBindingOperationCallable()

  • updateMembershipRBACRoleBindingCallable()

DeleteMembershipRBACRoleBinding

Deletes a Membership RBACRoleBinding.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteMembershipRBACRoleBindingAsync(RBACRoleBindingName name)

  • deleteMembershipRBACRoleBindingAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteMembershipRBACRoleBindingOperationCallable()

  • deleteMembershipRBACRoleBindingCallable()

ListMembershipRBACRoleBindings

Lists all Membership RBACRoleBindings.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listMembershipRBACRoleBindings(MembershipName parent)

  • listMembershipRBACRoleBindings(ScopeName parent)

  • listMembershipRBACRoleBindings(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listMembershipRBACRoleBindingsPagedCallable()

  • listMembershipRBACRoleBindingsCallable()

GenerateMembershipRBACRoleBindingYAML

Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • generateMembershipRBACRoleBindingYAMLCallable()

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of GkeHubSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings =
     GkeHubSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings = GkeHubSettings.newBuilder().setEndpoint(myEndpoint).build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 GkeHubSettings gkeHubSettings = GkeHubSettings.newHttpJsonBuilder().build();
 GkeHubClient gkeHubClient = GkeHubClient.create(gkeHubSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > GkeHubClient

Static Methods

create()

public static final GkeHubClient create()

Constructs an instance of GkeHubClient with default settings.

Returns
Type Description
GkeHubClient
Exceptions
Type Description
IOException

create(GkeHubSettings settings)

public static final GkeHubClient create(GkeHubSettings settings)

Constructs an instance of GkeHubClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
Name Description
settings GkeHubSettings
Returns
Type Description
GkeHubClient
Exceptions
Type Description
IOException

create(GkeHubStub stub)

public static final GkeHubClient create(GkeHubStub stub)

Constructs an instance of GkeHubClient, using the given stub for making calls. This is for advanced usage - prefer using create(GkeHubSettings).

Parameter
Name Description
stub GkeHubStub
Returns
Type Description
GkeHubClient

Constructors

GkeHubClient(GkeHubSettings settings)

protected GkeHubClient(GkeHubSettings settings)

Constructs an instance of GkeHubClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.

Parameter
Name Description
settings GkeHubSettings

GkeHubClient(GkeHubStub stub)

protected GkeHubClient(GkeHubStub stub)
Parameter
Name Description
stub GkeHubStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createFeatureAsync(CreateFeatureRequest request)

public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(CreateFeatureRequest request)

Adds a new Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFeatureRequest request =
       CreateFeatureRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFeatureId("featureId-420503887")
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Feature response = gkeHubClient.createFeatureAsync(request).get();
 }
 
Parameter
Name Description
request CreateFeatureRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

createFeatureAsync(LocationName parent, Feature resource, String featureId)

public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(LocationName parent, Feature resource, String featureId)

Adds a new Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Feature resource = Feature.newBuilder().build();
   String featureId = "featureId-420503887";
   Feature response = gkeHubClient.createFeatureAsync(parent, resource, featureId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resource Feature

The Feature resource to create.

featureId String

The ID of the feature to create.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

createFeatureAsync(String parent, Feature resource, String featureId)

public final OperationFuture<Feature,OperationMetadata> createFeatureAsync(String parent, Feature resource, String featureId)

Adds a new Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Feature resource = Feature.newBuilder().build();
   String featureId = "featureId-420503887";
   Feature response = gkeHubClient.createFeatureAsync(parent, resource, featureId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the Feature will be created. Specified in the format projects/*/locations/*.

resource Feature

The Feature resource to create.

featureId String

The ID of the feature to create.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

createFeatureCallable()

public final UnaryCallable<CreateFeatureRequest,Operation> createFeatureCallable()

Adds a new Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFeatureRequest request =
       CreateFeatureRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFeatureId("featureId-420503887")
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = gkeHubClient.createFeatureCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateFeatureRequest,Operation>

createFeatureOperationCallable()

public final OperationCallable<CreateFeatureRequest,Feature,OperationMetadata> createFeatureOperationCallable()

Adds a new Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFeatureRequest request =
       CreateFeatureRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFeatureId("featureId-420503887")
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Feature, OperationMetadata> future =
       gkeHubClient.createFeatureOperationCallable().futureCall(request);
   // Do something.
   Feature response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateFeatureRequest,Feature,OperationMetadata>

createFleetAsync(CreateFleetRequest request)

public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(CreateFleetRequest request)

Creates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFleetRequest request =
       CreateFleetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFleet(Fleet.newBuilder().build())
           .build();
   Fleet response = gkeHubClient.createFleetAsync(request).get();
 }
 
Parameter
Name Description
request CreateFleetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Fleet,OperationMetadata>

createFleetAsync(LocationName parent, Fleet fleet)

public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(LocationName parent, Fleet fleet)

Creates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Fleet fleet = Fleet.newBuilder().build();
   Fleet response = gkeHubClient.createFleetAsync(parent, fleet).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent (project and location) where the Fleet will be created. Specified in the format projects/*/locations/*.

fleet Fleet

Required. The fleet to create.

Returns
Type Description
OperationFuture<Fleet,OperationMetadata>

createFleetAsync(String parent, Fleet fleet)

public final OperationFuture<Fleet,OperationMetadata> createFleetAsync(String parent, Fleet fleet)

Creates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Fleet fleet = Fleet.newBuilder().build();
   Fleet response = gkeHubClient.createFleetAsync(parent, fleet).get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the Fleet will be created. Specified in the format projects/*/locations/*.

fleet Fleet

Required. The fleet to create.

Returns
Type Description
OperationFuture<Fleet,OperationMetadata>

createFleetCallable()

public final UnaryCallable<CreateFleetRequest,Operation> createFleetCallable()

Creates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFleetRequest request =
       CreateFleetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFleet(Fleet.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.createFleetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateFleetRequest,Operation>

createFleetOperationCallable()

public final OperationCallable<CreateFleetRequest,Fleet,OperationMetadata> createFleetOperationCallable()

Creates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateFleetRequest request =
       CreateFleetRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setFleet(Fleet.newBuilder().build())
           .build();
   OperationFuture<Fleet, OperationMetadata> future =
       gkeHubClient.createFleetOperationCallable().futureCall(request);
   // Do something.
   Fleet response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateFleetRequest,Fleet,OperationMetadata>

createMembershipAsync(CreateMembershipRequest request)

public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(CreateMembershipRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRequest request =
       CreateMembershipRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setMembershipId("membershipId517665681")
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Membership response = gkeHubClient.createMembershipAsync(request).get();
 }
 
Parameter
Name Description
request CreateMembershipRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

createMembershipAsync(LocationName parent, Membership resource, String membershipId)

public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(LocationName parent, Membership resource, String membershipId)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Membership resource = Membership.newBuilder().build();
   String membershipId = "membershipId517665681";
   Membership response =
       gkeHubClient.createMembershipAsync(parent, resource, membershipId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resource Membership

Required. The membership to create.

membershipId String

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

createMembershipAsync(String parent, Membership resource, String membershipId)

public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(String parent, Membership resource, String membershipId)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Membership resource = Membership.newBuilder().build();
   String membershipId = "membershipId517665681";
   Membership response =
       gkeHubClient.createMembershipAsync(parent, resource, membershipId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the Memberships will be created. Specified in the format projects/*/locations/*.

resource Membership

Required. The membership to create.

membershipId String

Required. Client chosen ID for the membership. membership_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

createMembershipBindingAsync(CreateMembershipBindingRequest request)

public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(CreateMembershipBindingRequest request)

Creates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipBindingRequest request =
       CreateMembershipBindingRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setMembershipBindingId("membershipBindingId1360802634")
           .build();
   MembershipBinding response = gkeHubClient.createMembershipBindingAsync(request).get();
 }
 
Parameter
Name Description
request CreateMembershipBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<MembershipBinding,OperationMetadata>

createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId)

public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId)

Creates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
   String membershipBindingId = "membershipBindingId1360802634";
   MembershipBinding response =
       gkeHubClient
           .createMembershipBindingAsync(parent, membershipBinding, membershipBindingId)
           .get();
 }
 
Parameters
Name Description
parent MembershipName

Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format projects/*/locations/*/memberships/*.

membershipBinding MembershipBinding

Required. The MembershipBinding to create.

membershipBindingId String

Required. The ID to use for the MembershipBinding.

Returns
Type Description
OperationFuture<MembershipBinding,OperationMetadata>

createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId)

public final OperationFuture<MembershipBinding,OperationMetadata> createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId)

Creates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
   MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
   String membershipBindingId = "membershipBindingId1360802634";
   MembershipBinding response =
       gkeHubClient
           .createMembershipBindingAsync(parent, membershipBinding, membershipBindingId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format projects/*/locations/*/memberships/*.

membershipBinding MembershipBinding

Required. The MembershipBinding to create.

membershipBindingId String

Required. The ID to use for the MembershipBinding.

Returns
Type Description
OperationFuture<MembershipBinding,OperationMetadata>

createMembershipBindingCallable()

public final UnaryCallable<CreateMembershipBindingRequest,Operation> createMembershipBindingCallable()

Creates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipBindingRequest request =
       CreateMembershipBindingRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setMembershipBindingId("membershipBindingId1360802634")
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.createMembershipBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateMembershipBindingRequest,Operation>

createMembershipBindingOperationCallable()

public final OperationCallable<CreateMembershipBindingRequest,MembershipBinding,OperationMetadata> createMembershipBindingOperationCallable()

Creates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipBindingRequest request =
       CreateMembershipBindingRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setMembershipBindingId("membershipBindingId1360802634")
           .build();
   OperationFuture<MembershipBinding, OperationMetadata> future =
       gkeHubClient.createMembershipBindingOperationCallable().futureCall(request);
   // Do something.
   MembershipBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateMembershipBindingRequest,MembershipBinding,OperationMetadata>

createMembershipCallable()

public final UnaryCallable<CreateMembershipRequest,Operation> createMembershipCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRequest request =
       CreateMembershipRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setMembershipId("membershipId517665681")
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = gkeHubClient.createMembershipCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateMembershipRequest,Operation>

createMembershipOperationCallable()

public final OperationCallable<CreateMembershipRequest,Membership,OperationMetadata> createMembershipOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRequest request =
       CreateMembershipRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setMembershipId("membershipId517665681")
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Membership, OperationMetadata> future =
       gkeHubClient.createMembershipOperationCallable().futureCall(request);
   // Do something.
   Membership response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateMembershipRequest,Membership,OperationMetadata>

createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest request)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(CreateMembershipRBACRoleBindingRequest request)

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRBACRoleBindingRequest request =
       CreateMembershipRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   RBACRoleBinding response = gkeHubClient.createMembershipRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request CreateMembershipRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent MembershipName

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/memberships/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent ScopeName

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/memberships/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createMembershipRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/memberships/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createMembershipRBACRoleBindingCallable()

public final UnaryCallable<CreateMembershipRBACRoleBindingRequest,Operation> createMembershipRBACRoleBindingCallable()

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRBACRoleBindingRequest request =
       CreateMembershipRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.createMembershipRBACRoleBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateMembershipRBACRoleBindingRequest,Operation>

createMembershipRBACRoleBindingOperationCallable()

public final OperationCallable<CreateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> createMembershipRBACRoleBindingOperationCallable()

Creates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateMembershipRBACRoleBindingRequest request =
       CreateMembershipRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   OperationFuture<RBACRoleBinding, OperationMetadata> future =
       gkeHubClient.createMembershipRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata>

createScopeAsync(CreateScopeRequest request)

public final OperationFuture<Scope,OperationMetadata> createScopeAsync(CreateScopeRequest request)

Creates a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRequest request =
       CreateScopeRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setScopeId("scopeId1923941007")
           .setScope(Scope.newBuilder().build())
           .build();
   Scope response = gkeHubClient.createScopeAsync(request).get();
 }
 
Parameter
Name Description
request CreateScopeRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Scope,OperationMetadata>

createScopeAsync(LocationName parent, Scope scope, String scopeId)

public final OperationFuture<Scope,OperationMetadata> createScopeAsync(LocationName parent, Scope scope, String scopeId)

Creates a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   Scope scope = Scope.newBuilder().build();
   String scopeId = "scopeId1923941007";
   Scope response = gkeHubClient.createScopeAsync(parent, scope, scopeId).get();
 }
 
Parameters
Name Description
parent LocationName

Required. The parent (project and location) where the Scope will be created. Specified in the format projects/*/locations/*.

scope Scope

Required. The Scope to create.

scopeId String

Required. Client chosen ID for the Scope. scope_id must be a ????

Returns
Type Description
OperationFuture<Scope,OperationMetadata>

createScopeAsync(String parent, Scope scope, String scopeId)

public final OperationFuture<Scope,OperationMetadata> createScopeAsync(String parent, Scope scope, String scopeId)

Creates a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   Scope scope = Scope.newBuilder().build();
   String scopeId = "scopeId1923941007";
   Scope response = gkeHubClient.createScopeAsync(parent, scope, scopeId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the Scope will be created. Specified in the format projects/*/locations/*.

scope Scope

Required. The Scope to create.

scopeId String

Required. Client chosen ID for the Scope. scope_id must be a ????

Returns
Type Description
OperationFuture<Scope,OperationMetadata>

createScopeCallable()

public final UnaryCallable<CreateScopeRequest,Operation> createScopeCallable()

Creates a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRequest request =
       CreateScopeRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setScopeId("scopeId1923941007")
           .setScope(Scope.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.createScopeCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateScopeRequest,Operation>

createScopeNamespaceAsync(CreateScopeNamespaceRequest request)

public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(CreateScopeNamespaceRequest request)

Creates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeNamespaceRequest request =
       CreateScopeNamespaceRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setScopeNamespaceId("scopeNamespaceId-125738782")
           .setScopeNamespace(Namespace.newBuilder().build())
           .build();
   Namespace response = gkeHubClient.createScopeNamespaceAsync(request).get();
 }
 
Parameter
Name Description
request CreateScopeNamespaceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Namespace,OperationMetadata>

createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId)

public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId)

Creates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   Namespace scopeNamespace = Namespace.newBuilder().build();
   String scopeNamespaceId = "scopeNamespaceId-125738782";
   Namespace response =
       gkeHubClient.createScopeNamespaceAsync(parent, scopeNamespace, scopeNamespaceId).get();
 }
 
Parameters
Name Description
parent ScopeName

Required. The parent (project and location) where the Namespace will be created. Specified in the format projects/*/locations/*/scopes/*.

scopeNamespace Namespace

Required. The fleet namespace to create.

scopeNamespaceId String

Required. Client chosen ID for the Namespace. namespace_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<Namespace,OperationMetadata>

createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId)

public final OperationFuture<Namespace,OperationMetadata> createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId)

Creates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   Namespace scopeNamespace = Namespace.newBuilder().build();
   String scopeNamespaceId = "scopeNamespaceId-125738782";
   Namespace response =
       gkeHubClient.createScopeNamespaceAsync(parent, scopeNamespace, scopeNamespaceId).get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the Namespace will be created. Specified in the format projects/*/locations/*/scopes/*.

scopeNamespace Namespace

Required. The fleet namespace to create.

scopeNamespaceId String

Required. Client chosen ID for the Namespace. namespace_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<Namespace,OperationMetadata>

createScopeNamespaceCallable()

public final UnaryCallable<CreateScopeNamespaceRequest,Operation> createScopeNamespaceCallable()

Creates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeNamespaceRequest request =
       CreateScopeNamespaceRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setScopeNamespaceId("scopeNamespaceId-125738782")
           .setScopeNamespace(Namespace.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.createScopeNamespaceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateScopeNamespaceRequest,Operation>

createScopeNamespaceOperationCallable()

public final OperationCallable<CreateScopeNamespaceRequest,Namespace,OperationMetadata> createScopeNamespaceOperationCallable()

Creates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeNamespaceRequest request =
       CreateScopeNamespaceRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setScopeNamespaceId("scopeNamespaceId-125738782")
           .setScopeNamespace(Namespace.newBuilder().build())
           .build();
   OperationFuture<Namespace, OperationMetadata> future =
       gkeHubClient.createScopeNamespaceOperationCallable().futureCall(request);
   // Do something.
   Namespace response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateScopeNamespaceRequest,Namespace,OperationMetadata>

createScopeOperationCallable()

public final OperationCallable<CreateScopeRequest,Scope,OperationMetadata> createScopeOperationCallable()

Creates a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRequest request =
       CreateScopeRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setScopeId("scopeId1923941007")
           .setScope(Scope.newBuilder().build())
           .build();
   OperationFuture<Scope, OperationMetadata> future =
       gkeHubClient.createScopeOperationCallable().futureCall(request);
   // Do something.
   Scope response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateScopeRequest,Scope,OperationMetadata>

createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest request)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(CreateScopeRBACRoleBindingRequest request)

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRBACRoleBindingRequest request =
       CreateScopeRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   RBACRoleBinding response = gkeHubClient.createScopeRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request CreateScopeRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent MembershipName

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/scopes/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent ScopeName

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/scopes/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

public final OperationFuture<RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId)

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   String rbacrolebindingId = "rbacrolebindingId827577784";
   RBACRoleBinding response =
       gkeHubClient
           .createScopeRBACRoleBindingAsync(parent, rbacrolebinding, rbacrolebindingId)
           .get();
 }
 
Parameters
Name Description
parent String

Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format projects/*/locations/*/scopes/*.

rbacrolebinding RBACRoleBinding

Required. The rbacrolebindings to create.

rbacrolebindingId String

Required. Client chosen ID for the RBACRoleBinding. rbacrolebinding_id must be a valid RFC 1123 compliant DNS label:

1. At most 63 characters in length 2. It must consist of lower case alphanumeric characters or - 3. It must start and end with an alphanumeric character

Which can be expressed as the regex: a-z0-9?, with a maximum length of 63 characters.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

createScopeRBACRoleBindingCallable()

public final UnaryCallable<CreateScopeRBACRoleBindingRequest,Operation> createScopeRBACRoleBindingCallable()

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRBACRoleBindingRequest request =
       CreateScopeRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.createScopeRBACRoleBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateScopeRBACRoleBindingRequest,Operation>

createScopeRBACRoleBindingOperationCallable()

public final OperationCallable<CreateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> createScopeRBACRoleBindingOperationCallable()

Creates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   CreateScopeRBACRoleBindingRequest request =
       CreateScopeRBACRoleBindingRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   OperationFuture<RBACRoleBinding, OperationMetadata> future =
       gkeHubClient.createScopeRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata>

deleteFeatureAsync(DeleteFeatureRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteFeatureAsync(DeleteFeatureRequest request)

Removes a Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFeatureRequest request =
       DeleteFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setForce(true)
           .setRequestId("requestId693933066")
           .build();
   gkeHubClient.deleteFeatureAsync(request).get();
 }
 
Parameter
Name Description
request DeleteFeatureRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFeatureAsync(FeatureName name)

public final OperationFuture<Empty,OperationMetadata> deleteFeatureAsync(FeatureName name)

Removes a Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
   gkeHubClient.deleteFeatureAsync(name).get();
 }
 
Parameter
Name Description
name FeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFeatureAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteFeatureAsync(String name)

Removes a Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
   gkeHubClient.deleteFeatureAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Feature resource name in the format projects/*/locations/*/features/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFeatureCallable()

public final UnaryCallable<DeleteFeatureRequest,Operation> deleteFeatureCallable()

Removes a Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFeatureRequest request =
       DeleteFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setForce(true)
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = gkeHubClient.deleteFeatureCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteFeatureRequest,Operation>

deleteFeatureOperationCallable()

public final OperationCallable<DeleteFeatureRequest,Empty,OperationMetadata> deleteFeatureOperationCallable()

Removes a Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFeatureRequest request =
       DeleteFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setForce(true)
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteFeatureOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteFeatureRequest,Empty,OperationMetadata>

deleteFleetAsync(DeleteFleetRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteFleetAsync(DeleteFleetRequest request)

Removes a Fleet. There must be no memberships remaining in the Fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFleetRequest request =
       DeleteFleetRequest.newBuilder()
           .setName(
               FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                   .toString())
           .build();
   gkeHubClient.deleteFleetAsync(request).get();
 }
 
Parameter
Name Description
request DeleteFleetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFleetAsync(FleetName name)

public final OperationFuture<Empty,OperationMetadata> deleteFleetAsync(FleetName name)

Removes a Fleet. There must be no memberships remaining in the Fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   FleetName name = FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]");
   gkeHubClient.deleteFleetAsync(name).get();
 }
 
Parameter
Name Description
name FleetName

Required. The Fleet resource name in the format projects/*/locations/*/fleets/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFleetAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteFleetAsync(String name)

Removes a Fleet. There must be no memberships remaining in the Fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]").toString();
   gkeHubClient.deleteFleetAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Fleet resource name in the format projects/*/locations/*/fleets/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteFleetCallable()

public final UnaryCallable<DeleteFleetRequest,Operation> deleteFleetCallable()

Removes a Fleet. There must be no memberships remaining in the Fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFleetRequest request =
       DeleteFleetRequest.newBuilder()
           .setName(
               FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                   .toString())
           .build();
   ApiFuture<Operation> future = gkeHubClient.deleteFleetCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteFleetRequest,Operation>

deleteFleetOperationCallable()

public final OperationCallable<DeleteFleetRequest,Empty,OperationMetadata> deleteFleetOperationCallable()

Removes a Fleet. There must be no memberships remaining in the Fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteFleetRequest request =
       DeleteFleetRequest.newBuilder()
           .setName(
               FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteFleetOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteFleetRequest,Empty,OperationMetadata>

deleteMembershipAsync(DeleteMembershipRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipAsync(DeleteMembershipRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRequest request =
       DeleteMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   gkeHubClient.deleteMembershipAsync(request).get();
 }
 
Parameter
Name Description
request DeleteMembershipRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipAsync(MembershipName name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipAsync(MembershipName name)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   gkeHubClient.deleteMembershipAsync(name).get();
 }
 
Parameter
Name Description
name MembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipAsync(String name)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
   gkeHubClient.deleteMembershipAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipBindingAsync(DeleteMembershipBindingRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipBindingAsync(DeleteMembershipBindingRequest request)

Deletes a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipBindingRequest request =
       DeleteMembershipBindingRequest.newBuilder()
           .setName(
               MembershipBindingName.of(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                   .toString())
           .build();
   gkeHubClient.deleteMembershipBindingAsync(request).get();
 }
 
Parameter
Name Description
request DeleteMembershipBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipBindingAsync(MembershipBindingName name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipBindingAsync(MembershipBindingName name)

Deletes a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipBindingName name =
       MembershipBindingName.of(
           "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]");
   gkeHubClient.deleteMembershipBindingAsync(name).get();
 }
 
Parameter
Name Description
name MembershipBindingName

Required. The MembershipBinding resource name in the format projects/*/locations/*/memberships/*/bindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipBindingAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipBindingAsync(String name)

Deletes a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       MembershipBindingName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
           .toString();
   gkeHubClient.deleteMembershipBindingAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The MembershipBinding resource name in the format projects/*/locations/*/memberships/*/bindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipBindingCallable()

public final UnaryCallable<DeleteMembershipBindingRequest,Operation> deleteMembershipBindingCallable()

Deletes a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipBindingRequest request =
       DeleteMembershipBindingRequest.newBuilder()
           .setName(
               MembershipBindingName.of(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.deleteMembershipBindingCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteMembershipBindingRequest,Operation>

deleteMembershipBindingOperationCallable()

public final OperationCallable<DeleteMembershipBindingRequest,Empty,OperationMetadata> deleteMembershipBindingOperationCallable()

Deletes a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipBindingRequest request =
       DeleteMembershipBindingRequest.newBuilder()
           .setName(
               MembershipBindingName.of(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteMembershipBindingOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteMembershipBindingRequest,Empty,OperationMetadata>

deleteMembershipCallable()

public final UnaryCallable<DeleteMembershipRequest,Operation> deleteMembershipCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRequest request =
       DeleteMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   ApiFuture<Operation> future = gkeHubClient.deleteMembershipCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteMembershipRequest,Operation>

deleteMembershipOperationCallable()

public final OperationCallable<DeleteMembershipRequest,Empty,OperationMetadata> deleteMembershipOperationCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRequest request =
       DeleteMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setRequestId("requestId693933066")
           .setForce(true)
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteMembershipOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteMembershipRequest,Empty,OperationMetadata>

deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(DeleteMembershipRBACRoleBindingRequest request)

Deletes a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRBACRoleBindingRequest request =
       DeleteMembershipRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   gkeHubClient.deleteMembershipRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request DeleteMembershipRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipRBACRoleBindingAsync(RBACRoleBindingName name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(RBACRoleBindingName name)

Deletes a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBindingName name =
       RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
           "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]");
   gkeHubClient.deleteMembershipRBACRoleBindingAsync(name).get();
 }
 
Parameter
Name Description
name RBACRoleBindingName

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/memberships/*/rbacrolebindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipRBACRoleBindingAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteMembershipRBACRoleBindingAsync(String name)

Deletes a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
               "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
           .toString();
   gkeHubClient.deleteMembershipRBACRoleBindingAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/memberships/*/rbacrolebindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteMembershipRBACRoleBindingCallable()

public final UnaryCallable<DeleteMembershipRBACRoleBindingRequest,Operation> deleteMembershipRBACRoleBindingCallable()

Deletes a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRBACRoleBindingRequest request =
       DeleteMembershipRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.deleteMembershipRBACRoleBindingCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteMembershipRBACRoleBindingRequest,Operation>

deleteMembershipRBACRoleBindingOperationCallable()

public final OperationCallable<DeleteMembershipRBACRoleBindingRequest,Empty,OperationMetadata> deleteMembershipRBACRoleBindingOperationCallable()

Deletes a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteMembershipRBACRoleBindingRequest request =
       DeleteMembershipRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteMembershipRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteMembershipRBACRoleBindingRequest,Empty,OperationMetadata>

deleteScopeAsync(DeleteScopeRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteScopeAsync(DeleteScopeRequest request)

Deletes a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRequest request =
       DeleteScopeRequest.newBuilder()
           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .build();
   gkeHubClient.deleteScopeAsync(request).get();
 }
 
Parameter
Name Description
request DeleteScopeRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeAsync(ScopeName name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeAsync(ScopeName name)

Deletes a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   gkeHubClient.deleteScopeAsync(name).get();
 }
 
Parameter
Name Description
name ScopeName

Required. The Scope resource name in the format projects/*/locations/*/scopes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeAsync(String name)

Deletes a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   gkeHubClient.deleteScopeAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Scope resource name in the format projects/*/locations/*/scopes/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeCallable()

public final UnaryCallable<DeleteScopeRequest,Operation> deleteScopeCallable()

Deletes a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRequest request =
       DeleteScopeRequest.newBuilder()
           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .build();
   ApiFuture<Operation> future = gkeHubClient.deleteScopeCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteScopeRequest,Operation>

deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteScopeNamespaceAsync(DeleteScopeNamespaceRequest request)

Deletes a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeNamespaceRequest request =
       DeleteScopeNamespaceRequest.newBuilder()
           .setName(
               NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
           .build();
   gkeHubClient.deleteScopeNamespaceAsync(request).get();
 }
 
Parameter
Name Description
request DeleteScopeNamespaceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeNamespaceAsync(NamespaceName name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeNamespaceAsync(NamespaceName name)

Deletes a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   NamespaceName name = NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]");
   gkeHubClient.deleteScopeNamespaceAsync(name).get();
 }
 
Parameter
Name Description
name NamespaceName

Required. The Namespace resource name in the format projects/*/locations/*/scopes/*/namespaces/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeNamespaceAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeNamespaceAsync(String name)

Deletes a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString();
   gkeHubClient.deleteScopeNamespaceAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The Namespace resource name in the format projects/*/locations/*/scopes/*/namespaces/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeNamespaceCallable()

public final UnaryCallable<DeleteScopeNamespaceRequest,Operation> deleteScopeNamespaceCallable()

Deletes a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeNamespaceRequest request =
       DeleteScopeNamespaceRequest.newBuilder()
           .setName(
               NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
           .build();
   ApiFuture<Operation> future = gkeHubClient.deleteScopeNamespaceCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteScopeNamespaceRequest,Operation>

deleteScopeNamespaceOperationCallable()

public final OperationCallable<DeleteScopeNamespaceRequest,Empty,OperationMetadata> deleteScopeNamespaceOperationCallable()

Deletes a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeNamespaceRequest request =
       DeleteScopeNamespaceRequest.newBuilder()
           .setName(
               NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteScopeNamespaceOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteScopeNamespaceRequest,Empty,OperationMetadata>

deleteScopeOperationCallable()

public final OperationCallable<DeleteScopeRequest,Empty,OperationMetadata> deleteScopeOperationCallable()

Deletes a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRequest request =
       DeleteScopeRequest.newBuilder()
           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteScopeOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteScopeRequest,Empty,OperationMetadata>

deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(DeleteScopeRBACRoleBindingRequest request)

Deletes a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRBACRoleBindingRequest request =
       DeleteScopeRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   gkeHubClient.deleteScopeRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request DeleteScopeRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeRBACRoleBindingAsync(RBACRoleBindingName name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(RBACRoleBindingName name)

Deletes a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBindingName name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
           "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]");
   gkeHubClient.deleteScopeRBACRoleBindingAsync(name).get();
 }
 
Parameter
Name Description
name RBACRoleBindingName

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/scopes/*/rbacrolebindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeRBACRoleBindingAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteScopeRBACRoleBindingAsync(String name)

Deletes a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
               "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
           .toString();
   gkeHubClient.deleteScopeRBACRoleBindingAsync(name).get();
 }
 
Parameter
Name Description
name String

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/scopes/*/rbacrolebindings/*.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteScopeRBACRoleBindingCallable()

public final UnaryCallable<DeleteScopeRBACRoleBindingRequest,Operation> deleteScopeRBACRoleBindingCallable()

Deletes a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRBACRoleBindingRequest request =
       DeleteScopeRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.deleteScopeRBACRoleBindingCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteScopeRBACRoleBindingRequest,Operation>

deleteScopeRBACRoleBindingOperationCallable()

public final OperationCallable<DeleteScopeRBACRoleBindingRequest,Empty,OperationMetadata> deleteScopeRBACRoleBindingOperationCallable()

Deletes a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   DeleteScopeRBACRoleBindingRequest request =
       DeleteScopeRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   OperationFuture<Empty, OperationMetadata> future =
       gkeHubClient.deleteScopeRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteScopeRBACRoleBindingRequest,Empty,OperationMetadata>

generateConnectManifest(GenerateConnectManifestRequest request)

public final GenerateConnectManifestResponse generateConnectManifest(GenerateConnectManifestRequest request)

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GenerateConnectManifestRequest request =
       GenerateConnectManifestRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setNamespace("namespace1252218203")
           .setProxy(ByteString.EMPTY)
           .setVersion("version351608024")
           .setIsUpgrade(true)
           .setRegistry("registry-690212803")
           .setImagePullSecretContent(ByteString.EMPTY)
           .build();
   GenerateConnectManifestResponse response = gkeHubClient.generateConnectManifest(request);
 }
 
Parameter
Name Description
request GenerateConnectManifestRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GenerateConnectManifestResponse

generateConnectManifestCallable()

public final UnaryCallable<GenerateConnectManifestRequest,GenerateConnectManifestResponse> generateConnectManifestCallable()

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.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GenerateConnectManifestRequest request =
       GenerateConnectManifestRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setNamespace("namespace1252218203")
           .setProxy(ByteString.EMPTY)
           .setVersion("version351608024")
           .setIsUpgrade(true)
           .setRegistry("registry-690212803")
           .setImagePullSecretContent(ByteString.EMPTY)
           .build();
   ApiFuture<GenerateConnectManifestResponse> future =
       gkeHubClient.generateConnectManifestCallable().futureCall(request);
   // Do something.
   GenerateConnectManifestResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateConnectManifestRequest,GenerateConnectManifestResponse>

generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest request)

public final GenerateMembershipRBACRoleBindingYAMLResponse generateMembershipRBACRoleBindingYAML(GenerateMembershipRBACRoleBindingYAMLRequest request)

Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GenerateMembershipRBACRoleBindingYAMLRequest request =
       GenerateMembershipRBACRoleBindingYAMLRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   GenerateMembershipRBACRoleBindingYAMLResponse response =
       gkeHubClient.generateMembershipRBACRoleBindingYAML(request);
 }
 
Parameter
Name Description
request GenerateMembershipRBACRoleBindingYAMLRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GenerateMembershipRBACRoleBindingYAMLResponse

generateMembershipRBACRoleBindingYAMLCallable()

public final UnaryCallable<GenerateMembershipRBACRoleBindingYAMLRequest,GenerateMembershipRBACRoleBindingYAMLResponse> generateMembershipRBACRoleBindingYAMLCallable()

Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GenerateMembershipRBACRoleBindingYAMLRequest request =
       GenerateMembershipRBACRoleBindingYAMLRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setRbacrolebindingId("rbacrolebindingId827577784")
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .build();
   ApiFuture<GenerateMembershipRBACRoleBindingYAMLResponse> future =
       gkeHubClient.generateMembershipRBACRoleBindingYAMLCallable().futureCall(request);
   // Do something.
   GenerateMembershipRBACRoleBindingYAMLResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateMembershipRBACRoleBindingYAMLRequest,GenerateMembershipRBACRoleBindingYAMLResponse>

getFeature(FeatureName name)

public final Feature getFeature(FeatureName name)

Gets details of a single Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
   Feature response = gkeHubClient.getFeature(name);
 }
 
Parameter
Name Description
name FeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*

Returns
Type Description
Feature

getFeature(GetFeatureRequest request)

public final Feature getFeature(GetFeatureRequest request)

Gets details of a single Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetFeatureRequest request =
       GetFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setReturnPartialSuccess(true)
           .build();
   Feature response = gkeHubClient.getFeature(request);
 }
 
Parameter
Name Description
request GetFeatureRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Feature

getFeature(String name)

public final Feature getFeature(String name)

Gets details of a single Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
   Feature response = gkeHubClient.getFeature(name);
 }
 
Parameter
Name Description
name String

Required. The Feature resource name in the format projects/*/locations/*/features/*

Returns
Type Description
Feature

getFeatureCallable()

public final UnaryCallable<GetFeatureRequest,Feature> getFeatureCallable()

Gets details of a single Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetFeatureRequest request =
       GetFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<Feature> future = gkeHubClient.getFeatureCallable().futureCall(request);
   // Do something.
   Feature response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetFeatureRequest,Feature>

getFleet(FleetName name)

public final Fleet getFleet(FleetName name)

Returns the details of a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   FleetName name = FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]");
   Fleet response = gkeHubClient.getFleet(name);
 }
 
Parameter
Name Description
name FleetName

Required. The Fleet resource name in the format projects/*/locations/*/fleets/*.

Returns
Type Description
Fleet

getFleet(GetFleetRequest request)

public final Fleet getFleet(GetFleetRequest request)

Returns the details of a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetFleetRequest request =
       GetFleetRequest.newBuilder()
           .setName(
               FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                   .toString())
           .build();
   Fleet response = gkeHubClient.getFleet(request);
 }
 
Parameter
Name Description
request GetFleetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Fleet

getFleet(String name)

public final Fleet getFleet(String name)

Returns the details of a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]").toString();
   Fleet response = gkeHubClient.getFleet(name);
 }
 
Parameter
Name Description
name String

Required. The Fleet resource name in the format projects/*/locations/*/fleets/*.

Returns
Type Description
Fleet

getFleetCallable()

public final UnaryCallable<GetFleetRequest,Fleet> getFleetCallable()

Returns the details of a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetFleetRequest request =
       GetFleetRequest.newBuilder()
           .setName(
               FleetName.ofProjectLocationFleetName("[PROJECT]", "[LOCATION]", "[FLEET]")
                   .toString())
           .build();
   ApiFuture<Fleet> future = gkeHubClient.getFleetCallable().futureCall(request);
   // Do something.
   Fleet response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetFleetRequest,Fleet>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getMembership(GetMembershipRequest request)

public final Membership getMembership(GetMembershipRequest request)

Gets the details of a Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipRequest request =
       GetMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .build();
   Membership response = gkeHubClient.getMembership(request);
 }
 
Parameter
Name Description
request GetMembershipRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Membership

getMembership(MembershipName name)

public final Membership getMembership(MembershipName name)

Gets the details of a Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   Membership response = gkeHubClient.getMembership(name);
 }
 
Parameter
Name Description
name MembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

Returns
Type Description
Membership

getMembership(String name)

public final Membership getMembership(String name)

Gets the details of a Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
   Membership response = gkeHubClient.getMembership(name);
 }
 
Parameter
Name Description
name String

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

Returns
Type Description
Membership

getMembershipBinding(GetMembershipBindingRequest request)

public final MembershipBinding getMembershipBinding(GetMembershipBindingRequest request)

Returns the details of a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipBindingRequest request =
       GetMembershipBindingRequest.newBuilder()
           .setName(
               MembershipBindingName.of(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                   .toString())
           .build();
   MembershipBinding response = gkeHubClient.getMembershipBinding(request);
 }
 
Parameter
Name Description
request GetMembershipBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
MembershipBinding

getMembershipBinding(MembershipBindingName name)

public final MembershipBinding getMembershipBinding(MembershipBindingName name)

Returns the details of a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipBindingName name =
       MembershipBindingName.of(
           "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]");
   MembershipBinding response = gkeHubClient.getMembershipBinding(name);
 }
 
Parameter
Name Description
name MembershipBindingName

Required. The MembershipBinding resource name in the format projects/*/locations/*/memberships/*/bindings/*.

Returns
Type Description
MembershipBinding

getMembershipBinding(String name)

public final MembershipBinding getMembershipBinding(String name)

Returns the details of a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       MembershipBindingName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
           .toString();
   MembershipBinding response = gkeHubClient.getMembershipBinding(name);
 }
 
Parameter
Name Description
name String

Required. The MembershipBinding resource name in the format projects/*/locations/*/memberships/*/bindings/*.

Returns
Type Description
MembershipBinding

getMembershipBindingCallable()

public final UnaryCallable<GetMembershipBindingRequest,MembershipBinding> getMembershipBindingCallable()

Returns the details of a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipBindingRequest request =
       GetMembershipBindingRequest.newBuilder()
           .setName(
               MembershipBindingName.of(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[MEMBERSHIPBINDING]")
                   .toString())
           .build();
   ApiFuture<MembershipBinding> future =
       gkeHubClient.getMembershipBindingCallable().futureCall(request);
   // Do something.
   MembershipBinding response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetMembershipBindingRequest,MembershipBinding>

getMembershipCallable()

public final UnaryCallable<GetMembershipRequest,Membership> getMembershipCallable()

Gets the details of a Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipRequest request =
       GetMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .build();
   ApiFuture<Membership> future = gkeHubClient.getMembershipCallable().futureCall(request);
   // Do something.
   Membership response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetMembershipRequest,Membership>

getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest request)

public final RBACRoleBinding getMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest request)

Returns the details of a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipRBACRoleBindingRequest request =
       GetMembershipRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(request);
 }
 
Parameter
Name Description
request GetMembershipRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RBACRoleBinding

getMembershipRBACRoleBinding(RBACRoleBindingName name)

public final RBACRoleBinding getMembershipRBACRoleBinding(RBACRoleBindingName name)

Returns the details of a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBindingName name =
       RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
           "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]");
   RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(name);
 }
 
Parameter
Name Description
name RBACRoleBindingName

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/memberships/*/rbacrolebindings/*.

Returns
Type Description
RBACRoleBinding

getMembershipRBACRoleBinding(String name)

public final RBACRoleBinding getMembershipRBACRoleBinding(String name)

Returns the details of a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
               "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
           .toString();
   RBACRoleBinding response = gkeHubClient.getMembershipRBACRoleBinding(name);
 }
 
Parameter
Name Description
name String

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/memberships/*/rbacrolebindings/*.

Returns
Type Description
RBACRoleBinding

getMembershipRBACRoleBindingCallable()

public final UnaryCallable<GetMembershipRBACRoleBindingRequest,RBACRoleBinding> getMembershipRBACRoleBindingCallable()

Returns the details of a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetMembershipRBACRoleBindingRequest request =
       GetMembershipRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationMembershipRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[MEMBERSHIP]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   ApiFuture<RBACRoleBinding> future =
       gkeHubClient.getMembershipRBACRoleBindingCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetMembershipRBACRoleBindingRequest,RBACRoleBinding>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getScope(GetScopeRequest request)

public final Scope getScope(GetScopeRequest request)

Returns the details of a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeRequest request =
       GetScopeRequest.newBuilder()
           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .build();
   Scope response = gkeHubClient.getScope(request);
 }
 
Parameter
Name Description
request GetScopeRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Scope

getScope(ScopeName name)

public final Scope getScope(ScopeName name)

Returns the details of a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   Scope response = gkeHubClient.getScope(name);
 }
 
Parameter
Name Description
name ScopeName

Required. The Scope resource name in the format projects/*/locations/*/scopes/*.

Returns
Type Description
Scope

getScope(String name)

public final Scope getScope(String name)

Returns the details of a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   Scope response = gkeHubClient.getScope(name);
 }
 
Parameter
Name Description
name String

Required. The Scope resource name in the format projects/*/locations/*/scopes/*.

Returns
Type Description
Scope

getScopeCallable()

public final UnaryCallable<GetScopeRequest,Scope> getScopeCallable()

Returns the details of a Scope.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeRequest request =
       GetScopeRequest.newBuilder()
           .setName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .build();
   ApiFuture<Scope> future = gkeHubClient.getScopeCallable().futureCall(request);
   // Do something.
   Scope response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetScopeRequest,Scope>

getScopeNamespace(GetScopeNamespaceRequest request)

public final Namespace getScopeNamespace(GetScopeNamespaceRequest request)

Returns the details of a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeNamespaceRequest request =
       GetScopeNamespaceRequest.newBuilder()
           .setName(
               NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
           .build();
   Namespace response = gkeHubClient.getScopeNamespace(request);
 }
 
Parameter
Name Description
request GetScopeNamespaceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Namespace

getScopeNamespace(NamespaceName name)

public final Namespace getScopeNamespace(NamespaceName name)

Returns the details of a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   NamespaceName name = NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]");
   Namespace response = gkeHubClient.getScopeNamespace(name);
 }
 
Parameter
Name Description
name NamespaceName

Required. The Namespace resource name in the format projects/*/locations/*/scopes/*/namespaces/*.

Returns
Type Description
Namespace

getScopeNamespace(String name)

public final Namespace getScopeNamespace(String name)

Returns the details of a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString();
   Namespace response = gkeHubClient.getScopeNamespace(name);
 }
 
Parameter
Name Description
name String

Required. The Namespace resource name in the format projects/*/locations/*/scopes/*/namespaces/*.

Returns
Type Description
Namespace

getScopeNamespaceCallable()

public final UnaryCallable<GetScopeNamespaceRequest,Namespace> getScopeNamespaceCallable()

Returns the details of a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeNamespaceRequest request =
       GetScopeNamespaceRequest.newBuilder()
           .setName(
               NamespaceName.of("[PROJECT]", "[LOCATION]", "[SCOPE]", "[NAMESPACE]").toString())
           .build();
   ApiFuture<Namespace> future = gkeHubClient.getScopeNamespaceCallable().futureCall(request);
   // Do something.
   Namespace response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetScopeNamespaceRequest,Namespace>

getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest request)

public final RBACRoleBinding getScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest request)

Returns the details of a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeRBACRoleBindingRequest request =
       GetScopeRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(request);
 }
 
Parameter
Name Description
request GetScopeRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
RBACRoleBinding

getScopeRBACRoleBinding(RBACRoleBindingName name)

public final RBACRoleBinding getScopeRBACRoleBinding(RBACRoleBindingName name)

Returns the details of a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBindingName name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
           "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]");
   RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(name);
 }
 
Parameter
Name Description
name RBACRoleBindingName

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/scopes/*/rbacrolebindings/*.

Returns
Type Description
RBACRoleBinding

getScopeRBACRoleBinding(String name)

public final RBACRoleBinding getScopeRBACRoleBinding(String name)

Returns the details of a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name =
       RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
               "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
           .toString();
   RBACRoleBinding response = gkeHubClient.getScopeRBACRoleBinding(name);
 }
 
Parameter
Name Description
name String

Required. The RBACRoleBinding resource name in the format projects/*/locations/*/scopes/*/rbacrolebindings/*.

Returns
Type Description
RBACRoleBinding

getScopeRBACRoleBindingCallable()

public final UnaryCallable<GetScopeRBACRoleBindingRequest,RBACRoleBinding> getScopeRBACRoleBindingCallable()

Returns the details of a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   GetScopeRBACRoleBindingRequest request =
       GetScopeRBACRoleBindingRequest.newBuilder()
           .setName(
               RBACRoleBindingName.ofProjectLocationScopeRbacrolebindingName(
                       "[PROJECT]", "[LOCATION]", "[SCOPE]", "[RBACROLEBINDING]")
                   .toString())
           .build();
   ApiFuture<RBACRoleBinding> future =
       gkeHubClient.getScopeRBACRoleBindingCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetScopeRBACRoleBindingRequest,RBACRoleBinding>

getSettings()

public final GkeHubSettings getSettings()
Returns
Type Description
GkeHubSettings

getStub()

public GkeHubStub getStub()
Returns
Type Description
GkeHubStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listBoundMemberships(ListBoundMembershipsRequest request)

public final GkeHubClient.ListBoundMembershipsPagedResponse listBoundMemberships(ListBoundMembershipsRequest request)

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListBoundMembershipsRequest request =
       ListBoundMembershipsRequest.newBuilder()
           .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Membership element : gkeHubClient.listBoundMemberships(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListBoundMembershipsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListBoundMembershipsPagedResponse

listBoundMemberships(ScopeName scopeName)

public final GkeHubClient.ListBoundMembershipsPagedResponse listBoundMemberships(ScopeName scopeName)

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName scopeName = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   for (Membership element : gkeHubClient.listBoundMemberships(scopeName).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
scopeName ScopeName

Required. Name of the Scope, in the format projects/*/locations/global/scopes/*, to which the Memberships are bound.

Returns
Type Description
GkeHubClient.ListBoundMembershipsPagedResponse

listBoundMemberships(String scopeName)

public final GkeHubClient.ListBoundMembershipsPagedResponse listBoundMemberships(String scopeName)

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String scopeName = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   for (Membership element : gkeHubClient.listBoundMemberships(scopeName).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
scopeName String

Required. Name of the Scope, in the format projects/*/locations/global/scopes/*, to which the Memberships are bound.

Returns
Type Description
GkeHubClient.ListBoundMembershipsPagedResponse

listBoundMembershipsCallable()

public final UnaryCallable<ListBoundMembershipsRequest,ListBoundMembershipsResponse> listBoundMembershipsCallable()

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListBoundMembershipsRequest request =
       ListBoundMembershipsRequest.newBuilder()
           .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListBoundMembershipsResponse response =
         gkeHubClient.listBoundMembershipsCallable().call(request);
     for (Membership element : response.getMembershipsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListBoundMembershipsRequest,ListBoundMembershipsResponse>

listBoundMembershipsPagedCallable()

public final UnaryCallable<ListBoundMembershipsRequest,GkeHubClient.ListBoundMembershipsPagedResponse> listBoundMembershipsPagedCallable()

Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListBoundMembershipsRequest request =
       ListBoundMembershipsRequest.newBuilder()
           .setScopeName(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Membership> future =
       gkeHubClient.listBoundMembershipsPagedCallable().futureCall(request);
   // Do something.
   for (Membership element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListBoundMembershipsRequest,ListBoundMembershipsPagedResponse>

listFeatures(ListFeaturesRequest request)

public final GkeHubClient.ListFeaturesPagedResponse listFeatures(ListFeaturesRequest request)

Lists Features in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFeaturesRequest request =
       ListFeaturesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReturnPartialSuccess(true)
           .build();
   for (Feature element : gkeHubClient.listFeatures(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListFeaturesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListFeaturesPagedResponse

listFeatures(LocationName parent)

public final GkeHubClient.ListFeaturesPagedResponse listFeatures(LocationName parent)

Lists Features in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Feature element : gkeHubClient.listFeatures(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListFeaturesPagedResponse

listFeatures(String parent)

public final GkeHubClient.ListFeaturesPagedResponse listFeatures(String parent)

Lists Features in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Feature element : gkeHubClient.listFeatures(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListFeaturesPagedResponse

listFeaturesCallable()

public final UnaryCallable<ListFeaturesRequest,ListFeaturesResponse> listFeaturesCallable()

Lists Features in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFeaturesRequest request =
       ListFeaturesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReturnPartialSuccess(true)
           .build();
   while (true) {
     ListFeaturesResponse response = gkeHubClient.listFeaturesCallable().call(request);
     for (Feature element : response.getResourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListFeaturesRequest,ListFeaturesResponse>

listFeaturesPagedCallable()

public final UnaryCallable<ListFeaturesRequest,GkeHubClient.ListFeaturesPagedResponse> listFeaturesPagedCallable()

Lists Features in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFeaturesRequest request =
       ListFeaturesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .setReturnPartialSuccess(true)
           .build();
   ApiFuture<Feature> future = gkeHubClient.listFeaturesPagedCallable().futureCall(request);
   // Do something.
   for (Feature element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListFeaturesRequest,ListFeaturesPagedResponse>

listFleets(ListFleetsRequest request)

public final GkeHubClient.ListFleetsPagedResponse listFleets(ListFleetsRequest request)

Returns all fleets within an organization or a project that the caller has access to.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFleetsRequest request =
       ListFleetsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   for (Fleet element : gkeHubClient.listFleets(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListFleetsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListFleetsPagedResponse

listFleets(LocationName parent)

public final GkeHubClient.ListFleetsPagedResponse listFleets(LocationName parent)

Returns all fleets within an organization or a project that the caller has access to.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Fleet element : gkeHubClient.listFleets(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The organization or project to list for Fleets under, in the format organizations/*/locations/* or projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListFleetsPagedResponse

listFleets(String parent)

public final GkeHubClient.ListFleetsPagedResponse listFleets(String parent)

Returns all fleets within an organization or a project that the caller has access to.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Fleet element : gkeHubClient.listFleets(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The organization or project to list for Fleets under, in the format organizations/*/locations/* or projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListFleetsPagedResponse

listFleetsCallable()

public final UnaryCallable<ListFleetsRequest,ListFleetsResponse> listFleetsCallable()

Returns all fleets within an organization or a project that the caller has access to.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFleetsRequest request =
       ListFleetsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   while (true) {
     ListFleetsResponse response = gkeHubClient.listFleetsCallable().call(request);
     for (Fleet element : response.getFleetsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListFleetsRequest,ListFleetsResponse>

listFleetsPagedCallable()

public final UnaryCallable<ListFleetsRequest,GkeHubClient.ListFleetsPagedResponse> listFleetsPagedCallable()

Returns all fleets within an organization or a project that the caller has access to.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListFleetsRequest request =
       ListFleetsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageToken("pageToken873572522")
           .setPageSize(883849137)
           .build();
   ApiFuture<Fleet> future = gkeHubClient.listFleetsPagedCallable().futureCall(request);
   // Do something.
   for (Fleet element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListFleetsRequest,ListFleetsPagedResponse>

listMembershipBindings(ListMembershipBindingsRequest request)

public final GkeHubClient.ListMembershipBindingsPagedResponse listMembershipBindings(ListMembershipBindingsRequest request)

Lists MembershipBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipBindingsRequest request =
       ListMembershipBindingsRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   for (MembershipBinding element : gkeHubClient.listMembershipBindings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListMembershipBindingsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListMembershipBindingsPagedResponse

listMembershipBindings(MembershipName parent)

public final GkeHubClient.ListMembershipBindingsPagedResponse listMembershipBindings(MembershipName parent)

Lists MembershipBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   for (MembershipBinding element : gkeHubClient.listMembershipBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MembershipName

Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format projects/*/locations/*/memberships/*.

Returns
Type Description
GkeHubClient.ListMembershipBindingsPagedResponse

listMembershipBindings(String parent)

public final GkeHubClient.ListMembershipBindingsPagedResponse listMembershipBindings(String parent)

Lists MembershipBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
   for (MembershipBinding element : gkeHubClient.listMembershipBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format projects/*/locations/*/memberships/*.

Returns
Type Description
GkeHubClient.ListMembershipBindingsPagedResponse

listMembershipBindingsCallable()

public final UnaryCallable<ListMembershipBindingsRequest,ListMembershipBindingsResponse> listMembershipBindingsCallable()

Lists MembershipBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipBindingsRequest request =
       ListMembershipBindingsRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   while (true) {
     ListMembershipBindingsResponse response =
         gkeHubClient.listMembershipBindingsCallable().call(request);
     for (MembershipBinding element : response.getMembershipBindingsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipBindingsRequest,ListMembershipBindingsResponse>

listMembershipBindingsPagedCallable()

public final UnaryCallable<ListMembershipBindingsRequest,GkeHubClient.ListMembershipBindingsPagedResponse> listMembershipBindingsPagedCallable()

Lists MembershipBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipBindingsRequest request =
       ListMembershipBindingsRequest.newBuilder()
           .setParent(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .build();
   ApiFuture<MembershipBinding> future =
       gkeHubClient.listMembershipBindingsPagedCallable().futureCall(request);
   // Do something.
   for (MembershipBinding element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipBindingsRequest,ListMembershipBindingsPagedResponse>

listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest request)

public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest request)

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipRBACRoleBindingsRequest request =
       ListMembershipRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (RBACRoleBinding element :
       gkeHubClient.listMembershipRBACRoleBindings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListMembershipRBACRoleBindingsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse

listMembershipRBACRoleBindings(MembershipName parent)

public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(MembershipName parent)

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   for (RBACRoleBinding element :
       gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MembershipName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/memberships/*.

Returns
Type Description
GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse

listMembershipRBACRoleBindings(ScopeName parent)

public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(ScopeName parent)

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   for (RBACRoleBinding element :
       gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent ScopeName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/memberships/*.

Returns
Type Description
GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse

listMembershipRBACRoleBindings(String parent)

public final GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse listMembershipRBACRoleBindings(String parent)

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   for (RBACRoleBinding element :
       gkeHubClient.listMembershipRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/memberships/*.

Returns
Type Description
GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse

listMembershipRBACRoleBindingsCallable()

public final UnaryCallable<ListMembershipRBACRoleBindingsRequest,ListMembershipRBACRoleBindingsResponse> listMembershipRBACRoleBindingsCallable()

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipRBACRoleBindingsRequest request =
       ListMembershipRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListMembershipRBACRoleBindingsResponse response =
         gkeHubClient.listMembershipRBACRoleBindingsCallable().call(request);
     for (RBACRoleBinding element : response.getRbacrolebindingsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipRBACRoleBindingsRequest,ListMembershipRBACRoleBindingsResponse>

listMembershipRBACRoleBindingsPagedCallable()

public final UnaryCallable<ListMembershipRBACRoleBindingsRequest,GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse> listMembershipRBACRoleBindingsPagedCallable()

Lists all Membership RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipRBACRoleBindingsRequest request =
       ListMembershipRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<RBACRoleBinding> future =
       gkeHubClient.listMembershipRBACRoleBindingsPagedCallable().futureCall(request);
   // Do something.
   for (RBACRoleBinding element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipRBACRoleBindingsRequest,ListMembershipRBACRoleBindingsPagedResponse>

listMemberships(ListMembershipsRequest request)

public final GkeHubClient.ListMembershipsPagedResponse listMemberships(ListMembershipsRequest request)

Lists Memberships in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipsRequest request =
       ListMembershipsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   for (Membership element : gkeHubClient.listMemberships(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListMembershipsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListMembershipsPagedResponse

listMemberships(LocationName parent)

public final GkeHubClient.ListMembershipsPagedResponse listMemberships(LocationName parent)

Lists Memberships in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Membership element : gkeHubClient.listMemberships(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent (project and location) where the Memberships will be listed. Specified in the format projects/*/locations/*. projects/*/locations/- list memberships in all the regions.

Returns
Type Description
GkeHubClient.ListMembershipsPagedResponse

listMemberships(String parent)

public final GkeHubClient.ListMembershipsPagedResponse listMemberships(String parent)

Lists Memberships in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Membership element : gkeHubClient.listMemberships(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Memberships will be listed. Specified in the format projects/*/locations/*. projects/*/locations/- list memberships in all the regions.

Returns
Type Description
GkeHubClient.ListMembershipsPagedResponse

listMembershipsCallable()

public final UnaryCallable<ListMembershipsRequest,ListMembershipsResponse> listMembershipsCallable()

Lists Memberships in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipsRequest request =
       ListMembershipsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   while (true) {
     ListMembershipsResponse response = gkeHubClient.listMembershipsCallable().call(request);
     for (Membership element : response.getResourcesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipsRequest,ListMembershipsResponse>

listMembershipsPagedCallable()

public final UnaryCallable<ListMembershipsRequest,GkeHubClient.ListMembershipsPagedResponse> listMembershipsPagedCallable()

Lists Memberships in a given project and location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListMembershipsRequest request =
       ListMembershipsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .setFilter("filter-1274492040")
           .setOrderBy("orderBy-1207110587")
           .build();
   ApiFuture<Membership> future =
       gkeHubClient.listMembershipsPagedCallable().futureCall(request);
   // Do something.
   for (Membership element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListMembershipsRequest,ListMembershipsPagedResponse>

listPermittedScopes(ListPermittedScopesRequest request)

public final GkeHubClient.ListPermittedScopesPagedResponse listPermittedScopes(ListPermittedScopesRequest request)

Lists permitted Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListPermittedScopesRequest request =
       ListPermittedScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Scope element : gkeHubClient.listPermittedScopes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListPermittedScopesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListPermittedScopesPagedResponse

listPermittedScopes(LocationName parent)

public final GkeHubClient.ListPermittedScopesPagedResponse listPermittedScopes(LocationName parent)

Lists permitted Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Scope element : gkeHubClient.listPermittedScopes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent (project and location) where the Scope will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListPermittedScopesPagedResponse

listPermittedScopes(String parent)

public final GkeHubClient.ListPermittedScopesPagedResponse listPermittedScopes(String parent)

Lists permitted Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Scope element : gkeHubClient.listPermittedScopes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Scope will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListPermittedScopesPagedResponse

listPermittedScopesCallable()

public final UnaryCallable<ListPermittedScopesRequest,ListPermittedScopesResponse> listPermittedScopesCallable()

Lists permitted Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListPermittedScopesRequest request =
       ListPermittedScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListPermittedScopesResponse response =
         gkeHubClient.listPermittedScopesCallable().call(request);
     for (Scope element : response.getScopesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListPermittedScopesRequest,ListPermittedScopesResponse>

listPermittedScopesPagedCallable()

public final UnaryCallable<ListPermittedScopesRequest,GkeHubClient.ListPermittedScopesPagedResponse> listPermittedScopesPagedCallable()

Lists permitted Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListPermittedScopesRequest request =
       ListPermittedScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Scope> future = gkeHubClient.listPermittedScopesPagedCallable().futureCall(request);
   // Do something.
   for (Scope element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListPermittedScopesRequest,ListPermittedScopesPagedResponse>

listScopeNamespaces(ListScopeNamespacesRequest request)

public final GkeHubClient.ListScopeNamespacesPagedResponse listScopeNamespaces(ListScopeNamespacesRequest request)

Lists fleet namespaces.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeNamespacesRequest request =
       ListScopeNamespacesRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Namespace element : gkeHubClient.listScopeNamespaces(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListScopeNamespacesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListScopeNamespacesPagedResponse

listScopeNamespaces(ScopeName parent)

public final GkeHubClient.ListScopeNamespacesPagedResponse listScopeNamespaces(ScopeName parent)

Lists fleet namespaces.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   for (Namespace element : gkeHubClient.listScopeNamespaces(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent ScopeName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/scopes/*.

Returns
Type Description
GkeHubClient.ListScopeNamespacesPagedResponse

listScopeNamespaces(String parent)

public final GkeHubClient.ListScopeNamespacesPagedResponse listScopeNamespaces(String parent)

Lists fleet namespaces.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   for (Namespace element : gkeHubClient.listScopeNamespaces(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/scopes/*.

Returns
Type Description
GkeHubClient.ListScopeNamespacesPagedResponse

listScopeNamespacesCallable()

public final UnaryCallable<ListScopeNamespacesRequest,ListScopeNamespacesResponse> listScopeNamespacesCallable()

Lists fleet namespaces.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeNamespacesRequest request =
       ListScopeNamespacesRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListScopeNamespacesResponse response =
         gkeHubClient.listScopeNamespacesCallable().call(request);
     for (Namespace element : response.getScopeNamespacesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopeNamespacesRequest,ListScopeNamespacesResponse>

listScopeNamespacesPagedCallable()

public final UnaryCallable<ListScopeNamespacesRequest,GkeHubClient.ListScopeNamespacesPagedResponse> listScopeNamespacesPagedCallable()

Lists fleet namespaces.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeNamespacesRequest request =
       ListScopeNamespacesRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Namespace> future =
       gkeHubClient.listScopeNamespacesPagedCallable().futureCall(request);
   // Do something.
   for (Namespace element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopeNamespacesRequest,ListScopeNamespacesPagedResponse>

listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest request)

public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest request)

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeRBACRoleBindingsRequest request =
       ListScopeRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListScopeRBACRoleBindingsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListScopeRBACRoleBindingsPagedResponse

listScopeRBACRoleBindings(MembershipName parent)

public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(MembershipName parent)

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName parent = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent MembershipName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/scopes/*.

Returns
Type Description
GkeHubClient.ListScopeRBACRoleBindingsPagedResponse

listScopeRBACRoleBindings(ScopeName parent)

public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(ScopeName parent)

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ScopeName parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]");
   for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent ScopeName

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/scopes/*.

Returns
Type Description
GkeHubClient.ListScopeRBACRoleBindingsPagedResponse

listScopeRBACRoleBindings(String parent)

public final GkeHubClient.ListScopeRBACRoleBindingsPagedResponse listScopeRBACRoleBindings(String parent)

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString();
   for (RBACRoleBinding element : gkeHubClient.listScopeRBACRoleBindings(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Features will be listed. Specified in the format projects/*/locations/*/scopes/*.

Returns
Type Description
GkeHubClient.ListScopeRBACRoleBindingsPagedResponse

listScopeRBACRoleBindingsCallable()

public final UnaryCallable<ListScopeRBACRoleBindingsRequest,ListScopeRBACRoleBindingsResponse> listScopeRBACRoleBindingsCallable()

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeRBACRoleBindingsRequest request =
       ListScopeRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListScopeRBACRoleBindingsResponse response =
         gkeHubClient.listScopeRBACRoleBindingsCallable().call(request);
     for (RBACRoleBinding element : response.getRbacrolebindingsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopeRBACRoleBindingsRequest,ListScopeRBACRoleBindingsResponse>

listScopeRBACRoleBindingsPagedCallable()

public final UnaryCallable<ListScopeRBACRoleBindingsRequest,GkeHubClient.ListScopeRBACRoleBindingsPagedResponse> listScopeRBACRoleBindingsPagedCallable()

Lists all Scope RBACRoleBindings.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopeRBACRoleBindingsRequest request =
       ListScopeRBACRoleBindingsRequest.newBuilder()
           .setParent(ScopeName.of("[PROJECT]", "[LOCATION]", "[SCOPE]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<RBACRoleBinding> future =
       gkeHubClient.listScopeRBACRoleBindingsPagedCallable().futureCall(request);
   // Do something.
   for (RBACRoleBinding element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopeRBACRoleBindingsRequest,ListScopeRBACRoleBindingsPagedResponse>

listScopes(ListScopesRequest request)

public final GkeHubClient.ListScopesPagedResponse listScopes(ListScopesRequest request)

Lists Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopesRequest request =
       ListScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Scope element : gkeHubClient.listScopes(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListScopesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GkeHubClient.ListScopesPagedResponse

listScopes(LocationName parent)

public final GkeHubClient.ListScopesPagedResponse listScopes(LocationName parent)

Lists Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Scope element : gkeHubClient.listScopes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent LocationName

Required. The parent (project and location) where the Scope will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListScopesPagedResponse

listScopes(String parent)

public final GkeHubClient.ListScopesPagedResponse listScopes(String parent)

Lists Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Scope element : gkeHubClient.listScopes(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent (project and location) where the Scope will be listed. Specified in the format projects/*/locations/*.

Returns
Type Description
GkeHubClient.ListScopesPagedResponse

listScopesCallable()

public final UnaryCallable<ListScopesRequest,ListScopesResponse> listScopesCallable()

Lists Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopesRequest request =
       ListScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListScopesResponse response = gkeHubClient.listScopesCallable().call(request);
     for (Scope element : response.getScopesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopesRequest,ListScopesResponse>

listScopesPagedCallable()

public final UnaryCallable<ListScopesRequest,GkeHubClient.ListScopesPagedResponse> listScopesPagedCallable()

Lists Scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   ListScopesRequest request =
       ListScopesRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Scope> future = gkeHubClient.listScopesPagedCallable().futureCall(request);
   // Do something.
   for (Scope element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListScopesRequest,ListScopesPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateFeatureAsync(FeatureName name, Feature resource, FieldMask updateMask)

public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(FeatureName name, Feature resource, FieldMask updateMask)

Updates an existing Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   FeatureName name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]");
   Feature resource = Feature.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Feature response = gkeHubClient.updateFeatureAsync(name, resource, updateMask).get();
 }
 
Parameters
Name Description
name FeatureName

Required. The Feature resource name in the format projects/*/locations/*/features/*.

resource Feature

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 resource.

updateMask FieldMask

Mask of fields to update.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

updateFeatureAsync(UpdateFeatureRequest request)

public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(UpdateFeatureRequest request)

Updates an existing Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFeatureRequest request =
       UpdateFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Feature response = gkeHubClient.updateFeatureAsync(request).get();
 }
 
Parameter
Name Description
request UpdateFeatureRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

updateFeatureAsync(String name, Feature resource, FieldMask updateMask)

public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(String name, Feature resource, FieldMask updateMask)

Updates an existing Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString();
   Feature resource = Feature.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Feature response = gkeHubClient.updateFeatureAsync(name, resource, updateMask).get();
 }
 
Parameters
Name Description
name String

Required. The Feature resource name in the format projects/*/locations/*/features/*.

resource Feature

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 resource.

updateMask FieldMask

Mask of fields to update.

Returns
Type Description
OperationFuture<Feature,OperationMetadata>

updateFeatureCallable()

public final UnaryCallable<UpdateFeatureRequest,Operation> updateFeatureCallable()

Updates an existing Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFeatureRequest request =
       UpdateFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = gkeHubClient.updateFeatureCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateFeatureRequest,Operation>

updateFeatureOperationCallable()

public final OperationCallable<UpdateFeatureRequest,Feature,OperationMetadata> updateFeatureOperationCallable()

Updates an existing Feature.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFeatureRequest request =
       UpdateFeatureRequest.newBuilder()
           .setName(FeatureName.of("[PROJECT]", "[LOCATION]", "[FEATURE]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Feature.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Feature, OperationMetadata> future =
       gkeHubClient.updateFeatureOperationCallable().futureCall(request);
   // Do something.
   Feature response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateFeatureRequest,Feature,OperationMetadata>

updateFleetAsync(Fleet fleet, FieldMask updateMask)

public final OperationFuture<Fleet,OperationMetadata> updateFleetAsync(Fleet fleet, FieldMask updateMask)

Updates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   Fleet fleet = Fleet.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Fleet response = gkeHubClient.updateFleetAsync(fleet, updateMask).get();
 }
 
Parameters
Name Description
fleet Fleet

Required. The Fleet to update.

The name field of the Fleet object identifies which fleet will be updated.

updateMask FieldMask

Required. The fields to be updated;

Returns
Type Description
OperationFuture<Fleet,OperationMetadata>

updateFleetAsync(UpdateFleetRequest request)

public final OperationFuture<Fleet,OperationMetadata> updateFleetAsync(UpdateFleetRequest request)

Updates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFleetRequest request =
       UpdateFleetRequest.newBuilder()
           .setFleet(Fleet.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Fleet response = gkeHubClient.updateFleetAsync(request).get();
 }
 
Parameter
Name Description
request UpdateFleetRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Fleet,OperationMetadata>

updateFleetCallable()

public final UnaryCallable<UpdateFleetRequest,Operation> updateFleetCallable()

Updates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFleetRequest request =
       UpdateFleetRequest.newBuilder()
           .setFleet(Fleet.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.updateFleetCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateFleetRequest,Operation>

updateFleetOperationCallable()

public final OperationCallable<UpdateFleetRequest,Fleet,OperationMetadata> updateFleetOperationCallable()

Updates a fleet.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateFleetRequest request =
       UpdateFleetRequest.newBuilder()
           .setFleet(Fleet.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<Fleet, OperationMetadata> future =
       gkeHubClient.updateFleetOperationCallable().futureCall(request);
   // Do something.
   Fleet response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateFleetRequest,Fleet,OperationMetadata>

updateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask)

public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(MembershipName name, Membership resource, FieldMask updateMask)

Updates an existing Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipName name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]");
   Membership resource = Membership.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Membership response = gkeHubClient.updateMembershipAsync(name, resource, updateMask).get();
 }
 
Parameters
Name Description
name MembershipName

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

resource Membership

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 resource.

updateMask FieldMask

Required. Mask of fields to update.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

updateMembershipAsync(UpdateMembershipRequest request)

public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(UpdateMembershipRequest request)

Updates an existing Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRequest request =
       UpdateMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   Membership response = gkeHubClient.updateMembershipAsync(request).get();
 }
 
Parameter
Name Description
request UpdateMembershipRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

updateMembershipAsync(String name, Membership resource, FieldMask updateMask)

public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(String name, Membership resource, FieldMask updateMask)

Updates an existing Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   String name = MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString();
   Membership resource = Membership.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Membership response = gkeHubClient.updateMembershipAsync(name, resource, updateMask).get();
 }
 
Parameters
Name Description
name String

Required. The Membership resource name in the format projects/*/locations/*/memberships/*.

resource Membership

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 resource.

updateMask FieldMask

Required. Mask of fields to update.

Returns
Type Description
OperationFuture<Membership,OperationMetadata>

updateMembershipBindingAsync(MembershipBinding membershipBinding, FieldMask updateMask)

public final OperationFuture<MembershipBinding,OperationMetadata> updateMembershipBindingAsync(MembershipBinding membershipBinding, FieldMask updateMask)

Updates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   MembershipBinding membershipBinding = MembershipBinding.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   MembershipBinding response =
       gkeHubClient.updateMembershipBindingAsync(membershipBinding, updateMask).get();
 }
 
Parameters
Name Description
membershipBinding MembershipBinding

Required. The MembershipBinding object with fields updated.

updateMask FieldMask

Required. The fields to be updated.

Returns
Type Description
OperationFuture<MembershipBinding,OperationMetadata>

updateMembershipBindingAsync(UpdateMembershipBindingRequest request)

public final OperationFuture<MembershipBinding,OperationMetadata> updateMembershipBindingAsync(UpdateMembershipBindingRequest request)

Updates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipBindingRequest request =
       UpdateMembershipBindingRequest.newBuilder()
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   MembershipBinding response = gkeHubClient.updateMembershipBindingAsync(request).get();
 }
 
Parameter
Name Description
request UpdateMembershipBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<MembershipBinding,OperationMetadata>

updateMembershipBindingCallable()

public final UnaryCallable<UpdateMembershipBindingRequest,Operation> updateMembershipBindingCallable()

Updates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipBindingRequest request =
       UpdateMembershipBindingRequest.newBuilder()
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.updateMembershipBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateMembershipBindingRequest,Operation>

updateMembershipBindingOperationCallable()

public final OperationCallable<UpdateMembershipBindingRequest,MembershipBinding,OperationMetadata> updateMembershipBindingOperationCallable()

Updates a MembershipBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipBindingRequest request =
       UpdateMembershipBindingRequest.newBuilder()
           .setMembershipBinding(MembershipBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<MembershipBinding, OperationMetadata> future =
       gkeHubClient.updateMembershipBindingOperationCallable().futureCall(request);
   // Do something.
   MembershipBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateMembershipBindingRequest,MembershipBinding,OperationMetadata>

updateMembershipCallable()

public final UnaryCallable<UpdateMembershipRequest,Operation> updateMembershipCallable()

Updates an existing Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRequest request =
       UpdateMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   ApiFuture<Operation> future = gkeHubClient.updateMembershipCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateMembershipRequest,Operation>

updateMembershipOperationCallable()

public final OperationCallable<UpdateMembershipRequest,Membership,OperationMetadata> updateMembershipOperationCallable()

Updates an existing Membership.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRequest request =
       UpdateMembershipRequest.newBuilder()
           .setName(MembershipName.of("[PROJECT]", "[LOCATION]", "[MEMBERSHIP]").toString())
           .setUpdateMask(FieldMask.newBuilder().build())
           .setResource(Membership.newBuilder().build())
           .setRequestId("requestId693933066")
           .build();
   OperationFuture<Membership, OperationMetadata> future =
       gkeHubClient.updateMembershipOperationCallable().futureCall(request);
   // Do something.
   Membership response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateMembershipRequest,Membership,OperationMetadata>

updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

public final OperationFuture<RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Updates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   RBACRoleBinding response =
       gkeHubClient.updateMembershipRBACRoleBindingAsync(rbacrolebinding, updateMask).get();
 }
 
Parameters
Name Description
rbacrolebinding RBACRoleBinding

Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.

updateMask FieldMask

Required. The fields to be updated.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest request)

public final OperationFuture<RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingAsync(UpdateMembershipRBACRoleBindingRequest request)

Updates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRBACRoleBindingRequest request =
       UpdateMembershipRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   RBACRoleBinding response = gkeHubClient.updateMembershipRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request UpdateMembershipRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

updateMembershipRBACRoleBindingCallable()

public final UnaryCallable<UpdateMembershipRBACRoleBindingRequest,Operation> updateMembershipRBACRoleBindingCallable()

Updates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRBACRoleBindingRequest request =
       UpdateMembershipRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.updateMembershipRBACRoleBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateMembershipRBACRoleBindingRequest,Operation>

updateMembershipRBACRoleBindingOperationCallable()

public final OperationCallable<UpdateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingOperationCallable()

Updates a Membership RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateMembershipRBACRoleBindingRequest request =
       UpdateMembershipRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<RBACRoleBinding, OperationMetadata> future =
       gkeHubClient.updateMembershipRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateMembershipRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata>

updateScopeAsync(Scope scope, FieldMask updateMask)

public final OperationFuture<Scope,OperationMetadata> updateScopeAsync(Scope scope, FieldMask updateMask)

Updates a scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   Scope scope = Scope.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Scope response = gkeHubClient.updateScopeAsync(scope, updateMask).get();
 }
 
Parameters
Name Description
scope Scope

Required. A Scope with fields updated. The 'name' field in this namespace is used to identify the resource to update.

updateMask FieldMask

Required. The fields to be updated.

Returns
Type Description
OperationFuture<Scope,OperationMetadata>

updateScopeAsync(UpdateScopeRequest request)

public final OperationFuture<Scope,OperationMetadata> updateScopeAsync(UpdateScopeRequest request)

Updates a scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRequest request =
       UpdateScopeRequest.newBuilder()
           .setScope(Scope.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Scope response = gkeHubClient.updateScopeAsync(request).get();
 }
 
Parameter
Name Description
request UpdateScopeRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Scope,OperationMetadata>

updateScopeCallable()

public final UnaryCallable<UpdateScopeRequest,Operation> updateScopeCallable()

Updates a scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRequest request =
       UpdateScopeRequest.newBuilder()
           .setScope(Scope.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.updateScopeCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateScopeRequest,Operation>

updateScopeNamespaceAsync(Namespace scopeNamespace, FieldMask updateMask)

public final OperationFuture<Namespace,OperationMetadata> updateScopeNamespaceAsync(Namespace scopeNamespace, FieldMask updateMask)

Updates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   Namespace scopeNamespace = Namespace.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   Namespace response = gkeHubClient.updateScopeNamespaceAsync(scopeNamespace, updateMask).get();
 }
 
Parameters
Name Description
scopeNamespace Namespace

Required. A namespace with fields updated. The 'name' field in this namespace is used to identify the resource to update. Given 'updated' prefix to follow go/proto-best-practices-checkers#keyword_conflict

updateMask FieldMask

Required. The fields to be updated.

Returns
Type Description
OperationFuture<Namespace,OperationMetadata>

updateScopeNamespaceAsync(UpdateScopeNamespaceRequest request)

public final OperationFuture<Namespace,OperationMetadata> updateScopeNamespaceAsync(UpdateScopeNamespaceRequest request)

Updates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeNamespaceRequest request =
       UpdateScopeNamespaceRequest.newBuilder()
           .setScopeNamespace(Namespace.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   Namespace response = gkeHubClient.updateScopeNamespaceAsync(request).get();
 }
 
Parameter
Name Description
request UpdateScopeNamespaceRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Namespace,OperationMetadata>

updateScopeNamespaceCallable()

public final UnaryCallable<UpdateScopeNamespaceRequest,Operation> updateScopeNamespaceCallable()

Updates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeNamespaceRequest request =
       UpdateScopeNamespaceRequest.newBuilder()
           .setScopeNamespace(Namespace.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future = gkeHubClient.updateScopeNamespaceCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateScopeNamespaceRequest,Operation>

updateScopeNamespaceOperationCallable()

public final OperationCallable<UpdateScopeNamespaceRequest,Namespace,OperationMetadata> updateScopeNamespaceOperationCallable()

Updates a fleet namespace.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeNamespaceRequest request =
       UpdateScopeNamespaceRequest.newBuilder()
           .setScopeNamespace(Namespace.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<Namespace, OperationMetadata> future =
       gkeHubClient.updateScopeNamespaceOperationCallable().futureCall(request);
   // Do something.
   Namespace response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateScopeNamespaceRequest,Namespace,OperationMetadata>

updateScopeOperationCallable()

public final OperationCallable<UpdateScopeRequest,Scope,OperationMetadata> updateScopeOperationCallable()

Updates a scopes.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRequest request =
       UpdateScopeRequest.newBuilder()
           .setScope(Scope.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<Scope, OperationMetadata> future =
       gkeHubClient.updateScopeOperationCallable().futureCall(request);
   // Do something.
   Scope response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateScopeRequest,Scope,OperationMetadata>

updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

public final OperationFuture<RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, FieldMask updateMask)

Updates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   RBACRoleBinding rbacrolebinding = RBACRoleBinding.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   RBACRoleBinding response =
       gkeHubClient.updateScopeRBACRoleBindingAsync(rbacrolebinding, updateMask).get();
 }
 
Parameters
Name Description
rbacrolebinding RBACRoleBinding

Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.

updateMask FieldMask

Required. The fields to be updated.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest request)

public final OperationFuture<RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingAsync(UpdateScopeRBACRoleBindingRequest request)

Updates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRBACRoleBindingRequest request =
       UpdateScopeRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   RBACRoleBinding response = gkeHubClient.updateScopeRBACRoleBindingAsync(request).get();
 }
 
Parameter
Name Description
request UpdateScopeRBACRoleBindingRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<RBACRoleBinding,OperationMetadata>

updateScopeRBACRoleBindingCallable()

public final UnaryCallable<UpdateScopeRBACRoleBindingRequest,Operation> updateScopeRBACRoleBindingCallable()

Updates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRBACRoleBindingRequest request =
       UpdateScopeRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<Operation> future =
       gkeHubClient.updateScopeRBACRoleBindingCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateScopeRBACRoleBindingRequest,Operation>

updateScopeRBACRoleBindingOperationCallable()

public final OperationCallable<UpdateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingOperationCallable()

Updates a Scope RBACRoleBinding.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (GkeHubClient gkeHubClient = GkeHubClient.create()) {
   UpdateScopeRBACRoleBindingRequest request =
       UpdateScopeRBACRoleBindingRequest.newBuilder()
           .setRbacrolebinding(RBACRoleBinding.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   OperationFuture<RBACRoleBinding, OperationMetadata> future =
       gkeHubClient.updateScopeRBACRoleBindingOperationCallable().futureCall(request);
   // Do something.
   RBACRoleBinding response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateScopeRBACRoleBindingRequest,RBACRoleBinding,OperationMetadata>