- 0.52.0 (latest)
- 0.51.0
- 0.50.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.6
- 0.1.0
GitHub Repository | Product Reference |
Service Description: The AttachedClusters API provides a single centrally managed service to register and manage Anthos attached clusters that run on customer's owned infrastructure.
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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
AttachedClusterName name =
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
}
Note: close() needs to be called on the AttachedClustersClient 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 AttachedClustersSettings 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
AttachedClustersSettings attachedClustersSettings =
AttachedClustersSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AttachedClustersClient attachedClustersClient =
AttachedClustersClient.create(attachedClustersSettings);
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
AttachedClustersSettings attachedClustersSettings =
AttachedClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
AttachedClustersClient attachedClustersClient =
AttachedClustersClient.create(attachedClustersSettings);
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
AttachedClustersSettings attachedClustersSettings =
AttachedClustersSettings.newHttpJsonBuilder().build();
AttachedClustersClient attachedClustersClient =
AttachedClustersClient.create(attachedClustersSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final AttachedClustersClient create()
Constructs an instance of AttachedClustersClient with default settings.
Returns | |
---|---|
Type | Description |
AttachedClustersClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(AttachedClustersSettings settings)
public static final AttachedClustersClient create(AttachedClustersSettings settings)
Constructs an instance of AttachedClustersClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings | AttachedClustersSettings |
Returns | |
---|---|
Type | Description |
AttachedClustersClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(AttachedClustersStub stub)
public static final AttachedClustersClient create(AttachedClustersStub stub)
Constructs an instance of AttachedClustersClient, using the given stub for making calls. This is for advanced usage - prefer using create(AttachedClustersSettings).
Parameter | |
---|---|
Name | Description |
stub | AttachedClustersStub |
Returns | |
---|---|
Type | Description |
AttachedClustersClient |
Constructors
AttachedClustersClient(AttachedClustersSettings settings)
protected AttachedClustersClient(AttachedClustersSettings settings)
Constructs an instance of AttachedClustersClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings | AttachedClustersSettings |
AttachedClustersClient(AttachedClustersStub stub)
protected AttachedClustersClient(AttachedClustersStub stub)
Parameter | |
---|---|
Name | Description |
stub | AttachedClustersStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration | long |
unit | TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
createAttachedClusterAsync(CreateAttachedClusterRequest request)
public final OperationFuture<AttachedCluster,OperationMetadata> createAttachedClusterAsync(CreateAttachedClusterRequest request)
Creates a new AttachedCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
CreateAttachedClusterRequest request =
CreateAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setAttachedClusterId("attachedClusterId865943409")
.setValidateOnly(true)
.build();
AttachedCluster response = attachedClustersClient.createAttachedClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateAttachedClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
createAttachedClusterAsync(LocationName parent, AttachedCluster attachedCluster, String attachedClusterId)
public final OperationFuture<AttachedCluster,OperationMetadata> createAttachedClusterAsync(LocationName parent, AttachedCluster attachedCluster, String attachedClusterId)
Creates a new AttachedCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
String attachedClusterId = "attachedClusterId865943409";
AttachedCluster response =
attachedClustersClient
.createAttachedClusterAsync(parent, attachedCluster, attachedClusterId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
attachedCluster | AttachedCluster Required. The specification of the AttachedCluster to create. |
attachedClusterId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AttachedCluster resource name formatted as
Valid characters are |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
createAttachedClusterAsync(String parent, AttachedCluster attachedCluster, String attachedClusterId)
public final OperationFuture<AttachedCluster,OperationMetadata> createAttachedClusterAsync(String parent, AttachedCluster attachedCluster, String attachedClusterId)
Creates a new AttachedCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
String attachedClusterId = "attachedClusterId865943409";
AttachedCluster response =
attachedClustersClient
.createAttachedClusterAsync(parent, attachedCluster, attachedClusterId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
attachedCluster | AttachedCluster Required. The specification of the AttachedCluster to create. |
attachedClusterId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AttachedCluster resource name formatted as
Valid characters are |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
createAttachedClusterCallable()
public final UnaryCallable<CreateAttachedClusterRequest,Operation> createAttachedClusterCallable()
Creates a new AttachedCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
CreateAttachedClusterRequest request =
CreateAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setAttachedClusterId("attachedClusterId865943409")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
attachedClustersClient.createAttachedClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateAttachedClusterRequest,Operation> |
createAttachedClusterOperationCallable()
public final OperationCallable<CreateAttachedClusterRequest,AttachedCluster,OperationMetadata> createAttachedClusterOperationCallable()
Creates a new AttachedCluster resource on a given Google Cloud Platform project and region.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
CreateAttachedClusterRequest request =
CreateAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setAttachedClusterId("attachedClusterId865943409")
.setValidateOnly(true)
.build();
OperationFuture<AttachedCluster, OperationMetadata> future =
attachedClustersClient.createAttachedClusterOperationCallable().futureCall(request);
// Do something.
AttachedCluster response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateAttachedClusterRequest,AttachedCluster,OperationMetadata> |
deleteAttachedClusterAsync(AttachedClusterName name)
public final OperationFuture<Empty,OperationMetadata> deleteAttachedClusterAsync(AttachedClusterName name)
Deletes a specific AttachedCluster resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
AttachedClusterName name =
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
attachedClustersClient.deleteAttachedClusterAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | AttachedClusterName Required. The resource name the AttachedCluster to delete.
See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAttachedClusterAsync(DeleteAttachedClusterRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAttachedClusterAsync(DeleteAttachedClusterRequest request)
Deletes a specific AttachedCluster resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
DeleteAttachedClusterRequest request =
DeleteAttachedClusterRequest.newBuilder()
.setName(
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setIgnoreErrors(true)
.setEtag("etag3123477")
.build();
attachedClustersClient.deleteAttachedClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteAttachedClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAttachedClusterAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAttachedClusterAsync(String name)
Deletes a specific AttachedCluster resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String name =
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]").toString();
attachedClustersClient.deleteAttachedClusterAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name the AttachedCluster to delete.
See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAttachedClusterCallable()
public final UnaryCallable<DeleteAttachedClusterRequest,Operation> deleteAttachedClusterCallable()
Deletes a specific AttachedCluster resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
DeleteAttachedClusterRequest request =
DeleteAttachedClusterRequest.newBuilder()
.setName(
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setIgnoreErrors(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
attachedClustersClient.deleteAttachedClusterCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteAttachedClusterRequest,Operation> |
deleteAttachedClusterOperationCallable()
public final OperationCallable<DeleteAttachedClusterRequest,Empty,OperationMetadata> deleteAttachedClusterOperationCallable()
Deletes a specific AttachedCluster resource.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
DeleteAttachedClusterRequest request =
DeleteAttachedClusterRequest.newBuilder()
.setName(
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setIgnoreErrors(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
attachedClustersClient.deleteAttachedClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteAttachedClusterRequest,Empty,OperationMetadata> |
generateAttachedClusterInstallManifest(GenerateAttachedClusterInstallManifestRequest request)
public final GenerateAttachedClusterInstallManifestResponse generateAttachedClusterInstallManifest(GenerateAttachedClusterInstallManifestRequest request)
Generates the install manifest to be installed on the target 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GenerateAttachedClusterInstallManifestRequest request =
GenerateAttachedClusterInstallManifestRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAttachedClusterId("attachedClusterId865943409")
.setPlatformVersion("platformVersion1848800485")
.build();
GenerateAttachedClusterInstallManifestResponse response =
attachedClustersClient.generateAttachedClusterInstallManifest(request);
}
Parameter | |
---|---|
Name | Description |
request | GenerateAttachedClusterInstallManifestRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
GenerateAttachedClusterInstallManifestResponse |
generateAttachedClusterInstallManifest(LocationName parent, String attachedClusterId)
public final GenerateAttachedClusterInstallManifestResponse generateAttachedClusterInstallManifest(LocationName parent, String attachedClusterId)
Generates the install manifest to be installed on the target 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
String attachedClusterId = "attachedClusterId865943409";
GenerateAttachedClusterInstallManifestResponse response =
attachedClustersClient.generateAttachedClusterInstallManifest(parent, attachedClusterId);
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
attachedClusterId | String Required. A client provided ID of the resource. Must be unique within the parent resource. The provided ID will be part of the
AttachedCluster resource name formatted as
Valid characters are When generating an install manifest for importing an existing Membership resource, the attached_cluster_id field must be the Membership id. Membership names are formatted as
|
Returns | |
---|---|
Type | Description |
GenerateAttachedClusterInstallManifestResponse |
generateAttachedClusterInstallManifest(String parent, String attachedClusterId)
public final GenerateAttachedClusterInstallManifestResponse generateAttachedClusterInstallManifest(String parent, String attachedClusterId)
Generates the install manifest to be installed on the target 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String attachedClusterId = "attachedClusterId865943409";
GenerateAttachedClusterInstallManifestResponse response =
attachedClustersClient.generateAttachedClusterInstallManifest(parent, attachedClusterId);
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
attachedClusterId | String Required. A client provided ID of the resource. Must be unique within the parent resource. The provided ID will be part of the
AttachedCluster resource name formatted as
Valid characters are When generating an install manifest for importing an existing Membership resource, the attached_cluster_id field must be the Membership id. Membership names are formatted as
|
Returns | |
---|---|
Type | Description |
GenerateAttachedClusterInstallManifestResponse |
generateAttachedClusterInstallManifestCallable()
public final UnaryCallable<GenerateAttachedClusterInstallManifestRequest,GenerateAttachedClusterInstallManifestResponse> generateAttachedClusterInstallManifestCallable()
Generates the install manifest to be installed on the target 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GenerateAttachedClusterInstallManifestRequest request =
GenerateAttachedClusterInstallManifestRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAttachedClusterId("attachedClusterId865943409")
.setPlatformVersion("platformVersion1848800485")
.build();
ApiFuture<GenerateAttachedClusterInstallManifestResponse> future =
attachedClustersClient
.generateAttachedClusterInstallManifestCallable()
.futureCall(request);
// Do something.
GenerateAttachedClusterInstallManifestResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GenerateAttachedClusterInstallManifestRequest,GenerateAttachedClusterInstallManifestResponse> |
getAttachedCluster(AttachedClusterName name)
public final AttachedCluster getAttachedCluster(AttachedClusterName name)
Describes a specific AttachedCluster resource.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
AttachedClusterName name =
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]");
AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
}
Parameter | |
---|---|
Name | Description |
name | AttachedClusterName Required. The name of the AttachedCluster resource to describe.
See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
AttachedCluster |
getAttachedCluster(GetAttachedClusterRequest request)
public final AttachedCluster getAttachedCluster(GetAttachedClusterRequest request)
Describes a specific AttachedCluster resource.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GetAttachedClusterRequest request =
GetAttachedClusterRequest.newBuilder()
.setName(
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
.toString())
.build();
AttachedCluster response = attachedClustersClient.getAttachedCluster(request);
}
Parameter | |
---|---|
Name | Description |
request | GetAttachedClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
AttachedCluster |
getAttachedCluster(String name)
public final AttachedCluster getAttachedCluster(String name)
Describes a specific AttachedCluster resource.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String name =
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]").toString();
AttachedCluster response = attachedClustersClient.getAttachedCluster(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the AttachedCluster resource to describe.
See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
AttachedCluster |
getAttachedClusterCallable()
public final UnaryCallable<GetAttachedClusterRequest,AttachedCluster> getAttachedClusterCallable()
Describes a specific AttachedCluster resource.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GetAttachedClusterRequest request =
GetAttachedClusterRequest.newBuilder()
.setName(
AttachedClusterName.of("[PROJECT]", "[LOCATION]", "[ATTACHED_CLUSTER]")
.toString())
.build();
ApiFuture<AttachedCluster> future =
attachedClustersClient.getAttachedClusterCallable().futureCall(request);
// Do something.
AttachedCluster response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetAttachedClusterRequest,AttachedCluster> |
getAttachedServerConfig(AttachedServerConfigName name)
public final AttachedServerConfig getAttachedServerConfig(AttachedServerConfigName name)
Returns information, such as supported Kubernetes versions, on a given Google Cloud 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
AttachedServerConfigName name = AttachedServerConfigName.of("[PROJECT]", "[LOCATION]");
AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(name);
}
Parameter | |
---|---|
Name | Description |
name | AttachedServerConfigName Required. The name of the AttachedServerConfig resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Returns | |
---|---|
Type | Description |
AttachedServerConfig |
getAttachedServerConfig(GetAttachedServerConfigRequest request)
public final AttachedServerConfig getAttachedServerConfig(GetAttachedServerConfigRequest request)
Returns information, such as supported Kubernetes versions, on a given Google Cloud 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GetAttachedServerConfigRequest request =
GetAttachedServerConfigRequest.newBuilder()
.setName(AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(request);
}
Parameter | |
---|---|
Name | Description |
request | GetAttachedServerConfigRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
AttachedServerConfig |
getAttachedServerConfig(String name)
public final AttachedServerConfig getAttachedServerConfig(String name)
Returns information, such as supported Kubernetes versions, on a given Google Cloud 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String name = AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
AttachedServerConfig response = attachedClustersClient.getAttachedServerConfig(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The name of the AttachedServerConfig resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Returns | |
---|---|
Type | Description |
AttachedServerConfig |
getAttachedServerConfigCallable()
public final UnaryCallable<GetAttachedServerConfigRequest,AttachedServerConfig> getAttachedServerConfigCallable()
Returns information, such as supported Kubernetes versions, on a given Google Cloud 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 (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
GetAttachedServerConfigRequest request =
GetAttachedServerConfigRequest.newBuilder()
.setName(AttachedServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<AttachedServerConfig> future =
attachedClustersClient.getAttachedServerConfigCallable().futureCall(request);
// Do something.
AttachedServerConfig response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetAttachedServerConfigRequest,AttachedServerConfig> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getSettings()
public final AttachedClustersSettings getSettings()
Returns | |
---|---|
Type | Description |
AttachedClustersSettings |
getStub()
public AttachedClustersStub getStub()
Returns | |
---|---|
Type | Description |
AttachedClustersStub |
importAttachedClusterAsync(ImportAttachedClusterRequest request)
public final OperationFuture<AttachedCluster,OperationMetadata> importAttachedClusterAsync(ImportAttachedClusterRequest request)
Imports creates a new AttachedCluster resource by importing an existing Fleet Membership resource.
Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ImportAttachedClusterRequest request =
ImportAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setValidateOnly(true)
.setFleetMembership("fleetMembership-665479228")
.setPlatformVersion("platformVersion1848800485")
.setDistribution("distribution-1580708220")
.build();
AttachedCluster response = attachedClustersClient.importAttachedClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | ImportAttachedClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
importAttachedClusterAsync(LocationName parent, String fleetMembership)
public final OperationFuture<AttachedCluster,OperationMetadata> importAttachedClusterAsync(LocationName parent, String fleetMembership)
Imports creates a new AttachedCluster resource by importing an existing Fleet Membership resource.
Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
String fleetMembership = "fleetMembership-665479228";
AttachedCluster response =
attachedClustersClient.importAttachedClusterAsync(parent, fleetMembership).get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
fleetMembership | String Required. The name of the fleet membership resource to import. |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
importAttachedClusterAsync(String parent, String fleetMembership)
public final OperationFuture<AttachedCluster,OperationMetadata> importAttachedClusterAsync(String parent, String fleetMembership)
Imports creates a new AttachedCluster resource by importing an existing Fleet Membership resource.
Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
String fleetMembership = "fleetMembership-665479228";
AttachedCluster response =
attachedClustersClient.importAttachedClusterAsync(parent, fleetMembership).get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The parent location where this AttachedCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
fleetMembership | String Required. The name of the fleet membership resource to import. |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
importAttachedClusterCallable()
public final UnaryCallable<ImportAttachedClusterRequest,Operation> importAttachedClusterCallable()
Imports creates a new AttachedCluster resource by importing an existing Fleet Membership resource.
Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ImportAttachedClusterRequest request =
ImportAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setValidateOnly(true)
.setFleetMembership("fleetMembership-665479228")
.setPlatformVersion("platformVersion1848800485")
.setDistribution("distribution-1580708220")
.build();
ApiFuture<Operation> future =
attachedClustersClient.importAttachedClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ImportAttachedClusterRequest,Operation> |
importAttachedClusterOperationCallable()
public final OperationCallable<ImportAttachedClusterRequest,AttachedCluster,OperationMetadata> importAttachedClusterOperationCallable()
Imports creates a new AttachedCluster resource by importing an existing Fleet Membership resource.
Attached Clusters created before the introduction of the Anthos Multi-Cloud API can be imported through this method.
If successful, the response contains a newly created Operation resource that can be described to track the status of the operation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ImportAttachedClusterRequest request =
ImportAttachedClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setValidateOnly(true)
.setFleetMembership("fleetMembership-665479228")
.setPlatformVersion("platformVersion1848800485")
.setDistribution("distribution-1580708220")
.build();
OperationFuture<AttachedCluster, OperationMetadata> future =
attachedClustersClient.importAttachedClusterOperationCallable().futureCall(request);
// Do something.
AttachedCluster response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<ImportAttachedClusterRequest,AttachedCluster,OperationMetadata> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listAttachedClusters(ListAttachedClustersRequest request)
public final AttachedClustersClient.ListAttachedClustersPagedResponse listAttachedClusters(ListAttachedClustersRequest request)
Lists all AttachedCluster resources on a given Google Cloud project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ListAttachedClustersRequest request =
ListAttachedClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AttachedCluster element :
attachedClustersClient.listAttachedClusters(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request | ListAttachedClustersRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
AttachedClustersClient.ListAttachedClustersPagedResponse |
listAttachedClusters(LocationName parent)
public final AttachedClustersClient.ListAttachedClustersPagedResponse listAttachedClusters(LocationName parent)
Lists all AttachedCluster resources on a given Google Cloud project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AttachedCluster element :
attachedClustersClient.listAttachedClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | LocationName Required. The parent location which owns this collection of AttachedCluster resources. Location names are formatted as See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
AttachedClustersClient.ListAttachedClustersPagedResponse |
listAttachedClusters(String parent)
public final AttachedClustersClient.ListAttachedClustersPagedResponse listAttachedClusters(String parent)
Lists all AttachedCluster resources on a given Google Cloud project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AttachedCluster element :
attachedClustersClient.listAttachedClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent | String Required. The parent location which owns this collection of AttachedCluster resources. Location names are formatted as See Resource Names for more details on Google Cloud Platform resource names. |
Returns | |
---|---|
Type | Description |
AttachedClustersClient.ListAttachedClustersPagedResponse |
listAttachedClustersCallable()
public final UnaryCallable<ListAttachedClustersRequest,ListAttachedClustersResponse> listAttachedClustersCallable()
Lists all AttachedCluster resources on a given Google Cloud project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ListAttachedClustersRequest request =
ListAttachedClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAttachedClustersResponse response =
attachedClustersClient.listAttachedClustersCallable().call(request);
for (AttachedCluster element : response.getAttachedClustersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListAttachedClustersRequest,ListAttachedClustersResponse> |
listAttachedClustersPagedCallable()
public final UnaryCallable<ListAttachedClustersRequest,AttachedClustersClient.ListAttachedClustersPagedResponse> listAttachedClustersPagedCallable()
Lists all AttachedCluster resources on a given Google Cloud project and region.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
ListAttachedClustersRequest request =
ListAttachedClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AttachedCluster> future =
attachedClustersClient.listAttachedClustersPagedCallable().futureCall(request);
// Do something.
for (AttachedCluster element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListAttachedClustersRequest,ListAttachedClustersPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateAttachedClusterAsync(AttachedCluster attachedCluster, FieldMask updateMask)
public final OperationFuture<AttachedCluster,OperationMetadata> updateAttachedClusterAsync(AttachedCluster attachedCluster, FieldMask updateMask)
Updates an AttachedCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
AttachedCluster attachedCluster = AttachedCluster.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AttachedCluster response =
attachedClustersClient.updateAttachedClusterAsync(attachedCluster, updateMask).get();
}
Parameters | |
---|---|
Name | Description |
attachedCluster | AttachedCluster Required. The AttachedCluster resource to update. |
updateMask | FieldMask Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field can only include these fields from AttachedCluster: * |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
updateAttachedClusterAsync(UpdateAttachedClusterRequest request)
public final OperationFuture<AttachedCluster,OperationMetadata> updateAttachedClusterAsync(UpdateAttachedClusterRequest request)
Updates an AttachedCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
UpdateAttachedClusterRequest request =
UpdateAttachedClusterRequest.newBuilder()
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AttachedCluster response = attachedClustersClient.updateAttachedClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | UpdateAttachedClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<AttachedCluster,OperationMetadata> |
updateAttachedClusterCallable()
public final UnaryCallable<UpdateAttachedClusterRequest,Operation> updateAttachedClusterCallable()
Updates an AttachedCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
UpdateAttachedClusterRequest request =
UpdateAttachedClusterRequest.newBuilder()
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
attachedClustersClient.updateAttachedClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateAttachedClusterRequest,Operation> |
updateAttachedClusterOperationCallable()
public final OperationCallable<UpdateAttachedClusterRequest,AttachedCluster,OperationMetadata> updateAttachedClusterOperationCallable()
Updates an AttachedCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AttachedClustersClient attachedClustersClient = AttachedClustersClient.create()) {
UpdateAttachedClusterRequest request =
UpdateAttachedClusterRequest.newBuilder()
.setAttachedCluster(AttachedCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<AttachedCluster, OperationMetadata> future =
attachedClustersClient.updateAttachedClusterOperationCallable().futureCall(request);
// Do something.
AttachedCluster response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateAttachedClusterRequest,AttachedCluster,OperationMetadata> |