Class GkeHubClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
The GKE Hub service operates on the following resources:
- [Membership][google.cloud.gkehub.v1.Membership]
- [Feature][google.cloud.gkehub.v1.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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFeature |
Adds a new Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteFeature |
Removes a Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMembership |
Updates an existing Membership. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFeature |
Updates an existing Feature. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateFleet |
Creates a fleet. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateFleet |
Updates a fleet. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateScopeNamespace |
Creates a fleet namespace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateScopeNamespace |
Updates a fleet namespace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteScopeNamespace |
Deletes a fleet namespace. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListScopeNamespaces |
Lists fleet namespaces. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateScopeRBACRoleBinding |
Creates a Scope RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateScopeRBACRoleBinding |
Updates a Scope RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteScopeRBACRoleBinding |
Deletes a Scope RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListScopeRBACRoleBindings |
Lists all Scope RBACRoleBindings. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateScope |
Creates a Scope. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateScope |
Updates a scopes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteScope |
Deletes a Scope. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListScopes |
Lists Scopes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListPermittedScopes |
Lists permitted Scopes. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMembershipBinding |
Creates a MembershipBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMembershipBinding |
Updates a MembershipBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMembershipBinding |
Deletes a MembershipBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMembershipBindings |
Lists MembershipBindings. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMembershipRBACRoleBinding |
Creates a Membership RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMembershipRBACRoleBinding |
Updates a Membership RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMembershipRBACRoleBinding |
Deletes a Membership RBACRoleBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMembershipRBACRoleBindings |
Lists all Membership RBACRoleBindings. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGkeHubClient(GkeHubSettings settings) Constructs an instance of GkeHubClient, using the given settings.protectedGkeHubClient(GkeHubStub stub) -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final GkeHubClientcreate()Constructs an instance of GkeHubClient with default settings.static final GkeHubClientcreate(GkeHubSettings settings) Constructs an instance of GkeHubClient, using the given settings.static final GkeHubClientcreate(GkeHubStub stub) Constructs an instance of GkeHubClient, using the given stub for making calls.createFeatureAsync(CreateFeatureRequest request) Adds a new Feature.createFeatureAsync(LocationName parent, Feature resource, String featureId) Adds a new Feature.createFeatureAsync(String parent, Feature resource, String featureId) Adds a new Feature.Adds a new Feature.Adds a new Feature.createFleetAsync(CreateFleetRequest request) Creates a fleet.createFleetAsync(LocationName parent, Fleet fleet) Creates a fleet.createFleetAsync(String parent, Fleet fleet) Creates a fleet.Creates a fleet.Creates a fleet.Creates a new Membership.createMembershipAsync(LocationName parent, Membership resource, String membershipId) Creates a new Membership.createMembershipAsync(String parent, Membership resource, String membershipId) Creates a new Membership.Creates a MembershipBinding.createMembershipBindingAsync(MembershipName parent, MembershipBinding membershipBinding, String membershipBindingId) Creates a MembershipBinding.createMembershipBindingAsync(String parent, MembershipBinding membershipBinding, String membershipBindingId) Creates a MembershipBinding.Creates a MembershipBinding.Creates a MembershipBinding.Creates a new Membership.Creates a new Membership.Creates a Membership RBACRoleBinding.createMembershipRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Membership RBACRoleBinding.createMembershipRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Membership RBACRoleBinding.createMembershipRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Membership RBACRoleBinding.Creates a Membership RBACRoleBinding.Creates a Membership RBACRoleBinding.createScopeAsync(CreateScopeRequest request) Creates a Scope.createScopeAsync(LocationName parent, Scope scope, String scopeId) Creates a Scope.createScopeAsync(String parent, Scope scope, String scopeId) Creates a Scope.Creates a Scope.Creates a fleet namespace.createScopeNamespaceAsync(ScopeName parent, Namespace scopeNamespace, String scopeNamespaceId) Creates a fleet namespace.createScopeNamespaceAsync(String parent, Namespace scopeNamespace, String scopeNamespaceId) Creates a fleet namespace.Creates a fleet namespace.Creates a fleet namespace.Creates a Scope.Creates a Scope RBACRoleBinding.createScopeRBACRoleBindingAsync(MembershipName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Scope RBACRoleBinding.createScopeRBACRoleBindingAsync(ScopeName parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Scope RBACRoleBinding.createScopeRBACRoleBindingAsync(String parent, RBACRoleBinding rbacrolebinding, String rbacrolebindingId) Creates a Scope RBACRoleBinding.Creates a Scope RBACRoleBinding.Creates a Scope RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFeatureAsync(DeleteFeatureRequest request) Removes a Feature.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Removes a Feature.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFeatureAsync(String name) Removes a Feature.Removes a Feature.final OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty, OperationMetadata> Removes a Feature.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(DeleteFleetRequest request) Removes a Fleet.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(FleetName name) Removes a Fleet.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFleetAsync(String name) Removes a Fleet.Removes a Fleet.final OperationCallable<DeleteFleetRequest,com.google.protobuf.Empty, OperationMetadata> Removes a Fleet.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Removes a Membership.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Removes a Membership.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteMembershipAsync(String name) Removes a Membership.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a MembershipBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a MembershipBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a MembershipBinding.Deletes a MembershipBinding.final OperationCallable<DeleteMembershipBindingRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a MembershipBinding.Removes a Membership.final OperationCallable<DeleteMembershipRequest,com.google.protobuf.Empty, OperationMetadata> Removes a Membership.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Membership RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Membership RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Membership RBACRoleBinding.Deletes a Membership RBACRoleBinding.final OperationCallable<DeleteMembershipRBACRoleBindingRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Membership RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(DeleteScopeRequest request) Deletes a Scope.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(ScopeName name) Deletes a Scope.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteScopeAsync(String name) Deletes a Scope.Deletes a Scope.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a fleet namespace.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a fleet namespace.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a fleet namespace.Deletes a fleet namespace.final OperationCallable<DeleteScopeNamespaceRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a fleet namespace.final OperationCallable<DeleteScopeRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Scope.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Scope RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Scope RBACRoleBinding.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a Scope RBACRoleBinding.Deletes a Scope RBACRoleBinding.final OperationCallable<DeleteScopeRBACRoleBindingRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a Scope RBACRoleBinding.Generates the manifest for deployment of the GKE connect agent.Generates the manifest for deployment of the GKE connect agent.Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.final UnaryCallable<GenerateMembershipRBACRoleBindingYAMLRequest,GenerateMembershipRBACRoleBindingYAMLResponse> Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.final FeaturegetFeature(FeatureName name) Gets details of a single Feature.final FeaturegetFeature(GetFeatureRequest request) Gets details of a single Feature.final FeaturegetFeature(String name) Gets details of a single Feature.Gets details of a single Feature.final FleetReturns the details of a fleet.final FleetgetFleet(GetFleetRequest request) Returns the details of a fleet.final FleetReturns the details of a fleet.final UnaryCallable<GetFleetRequest,Fleet> Returns the details of a fleet.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final MembershipgetMembership(GetMembershipRequest request) Gets the details of a Membership.final MembershipgetMembership(MembershipName name) Gets the details of a Membership.final MembershipgetMembership(String name) Gets the details of a Membership.final MembershipBindingReturns the details of a MembershipBinding.final MembershipBindingReturns the details of a MembershipBinding.final MembershipBindinggetMembershipBinding(String name) Returns the details of a MembershipBinding.Returns the details of a MembershipBinding.Gets the details of a Membership.final RBACRoleBindingReturns the details of a Membership RBACRoleBinding.final RBACRoleBindingReturns the details of a Membership RBACRoleBinding.final RBACRoleBindingReturns the details of a Membership RBACRoleBinding.Returns the details of a Membership RBACRoleBinding.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final ScopegetScope(GetScopeRequest request) Returns the details of a Scope.final ScopeReturns the details of a Scope.final ScopeReturns the details of a Scope.final UnaryCallable<GetScopeRequest,Scope> Returns the details of a Scope.final NamespaceReturns the details of a fleet namespace.final NamespaceReturns the details of a fleet namespace.final NamespacegetScopeNamespace(String name) Returns the details of a fleet namespace.Returns the details of a fleet namespace.final RBACRoleBindingReturns the details of a Scope RBACRoleBinding.final RBACRoleBindingReturns the details of a Scope RBACRoleBinding.final RBACRoleBindingReturns the details of a Scope RBACRoleBinding.Returns the details of a Scope RBACRoleBinding.final GkeHubSettingsgetStub()booleanbooleanLists Memberships bound to a Scope.listBoundMemberships(ScopeName scopeName) Lists Memberships bound to a Scope.listBoundMemberships(String scopeName) Lists Memberships bound to a Scope.Lists Memberships bound to a Scope.Lists Memberships bound to a Scope.listFeatures(ListFeaturesRequest request) Lists Features in a given project and location.listFeatures(LocationName parent) Lists Features in a given project and location.listFeatures(String parent) Lists Features in a given project and location.Lists Features in a given project and location.Lists Features in a given project and location.listFleets(ListFleetsRequest request) Returns all fleets within an organization or a project that the caller has access to.listFleets(LocationName parent) Returns all fleets within an organization or a project that the caller has access to.listFleets(String parent) Returns all fleets within an organization or a project that the caller has access to.Returns all fleets within an organization or a project that the caller has access to.Returns all fleets within an organization or a project that the caller has access to.Lists MembershipBindings.listMembershipBindings(MembershipName parent) Lists MembershipBindings.listMembershipBindings(String parent) Lists MembershipBindings.Lists MembershipBindings.Lists MembershipBindings.Lists all Membership RBACRoleBindings.Lists all Membership RBACRoleBindings.Lists all Membership RBACRoleBindings.listMembershipRBACRoleBindings(String parent) Lists all Membership RBACRoleBindings.Lists all Membership RBACRoleBindings.final UnaryCallable<ListMembershipRBACRoleBindingsRequest,GkeHubClient.ListMembershipRBACRoleBindingsPagedResponse> Lists all Membership RBACRoleBindings.listMemberships(ListMembershipsRequest request) Lists Memberships in a given project and location.listMemberships(LocationName parent) Lists Memberships in a given project and location.listMemberships(String parent) Lists Memberships in a given project and location.Lists Memberships in a given project and location.Lists Memberships in a given project and location.Lists permitted Scopes.listPermittedScopes(LocationName parent) Lists permitted Scopes.listPermittedScopes(String parent) Lists permitted Scopes.Lists permitted Scopes.Lists permitted Scopes.Lists fleet namespaces.listScopeNamespaces(ScopeName parent) Lists fleet namespaces.listScopeNamespaces(String parent) Lists fleet namespaces.Lists fleet namespaces.Lists fleet namespaces.Lists all Scope RBACRoleBindings.Lists all Scope RBACRoleBindings.listScopeRBACRoleBindings(ScopeName parent) Lists all Scope RBACRoleBindings.listScopeRBACRoleBindings(String parent) Lists all Scope RBACRoleBindings.Lists all Scope RBACRoleBindings.final UnaryCallable<ListScopeRBACRoleBindingsRequest,GkeHubClient.ListScopeRBACRoleBindingsPagedResponse> Lists all Scope RBACRoleBindings.listScopes(ListScopesRequest request) Lists Scopes.listScopes(LocationName parent) Lists Scopes.listScopes(String parent) Lists Scopes.Lists Scopes.Lists Scopes.voidshutdown()voidupdateFeatureAsync(FeatureName name, Feature resource, com.google.protobuf.FieldMask updateMask) Updates an existing Feature.updateFeatureAsync(UpdateFeatureRequest request) Updates an existing Feature.updateFeatureAsync(String name, Feature resource, com.google.protobuf.FieldMask updateMask) Updates an existing Feature.Updates an existing Feature.Updates an existing Feature.updateFleetAsync(Fleet fleet, com.google.protobuf.FieldMask updateMask) Updates a fleet.updateFleetAsync(UpdateFleetRequest request) Updates a fleet.Updates a fleet.Updates a fleet.updateMembershipAsync(MembershipName name, Membership resource, com.google.protobuf.FieldMask updateMask) Updates an existing Membership.Updates an existing Membership.updateMembershipAsync(String name, Membership resource, com.google.protobuf.FieldMask updateMask) Updates an existing Membership.updateMembershipBindingAsync(MembershipBinding membershipBinding, com.google.protobuf.FieldMask updateMask) Updates a MembershipBinding.Updates a MembershipBinding.Updates a MembershipBinding.Updates a MembershipBinding.Updates an existing Membership.Updates an existing Membership.updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.FieldMask updateMask) Updates a Membership RBACRoleBinding.Updates a Membership RBACRoleBinding.Updates a Membership RBACRoleBinding.Updates a Membership RBACRoleBinding.updateScopeAsync(Scope scope, com.google.protobuf.FieldMask updateMask) Updates a scopes.updateScopeAsync(UpdateScopeRequest request) Updates a scopes.Updates a scopes.updateScopeNamespaceAsync(Namespace scopeNamespace, com.google.protobuf.FieldMask updateMask) Updates a fleet namespace.Updates a fleet namespace.Updates a fleet namespace.Updates a fleet namespace.Updates a scopes.updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.FieldMask updateMask) Updates a Scope RBACRoleBinding.Updates a Scope RBACRoleBinding.Updates a Scope RBACRoleBinding.Updates a Scope RBACRoleBinding.
-
Constructor Details
-
GkeHubClient
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.- Throws:
IOException
-
GkeHubClient
-
-
Method Details
-
create
Constructs an instance of GkeHubClient with default settings.- Throws:
IOException
-
create
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.- Throws:
IOException
-
create
Constructs an instance of GkeHubClient, using the given stub for making calls. This is for advanced usage - prefer using create(GkeHubSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listMemberships
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); } }- Parameters:
parent- 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.- Throws:
ApiException- if the remote call fails
-
listMemberships
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); } }- Parameters:
parent- 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.- Throws:
ApiException- if the remote call fails
-
listMemberships
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
listBoundMemberships
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); } }- Parameters:
scopeName- Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.- Throws:
ApiException- if the remote call fails
-
listBoundMemberships
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); } }- Parameters:
scopeName- Required. Name of the Scope, in the format `projects/*/locations/global/scopes/*`, to which the Memberships are bound.- Throws:
ApiException- if the remote call fails
-
listBoundMemberships
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
listFeatures
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listFeatures
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listFeatures
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getMembership
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); }- Parameters:
name- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
getMembership
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); }- Parameters:
name- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
getMembership
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
getFeature
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); }- Parameters:
name- Required. The Feature resource name in the format `projects/*/locations/*/features/*`- Throws:
ApiException- if the remote call fails
-
getFeature
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); }- Parameters:
name- Required. The Feature resource name in the format `projects/*/locations/*/features/*`- Throws:
ApiException- if the remote call fails
-
getFeature
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createMembershipAsync
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:
parent- Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.resource- Required. The membership to create.membershipId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createMembershipAsync
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:
parent- Required. The parent (project and location) where the Memberships will be created. Specified in the format `projects/*/locations/*`.resource- Required. The membership to create.membershipId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createMembershipAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMembershipOperationCallable
public final OperationCallable<CreateMembershipRequest,Membership, createMembershipOperationCallable()OperationMetadata> 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(); } -
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(); } -
createFeatureAsync
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:
parent- Required. The parent (project and location) where the Feature will be created. Specified in the format `projects/*/locations/*`.resource- The Feature resource to create.featureId- The ID of the feature to create.- Throws:
ApiException- if the remote call fails
-
createFeatureAsync
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:
parent- Required. The parent (project and location) where the Feature will be created. Specified in the format `projects/*/locations/*`.resource- The Feature resource to create.featureId- The ID of the feature to create.- Throws:
ApiException- if the remote call fails
-
createFeatureAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFeatureOperationCallable
public final OperationCallable<CreateFeatureRequest,Feature, createFeatureOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteMembershipAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMembershipOperationCallable
public final OperationCallable<DeleteMembershipRequest,com.google.protobuf.Empty, deleteMembershipOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Feature resource name in the format `projects/*/locations/*/features/*`.- Throws:
ApiException- if the remote call fails
-
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Feature resource name in the format `projects/*/locations/*/features/*`.- Throws:
ApiException- if the remote call fails
-
deleteFeatureAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFeatureOperationCallable
public final OperationCallable<DeleteFeatureRequest,com.google.protobuf.Empty, deleteFeatureOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateMembershipAsync
public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(MembershipName name, Membership resource, com.google.protobuf.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- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.resource- 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- Required. Mask of fields to update.- Throws:
ApiException- if the remote call fails
-
updateMembershipAsync
public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(String name, Membership resource, com.google.protobuf.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- Required. The Membership resource name in the format `projects/*/locations/*/memberships/*`.resource- 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- Required. Mask of fields to update.- Throws:
ApiException- if the remote call fails
-
updateMembershipAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMembershipOperationCallable
public final OperationCallable<UpdateMembershipRequest,Membership, updateMembershipOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateFeatureAsync
public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(FeatureName name, Feature resource, com.google.protobuf.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- Required. The Feature resource name in the format `projects/*/locations/*/features/*`.resource- 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- Mask of fields to update.- Throws:
ApiException- if the remote call fails
-
updateFeatureAsync
public final OperationFuture<Feature,OperationMetadata> updateFeatureAsync(String name, Feature resource, com.google.protobuf.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- Required. The Feature resource name in the format `projects/*/locations/*/features/*`.resource- 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- Mask of fields to update.- Throws:
ApiException- if the remote call fails
-
updateFeatureAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFeatureOperationCallable
public final OperationCallable<UpdateFeatureRequest,Feature, updateFeatureOperationCallable()OperationMetadata> 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(); } -
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(); } -
generateConnectManifest
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createFleetAsync
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:
parent- Required. The parent (project and location) where the Fleet will be created. Specified in the format `projects/*/locations/*`.fleet- Required. The fleet to create.- Throws:
ApiException- if the remote call fails
-
createFleetAsync
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:
parent- Required. The parent (project and location) where the Fleet will be created. Specified in the format `projects/*/locations/*`.fleet- Required. The fleet to create.- Throws:
ApiException- if the remote call fails
-
createFleetAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createFleetOperationCallable
public final OperationCallable<CreateFleetRequest,Fleet, createFleetOperationCallable()OperationMetadata> 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(); } -
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(); } -
getFleet
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); }- Parameters:
name- Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.- Throws:
ApiException- if the remote call fails
-
getFleet
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); }- Parameters:
name- Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.- Throws:
ApiException- if the remote call fails
-
getFleet
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
updateFleetAsync
public final OperationFuture<Fleet,OperationMetadata> updateFleetAsync(Fleet fleet, com.google.protobuf.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:
fleet- Required. The Fleet to update.The `name` field of the Fleet object identifies which fleet will be updated.
updateMask- Required. The fields to be updated;- Throws:
ApiException- if the remote call fails
-
updateFleetAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateFleetOperationCallable
public final OperationCallable<UpdateFleetRequest,Fleet, updateFleetOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteFleetAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.- Throws:
ApiException- if the remote call fails
-
deleteFleetAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Fleet resource name in the format `projects/*/locations/*/fleets/*`.- Throws:
ApiException- if the remote call fails
-
deleteFleetAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteFleetOperationCallable
public final OperationCallable<DeleteFleetRequest,com.google.protobuf.Empty, deleteFleetOperationCallable()OperationMetadata> 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(); } -
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(); } -
listFleets
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); } }- Parameters:
parent- Required. The organization or project to list for Fleets under, in the format `organizations/*/locations/*` or `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listFleets
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); } }- Parameters:
parent- Required. The organization or project to list for Fleets under, in the format `organizations/*/locations/*` or `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listFleets
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getScopeNamespace
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); }- Parameters:
name- Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.- Throws:
ApiException- if the remote call fails
-
getScopeNamespace
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); }- Parameters:
name- Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.- Throws:
ApiException- if the remote call fails
-
getScopeNamespace
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createScopeNamespaceAsync
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:
parent- Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.scopeNamespace- Required. The fleet namespace to create.scopeNamespaceId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createScopeNamespaceAsync
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:
parent- Required. The parent (project and location) where the Namespace will be created. Specified in the format `projects/*/locations/*/scopes/*`.scopeNamespace- Required. The fleet namespace to create.scopeNamespaceId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createScopeNamespaceAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createScopeNamespaceOperationCallable
public final OperationCallable<CreateScopeNamespaceRequest,Namespace, createScopeNamespaceOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateScopeNamespaceAsync
public final OperationFuture<Namespace,OperationMetadata> updateScopeNamespaceAsync(Namespace scopeNamespace, com.google.protobuf.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:
scopeNamespace- 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_conflictupdateMask- Required. The fields to be updated.- Throws:
ApiException- if the remote call fails
-
updateScopeNamespaceAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateScopeNamespaceOperationCallable
public final OperationCallable<UpdateScopeNamespaceRequest,Namespace, updateScopeNamespaceOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteScopeNamespaceAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeNamespaceAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Namespace resource name in the format `projects/*/locations/*/scopes/*/namespaces/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeNamespaceAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteScopeNamespaceOperationCallable
public final OperationCallable<DeleteScopeNamespaceRequest,com.google.protobuf.Empty, deleteScopeNamespaceOperationCallable()OperationMetadata> 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(); } -
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(); } -
listScopeNamespaces
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
listScopeNamespaces
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
listScopeNamespaces
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getScopeRBACRoleBinding
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); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
getScopeRBACRoleBinding
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); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
getScopeRBACRoleBinding
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createScopeRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createScopeRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createScopeRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/scopes/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createScopeRBACRoleBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createScopeRBACRoleBindingOperationCallable
public final OperationCallable<CreateScopeRBACRoleBindingRequest,RBACRoleBinding, createScopeRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateScopeRBACRoleBindingAsync
public final OperationFuture<RBACRoleBinding,OperationMetadata> updateScopeRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.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:
rbacrolebinding- Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.updateMask- Required. The fields to be updated.- Throws:
ApiException- if the remote call fails
-
updateScopeRBACRoleBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateScopeRBACRoleBindingOperationCallable
public final OperationCallable<UpdateScopeRBACRoleBindingRequest,RBACRoleBinding, updateScopeRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteScopeRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/scopes/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteScopeRBACRoleBindingOperationCallable
public final OperationCallable<DeleteScopeRBACRoleBindingRequest,com.google.protobuf.Empty, deleteScopeRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
listScopeRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
listScopeRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
listScopeRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
listScopeRBACRoleBindings
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getScope
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); }- Parameters:
name- Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
getScope
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); }- Parameters:
name- Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
getScope
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createScopeAsync
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:
parent- Required. The parent (project and location) where the Scope will be created. Specified in the format `projects/*/locations/*`.scope- Required. The Scope to create.scopeId- Required. Client chosen ID for the Scope. `scope_id` must be a ????- Throws:
ApiException- if the remote call fails
-
createScopeAsync
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:
parent- Required. The parent (project and location) where the Scope will be created. Specified in the format `projects/*/locations/*`.scope- Required. The Scope to create.scopeId- Required. Client chosen ID for the Scope. `scope_id` must be a ????- Throws:
ApiException- if the remote call fails
-
createScopeAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createScopeOperationCallable
public final OperationCallable<CreateScopeRequest,Scope, createScopeOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateScopeAsync
public final OperationFuture<Scope,OperationMetadata> updateScopeAsync(Scope scope, com.google.protobuf.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:
scope- Required. A Scope with fields updated. The 'name' field in this namespace is used to identify the resource to update.updateMask- Required. The fields to be updated.- Throws:
ApiException- if the remote call fails
-
updateScopeAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateScopeOperationCallable
public final OperationCallable<UpdateScopeRequest,Scope, updateScopeOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteScopeAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The Scope resource name in the format `projects/*/locations/*/scopes/*`.- Throws:
ApiException- if the remote call fails
-
deleteScopeAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteScopeOperationCallable
public final OperationCallable<DeleteScopeRequest,com.google.protobuf.Empty, deleteScopeOperationCallable()OperationMetadata> 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(); } -
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(); } -
listScopes
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); } }- Parameters:
parent- Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listScopes
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); } }- Parameters:
parent- Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listScopes
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
listPermittedScopes
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); } }- Parameters:
parent- Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listPermittedScopes
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); } }- Parameters:
parent- Required. The parent (project and location) where the Scope will be listed. Specified in the format `projects/*/locations/*`.- Throws:
ApiException- if the remote call fails
-
listPermittedScopes
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getMembershipBinding
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); }- Parameters:
name- Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.- Throws:
ApiException- if the remote call fails
-
getMembershipBinding
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); }- Parameters:
name- Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.- Throws:
ApiException- if the remote call fails
-
getMembershipBinding
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createMembershipBindingAsync
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:
parent- Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.membershipBinding- Required. The MembershipBinding to create.membershipBindingId- Required. The ID to use for the MembershipBinding.- Throws:
ApiException- if the remote call fails
-
createMembershipBindingAsync
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:
parent- Required. The parent (project and location) where the MembershipBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.membershipBinding- Required. The MembershipBinding to create.membershipBindingId- Required. The ID to use for the MembershipBinding.- Throws:
ApiException- if the remote call fails
-
createMembershipBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMembershipBindingOperationCallable
public final OperationCallable<CreateMembershipBindingRequest,MembershipBinding, createMembershipBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateMembershipBindingAsync
public final OperationFuture<MembershipBinding,OperationMetadata> updateMembershipBindingAsync(MembershipBinding membershipBinding, com.google.protobuf.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:
membershipBinding- Required. The MembershipBinding object with fields updated.updateMask- Required. The fields to be updated.- Throws:
ApiException- if the remote call fails
-
updateMembershipBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMembershipBindingOperationCallable
public final OperationCallable<UpdateMembershipBindingRequest,MembershipBinding, updateMembershipBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteMembershipBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The MembershipBinding resource name in the format `projects/*/locations/*/memberships/*/bindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMembershipBindingOperationCallable
public final OperationCallable<DeleteMembershipBindingRequest,com.google.protobuf.Empty, deleteMembershipBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
listMembershipBindings
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); } }- Parameters:
parent- Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
listMembershipBindings
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); } }- Parameters:
parent- Required. The parent Membership for which the MembershipBindings will be listed. Specified in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
listMembershipBindings
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
getMembershipRBACRoleBinding
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); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
getMembershipRBACRoleBinding
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); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
getMembershipRBACRoleBinding
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
createMembershipRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createMembershipRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createMembershipRBACRoleBindingAsync
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:
parent- Required. The parent (project and location) where the RBACRoleBinding will be created. Specified in the format `projects/*/locations/*/memberships/*`.rbacrolebinding- Required. The rbacrolebindings to create.rbacrolebindingId- 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]([-a-z0-9]*[a-z0-9])?`, with a maximum length of 63 characters.
- Throws:
ApiException- if the remote call fails
-
createMembershipRBACRoleBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createMembershipRBACRoleBindingOperationCallable
public final OperationCallable<CreateMembershipRBACRoleBindingRequest,RBACRoleBinding, createMembershipRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
updateMembershipRBACRoleBindingAsync
public final OperationFuture<RBACRoleBinding,OperationMetadata> updateMembershipRBACRoleBindingAsync(RBACRoleBinding rbacrolebinding, com.google.protobuf.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:
rbacrolebinding- Required. A rbacrolebinding with fields updated. The 'name' field in this rbacrolebinding is used to identify the resource to update.updateMask- Required. The fields to be updated.- Throws:
ApiException- if the remote call fails
-
updateMembershipRBACRoleBindingAsync
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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateMembershipRBACRoleBindingOperationCallable
public final OperationCallable<UpdateMembershipRBACRoleBindingRequest,RBACRoleBinding, updateMembershipRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
deleteMembershipRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
name- Required. The RBACRoleBinding resource name in the format `projects/*/locations/*/memberships/*/rbacrolebindings/*`.- Throws:
ApiException- if the remote call fails
-
deleteMembershipRBACRoleBindingAsync
public final OperationFuture<com.google.protobuf.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(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteMembershipRBACRoleBindingOperationCallable
public final OperationCallable<DeleteMembershipRBACRoleBindingRequest,com.google.protobuf.Empty, deleteMembershipRBACRoleBindingOperationCallable()OperationMetadata> 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(); } -
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(); } -
listMembershipRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
listMembershipRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
listMembershipRBACRoleBindings
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); } }- Parameters:
parent- Required. The parent (project and location) where the Features will be listed. Specified in the format `projects/*/locations/*/memberships/*`.- Throws:
ApiException- if the remote call fails
-
listMembershipRBACRoleBindings
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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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); } } -
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; } } } -
generateMembershipRBACRoleBindingYAML
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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
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(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-