- 0.54.0 (latest)
- 0.53.0
- 0.52.0
- 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
public class AwsClustersClient implements BackgroundResource
Service Description: The AwsClusters API provides a single centrally managed service to create and manage Anthos clusters that run on AWS 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
AwsCluster response = awsClustersClient.getAwsCluster(name);
}
Note: close() needs to be called on the AwsClustersClient 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 AwsClustersSettings 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
AwsClustersSettings awsClustersSettings =
AwsClustersSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
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
AwsClustersSettings awsClustersSettings =
AwsClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
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
AwsClustersSettings awsClustersSettings = AwsClustersSettings.newHttpJsonBuilder().build();
AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final AwsClustersClient create()
Constructs an instance of AwsClustersClient with default settings.
Type | Description |
AwsClustersClient |
Type | Description |
IOException |
create(AwsClustersSettings settings)
public static final AwsClustersClient create(AwsClustersSettings settings)
Constructs an instance of AwsClustersClient, 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 | AwsClustersSettings |
Type | Description |
AwsClustersClient |
Type | Description |
IOException |
create(AwsClustersStub stub)
public static final AwsClustersClient create(AwsClustersStub stub)
Constructs an instance of AwsClustersClient, using the given stub for making calls. This is for advanced usage - prefer using create(AwsClustersSettings).
Name | Description |
stub | AwsClustersStub |
Type | Description |
AwsClustersClient |
Constructors
AwsClustersClient(AwsClustersSettings settings)
protected AwsClustersClient(AwsClustersSettings settings)
Constructs an instance of AwsClustersClient, 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 | AwsClustersSettings |
AwsClustersClient(AwsClustersStub stub)
protected AwsClustersClient(AwsClustersStub stub)
Name | Description |
stub | AwsClustersStub |
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()
createAwsClusterAsync(CreateAwsClusterRequest request)
public final OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(CreateAwsClusterRequest request)
Creates a new AwsCluster resource on a given GCP 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsClusterRequest request =
CreateAwsClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAwsCluster(AwsCluster.newBuilder().build())
.setAwsClusterId("awsClusterId1988965944")
.setValidateOnly(true)
.build();
AwsCluster response = awsClustersClient.createAwsClusterAsync(request).get();
}
Name | Description |
request | CreateAwsClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterAsync(LocationName parent, AwsCluster awsCluster, String awsClusterId)
public final OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(LocationName parent, AwsCluster awsCluster, String awsClusterId)
Creates a new AwsCluster resource on a given GCP 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AwsCluster awsCluster = AwsCluster.newBuilder().build();
String awsClusterId = "awsClusterId1988965944";
AwsCluster response =
awsClustersClient.createAwsClusterAsync(parent, awsCluster, awsClusterId).get();
}
Name | Description |
parent | LocationName Required. The parent location where this AwsCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
awsCluster | AwsCluster Required. The specification of the AwsCluster to create. |
awsClusterId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AwsCluster resource name formatted as
Valid characters are |
Type | Description |
OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterAsync(String parent, AwsCluster awsCluster, String awsClusterId)
public final OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(String parent, AwsCluster awsCluster, String awsClusterId)
Creates a new AwsCluster resource on a given GCP 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AwsCluster awsCluster = AwsCluster.newBuilder().build();
String awsClusterId = "awsClusterId1988965944";
AwsCluster response =
awsClustersClient.createAwsClusterAsync(parent, awsCluster, awsClusterId).get();
}
Name | Description |
parent | String Required. The parent location where this AwsCluster resource will be created. Location names are formatted as See Resource Names for more details on Google Cloud resource names. |
awsCluster | AwsCluster Required. The specification of the AwsCluster to create. |
awsClusterId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AwsCluster resource name formatted as
Valid characters are |
Type | Description |
OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterCallable()
public final UnaryCallable<CreateAwsClusterRequest,Operation> createAwsClusterCallable()
Creates a new AwsCluster resource on a given GCP 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsClusterRequest request =
CreateAwsClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAwsCluster(AwsCluster.newBuilder().build())
.setAwsClusterId("awsClusterId1988965944")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
awsClustersClient.createAwsClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateAwsClusterRequest,Operation> |
createAwsClusterOperationCallable()
public final OperationCallable<CreateAwsClusterRequest,AwsCluster,OperationMetadata> createAwsClusterOperationCallable()
Creates a new AwsCluster resource on a given GCP 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsClusterRequest request =
CreateAwsClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAwsCluster(AwsCluster.newBuilder().build())
.setAwsClusterId("awsClusterId1988965944")
.setValidateOnly(true)
.build();
OperationFuture<AwsCluster, OperationMetadata> future =
awsClustersClient.createAwsClusterOperationCallable().futureCall(request);
// Do something.
AwsCluster response = future.get();
}
Type | Description |
OperationCallable<CreateAwsClusterRequest,AwsCluster,OperationMetadata> |
createAwsNodePoolAsync(AwsClusterName parent, AwsNodePool awsNodePool, String awsNodePoolId)
public final OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(AwsClusterName parent, AwsNodePool awsNodePool, String awsNodePoolId)
Creates a new AwsNodePool, attached to a given AwsCluster.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
String awsNodePoolId = "awsNodePoolId-1885267498";
AwsNodePool response =
awsClustersClient.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get();
}
Name | Description |
parent | AwsClusterName Required. The AwsCluster resource where this node pool will be created.
See Resource Names for more details on Google Cloud resource names. |
awsNodePool | AwsNodePool Required. The specification of the AwsNodePool to create. |
awsNodePoolId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AwsNodePool resource name formatted as
Valid characters are |
Type | Description |
OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolAsync(CreateAwsNodePoolRequest request)
public final OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(CreateAwsNodePoolRequest request)
Creates a new AwsNodePool, attached to a given AwsCluster.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsNodePoolRequest request =
CreateAwsNodePoolRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setAwsNodePoolId("awsNodePoolId-1885267498")
.setValidateOnly(true)
.build();
AwsNodePool response = awsClustersClient.createAwsNodePoolAsync(request).get();
}
Name | Description |
request | CreateAwsNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolAsync(String parent, AwsNodePool awsNodePool, String awsNodePoolId)
public final OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(String parent, AwsNodePool awsNodePool, String awsNodePoolId)
Creates a new AwsNodePool, attached to a given AwsCluster.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
String awsNodePoolId = "awsNodePoolId-1885267498";
AwsNodePool response =
awsClustersClient.createAwsNodePoolAsync(parent, awsNodePool, awsNodePoolId).get();
}
Name | Description |
parent | String Required. The AwsCluster resource where this node pool will be created.
See Resource Names for more details on Google Cloud resource names. |
awsNodePool | AwsNodePool Required. The specification of the AwsNodePool to create. |
awsNodePoolId | String Required. A client provided ID the resource. Must be unique within the parent resource. The provided ID will be part of the
AwsNodePool resource name formatted as
Valid characters are |
Type | Description |
OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolCallable()
public final UnaryCallable<CreateAwsNodePoolRequest,Operation> createAwsNodePoolCallable()
Creates a new AwsNodePool, attached to a given AwsCluster.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsNodePoolRequest request =
CreateAwsNodePoolRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setAwsNodePoolId("awsNodePoolId-1885267498")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
awsClustersClient.createAwsNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateAwsNodePoolRequest,Operation> |
createAwsNodePoolOperationCallable()
public final OperationCallable<CreateAwsNodePoolRequest,AwsNodePool,OperationMetadata> createAwsNodePoolOperationCallable()
Creates a new AwsNodePool, attached to a given AwsCluster.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
CreateAwsNodePoolRequest request =
CreateAwsNodePoolRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setAwsNodePoolId("awsNodePoolId-1885267498")
.setValidateOnly(true)
.build();
OperationFuture<AwsNodePool, OperationMetadata> future =
awsClustersClient.createAwsNodePoolOperationCallable().futureCall(request);
// Do something.
AwsNodePool response = future.get();
}
Type | Description |
OperationCallable<CreateAwsNodePoolRequest,AwsNodePool,OperationMetadata> |
deleteAwsClusterAsync(AwsClusterName name)
public final OperationFuture<Empty,OperationMetadata> deleteAwsClusterAsync(AwsClusterName name)
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
awsClustersClient.deleteAwsClusterAsync(name).get();
}
Name | Description |
name | AwsClusterName Required. The resource name the AwsCluster to delete.
See Resource Names for more details on GCP resource names. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsClusterAsync(DeleteAwsClusterRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAwsClusterAsync(DeleteAwsClusterRequest request)
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsClusterRequest request =
DeleteAwsClusterRequest.newBuilder()
.setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
awsClustersClient.deleteAwsClusterAsync(request).get();
}
Name | Description |
request | DeleteAwsClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsClusterAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAwsClusterAsync(String name)
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
awsClustersClient.deleteAwsClusterAsync(name).get();
}
Name | Description |
name | String Required. The resource name the AwsCluster to delete.
See Resource Names for more details on GCP resource names. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsClusterCallable()
public final UnaryCallable<DeleteAwsClusterRequest,Operation> deleteAwsClusterCallable()
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsClusterRequest request =
DeleteAwsClusterRequest.newBuilder()
.setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
awsClustersClient.deleteAwsClusterCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteAwsClusterRequest,Operation> |
deleteAwsClusterOperationCallable()
public final OperationCallable<DeleteAwsClusterRequest,Empty,OperationMetadata> deleteAwsClusterOperationCallable()
Deletes a specific AwsCluster resource.
Fails if the cluster has one or more associated AwsNodePool resources.
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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsClusterRequest request =
DeleteAwsClusterRequest.newBuilder()
.setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
awsClustersClient.deleteAwsClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteAwsClusterRequest,Empty,OperationMetadata> |
deleteAwsNodePoolAsync(AwsNodePoolName name)
public final OperationFuture<Empty,OperationMetadata> deleteAwsNodePoolAsync(AwsNodePoolName name)
Deletes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsNodePoolName name =
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]");
awsClustersClient.deleteAwsNodePoolAsync(name).get();
}
Name | Description |
name | AwsNodePoolName Required. The resource name the AwsNodePool to delete.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest request)
Deletes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsNodePoolRequest request =
DeleteAwsNodePoolRequest.newBuilder()
.setName(
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
awsClustersClient.deleteAwsNodePoolAsync(request).get();
}
Name | Description |
request | DeleteAwsNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsNodePoolAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteAwsNodePoolAsync(String name)
Deletes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String name =
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString();
awsClustersClient.deleteAwsNodePoolAsync(name).get();
}
Name | Description |
name | String Required. The resource name the AwsNodePool to delete.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteAwsNodePoolCallable()
public final UnaryCallable<DeleteAwsNodePoolRequest,Operation> deleteAwsNodePoolCallable()
Deletes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsNodePoolRequest request =
DeleteAwsNodePoolRequest.newBuilder()
.setName(
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
awsClustersClient.deleteAwsNodePoolCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteAwsNodePoolRequest,Operation> |
deleteAwsNodePoolOperationCallable()
public final OperationCallable<DeleteAwsNodePoolRequest,Empty,OperationMetadata> deleteAwsNodePoolOperationCallable()
Deletes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
DeleteAwsNodePoolRequest request =
DeleteAwsNodePoolRequest.newBuilder()
.setName(
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
awsClustersClient.deleteAwsNodePoolOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteAwsNodePoolRequest,Empty,OperationMetadata> |
generateAwsAccessToken(GenerateAwsAccessTokenRequest request)
public final GenerateAwsAccessTokenResponse generateAwsAccessToken(GenerateAwsAccessTokenRequest request)
Generates a short-lived access token to authenticate to a given AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GenerateAwsAccessTokenRequest request =
GenerateAwsAccessTokenRequest.newBuilder()
.setAwsCluster(
AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.build();
GenerateAwsAccessTokenResponse response = awsClustersClient.generateAwsAccessToken(request);
}
Name | Description |
request | GenerateAwsAccessTokenRequest The request object containing all of the parameters for the API call. |
Type | Description |
GenerateAwsAccessTokenResponse |
generateAwsAccessTokenCallable()
public final UnaryCallable<GenerateAwsAccessTokenRequest,GenerateAwsAccessTokenResponse> generateAwsAccessTokenCallable()
Generates a short-lived access token to authenticate to a given AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GenerateAwsAccessTokenRequest request =
GenerateAwsAccessTokenRequest.newBuilder()
.setAwsCluster(
AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.build();
ApiFuture<GenerateAwsAccessTokenResponse> future =
awsClustersClient.generateAwsAccessTokenCallable().futureCall(request);
// Do something.
GenerateAwsAccessTokenResponse response = future.get();
}
Type | Description |
UnaryCallable<GenerateAwsAccessTokenRequest,GenerateAwsAccessTokenResponse> |
getAwsCluster(AwsClusterName name)
public final AwsCluster getAwsCluster(AwsClusterName name)
Describes a specific AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsClusterName name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
AwsCluster response = awsClustersClient.getAwsCluster(name);
}
Name | Description |
name | AwsClusterName Required. The name of the AwsCluster resource to describe.
See Resource Names for more details on GCP resource names. |
Type | Description |
AwsCluster |
getAwsCluster(GetAwsClusterRequest request)
public final AwsCluster getAwsCluster(GetAwsClusterRequest request)
Describes a specific AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsClusterRequest request =
GetAwsClusterRequest.newBuilder()
.setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.build();
AwsCluster response = awsClustersClient.getAwsCluster(request);
}
Name | Description |
request | GetAwsClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
AwsCluster |
getAwsCluster(String name)
public final AwsCluster getAwsCluster(String name)
Describes a specific AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String name = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
AwsCluster response = awsClustersClient.getAwsCluster(name);
}
Name | Description |
name | String Required. The name of the AwsCluster resource to describe.
See Resource Names for more details on GCP resource names. |
Type | Description |
AwsCluster |
getAwsClusterCallable()
public final UnaryCallable<GetAwsClusterRequest,AwsCluster> getAwsClusterCallable()
Describes a specific AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsClusterRequest request =
GetAwsClusterRequest.newBuilder()
.setName(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.build();
ApiFuture<AwsCluster> future = awsClustersClient.getAwsClusterCallable().futureCall(request);
// Do something.
AwsCluster response = future.get();
}
Type | Description |
UnaryCallable<GetAwsClusterRequest,AwsCluster> |
getAwsNodePool(AwsNodePoolName name)
public final AwsNodePool getAwsNodePool(AwsNodePoolName name)
Describes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsNodePoolName name =
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]");
AwsNodePool response = awsClustersClient.getAwsNodePool(name);
}
Name | Description |
name | AwsNodePoolName Required. The name of the AwsNodePool resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsNodePool |
getAwsNodePool(GetAwsNodePoolRequest request)
public final AwsNodePool getAwsNodePool(GetAwsNodePoolRequest request)
Describes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsNodePoolRequest request =
GetAwsNodePoolRequest.newBuilder()
.setName(
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString())
.build();
AwsNodePool response = awsClustersClient.getAwsNodePool(request);
}
Name | Description |
request | GetAwsNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
AwsNodePool |
getAwsNodePool(String name)
public final AwsNodePool getAwsNodePool(String name)
Describes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String name =
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString();
AwsNodePool response = awsClustersClient.getAwsNodePool(name);
}
Name | Description |
name | String Required. The name of the AwsNodePool resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsNodePool |
getAwsNodePoolCallable()
public final UnaryCallable<GetAwsNodePoolRequest,AwsNodePool> getAwsNodePoolCallable()
Describes a specific AwsNodePool 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsNodePoolRequest request =
GetAwsNodePoolRequest.newBuilder()
.setName(
AwsNodePoolName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]", "[AWS_NODE_POOL]")
.toString())
.build();
ApiFuture<AwsNodePool> future =
awsClustersClient.getAwsNodePoolCallable().futureCall(request);
// Do something.
AwsNodePool response = future.get();
}
Type | Description |
UnaryCallable<GetAwsNodePoolRequest,AwsNodePool> |
getAwsServerConfig(AwsServerConfigName name)
public final AwsServerConfig getAwsServerConfig(AwsServerConfigName name)
Returns information, such as supported AWS regions and 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsServerConfigName name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]");
AwsServerConfig response = awsClustersClient.getAwsServerConfig(name);
}
Name | Description |
name | AwsServerConfigName Required. The name of the AwsServerConfig resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsServerConfig |
getAwsServerConfig(GetAwsServerConfigRequest request)
public final AwsServerConfig getAwsServerConfig(GetAwsServerConfigRequest request)
Returns information, such as supported AWS regions and 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsServerConfigRequest request =
GetAwsServerConfigRequest.newBuilder()
.setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
AwsServerConfig response = awsClustersClient.getAwsServerConfig(request);
}
Name | Description |
request | GetAwsServerConfigRequest The request object containing all of the parameters for the API call. |
Type | Description |
AwsServerConfig |
getAwsServerConfig(String name)
public final AwsServerConfig getAwsServerConfig(String name)
Returns information, such as supported AWS regions and 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String name = AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
AwsServerConfig response = awsClustersClient.getAwsServerConfig(name);
}
Name | Description |
name | String Required. The name of the AwsServerConfig resource to describe.
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsServerConfig |
getAwsServerConfigCallable()
public final UnaryCallable<GetAwsServerConfigRequest,AwsServerConfig> getAwsServerConfigCallable()
Returns information, such as supported AWS regions and 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
GetAwsServerConfigRequest request =
GetAwsServerConfigRequest.newBuilder()
.setName(AwsServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<AwsServerConfig> future =
awsClustersClient.getAwsServerConfigCallable().futureCall(request);
// Do something.
AwsServerConfig response = future.get();
}
Type | Description |
UnaryCallable<GetAwsServerConfigRequest,AwsServerConfig> |
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.
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.
Type | Description |
OperationsClient |
getSettings()
public final AwsClustersSettings getSettings()
Type | Description |
AwsClustersSettings |
getStub()
public AwsClustersStub getStub()
Type | Description |
AwsClustersStub |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listAwsClusters(ListAwsClustersRequest request)
public final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(ListAwsClustersRequest request)
Lists all AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsClustersRequest request =
ListAwsClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AwsCluster element : awsClustersClient.listAwsClusters(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListAwsClustersRequest The request object containing all of the parameters for the API call. |
Type | Description |
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClusters(LocationName parent)
public final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(LocationName parent)
Lists all AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AwsCluster element : awsClustersClient.listAwsClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The parent location which owns this collection of AwsCluster resources. Location names are formatted as See Resource Names for more details on GCP resource names. |
Type | Description |
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClusters(String parent)
public final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(String parent)
Lists all AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AwsCluster element : awsClustersClient.listAwsClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent location which owns this collection of AwsCluster resources. Location names are formatted as See Resource Names for more details on GCP resource names. |
Type | Description |
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClustersCallable()
public final UnaryCallable<ListAwsClustersRequest,ListAwsClustersResponse> listAwsClustersCallable()
Lists all AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsClustersRequest request =
ListAwsClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAwsClustersResponse response =
awsClustersClient.listAwsClustersCallable().call(request);
for (AwsCluster element : response.getAwsClustersList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListAwsClustersRequest,ListAwsClustersResponse> |
listAwsClustersPagedCallable()
public final UnaryCallable<ListAwsClustersRequest,AwsClustersClient.ListAwsClustersPagedResponse> listAwsClustersPagedCallable()
Lists all AwsCluster 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 (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsClustersRequest request =
ListAwsClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AwsCluster> future =
awsClustersClient.listAwsClustersPagedCallable().futureCall(request);
// Do something.
for (AwsCluster element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListAwsClustersRequest,ListAwsClustersPagedResponse> |
listAwsNodePools(AwsClusterName parent)
public final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(AwsClusterName parent)
Lists all AwsNodePool resources on a given AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsClusterName parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]");
for (AwsNodePool element : awsClustersClient.listAwsNodePools(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | AwsClusterName Required. The parent
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePools(ListAwsNodePoolsRequest request)
public final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(ListAwsNodePoolsRequest request)
Lists all AwsNodePool resources on a given AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsNodePoolsRequest request =
ListAwsNodePoolsRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AwsNodePool element : awsClustersClient.listAwsNodePools(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListAwsNodePoolsRequest The request object containing all of the parameters for the API call. |
Type | Description |
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePools(String parent)
public final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(String parent)
Lists all AwsNodePool resources on a given AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
String parent = AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString();
for (AwsNodePool element : awsClustersClient.listAwsNodePools(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The parent
See Resource Names for more details on Google Cloud resource names. |
Type | Description |
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePoolsCallable()
public final UnaryCallable<ListAwsNodePoolsRequest,ListAwsNodePoolsResponse> listAwsNodePoolsCallable()
Lists all AwsNodePool resources on a given AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsNodePoolsRequest request =
ListAwsNodePoolsRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAwsNodePoolsResponse response =
awsClustersClient.listAwsNodePoolsCallable().call(request);
for (AwsNodePool element : response.getAwsNodePoolsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListAwsNodePoolsRequest,ListAwsNodePoolsResponse> |
listAwsNodePoolsPagedCallable()
public final UnaryCallable<ListAwsNodePoolsRequest,AwsClustersClient.ListAwsNodePoolsPagedResponse> listAwsNodePoolsPagedCallable()
Lists all AwsNodePool resources on a given AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
ListAwsNodePoolsRequest request =
ListAwsNodePoolsRequest.newBuilder()
.setParent(AwsClusterName.of("[PROJECT]", "[LOCATION]", "[AWS_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AwsNodePool> future =
awsClustersClient.listAwsNodePoolsPagedCallable().futureCall(request);
// Do something.
for (AwsNodePool element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListAwsNodePoolsRequest,ListAwsNodePoolsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateAwsClusterAsync(AwsCluster awsCluster, FieldMask updateMask)
public final OperationFuture<AwsCluster,OperationMetadata> updateAwsClusterAsync(AwsCluster awsCluster, FieldMask updateMask)
Updates an AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsCluster awsCluster = AwsCluster.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AwsCluster response = awsClustersClient.updateAwsClusterAsync(awsCluster, updateMask).get();
}
Name | Description |
awsCluster | AwsCluster Required. The AwsCluster 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 AwsCluster: * |
Type | Description |
OperationFuture<AwsCluster,OperationMetadata> |
updateAwsClusterAsync(UpdateAwsClusterRequest request)
public final OperationFuture<AwsCluster,OperationMetadata> updateAwsClusterAsync(UpdateAwsClusterRequest request)
Updates an AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsClusterRequest request =
UpdateAwsClusterRequest.newBuilder()
.setAwsCluster(AwsCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AwsCluster response = awsClustersClient.updateAwsClusterAsync(request).get();
}
Name | Description |
request | UpdateAwsClusterRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<AwsCluster,OperationMetadata> |
updateAwsClusterCallable()
public final UnaryCallable<UpdateAwsClusterRequest,Operation> updateAwsClusterCallable()
Updates an AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsClusterRequest request =
UpdateAwsClusterRequest.newBuilder()
.setAwsCluster(AwsCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
awsClustersClient.updateAwsClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateAwsClusterRequest,Operation> |
updateAwsClusterOperationCallable()
public final OperationCallable<UpdateAwsClusterRequest,AwsCluster,OperationMetadata> updateAwsClusterOperationCallable()
Updates an AwsCluster.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsClusterRequest request =
UpdateAwsClusterRequest.newBuilder()
.setAwsCluster(AwsCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<AwsCluster, OperationMetadata> future =
awsClustersClient.updateAwsClusterOperationCallable().futureCall(request);
// Do something.
AwsCluster response = future.get();
}
Type | Description |
OperationCallable<UpdateAwsClusterRequest,AwsCluster,OperationMetadata> |
updateAwsNodePoolAsync(AwsNodePool awsNodePool, FieldMask updateMask)
public final OperationFuture<AwsNodePool,OperationMetadata> updateAwsNodePoolAsync(AwsNodePool awsNodePool, FieldMask updateMask)
Updates an AwsNodePool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
AwsNodePool awsNodePool = AwsNodePool.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AwsNodePool response =
awsClustersClient.updateAwsNodePoolAsync(awsNodePool, updateMask).get();
}
Name | Description |
awsNodePool | AwsNodePool Required. The AwsNodePool 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 AwsNodePool: * |
Type | Description |
OperationFuture<AwsNodePool,OperationMetadata> |
updateAwsNodePoolAsync(UpdateAwsNodePoolRequest request)
public final OperationFuture<AwsNodePool,OperationMetadata> updateAwsNodePoolAsync(UpdateAwsNodePoolRequest request)
Updates an AwsNodePool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsNodePoolRequest request =
UpdateAwsNodePoolRequest.newBuilder()
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AwsNodePool response = awsClustersClient.updateAwsNodePoolAsync(request).get();
}
Name | Description |
request | UpdateAwsNodePoolRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<AwsNodePool,OperationMetadata> |
updateAwsNodePoolCallable()
public final UnaryCallable<UpdateAwsNodePoolRequest,Operation> updateAwsNodePoolCallable()
Updates an AwsNodePool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsNodePoolRequest request =
UpdateAwsNodePoolRequest.newBuilder()
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
awsClustersClient.updateAwsNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<UpdateAwsNodePoolRequest,Operation> |
updateAwsNodePoolOperationCallable()
public final OperationCallable<UpdateAwsNodePoolRequest,AwsNodePool,OperationMetadata> updateAwsNodePoolOperationCallable()
Updates an AwsNodePool.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (AwsClustersClient awsClustersClient = AwsClustersClient.create()) {
UpdateAwsNodePoolRequest request =
UpdateAwsNodePoolRequest.newBuilder()
.setAwsNodePool(AwsNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<AwsNodePool, OperationMetadata> future =
awsClustersClient.updateAwsNodePoolOperationCallable().futureCall(request);
// Do something.
AwsNodePool response = future.get();
}
Type | Description |
OperationCallable<UpdateAwsNodePoolRequest,AwsNodePool,OperationMetadata> |