@Generated(value="by gapic-generator-java") public class AzureClustersClient 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
AzureClient response = azureClustersClient.getAzureClient(name);
}
Note: close() needs to be called on the AzureClustersClient 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 AzureClustersSettings 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
AzureClustersSettings azureClustersSettings =
AzureClustersSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
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
AzureClustersSettings azureClustersSettings =
AzureClustersSettings.newBuilder().setEndpoint(myEndpoint).build();
AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
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
AzureClustersSettings azureClustersSettings =
AzureClustersSettings.newHttpJsonBuilder().build();
AzureClustersClient azureClustersClient = AzureClustersClient.create(azureClustersSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
AzureClustersClient.ListAzureClientsFixedSizeCollection |
static class |
AzureClustersClient.ListAzureClientsPage |
static class |
AzureClustersClient.ListAzureClientsPagedResponse |
static class |
AzureClustersClient.ListAzureClustersFixedSizeCollection |
static class |
AzureClustersClient.ListAzureClustersPage |
static class |
AzureClustersClient.ListAzureClustersPagedResponse |
static class |
AzureClustersClient.ListAzureNodePoolsFixedSizeCollection |
static class |
AzureClustersClient.ListAzureNodePoolsPage |
static class |
AzureClustersClient.ListAzureNodePoolsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
AzureClustersClient(AzureClustersSettings settings)
Constructs an instance of AzureClustersClient, using the given settings.
|
protected |
AzureClustersClient(AzureClustersStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static AzureClustersClient |
create()
Constructs an instance of AzureClustersClient with default settings.
|
static AzureClustersClient |
create(AzureClustersSettings settings)
Constructs an instance of AzureClustersClient, using the given settings.
|
static AzureClustersClient |
create(AzureClustersStub stub)
Constructs an instance of AzureClustersClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<AzureClient,OperationMetadata> |
createAzureClientAsync(CreateAzureClientRequest request)
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
Google Cloud project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureClient,OperationMetadata> |
createAzureClientAsync(LocationName parent,
AzureClient azureClient,
String azureClientId)
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
Google Cloud project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureClient,OperationMetadata> |
createAzureClientAsync(String parent,
AzureClient azureClient,
String azureClientId)
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
Google Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<CreateAzureClientRequest,com.google.longrunning.Operation> |
createAzureClientCallable()
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
Google Cloud project and region.
|
com.google.api.gax.rpc.OperationCallable<CreateAzureClientRequest,AzureClient,OperationMetadata> |
createAzureClientOperationCallable()
Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource on a given
Google Cloud project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> |
createAzureClusterAsync(CreateAzureClusterRequest request)
Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
Google Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> |
createAzureClusterAsync(LocationName parent,
AzureCluster azureCluster,
String azureClusterId)
Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
Google Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> |
createAzureClusterAsync(String parent,
AzureCluster azureCluster,
String azureClusterId)
Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
Google Cloud Platform project and region.
|
com.google.api.gax.rpc.UnaryCallable<CreateAzureClusterRequest,com.google.longrunning.Operation> |
createAzureClusterCallable()
Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
Google Cloud Platform project and region.
|
com.google.api.gax.rpc.OperationCallable<CreateAzureClusterRequest,AzureCluster,OperationMetadata> |
createAzureClusterOperationCallable()
Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource on a given
Google Cloud Platform project and region.
|
com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> |
createAzureNodePoolAsync(AzureClusterName parent,
AzureNodePool azureNodePool,
String azureNodePoolId)
Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> |
createAzureNodePoolAsync(CreateAzureNodePoolRequest request)
Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> |
createAzureNodePoolAsync(String parent,
AzureNodePool azureNodePool,
String azureNodePoolId)
Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.UnaryCallable<CreateAzureNodePoolRequest,com.google.longrunning.Operation> |
createAzureNodePoolCallable()
Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.OperationCallable<CreateAzureNodePoolRequest,AzureNodePool,OperationMetadata> |
createAzureNodePoolOperationCallable()
Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool], attached to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClientAsync(AzureClientName name)
Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClientAsync(DeleteAzureClientRequest request)
Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClientAsync(String name)
Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAzureClientRequest,com.google.longrunning.Operation> |
deleteAzureClientCallable()
Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAzureClientRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClientOperationCallable()
Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClusterAsync(AzureClusterName name)
Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClusterAsync(DeleteAzureClusterRequest request)
Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClusterAsync(String name)
Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAzureClusterRequest,com.google.longrunning.Operation> |
deleteAzureClusterCallable()
Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAzureClusterRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAzureClusterOperationCallable()
Deletes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureNodePoolAsync(AzureNodePoolName name)
Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureNodePoolAsync(DeleteAzureNodePoolRequest request)
Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAzureNodePoolAsync(String name)
Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAzureNodePoolRequest,com.google.longrunning.Operation> |
deleteAzureNodePoolCallable()
Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAzureNodePoolRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAzureNodePoolOperationCallable()
Deletes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
GenerateAzureAccessTokenResponse |
generateAzureAccessToken(GenerateAzureAccessTokenRequest request)
Generates a short-lived access token to authenticate to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<GenerateAzureAccessTokenRequest,GenerateAzureAccessTokenResponse> |
generateAzureAccessTokenCallable()
Generates a short-lived access token to authenticate to a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
AzureClient |
getAzureClient(AzureClientName name)
Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
AzureClient |
getAzureClient(GetAzureClientRequest request)
Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
AzureClient |
getAzureClient(String name)
Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAzureClientRequest,AzureClient> |
getAzureClientCallable()
Describes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.
|
AzureCluster |
getAzureCluster(AzureClusterName name)
Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
AzureCluster |
getAzureCluster(GetAzureClusterRequest request)
Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
AzureCluster |
getAzureCluster(String name)
Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAzureClusterRequest,AzureCluster> |
getAzureClusterCallable()
Describes a specific [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.
|
AzureNodePool |
getAzureNodePool(AzureNodePoolName name)
Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
AzureNodePool |
getAzureNodePool(GetAzureNodePoolRequest request)
Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
AzureNodePool |
getAzureNodePool(String name)
Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAzureNodePoolRequest,AzureNodePool> |
getAzureNodePoolCallable()
Describes a specific [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.
|
AzureServerConfig |
getAzureServerConfig(AzureServerConfigName name)
Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
Cloud location.
|
AzureServerConfig |
getAzureServerConfig(GetAzureServerConfigRequest request)
Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
Cloud location.
|
AzureServerConfig |
getAzureServerConfig(String name)
Returns information, such as supported Azure regions and Kubernetes versions, on a given Google
Cloud location.
|
com.google.api.gax.rpc.UnaryCallable<GetAzureServerConfigRequest,AzureServerConfig> |
getAzureServerConfigCallable()
Returns information, such as supported Azure 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.
|
AzureClustersSettings |
getSettings() |
AzureClustersStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
AzureClustersClient.ListAzureClientsPagedResponse |
listAzureClients(ListAzureClientsRequest request)
Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
Cloud project and region.
|
AzureClustersClient.ListAzureClientsPagedResponse |
listAzureClients(LocationName parent)
Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
Cloud project and region.
|
AzureClustersClient.ListAzureClientsPagedResponse |
listAzureClients(String parent)
Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAzureClientsRequest,ListAzureClientsResponse> |
listAzureClientsCallable()
Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAzureClientsRequest,AzureClustersClient.ListAzureClientsPagedResponse> |
listAzureClientsPagedCallable()
Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resources on a given Google
Cloud project and region.
|
AzureClustersClient.ListAzureClustersPagedResponse |
listAzureClusters(ListAzureClustersRequest request)
Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
Google Cloud project and region.
|
AzureClustersClient.ListAzureClustersPagedResponse |
listAzureClusters(LocationName parent)
Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
Google Cloud project and region.
|
AzureClustersClient.ListAzureClustersPagedResponse |
listAzureClusters(String parent)
Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
Google Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAzureClustersRequest,ListAzureClustersResponse> |
listAzureClustersCallable()
Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
Google Cloud project and region.
|
com.google.api.gax.rpc.UnaryCallable<ListAzureClustersRequest,AzureClustersClient.ListAzureClustersPagedResponse> |
listAzureClustersPagedCallable()
Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resources on a given
Google Cloud project and region.
|
AzureClustersClient.ListAzureNodePoolsPagedResponse |
listAzureNodePools(AzureClusterName parent)
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
AzureClustersClient.ListAzureNodePoolsPagedResponse |
listAzureNodePools(ListAzureNodePoolsRequest request)
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
AzureClustersClient.ListAzureNodePoolsPagedResponse |
listAzureNodePools(String parent)
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.UnaryCallable<ListAzureNodePoolsRequest,ListAzureNodePoolsResponse> |
listAzureNodePoolsCallable()
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.UnaryCallable<ListAzureNodePoolsRequest,AzureClustersClient.ListAzureNodePoolsPagedResponse> |
listAzureNodePoolsPagedCallable()
Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources on a given
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> |
updateAzureClusterAsync(AzureCluster azureCluster,
com.google.protobuf.FieldMask updateMask)
Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> |
updateAzureClusterAsync(UpdateAzureClusterRequest request)
Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.UnaryCallable<UpdateAzureClusterRequest,com.google.longrunning.Operation> |
updateAzureClusterCallable()
Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.rpc.OperationCallable<UpdateAzureClusterRequest,AzureCluster,OperationMetadata> |
updateAzureClusterOperationCallable()
Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].
|
com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> |
updateAzureNodePoolAsync(AzureNodePool azureNodePool,
com.google.protobuf.FieldMask updateMask)
Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
|
com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> |
updateAzureNodePoolAsync(UpdateAzureNodePoolRequest request)
Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
|
com.google.api.gax.rpc.UnaryCallable<UpdateAzureNodePoolRequest,com.google.longrunning.Operation> |
updateAzureNodePoolCallable()
Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
|
com.google.api.gax.rpc.OperationCallable<UpdateAzureNodePoolRequest,AzureNodePool,OperationMetadata> |
updateAzureNodePoolOperationCallable()
Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].
|
protected AzureClustersClient(AzureClustersSettings settings) throws IOException
IOExceptionprotected AzureClustersClient(AzureClustersStub stub)
public static final AzureClustersClient create() throws IOException
IOExceptionpublic static final AzureClustersClient create(AzureClustersSettings settings) throws IOException
IOExceptionpublic static final AzureClustersClient create(AzureClustersStub stub)
public final AzureClustersSettings getSettings()
public AzureClustersStub 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<AzureClient,OperationMetadata> createAzureClientAsync(LocationName parent, AzureClient azureClient, String azureClientId)
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AzureClient azureClient = AzureClient.newBuilder().build();
String azureClientId = "azureClientId-1735934475";
AzureClient response =
azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
}
parent - Required. The parent location where this
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] 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.
azureClient - Required. The specification of the
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.azureClientId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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<AzureClient,OperationMetadata> createAzureClientAsync(String parent, AzureClient azureClient, String azureClientId)
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AzureClient azureClient = AzureClient.newBuilder().build();
String azureClientId = "azureClientId-1735934475";
AzureClient response =
azureClustersClient.createAzureClientAsync(parent, azureClient, azureClientId).get();
}
parent - Required. The parent location where this
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] 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.
azureClient - Required. The specification of the
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to create.azureClientId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource name formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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<AzureClient,OperationMetadata> createAzureClientAsync(CreateAzureClientRequest request)
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClientRequest request =
CreateAzureClientRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureClient(AzureClient.newBuilder().build())
.setAzureClientId("azureClientId-1735934475")
.setValidateOnly(true)
.build();
AzureClient response = azureClustersClient.createAzureClientAsync(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<CreateAzureClientRequest,AzureClient,OperationMetadata> createAzureClientOperationCallable()
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClientRequest request =
CreateAzureClientRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureClient(AzureClient.newBuilder().build())
.setAzureClientId("azureClientId-1735934475")
.setValidateOnly(true)
.build();
OperationFuture<AzureClient, OperationMetadata> future =
azureClustersClient.createAzureClientOperationCallable().futureCall(request);
// Do something.
AzureClient response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAzureClientRequest,com.google.longrunning.Operation> createAzureClientCallable()
`AzureClient` resources hold client authentication information needed by the Anthos Multicloud API to manage Azure resources on your Azure subscription on your behalf.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClientRequest request =
CreateAzureClientRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureClient(AzureClient.newBuilder().build())
.setAzureClientId("azureClientId-1735934475")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
azureClustersClient.createAzureClientCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final AzureClient getAzureClient(AzureClientName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
AzureClient response = azureClustersClient.getAzureClient(name);
}
name - Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
resource to describe.
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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 AzureClient getAzureClient(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
AzureClient response = azureClustersClient.getAzureClient(name);
}
name - Required. The name of the [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]
resource to describe.
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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 AzureClient getAzureClient(GetAzureClientRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureClientRequest request =
GetAzureClientRequest.newBuilder()
.setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
.build();
AzureClient response = azureClustersClient.getAzureClient(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<GetAzureClientRequest,AzureClient> getAzureClientCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureClientRequest request =
GetAzureClientRequest.newBuilder()
.setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
.build();
ApiFuture<AzureClient> future =
azureClustersClient.getAzureClientCallable().futureCall(request);
// Do something.
AzureClient response = future.get();
}
public final AzureClustersClient.ListAzureClientsPagedResponse listAzureClients(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent location which owns this collection of
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] 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 AzureClustersClient.ListAzureClientsPagedResponse listAzureClients(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AzureClient element : azureClustersClient.listAzureClients(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent location which owns this collection of
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] 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 AzureClustersClient.ListAzureClientsPagedResponse listAzureClients(ListAzureClientsRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClientsRequest request =
ListAzureClientsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AzureClient element : azureClustersClient.listAzureClients(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<ListAzureClientsRequest,AzureClustersClient.ListAzureClientsPagedResponse> listAzureClientsPagedCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClientsRequest request =
ListAzureClientsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AzureClient> future =
azureClustersClient.listAzureClientsPagedCallable().futureCall(request);
// Do something.
for (AzureClient element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAzureClientsRequest,ListAzureClientsResponse> listAzureClientsCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClientsRequest request =
ListAzureClientsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAzureClientsResponse response =
azureClustersClient.listAzureClientsCallable().call(request);
for (AzureClient element : response.getAzureClientsList()) {
// 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> deleteAzureClientAsync(AzureClientName name)
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClientName name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]");
azureClustersClient.deleteAzureClientAsync(name).get();
}
name - Required. The resource name the
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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> deleteAzureClientAsync(String name)
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name = AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString();
azureClustersClient.deleteAzureClientAsync(name).get();
}
name - Required. The resource name the
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] to delete.
[AzureClient][google.cloud.gkemulticloud.v1.AzureClient] names are formatted as `projects/<project-id>/locations/<region>/azureClients/<client-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> deleteAzureClientAsync(DeleteAzureClientRequest request)
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClientRequest request =
DeleteAzureClientRequest.newBuilder()
.setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
azureClustersClient.deleteAzureClientAsync(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<DeleteAzureClientRequest,com.google.protobuf.Empty,OperationMetadata> deleteAzureClientOperationCallable()
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClientRequest request =
DeleteAzureClientRequest.newBuilder()
.setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
OperationFuture<Empty, OperationMetadata> future =
azureClustersClient.deleteAzureClientOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAzureClientRequest,com.google.longrunning.Operation> deleteAzureClientCallable()
If the client is used by one or more clusters, deletion will fail and a `FAILED_PRECONDITION` error will be returned.
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClientRequest request =
DeleteAzureClientRequest.newBuilder()
.setName(AzureClientName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLIENT]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
azureClustersClient.deleteAzureClientCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> createAzureClusterAsync(LocationName parent, AzureCluster azureCluster, String azureClusterId)
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
AzureCluster azureCluster = AzureCluster.newBuilder().build();
String azureClusterId = "azureClusterId191689446";
AzureCluster response =
azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
}
parent - Required. The parent location where this
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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.
azureCluster - Required. The specification of the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.azureClusterId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as `projects/<project-id>/locations/<region>/azureClusters/<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<AzureCluster,OperationMetadata> createAzureClusterAsync(String parent, AzureCluster azureCluster, String azureClusterId)
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
AzureCluster azureCluster = AzureCluster.newBuilder().build();
String azureClusterId = "azureClusterId191689446";
AzureCluster response =
azureClustersClient.createAzureClusterAsync(parent, azureCluster, azureClusterId).get();
}
parent - Required. The parent location where this
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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.
azureCluster - Required. The specification of the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to create.azureClusterId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource name formatted as `projects/<project-id>/locations/<region>/azureClusters/<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<AzureCluster,OperationMetadata> createAzureClusterAsync(CreateAzureClusterRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClusterRequest request =
CreateAzureClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureCluster(AzureCluster.newBuilder().build())
.setAzureClusterId("azureClusterId191689446")
.setValidateOnly(true)
.build();
AzureCluster response = azureClustersClient.createAzureClusterAsync(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<CreateAzureClusterRequest,AzureCluster,OperationMetadata> createAzureClusterOperationCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClusterRequest request =
CreateAzureClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureCluster(AzureCluster.newBuilder().build())
.setAzureClusterId("azureClusterId191689446")
.setValidateOnly(true)
.build();
OperationFuture<AzureCluster, OperationMetadata> future =
azureClustersClient.createAzureClusterOperationCallable().futureCall(request);
// Do something.
AzureCluster response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAzureClusterRequest,com.google.longrunning.Operation> createAzureClusterCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureClusterRequest request =
CreateAzureClusterRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setAzureCluster(AzureCluster.newBuilder().build())
.setAzureClusterId("azureClusterId191689446")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
azureClustersClient.createAzureClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> updateAzureClusterAsync(AzureCluster azureCluster, 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureCluster azureCluster = AzureCluster.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AzureCluster response =
azureClustersClient.updateAzureClusterAsync(azureCluster, updateMask).get();
}
azureCluster - Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]
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
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]:
* `description`. * `azureClient`. * `control_plane.version`. * `control_plane.vm_size`. * `annotations`. * `authorization.admin_users`. * `control_plane.root_volume.size_gib`. * `azure_services_authentication`. * `azure_services_authentication.tenant_id`. * `azure_services_authentication.application_id`. * `control_plane.proxy_config`. * `control_plane.proxy_config.resource_group_id`. * `control_plane.proxy_config.secret_id`. * `control_plane.ssh_config.authorized_key`. * `logging_config.component_config.enable_components` * `monitoring_config.managed_prometheus_config.enabled`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AzureCluster,OperationMetadata> updateAzureClusterAsync(UpdateAzureClusterRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureClusterRequest request =
UpdateAzureClusterRequest.newBuilder()
.setAzureCluster(AzureCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AzureCluster response = azureClustersClient.updateAzureClusterAsync(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<UpdateAzureClusterRequest,AzureCluster,OperationMetadata> updateAzureClusterOperationCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureClusterRequest request =
UpdateAzureClusterRequest.newBuilder()
.setAzureCluster(AzureCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<AzureCluster, OperationMetadata> future =
azureClustersClient.updateAzureClusterOperationCallable().futureCall(request);
// Do something.
AzureCluster response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAzureClusterRequest,com.google.longrunning.Operation> updateAzureClusterCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureClusterRequest request =
UpdateAzureClusterRequest.newBuilder()
.setAzureCluster(AzureCluster.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
azureClustersClient.updateAzureClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final AzureCluster getAzureCluster(AzureClusterName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
AzureCluster response = azureClustersClient.getAzureCluster(name);
}
name - Required. The name of the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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 AzureCluster getAzureCluster(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
AzureCluster response = azureClustersClient.getAzureCluster(name);
}
name - Required. The name of the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource to describe.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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 AzureCluster getAzureCluster(GetAzureClusterRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureClusterRequest request =
GetAzureClusterRequest.newBuilder()
.setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.build();
AzureCluster response = azureClustersClient.getAzureCluster(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<GetAzureClusterRequest,AzureCluster> getAzureClusterCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureClusterRequest request =
GetAzureClusterRequest.newBuilder()
.setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.build();
ApiFuture<AzureCluster> future =
azureClustersClient.getAzureClusterCallable().futureCall(request);
// Do something.
AzureCluster response = future.get();
}
public final AzureClustersClient.ListAzureClustersPagedResponse listAzureClusters(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent location which owns this collection of
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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 AzureClustersClient.ListAzureClustersPagedResponse listAzureClusters(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AzureCluster element : azureClustersClient.listAzureClusters(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent location which owns this collection of
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] 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 AzureClustersClient.ListAzureClustersPagedResponse listAzureClusters(ListAzureClustersRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClustersRequest request =
ListAzureClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AzureCluster element : azureClustersClient.listAzureClusters(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<ListAzureClustersRequest,AzureClustersClient.ListAzureClustersPagedResponse> listAzureClustersPagedCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClustersRequest request =
ListAzureClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AzureCluster> future =
azureClustersClient.listAzureClustersPagedCallable().futureCall(request);
// Do something.
for (AzureCluster element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAzureClustersRequest,ListAzureClustersResponse> listAzureClustersCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureClustersRequest request =
ListAzureClustersRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAzureClustersResponse response =
azureClustersClient.listAzureClustersCallable().call(request);
for (AzureCluster element : response.getAzureClustersList()) {
// 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> deleteAzureClusterAsync(AzureClusterName name)
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClusterName name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
azureClustersClient.deleteAzureClusterAsync(name).get();
}
name - Required. The resource name the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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> deleteAzureClusterAsync(String name)
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
azureClustersClient.deleteAzureClusterAsync(name).get();
}
name - Required. The resource name the
[AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] to delete.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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> deleteAzureClusterAsync(DeleteAzureClusterRequest request)
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClusterRequest request =
DeleteAzureClusterRequest.newBuilder()
.setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
azureClustersClient.deleteAzureClusterAsync(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<DeleteAzureClusterRequest,com.google.protobuf.Empty,OperationMetadata> deleteAzureClusterOperationCallable()
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClusterRequest request =
DeleteAzureClusterRequest.newBuilder()
.setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
azureClustersClient.deleteAzureClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAzureClusterRequest,com.google.longrunning.Operation> deleteAzureClusterCallable()
Fails if the cluster has one or more associated [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureClusterRequest request =
DeleteAzureClusterRequest.newBuilder()
.setName(AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAllowMissing(true)
.setValidateOnly(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
azureClustersClient.deleteAzureClusterCallable().futureCall(request);
// Do something.
future.get();
}
public final GenerateAzureAccessTokenResponse generateAzureAccessToken(GenerateAzureAccessTokenRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GenerateAzureAccessTokenRequest request =
GenerateAzureAccessTokenRequest.newBuilder()
.setAzureCluster(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.build();
GenerateAzureAccessTokenResponse response =
azureClustersClient.generateAzureAccessToken(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<GenerateAzureAccessTokenRequest,GenerateAzureAccessTokenResponse> generateAzureAccessTokenCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GenerateAzureAccessTokenRequest request =
GenerateAzureAccessTokenRequest.newBuilder()
.setAzureCluster(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.build();
ApiFuture<GenerateAzureAccessTokenResponse> future =
azureClustersClient.generateAzureAccessTokenCallable().futureCall(request);
// Do something.
GenerateAzureAccessTokenResponse response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> createAzureNodePoolAsync(AzureClusterName parent, AzureNodePool azureNodePool, String azureNodePoolId)
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
String azureNodePoolId = "azureNodePoolId-1766264088";
AzureNodePool response =
azureClustersClient
.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
.get();
}
parent - Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
where this node pool 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.
azureNodePool - Required. The specification of the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.azureNodePoolId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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<AzureNodePool,OperationMetadata> createAzureNodePoolAsync(String parent, AzureNodePool azureNodePool, String azureNodePoolId)
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
String azureNodePoolId = "azureNodePoolId-1766264088";
AzureNodePool response =
azureClustersClient
.createAzureNodePoolAsync(parent, azureNodePool, azureNodePoolId)
.get();
}
parent - Required. The [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource
where this node pool 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.
azureNodePool - Required. The specification of the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to create.azureNodePoolId - Required. A client provided ID the resource. Must be unique within the
parent resource.
The provided ID will be part of the [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource name formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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<AzureNodePool,OperationMetadata> createAzureNodePoolAsync(CreateAzureNodePoolRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureNodePoolRequest request =
CreateAzureNodePoolRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setAzureNodePoolId("azureNodePoolId-1766264088")
.setValidateOnly(true)
.build();
AzureNodePool response = azureClustersClient.createAzureNodePoolAsync(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<CreateAzureNodePoolRequest,AzureNodePool,OperationMetadata> createAzureNodePoolOperationCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureNodePoolRequest request =
CreateAzureNodePoolRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setAzureNodePoolId("azureNodePoolId-1766264088")
.setValidateOnly(true)
.build();
OperationFuture<AzureNodePool, OperationMetadata> future =
azureClustersClient.createAzureNodePoolOperationCallable().futureCall(request);
// Do something.
AzureNodePool response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAzureNodePoolRequest,com.google.longrunning.Operation> createAzureNodePoolCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
CreateAzureNodePoolRequest request =
CreateAzureNodePoolRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setAzureNodePoolId("azureNodePoolId-1766264088")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
azureClustersClient.createAzureNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> updateAzureNodePoolAsync(AzureNodePool azureNodePool, 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureNodePool azureNodePool = AzureNodePool.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AzureNodePool response =
azureClustersClient.updateAzureNodePoolAsync(azureNodePool, updateMask).get();
}
azureNodePool - Required. The [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]
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
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]:
*. `annotations`. * `version`. * `autoscaling.min_node_count`. * `autoscaling.max_node_count`. * `config.ssh_config.authorized_key`.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AzureNodePool,OperationMetadata> updateAzureNodePoolAsync(UpdateAzureNodePoolRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureNodePoolRequest request =
UpdateAzureNodePoolRequest.newBuilder()
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
AzureNodePool response = azureClustersClient.updateAzureNodePoolAsync(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<UpdateAzureNodePoolRequest,AzureNodePool,OperationMetadata> updateAzureNodePoolOperationCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureNodePoolRequest request =
UpdateAzureNodePoolRequest.newBuilder()
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
OperationFuture<AzureNodePool, OperationMetadata> future =
azureClustersClient.updateAzureNodePoolOperationCallable().futureCall(request);
// Do something.
AzureNodePool response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAzureNodePoolRequest,com.google.longrunning.Operation> updateAzureNodePoolCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
UpdateAzureNodePoolRequest request =
UpdateAzureNodePoolRequest.newBuilder()
.setAzureNodePool(AzureNodePool.newBuilder().build())
.setValidateOnly(true)
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Operation> future =
azureClustersClient.updateAzureNodePoolCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final AzureNodePool getAzureNodePool(AzureNodePoolName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureNodePoolName name =
AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
AzureNodePool response = azureClustersClient.getAzureNodePool(name);
}
name - Required. The name of the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
`AzureNodePool` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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 AzureNodePool getAzureNodePool(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name =
AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString();
AzureNodePool response = azureClustersClient.getAzureNodePool(name);
}
name - Required. The name of the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource to describe.
`AzureNodePool` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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 AzureNodePool getAzureNodePool(GetAzureNodePoolRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureNodePoolRequest request =
GetAzureNodePoolRequest.newBuilder()
.setName(
AzureNodePoolName.of(
"[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString())
.build();
AzureNodePool response = azureClustersClient.getAzureNodePool(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<GetAzureNodePoolRequest,AzureNodePool> getAzureNodePoolCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureNodePoolRequest request =
GetAzureNodePoolRequest.newBuilder()
.setName(
AzureNodePoolName.of(
"[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString())
.build();
ApiFuture<AzureNodePool> future =
azureClustersClient.getAzureNodePoolCallable().futureCall(request);
// Do something.
AzureNodePool response = future.get();
}
public final AzureClustersClient.ListAzureNodePoolsPagedResponse listAzureNodePools(AzureClusterName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureClusterName parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]");
for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `AzureCluster` which owns this collection of
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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 AzureClustersClient.ListAzureNodePoolsPagedResponse listAzureNodePools(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String parent = AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString();
for (AzureNodePool element : azureClustersClient.listAzureNodePools(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The parent `AzureCluster` which owns this collection of
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.
`AzureCluster` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<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 AzureClustersClient.ListAzureNodePoolsPagedResponse listAzureNodePools(ListAzureNodePoolsRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureNodePoolsRequest request =
ListAzureNodePoolsRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (AzureNodePool element : azureClustersClient.listAzureNodePools(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<ListAzureNodePoolsRequest,AzureClustersClient.ListAzureNodePoolsPagedResponse> listAzureNodePoolsPagedCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureNodePoolsRequest request =
ListAzureNodePoolsRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<AzureNodePool> future =
azureClustersClient.listAzureNodePoolsPagedCallable().futureCall(request);
// Do something.
for (AzureNodePool element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAzureNodePoolsRequest,ListAzureNodePoolsResponse> listAzureNodePoolsCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
ListAzureNodePoolsRequest request =
ListAzureNodePoolsRequest.newBuilder()
.setParent(
AzureClusterName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListAzureNodePoolsResponse response =
azureClustersClient.listAzureNodePoolsCallable().call(request);
for (AzureNodePool element : response.getAzureNodePoolsList()) {
// 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> deleteAzureNodePoolAsync(AzureNodePoolName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureNodePoolName name =
AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]");
azureClustersClient.deleteAzureNodePoolAsync(name).get();
}
name - Required. The resource name the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
`AzureNodePool` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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> deleteAzureNodePoolAsync(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name =
AzureNodePoolName.of("[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString();
azureClustersClient.deleteAzureNodePoolAsync(name).get();
}
name - Required. The resource name the
[AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] to delete.
`AzureNodePool` names are formatted as `projects/<project-id>/locations/<region>/azureClusters/<cluster-id>/azureNodePools/<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> deleteAzureNodePoolAsync(DeleteAzureNodePoolRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureNodePoolRequest request =
DeleteAzureNodePoolRequest.newBuilder()
.setName(
AzureNodePoolName.of(
"[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
azureClustersClient.deleteAzureNodePoolAsync(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<DeleteAzureNodePoolRequest,com.google.protobuf.Empty,OperationMetadata> deleteAzureNodePoolOperationCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureNodePoolRequest request =
DeleteAzureNodePoolRequest.newBuilder()
.setName(
AzureNodePoolName.of(
"[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
azureClustersClient.deleteAzureNodePoolOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAzureNodePoolRequest,com.google.longrunning.Operation> deleteAzureNodePoolCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
DeleteAzureNodePoolRequest request =
DeleteAzureNodePoolRequest.newBuilder()
.setName(
AzureNodePoolName.of(
"[PROJECT]", "[LOCATION]", "[AZURE_CLUSTER]", "[AZURE_NODE_POOL]")
.toString())
.setValidateOnly(true)
.setAllowMissing(true)
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
azureClustersClient.deleteAzureNodePoolCallable().futureCall(request);
// Do something.
future.get();
}
public final AzureServerConfig getAzureServerConfig(AzureServerConfigName 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
AzureServerConfigName name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]");
AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
}
name - Required. The name of the
[AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
`AzureServerConfig` names are formatted as `projects/<project-id>/locations/<region>/azureServerConfig`.
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 AzureServerConfig getAzureServerConfig(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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
String name = AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString();
AzureServerConfig response = azureClustersClient.getAzureServerConfig(name);
}
name - Required. The name of the
[AzureServerConfig][google.cloud.gkemulticloud.v1.AzureServerConfig] resource to describe.
`AzureServerConfig` names are formatted as `projects/<project-id>/locations/<region>/azureServerConfig`.
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 AzureServerConfig getAzureServerConfig(GetAzureServerConfigRequest 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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureServerConfigRequest request =
GetAzureServerConfigRequest.newBuilder()
.setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
AzureServerConfig response = azureClustersClient.getAzureServerConfig(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<GetAzureServerConfigRequest,AzureServerConfig> getAzureServerConfigCallable()
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 (AzureClustersClient azureClustersClient = AzureClustersClient.create()) {
GetAzureServerConfigRequest request =
GetAzureServerConfigRequest.newBuilder()
.setName(AzureServerConfigName.of("[PROJECT]", "[LOCATION]").toString())
.build();
ApiFuture<AzureServerConfig> future =
azureClustersClient.getAzureServerConfigCallable().futureCall(request);
// Do something.
AzureServerConfig 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.