Class AwsClustersClient (0.2.6)

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:

  1. 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.
  2. 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.
  3. 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.newBuilder()
         .setTransportChannelProvider(
             AwsClustersSettings.defaultHttpJsonTransportProviderBuilder().build())
         .build();
 AwsClustersClient awsClustersClient = AwsClustersClient.create(awsClustersSettings);
 

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

Inheritance

java.lang.Object > AwsClustersClient

Implements

BackgroundResource

Static Methods

create()

public static final AwsClustersClient create()

Constructs an instance of AwsClustersClient with default settings.

Returns
TypeDescription
AwsClustersClient
Exceptions
TypeDescription
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.

Parameter
NameDescription
settingsAwsClustersSettings
Returns
TypeDescription
AwsClustersClient
Exceptions
TypeDescription
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).

Parameter
NameDescription
stubAwsClustersStub
Returns
TypeDescription
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.

Parameter
NameDescription
settingsAwsClustersSettings

AwsClustersClient(AwsClustersStub stub)

protected AwsClustersClient(AwsClustersStub stub)
Parameter
NameDescription
stubAwsClustersStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
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();
 }
 
Parameter
NameDescription
requestCreateAwsClusterRequest

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

Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
parentLocationName

Required. The parent location where this AwsCluster resource will be created.

Location names are formatted as projects/<project-id>/locations/<region>.

See Resource Names for more details on Google Cloud resource names.

awsClusterAwsCluster

Required. The specification of the AwsCluster to create.

awsClusterIdString

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 projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

Valid characters are /a-z-/. Cannot be longer than 40 characters.

Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
parentString

Required. The parent location where this AwsCluster resource will be created.

Location names are formatted as projects/<project-id>/locations/<region>.

See Resource Names for more details on Google Cloud resource names.

awsClusterAwsCluster

Required. The specification of the AwsCluster to create.

awsClusterIdString

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 projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

Valid characters are /a-z-/. Cannot be longer than 40 characters.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
parentAwsClusterName

Required. The AwsCluster resource where this node pool will be created.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on Google Cloud resource names.

awsNodePoolAwsNodePool

Required. The specification of the AwsNodePool to create.

awsNodePoolIdString

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 projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

Valid characters are /a-z-/. Cannot be longer than 40 characters.

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
requestCreateAwsNodePoolRequest

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

Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
parentString

Required. The AwsCluster resource where this node pool will be created.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on Google Cloud resource names.

awsNodePoolAwsNodePool

Required. The specification of the AwsNodePool to create.

awsNodePoolIdString

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 projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

Valid characters are /a-z-/. Cannot be longer than 40 characters.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
nameAwsClusterName

Required. The resource name the AwsCluster to delete.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
requestDeleteAwsClusterRequest

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

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
nameString

Required. The resource name the AwsCluster to delete.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
nameAwsNodePoolName

Required. The resource name the AwsNodePool to delete.

AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
requestDeleteAwsNodePoolRequest

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

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
nameString

Required. The resource name the AwsNodePool to delete.

AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
requestGenerateAwsAccessTokenRequest

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

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameAwsClusterName

Required. The name of the AwsCluster resource to describe.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
requestGetAwsClusterRequest

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

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the AwsCluster resource to describe.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameAwsNodePoolName

Required. The name of the AwsNodePool resource to describe.

AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
requestGetAwsNodePoolRequest

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

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the AwsNodePool resource to describe.

AwsNodePool names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameAwsServerConfigName

Required. The name of the AwsServerConfig resource to describe.

AwsServerConfig names are formatted as projects/<project-id>/locations/<region>/awsServerConfig.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
requestGetAwsServerConfigRequest

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

Returns
TypeDescription
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);
 }
 
Parameter
NameDescription
nameString

Required. The name of the AwsServerConfig resource to describe.

AwsServerConfig names are formatted as projects/<project-id>/locations/<region>/awsServerConfig.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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.

Returns
TypeDescription
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
TypeDescription
OperationsClient

getSettings()

public final AwsClustersSettings getSettings()
Returns
TypeDescription
AwsClustersSettings

getStub()

public AwsClustersStub getStub()
Returns
TypeDescription
AwsClustersStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
requestListAwsClustersRequest

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

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The parent location which owns this collection of AwsCluster resources.

Location names are formatted as projects/<project-id>/locations/<region>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent location which owns this collection of AwsCluster resources.

Location names are formatted as projects/<project-id>/locations/<region>.

See Resource Names for more details on GCP resource names.

Returns
TypeDescription
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;
     }
   }
 }
 
Returns
TypeDescription
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);
   }
 }
 
Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentAwsClusterName

Required. The parent AwsCluster which owns this collection of AwsNodePool resources.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
requestListAwsNodePoolsRequest

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

Returns
TypeDescription
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);
   }
 }
 
Parameter
NameDescription
parentString

Required. The parent AwsCluster which owns this collection of AwsNodePool resources.

AwsCluster names are formatted as projects/<project-id>/locations/<region>/awsClusters/<cluster-id>.

See Resource Names for more details on Google Cloud resource names.

Returns
TypeDescription
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;
     }
   }
 }
 
Returns
TypeDescription
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);
   }
 }
 
Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
awsClusterAwsCluster

Required. The AwsCluster resource to update.

updateMaskFieldMask

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:

* description. * annotations. * control_plane.version. * authorization.admin_users. * control_plane.aws_services_authentication.role_arn. * control_plane.aws_services_authentication.role_session_name. * control_plane.config_encryption.kms_key_arn. * control_plane.instance_type. * control_plane.security_group_ids. * control_plane.proxy_config. * control_plane.proxy_config.secret_arn. * control_plane.proxy_config.secret_version. * control_plane.root_volume.iops. * control_plane.root_volume.kms_key_arn. * control_plane.root_volume.volume_type. * control_plane.root_volume.size_gib. * control_plane.ssh_config. * control_plane.ssh_config.ec2_key_pair. * control_plane.instance_placement.tenancy. * logging_config.

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
requestUpdateAwsClusterRequest

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

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Parameters
NameDescription
awsNodePoolAwsNodePool

Required. The AwsNodePool resource to update.

updateMaskFieldMask

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:

* annotations. * version. * autoscaling.min_node_count. * autoscaling.max_node_count. * config.config_encryption.kms_key_arn. * config.security_group_ids. * config.root_volume.iops. * config.root_volume.kms_key_arn. * config.root_volume.volume_type. * config.root_volume.size_gib. * config.proxy_config. * config.proxy_config.secret_arn. * config.proxy_config.secret_version. * config.ssh_config. * config.ssh_config.ec2_key_pair.

Returns
TypeDescription
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();
 }
 
Parameter
NameDescription
requestUpdateAwsNodePoolRequest

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

Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
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();
 }
 
Returns
TypeDescription
OperationCallable<UpdateAwsNodePoolRequest,AwsNodePool,OperationMetadata>