- 1.53.0 (latest)
- 1.52.0
- 1.51.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.11.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.6
- 1.2.1
- 1.1.0
- 1.0.1
- 0.5.4
public class GkeHubMembershipServiceClient implements BackgroundResource
Service Description: The GKE Hub MembershipService handles the registration of many Kubernetes clusters to Google Cloud, represented with the Membership resource.
GKE Hub is currently only available in the global region.
**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:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String name = "name3373707";
Membership response = gkeHubMembershipServiceClient.getMembership(name);
}
Note: close() needs to be called on the GkeHubMembershipServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns 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 GkeHubMembershipServiceSettings to create(). For example:
To customize credentials:
GkeHubMembershipServiceSettings gkeHubMembershipServiceSettings =
GkeHubMembershipServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create(gkeHubMembershipServiceSettings);
To customize the endpoint:
GkeHubMembershipServiceSettings gkeHubMembershipServiceSettings =
GkeHubMembershipServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create(gkeHubMembershipServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceConstructors
GkeHubMembershipServiceClient(GkeHubMembershipServiceSettings settings)
protected GkeHubMembershipServiceClient(GkeHubMembershipServiceSettings settings)
Constructs an instance of GkeHubMembershipServiceClient, 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.
Name | Description |
settings | GkeHubMembershipServiceSettings |
GkeHubMembershipServiceClient(GkeHubMembershipServiceStub stub)
protected GkeHubMembershipServiceClient(GkeHubMembershipServiceStub stub)
Name | Description |
stub | GkeHubMembershipServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
create()
public static final GkeHubMembershipServiceClient create()
Constructs an instance of GkeHubMembershipServiceClient with default settings.
Type | Description |
GkeHubMembershipServiceClient |
Type | Description |
IOException |
create(GkeHubMembershipServiceSettings settings)
public static final GkeHubMembershipServiceClient create(GkeHubMembershipServiceSettings settings)
Constructs an instance of GkeHubMembershipServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | GkeHubMembershipServiceSettings |
Type | Description |
GkeHubMembershipServiceClient |
Type | Description |
IOException |
create(GkeHubMembershipServiceStub stub)
public static final GkeHubMembershipServiceClient create(GkeHubMembershipServiceStub stub)
Constructs an instance of GkeHubMembershipServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(GkeHubMembershipServiceSettings).
Name | Description |
stub | GkeHubMembershipServiceStub |
Type | Description |
GkeHubMembershipServiceClient |
createMembershipAsync(CreateMembershipRequest request)
public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(CreateMembershipRequest request)
Creates a new Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
CreateMembershipRequest request =
CreateMembershipRequest.newBuilder()
.setParent("parent-995424086")
.setMembershipId("membershipId517665681")
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Membership response = gkeHubMembershipServiceClient.createMembershipAsync(request).get();
}
Name | Description |
request | CreateMembershipRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Membership,OperationMetadata> |
createMembershipAsync(String parent, Membership resource, String membershipId)
public final OperationFuture<Membership,OperationMetadata> createMembershipAsync(String parent, Membership resource, String membershipId)
Creates a new Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String parent = "parent-995424086";
Membership resource = Membership.newBuilder().build();
String membershipId = "membershipId517665681";
Membership response =
gkeHubMembershipServiceClient.createMembershipAsync(parent, resource, membershipId).get();
}
Name | Description |
parent | String Required. The parent (project and location) where the Memberships will be
created. Specified in the format |
resource | Membership Required. The membership to create. |
membershipId | String Required. Client chosen ID for the membership. 1. At most 63 characters in length 2. It must consist of lower case alphanumeric
characters or Which can be expressed as the regex: |
Type | Description |
OperationFuture<Membership,OperationMetadata> |
createMembershipCallable()
public final UnaryCallable<CreateMembershipRequest,Operation> createMembershipCallable()
Creates a new Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
CreateMembershipRequest request =
CreateMembershipRequest.newBuilder()
.setParent("parent-995424086")
.setMembershipId("membershipId517665681")
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
gkeHubMembershipServiceClient.createMembershipCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateMembershipRequest,Operation> |
createMembershipOperationCallable()
public final OperationCallable<CreateMembershipRequest,Membership,OperationMetadata> createMembershipOperationCallable()
Creates a new Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To register other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
CreateMembershipRequest request =
CreateMembershipRequest.newBuilder()
.setParent("parent-995424086")
.setMembershipId("membershipId517665681")
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<CreateMembershipRequest,Membership,OperationMetadata> |
deleteMembershipAsync(DeleteMembershipRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteMembershipAsync(DeleteMembershipRequest request)
Removes a Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
DeleteMembershipRequest request =
DeleteMembershipRequest.newBuilder()
.setName("name3373707")
.setRequestId("requestId693933066")
.build();
gkeHubMembershipServiceClient.deleteMembershipAsync(request).get();
}
Name | Description |
request | DeleteMembershipRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMembershipAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteMembershipAsync(String name)
Removes a Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String name = "name3373707";
gkeHubMembershipServiceClient.deleteMembershipAsync(name).get();
}
Name | Description |
name | String Required. The Membership resource name in the format
|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteMembershipCallable()
public final UnaryCallable<DeleteMembershipRequest,Operation> deleteMembershipCallable()
Removes a Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
DeleteMembershipRequest request =
DeleteMembershipRequest.newBuilder()
.setName("name3373707")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
gkeHubMembershipServiceClient.deleteMembershipCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteMembershipRequest,Operation> |
deleteMembershipOperationCallable()
public final OperationCallable<DeleteMembershipRequest,Empty,OperationMetadata> deleteMembershipOperationCallable()
Removes a Membership.
**This is currently only supported for GKE clusters on Google Cloud**. To unregister other clusters, follow the instructions at https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
DeleteMembershipRequest request =
DeleteMembershipRequest.newBuilder()
.setName("name3373707")
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<DeleteMembershipRequest,Empty,OperationMetadata> |
generateConnectManifest(GenerateConnectManifestRequest request)
public final GenerateConnectManifestResponse generateConnectManifest(GenerateConnectManifestRequest request)
Generates the manifest for deployment of the GKE connect agent.
**This method is used internally by Google-provided libraries.** Most clients should not need to call this method directly.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GenerateConnectManifestRequest request =
GenerateConnectManifestRequest.newBuilder()
.setName("name3373707")
.setConnectAgent(ConnectAgent.newBuilder().build())
.setVersion("version351608024")
.setIsUpgrade(true)
.setRegistry("registry-690212803")
.setImagePullSecretContent(ByteString.EMPTY)
.build();
GenerateConnectManifestResponse response =
gkeHubMembershipServiceClient.generateConnectManifest(request);
}
Name | Description |
request | GenerateConnectManifestRequest The request object containing all of the parameters for the API call. |
Type | Description |
GenerateConnectManifestResponse |
generateConnectManifestCallable()
public final UnaryCallable<GenerateConnectManifestRequest,GenerateConnectManifestResponse> generateConnectManifestCallable()
Generates the manifest for deployment of the GKE connect agent.
**This method is used internally by Google-provided libraries.** Most clients should not need to call this method directly.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GenerateConnectManifestRequest request =
GenerateConnectManifestRequest.newBuilder()
.setName("name3373707")
.setConnectAgent(ConnectAgent.newBuilder().build())
.setVersion("version351608024")
.setIsUpgrade(true)
.setRegistry("registry-690212803")
.setImagePullSecretContent(ByteString.EMPTY)
.build();
ApiFuture
Type | Description |
UnaryCallable<GenerateConnectManifestRequest,GenerateConnectManifestResponse> |
generateExclusivityManifest(GenerateExclusivityManifestRequest request)
public final GenerateExclusivityManifestResponse generateExclusivityManifest(GenerateExclusivityManifestRequest request)
GenerateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed.
Exclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub.
The Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GenerateExclusivityManifestRequest request =
GenerateExclusivityManifestRequest.newBuilder()
.setName("name3373707")
.setCrdManifest("crdManifest1401188132")
.setCrManifest("crManifest-1971077186")
.build();
GenerateExclusivityManifestResponse response =
gkeHubMembershipServiceClient.generateExclusivityManifest(request);
}
Name | Description |
request | GenerateExclusivityManifestRequest The request object containing all of the parameters for the API call. |
Type | Description |
GenerateExclusivityManifestResponse |
generateExclusivityManifestCallable()
public final UnaryCallable<GenerateExclusivityManifestRequest,GenerateExclusivityManifestResponse> generateExclusivityManifestCallable()
GenerateExclusivityManifest generates the manifests to update the exclusivity artifacts in the cluster if needed.
Exclusivity artifacts include the Membership custom resource definition (CRD) and the singleton Membership custom resource (CR). Combined with ValidateExclusivity, exclusivity artifacts guarantee that a Kubernetes cluster is only registered to a single GKE Hub.
The Membership CRD is versioned, and may require conversion when the GKE Hub API server begins serving a newer version of the CRD and corresponding CR. The response will be the converted CRD and CR if there are any differences between the versions.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GenerateExclusivityManifestRequest request =
GenerateExclusivityManifestRequest.newBuilder()
.setName("name3373707")
.setCrdManifest("crdManifest1401188132")
.setCrManifest("crManifest-1971077186")
.build();
ApiFuture
Type | Description |
UnaryCallable<GenerateExclusivityManifestRequest,GenerateExclusivityManifestResponse> |
getMembership(GetMembershipRequest request)
public final Membership getMembership(GetMembershipRequest request)
Gets the details of a Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GetMembershipRequest request =
GetMembershipRequest.newBuilder().setName("name3373707").build();
Membership response = gkeHubMembershipServiceClient.getMembership(request);
}
Name | Description |
request | GetMembershipRequest The request object containing all of the parameters for the API call. |
Type | Description |
Membership |
getMembership(String name)
public final Membership getMembership(String name)
Gets the details of a Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String name = "name3373707";
Membership response = gkeHubMembershipServiceClient.getMembership(name);
}
Name | Description |
name | String Required. The Membership resource name in the format
|
Type | Description |
Membership |
getMembershipCallable()
public final UnaryCallable<GetMembershipRequest,Membership> getMembershipCallable()
Gets the details of a Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
GetMembershipRequest request =
GetMembershipRequest.newBuilder().setName("name3373707").build();
ApiFuture<Membership> future =
gkeHubMembershipServiceClient.getMembershipCallable().futureCall(request);
// Do something.
Membership response = future.get();
}
Type | Description |
UnaryCallable<GetMembershipRequest,Membership> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getSettings()
public final GkeHubMembershipServiceSettings getSettings()
Type | Description |
GkeHubMembershipServiceSettings |
getStub()
public GkeHubMembershipServiceStub getStub()
Type | Description |
GkeHubMembershipServiceStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listMemberships(ListMembershipsRequest request)
public final GkeHubMembershipServiceClient.ListMembershipsPagedResponse listMemberships(ListMembershipsRequest request)
Lists Memberships in a given project and location.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
ListMembershipsRequest request =
ListMembershipsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (Membership element :
gkeHubMembershipServiceClient.listMemberships(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListMembershipsRequest The request object containing all of the parameters for the API call. |
Type | Description |
GkeHubMembershipServiceClient.ListMembershipsPagedResponse |
listMemberships(String parent)
public final GkeHubMembershipServiceClient.ListMembershipsPagedResponse listMemberships(String parent)
Lists Memberships in a given project and location.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String parent = "parent-995424086";
for (Membership element :
gkeHubMembershipServiceClient.listMemberships(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent (project and location) where the Memberships will be listed.
Specified in the format |
Type | Description |
GkeHubMembershipServiceClient.ListMembershipsPagedResponse |
listMembershipsCallable()
public final UnaryCallable<ListMembershipsRequest,ListMembershipsResponse> listMembershipsCallable()
Lists Memberships in a given project and location.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
ListMembershipsRequest request =
ListMembershipsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListMembershipsResponse response =
gkeHubMembershipServiceClient.listMembershipsCallable().call(request);
for (Membership element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListMembershipsRequest,ListMembershipsResponse> |
listMembershipsPagedCallable()
public final UnaryCallable<ListMembershipsRequest,GkeHubMembershipServiceClient.ListMembershipsPagedResponse> listMembershipsPagedCallable()
Lists Memberships in a given project and location.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
ListMembershipsRequest request =
ListMembershipsRequest.newBuilder()
.setParent("parent-995424086")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Membership> future =
gkeHubMembershipServiceClient.listMembershipsPagedCallable().futureCall(request);
// Do something.
for (Membership element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListMembershipsRequest,ListMembershipsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateMembershipAsync(UpdateMembershipRequest request)
public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(UpdateMembershipRequest request)
Updates an existing Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
UpdateMembershipRequest request =
UpdateMembershipRequest.newBuilder()
.setName("name3373707")
.setUpdateMask(FieldMask.newBuilder().build())
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
Membership response = gkeHubMembershipServiceClient.updateMembershipAsync(request).get();
}
Name | Description |
request | UpdateMembershipRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Membership,OperationMetadata> |
updateMembershipAsync(String name, Membership resource, FieldMask updateMask)
public final OperationFuture<Membership,OperationMetadata> updateMembershipAsync(String name, Membership resource, FieldMask updateMask)
Updates an existing Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
String name = "name3373707";
Membership resource = Membership.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Membership response =
gkeHubMembershipServiceClient.updateMembershipAsync(name, resource, updateMask).get();
}
Name | Description |
name | String Required. The membership resource name in the format:
|
resource | Membership Required. Only fields specified in update_mask are updated. If you specify a
field in the update_mask but don't specify its value here that field will be deleted. If
you are updating a map field, set the value of a key to null or empty string to delete the
key from the map. It's not possible to update a key's value to the empty string. If you
specify the update_mask to be a special path "*", fully replaces all user-modifiable
fields to match |
updateMask | FieldMask Required. Mask of fields to update. At least one field path must be specified in this mask. |
Type | Description |
OperationFuture<Membership,OperationMetadata> |
updateMembershipCallable()
public final UnaryCallable<UpdateMembershipRequest,Operation> updateMembershipCallable()
Updates an existing Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
UpdateMembershipRequest request =
UpdateMembershipRequest.newBuilder()
.setName("name3373707")
.setUpdateMask(FieldMask.newBuilder().build())
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
gkeHubMembershipServiceClient.updateMembershipCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateMembershipRequest,Operation> |
updateMembershipOperationCallable()
public final OperationCallable<UpdateMembershipRequest,Membership,OperationMetadata> updateMembershipOperationCallable()
Updates an existing Membership.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
UpdateMembershipRequest request =
UpdateMembershipRequest.newBuilder()
.setName("name3373707")
.setUpdateMask(FieldMask.newBuilder().build())
.setResource(Membership.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture
Type | Description |
OperationCallable<UpdateMembershipRequest,Membership,OperationMetadata> |
validateExclusivity(ValidateExclusivityRequest request)
public final ValidateExclusivityResponse validateExclusivity(ValidateExclusivityRequest request)
ValidateExclusivity validates the state of exclusivity in the cluster. The validation does not depend on an existing Hub membership resource.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
ValidateExclusivityRequest request =
ValidateExclusivityRequest.newBuilder()
.setParent("parent-995424086")
.setCrManifest("crManifest-1971077186")
.setIntendedMembership("intendedMembership-2074920351")
.build();
ValidateExclusivityResponse response =
gkeHubMembershipServiceClient.validateExclusivity(request);
}
Name | Description |
request | ValidateExclusivityRequest The request object containing all of the parameters for the API call. |
Type | Description |
ValidateExclusivityResponse |
validateExclusivityCallable()
public final UnaryCallable<ValidateExclusivityRequest,ValidateExclusivityResponse> validateExclusivityCallable()
ValidateExclusivity validates the state of exclusivity in the cluster. The validation does not depend on an existing Hub membership resource.
Sample code:
try (GkeHubMembershipServiceClient gkeHubMembershipServiceClient =
GkeHubMembershipServiceClient.create()) {
ValidateExclusivityRequest request =
ValidateExclusivityRequest.newBuilder()
.setParent("parent-995424086")
.setCrManifest("crManifest-1971077186")
.setIntendedMembership("intendedMembership-2074920351")
.build();
ApiFuture
Type | Description |
UnaryCallable<ValidateExclusivityRequest,ValidateExclusivityResponse> |