@Generated(value="by gapic-generator-java") public class AwsClustersClient extends Object implements com.google.api.gax.core.BackgroundResource
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:
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
AwsClustersClient.ListAwsClustersFixedSizeCollection |
static class |
AwsClustersClient.ListAwsClustersPage |
static class |
AwsClustersClient.ListAwsClustersPagedResponse |
static class |
AwsClustersClient.ListAwsNodePoolsFixedSizeCollection |
static class |
AwsClustersClient.ListAwsNodePoolsPage |
static class |
AwsClustersClient.ListAwsNodePoolsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
AwsClustersClient(AwsClustersSettings settings)
Constructs an instance of AwsClustersClient, using the given settings.
|
protected |
AwsClustersClient(AwsClustersStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static AwsClustersClient |
create()
Constructs an instance of AwsClustersClient with default settings.
|
static AwsClustersClient |
create(AwsClustersSettings settings)
Constructs an instance of AwsClustersClient, using the given settings.
|
static AwsClustersClient |
create(AwsClustersStub stub)
Constructs an instance of AwsClustersClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterAsync(CreateAwsClusterRequest request)
Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given Google
Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterAsync(LocationName parent,
AwsCluster awsCluster,
String awsClusterId)
Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given Google
Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> |
createAwsClusterAsync(String parent,
AwsCluster awsCluster,
String awsClusterId)
Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given Google
Cloud Platform project and region.
|
com.google.api.gax.rpc.UnaryCallable<CreateAwsClusterRequest,com.google.longrunning.Operation> |
createAwsClusterCallable()
Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given Google
Cloud Platform project and region.
|
com.google.api.gax.rpc.OperationCallable<CreateAwsClusterRequest,AwsCluster,OperationMetadata> |
createAwsClusterOperationCallable()
Creates a new [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource on a given Google
Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolAsync(AwsClusterName parent,
AwsNodePool awsNodePool,
String awsNodePoolId)
Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolAsync(CreateAwsNodePoolRequest request)
Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> |
createAwsNodePoolAsync(String parent,
AwsNodePool awsNodePool,
String awsNodePoolId)
Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.UnaryCallable<CreateAwsNodePoolRequest,com.google.longrunning.Operation> |
createAwsNodePoolCallable()
Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.OperationCallable<CreateAwsNodePoolRequest,AwsNodePool,OperationMetadata> |
createAwsNodePoolOperationCallable()
Creates a new [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool], attached to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsClusterAsync(AwsClusterName name)
Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsClusterAsync(DeleteAwsClusterRequest request)
Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsClusterAsync(String name)
Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAwsClusterRequest,com.google.longrunning.Operation> |
deleteAwsClusterCallable()
Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAwsClusterRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAwsClusterOperationCallable()
Deletes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsNodePoolAsync(AwsNodePoolName name)
Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest request)
Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAwsNodePoolAsync(String name)
Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAwsNodePoolRequest,com.google.longrunning.Operation> |
deleteAwsNodePoolCallable()
Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAwsNodePoolRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAwsNodePoolOperationCallable()
Deletes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
GenerateAwsAccessTokenResponse |
generateAwsAccessToken(GenerateAwsAccessTokenRequest request)
Generates a short-lived access token to authenticate to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<GenerateAwsAccessTokenRequest,GenerateAwsAccessTokenResponse> |
generateAwsAccessTokenCallable()
Generates a short-lived access token to authenticate to a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
AwsCluster |
getAwsCluster(AwsClusterName name)
Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
AwsCluster |
getAwsCluster(GetAwsClusterRequest request)
Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
AwsCluster |
getAwsCluster(String name)
Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAwsClusterRequest,AwsCluster> |
getAwsClusterCallable()
Describes a specific [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource.
|
AwsNodePool |
getAwsNodePool(AwsNodePoolName name)
Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
AwsNodePool |
getAwsNodePool(GetAwsNodePoolRequest request)
Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
AwsNodePool |
getAwsNodePool(String name)
Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAwsNodePoolRequest,AwsNodePool> |
getAwsNodePoolCallable()
Describes a specific [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource.
|
AwsServerConfig |
getAwsServerConfig(AwsServerConfigName name)
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google
Cloud location.
|
AwsServerConfig |
getAwsServerConfig(GetAwsServerConfigRequest request)
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google
Cloud location.
|
AwsServerConfig |
getAwsServerConfig(String name)
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google
Cloud location.
|
com.google.api.gax.rpc.UnaryCallable<GetAwsServerConfigRequest,AwsServerConfig> |
getAwsServerConfigCallable()
Returns information, such as supported AWS regions and Kubernetes versions, on a given Google
Cloud location.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
AwsClustersSettings |
getSettings() |
AwsClustersStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClusters(ListAwsClustersRequest request)
Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google
Cloud project and region.
|
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClusters(LocationName parent)
Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google
Cloud project and region.
|
AwsClustersClient.ListAwsClustersPagedResponse |
listAwsClusters(String parent)
Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google
Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAwsClustersRequest,ListAwsClustersResponse> |
listAwsClustersCallable()
Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google
Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAwsClustersRequest,AwsClustersClient.ListAwsClustersPagedResponse> |
listAwsClustersPagedCallable()
Lists all [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources on a given Google
Cloud project and region.
|
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePools(AwsClusterName parent)
Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePools(ListAwsNodePoolsRequest request)
Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
AwsClustersClient.ListAwsNodePoolsPagedResponse |
listAwsNodePools(String parent)
Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.UnaryCallable<ListAwsNodePoolsRequest,ListAwsNodePoolsResponse> |
listAwsNodePoolsCallable()
Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.UnaryCallable<ListAwsNodePoolsRequest,AwsClustersClient.ListAwsNodePoolsPagedResponse> |
listAwsNodePoolsPagedCallable()
Lists all [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources on a given
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> |
updateAwsClusterAsync(AwsCluster awsCluster,
com.google.protobuf.FieldMask updateMask)
Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> |
updateAwsClusterAsync(UpdateAwsClusterRequest request)
Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.UnaryCallable<UpdateAwsClusterRequest,com.google.longrunning.Operation> |
updateAwsClusterCallable()
Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.rpc.OperationCallable<UpdateAwsClusterRequest,AwsCluster,OperationMetadata> |
updateAwsClusterOperationCallable()
Updates an [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster].
|
com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> |
updateAwsNodePoolAsync(AwsNodePool awsNodePool,
com.google.protobuf.FieldMask updateMask)
Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
|
com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> |
updateAwsNodePoolAsync(UpdateAwsNodePoolRequest request)
Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
|
com.google.api.gax.rpc.UnaryCallable<UpdateAwsNodePoolRequest,com.google.longrunning.Operation> |
updateAwsNodePoolCallable()
Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
|
com.google.api.gax.rpc.OperationCallable<UpdateAwsNodePoolRequest,AwsNodePool,OperationMetadata> |
updateAwsNodePoolOperationCallable()
Updates an [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool].
|
protected AwsClustersClient(AwsClustersSettings settings) throws IOException
IOExceptionprotected AwsClustersClient(AwsClustersStub stub)
public static final AwsClustersClient create() throws IOException
IOExceptionpublic static final AwsClustersClient create(AwsClustersSettings settings) throws IOException
IOExceptionpublic static final AwsClustersClient create(AwsClustersStub stub)
public final AwsClustersSettings getSettings()
public AwsClustersStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(LocationName parent, AwsCluster awsCluster, String awsClusterId)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
parent - Required. The parent location where this
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be created.
Location names are formatted as `projects/<project-id>/locations/<region>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
awsCluster - Required. The specification of the
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.awsClusterId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(String parent, AwsCluster awsCluster, String awsClusterId)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
parent - Required. The parent location where this
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource will be created.
Location names are formatted as `projects/<project-id>/locations/<region>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
awsCluster - Required. The specification of the
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to create.awsClusterId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource name formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> createAwsClusterAsync(CreateAwsClusterRequest request)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAwsClusterRequest,AwsCluster,OperationMetadata> createAwsClusterOperationCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAwsClusterRequest,com.google.longrunning.Operation> createAwsClusterCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> updateAwsClusterAsync(AwsCluster awsCluster, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
awsCluster - Required. The [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resource
to update.updateMask - 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][google.cloud.gkemulticloud.v1.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.size_gib`. * `control_plane.root_volume.volume_type`. * `control_plane.root_volume.iops`. * `control_plane.root_volume.kms_key_arn`. * `control_plane.ssh_config`. * `control_plane.ssh_config.ec2_key_pair`. * `control_plane.instance_placement.tenancy`. * `control_plane.iam_instance_profile`. * `logging_config.component_config.enable_components`. * `control_plane.tags`. * `monitoring_config.managed_prometheus_config.enabled`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsCluster,OperationMetadata> updateAwsClusterAsync(UpdateAwsClusterRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateAwsClusterRequest,AwsCluster,OperationMetadata> updateAwsClusterOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAwsClusterRequest,com.google.longrunning.Operation> updateAwsClusterCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AwsCluster getAwsCluster(AwsClusterName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
resource to describe.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsCluster getAwsCluster(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the [AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster]
resource to describe.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsCluster getAwsCluster(GetAwsClusterRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAwsClusterRequest,AwsCluster> getAwsClusterCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
parent - Required. The parent location which owns this collection of
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
Location names are formatted as `projects/<project-id>/locations/<region>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
parent - Required. The parent location which owns this collection of
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] resources.
Location names are formatted as `projects/<project-id>/locations/<region>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsClustersClient.ListAwsClustersPagedResponse listAwsClusters(ListAwsClustersRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAwsClustersRequest,AwsClustersClient.ListAwsClustersPagedResponse> listAwsClustersPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAwsClustersRequest,ListAwsClustersResponse> listAwsClustersCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsClusterAsync(AwsClusterName name)
Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
If successful, the response contains a newly created [Operation][google.longrunning.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 - Required. The resource name the
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsClusterAsync(String name)
Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
If successful, the response contains a newly created [Operation][google.longrunning.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 - Required. The resource name the
[AwsCluster][google.cloud.gkemulticloud.v1.AwsCluster] to delete.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud Platform resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsClusterAsync(DeleteAwsClusterRequest request)
Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteAwsClusterRequest,com.google.protobuf.Empty,OperationMetadata> deleteAwsClusterOperationCallable()
Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAwsClusterRequest,com.google.longrunning.Operation> deleteAwsClusterCallable()
Fails if the cluster has one or more associated [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final GenerateAwsAccessTokenResponse generateAwsAccessToken(GenerateAwsAccessTokenRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GenerateAwsAccessTokenRequest,GenerateAwsAccessTokenResponse> generateAwsAccessTokenCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(AwsClusterName parent, AwsNodePool awsNodePool, String awsNodePoolId)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
parent - Required. The [AwsCluster][google.cloud.gkemulticloud.v1.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](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
awsNodePool - Required. The specification of the
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.awsNodePoolId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(String parent, AwsNodePool awsNodePool, String awsNodePoolId)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
parent - Required. The [AwsCluster][google.cloud.gkemulticloud.v1.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](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
awsNodePool - Required. The specification of the
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to create.awsNodePoolId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resource name formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
Valid characters are `/[a-z][0-9]-/`. Cannot be longer than 63 characters.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> createAwsNodePoolAsync(CreateAwsNodePoolRequest request)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAwsNodePoolRequest,AwsNodePool,OperationMetadata> createAwsNodePoolOperationCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAwsNodePoolRequest,com.google.longrunning.Operation> createAwsNodePoolCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> updateAwsNodePoolAsync(AwsNodePool awsNodePool, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
awsNodePool - Required. The [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
resource to update.updateMask - 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][google.cloud.gkemulticloud.v1.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`. * `config.instance_placement.tenancy`. * `config.iam_instance_profile`. * `config.labels`. * `config.tags`. * `config.autoscaling_metrics_collection`. * `config.autoscaling_metrics_collection.granularity`. * `config.autoscaling_metrics_collection.metrics`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AwsNodePool,OperationMetadata> updateAwsNodePoolAsync(UpdateAwsNodePoolRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateAwsNodePoolRequest,AwsNodePool,OperationMetadata> updateAwsNodePoolOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAwsNodePoolRequest,com.google.longrunning.Operation> updateAwsNodePoolCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AwsNodePool getAwsNodePool(AwsNodePoolName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
resource to describe.
`AwsNodePool` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsNodePool getAwsNodePool(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the [AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool]
resource to describe.
`AwsNodePool` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsNodePool getAwsNodePool(GetAwsNodePoolRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAwsNodePoolRequest,AwsNodePool> getAwsNodePoolCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(AwsClusterName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
parent - Required. The parent `AwsCluster` which owns this collection of
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
parent - Required. The parent `AwsCluster` which owns this collection of
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] resources.
`AwsCluster` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsClustersClient.ListAwsNodePoolsPagedResponse listAwsNodePools(ListAwsNodePoolsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAwsNodePoolsRequest,AwsClustersClient.ListAwsNodePoolsPagedResponse> listAwsNodePoolsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAwsNodePoolsRequest,ListAwsNodePoolsResponse> listAwsNodePoolsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsNodePoolAsync(AwsNodePoolName name)
If successful, the response contains a newly created [Operation][google.longrunning.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 - Required. The resource name the
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
`AwsNodePool` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsNodePoolAsync(String name)
If successful, the response contains a newly created [Operation][google.longrunning.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 - Required. The resource name the
[AwsNodePool][google.cloud.gkemulticloud.v1.AwsNodePool] to delete.
`AwsNodePool` names are formatted as `projects/<project-id>/locations/<region>/awsClusters/<cluster-id>/awsNodePools/<node-pool-id>`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAwsNodePoolAsync(DeleteAwsNodePoolRequest request)
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteAwsNodePoolRequest,com.google.protobuf.Empty,OperationMetadata> deleteAwsNodePoolOperationCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAwsNodePoolRequest,com.google.longrunning.Operation> deleteAwsNodePoolCallable()
If successful, the response contains a newly created [Operation][google.longrunning.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();
}
public final AwsServerConfig getAwsServerConfig(AwsServerConfigName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the
[AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
`AwsServerConfig` names are formatted as `projects/<project-id>/locations/<region>/awsServerConfig`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsServerConfig getAwsServerConfig(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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 - Required. The name of the
[AwsServerConfig][google.cloud.gkemulticloud.v1.AwsServerConfig] resource to describe.
`AwsServerConfig` names are formatted as `projects/<project-id>/locations/<region>/awsServerConfig`.
See [Resource Names](https://cloud.google.com/apis/design/resource_names) for more details on Google Cloud resource names.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final AwsServerConfig getAwsServerConfig(GetAwsServerConfigRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAwsServerConfigRequest,AwsServerConfig> getAwsServerConfigCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2023 Google LLC. All rights reserved.