public class VmwareEngineClient implements BackgroundResource
Service Description: VMwareEngine manages VMware's private clusters in the Cloud.
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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
PrivateCloud response = vmwareEngineClient.getPrivateCloud(name);
}
Note: close() needs to be called on the VmwareEngineClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of VmwareEngineSettings 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
VmwareEngineSettings vmwareEngineSettings =
VmwareEngineSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings);
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
VmwareEngineSettings vmwareEngineSettings =
VmwareEngineSettings.newBuilder().setEndpoint(myEndpoint).build();
VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings);
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
VmwareEngineSettings vmwareEngineSettings = VmwareEngineSettings.newHttpJsonBuilder().build();
VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create(vmwareEngineSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final VmwareEngineClient create()
Constructs an instance of VmwareEngineClient with default settings.
Returns | |
---|---|
Type | Description |
VmwareEngineClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(VmwareEngineSettings settings)
public static final VmwareEngineClient create(VmwareEngineSettings settings)
Constructs an instance of VmwareEngineClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings | VmwareEngineSettings |
Returns | |
---|---|
Type | Description |
VmwareEngineClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(VmwareEngineStub stub)
public static final VmwareEngineClient create(VmwareEngineStub stub)
Constructs an instance of VmwareEngineClient, using the given stub for making calls. This is for advanced usage - prefer using create(VmwareEngineSettings).
Parameter | |
---|---|
Name | Description |
stub | VmwareEngineStub |
Returns | |
---|---|
Type | Description |
VmwareEngineClient |
Constructors
VmwareEngineClient(VmwareEngineSettings settings)
protected VmwareEngineClient(VmwareEngineSettings settings)
Constructs an instance of VmwareEngineClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings | VmwareEngineSettings |
VmwareEngineClient(VmwareEngineStub stub)
protected VmwareEngineClient(VmwareEngineStub stub)
Parameter | |
---|---|
Name | Description |
stub | VmwareEngineStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration | long |
unit | TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
close()
public final void close()
createClusterAsync(CreateClusterRequest request)
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(CreateClusterRequest request)
Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
Cluster response = vmwareEngineClient.createClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Cluster,OperationMetadata> |
createClusterAsync(PrivateCloudName parent, Cluster cluster, String clusterId)
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(PrivateCloudName parent, Cluster cluster, String clusterId)
Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
Cluster cluster = Cluster.newBuilder().build();
String clusterId = "clusterId561939637";
Cluster response = vmwareEngineClient.createClusterAsync(parent, cluster, clusterId).get();
}
Parameters | |
---|---|
Name | Description |
parent | PrivateCloudName Required. The resource name of the private cloud to create a new cluster in.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
cluster | Cluster Required. The initial description of the new cluster. |
clusterId | String Required. The user-provided identifier of the new
|
Returns | |
---|---|
Type | Description |
OperationFuture<Cluster,OperationMetadata> |
createClusterAsync(String parent, Cluster cluster, String clusterId)
public final OperationFuture<Cluster,OperationMetadata> createClusterAsync(String parent, Cluster cluster, String clusterId)
Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
Cluster cluster = Cluster.newBuilder().build();
String clusterId = "clusterId561939637";
Cluster response = vmwareEngineClient.createClusterAsync(parent, cluster, clusterId).get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the private cloud to create a new cluster in.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
cluster | Cluster Required. The initial description of the new cluster. |
clusterId | String Required. The user-provided identifier of the new
|
Returns | |
---|---|
Type | Description |
OperationFuture<Cluster,OperationMetadata> |
createClusterCallable()
public final UnaryCallable<CreateClusterRequest,Operation> createClusterCallable()
Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future = vmwareEngineClient.createClusterCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateClusterRequest,Operation> |
createClusterOperationCallable()
public final OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> createClusterOperationCallable()
Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient node quota.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateClusterRequest request =
CreateClusterRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setClusterId("clusterId561939637")
.setCluster(Cluster.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<Cluster, OperationMetadata> future =
vmwareEngineClient.createClusterOperationCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateClusterRequest,Cluster,OperationMetadata> |
createHcxActivationKeyAsync(CreateHcxActivationKeyRequest request)
public final OperationFuture<HcxActivationKey,OperationMetadata> createHcxActivationKeyAsync(CreateHcxActivationKeyRequest request)
Creates a new HCX activation key in a given private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateHcxActivationKeyRequest request =
CreateHcxActivationKeyRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setHcxActivationKey(HcxActivationKey.newBuilder().build())
.setHcxActivationKeyId("hcxActivationKeyId-645871673")
.setRequestId("requestId693933066")
.build();
HcxActivationKey response = vmwareEngineClient.createHcxActivationKeyAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateHcxActivationKeyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<HcxActivationKey,OperationMetadata> |
createHcxActivationKeyAsync(PrivateCloudName parent, HcxActivationKey hcxActivationKey, String hcxActivationKeyId)
public final OperationFuture<HcxActivationKey,OperationMetadata> createHcxActivationKeyAsync(PrivateCloudName parent, HcxActivationKey hcxActivationKey, String hcxActivationKeyId)
Creates a new HCX activation key in a given private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateCloudName parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
HcxActivationKey hcxActivationKey = HcxActivationKey.newBuilder().build();
String hcxActivationKeyId = "hcxActivationKeyId-645871673";
HcxActivationKey response =
vmwareEngineClient
.createHcxActivationKeyAsync(parent, hcxActivationKey, hcxActivationKeyId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | PrivateCloudName Required. The resource name of the private cloud to create the key for. Resource
names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
hcxActivationKey | HcxActivationKey Required. The initial description of a new HCX activation key. When creating a new key, this field must be an empty object. |
hcxActivationKeyId | String Required. The user-provided identifier of the
|
Returns | |
---|---|
Type | Description |
OperationFuture<HcxActivationKey,OperationMetadata> |
createHcxActivationKeyAsync(String parent, HcxActivationKey hcxActivationKey, String hcxActivationKeyId)
public final OperationFuture<HcxActivationKey,OperationMetadata> createHcxActivationKeyAsync(String parent, HcxActivationKey hcxActivationKey, String hcxActivationKeyId)
Creates a new HCX activation key in a given private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
HcxActivationKey hcxActivationKey = HcxActivationKey.newBuilder().build();
String hcxActivationKeyId = "hcxActivationKeyId-645871673";
HcxActivationKey response =
vmwareEngineClient
.createHcxActivationKeyAsync(parent, hcxActivationKey, hcxActivationKeyId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the private cloud to create the key for. Resource
names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
hcxActivationKey | HcxActivationKey Required. The initial description of a new HCX activation key. When creating a new key, this field must be an empty object. |
hcxActivationKeyId | String Required. The user-provided identifier of the
|
Returns | |
---|---|
Type | Description |
OperationFuture<HcxActivationKey,OperationMetadata> |
createHcxActivationKeyCallable()
public final UnaryCallable<CreateHcxActivationKeyRequest,Operation> createHcxActivationKeyCallable()
Creates a new HCX activation key in a given private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateHcxActivationKeyRequest request =
CreateHcxActivationKeyRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setHcxActivationKey(HcxActivationKey.newBuilder().build())
.setHcxActivationKeyId("hcxActivationKeyId-645871673")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.createHcxActivationKeyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateHcxActivationKeyRequest,Operation> |
createHcxActivationKeyOperationCallable()
public final OperationCallable<CreateHcxActivationKeyRequest,HcxActivationKey,OperationMetadata> createHcxActivationKeyOperationCallable()
Creates a new HCX activation key in a given private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateHcxActivationKeyRequest request =
CreateHcxActivationKeyRequest.newBuilder()
.setParent(
PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setHcxActivationKey(HcxActivationKey.newBuilder().build())
.setHcxActivationKeyId("hcxActivationKeyId-645871673")
.setRequestId("requestId693933066")
.build();
OperationFuture<HcxActivationKey, OperationMetadata> future =
vmwareEngineClient.createHcxActivationKeyOperationCallable().futureCall(request);
// Do something.
HcxActivationKey response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateHcxActivationKeyRequest,HcxActivationKey,OperationMetadata> |
createNetworkPolicyAsync(CreateNetworkPolicyRequest request)
public final OperationFuture<NetworkPolicy,OperationMetadata> createNetworkPolicyAsync(CreateNetworkPolicyRequest request)
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateNetworkPolicyRequest request =
CreateNetworkPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNetworkPolicyId("networkPolicyId-727262661")
.setNetworkPolicy(NetworkPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
NetworkPolicy response = vmwareEngineClient.createNetworkPolicyAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateNetworkPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<NetworkPolicy,OperationMetadata> |
createNetworkPolicyAsync(LocationName parent, NetworkPolicy networkPolicy, String networkPolicyId)
public final OperationFuture<NetworkPolicy,OperationMetadata> createNetworkPolicyAsync(LocationName parent, NetworkPolicy networkPolicy, String networkPolicyId)
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build();
String networkPolicyId = "networkPolicyId-727262661";
NetworkPolicy response =
vmwareEngineClient.createNetworkPolicyAsync(parent, networkPolicy, networkPolicyId).get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location (region) to create the new network
policy in. Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
networkPolicy | NetworkPolicy Required. The network policy configuration to use in the request. |
networkPolicyId | String Required. The user-provided identifier of the network policy to be
created. This identifier must be unique within parent
|
Returns | |
---|---|
Type | Description |
OperationFuture<NetworkPolicy,OperationMetadata> |
createNetworkPolicyAsync(String parent, NetworkPolicy networkPolicy, String networkPolicyId)
public final OperationFuture<NetworkPolicy,OperationMetadata> createNetworkPolicyAsync(String parent, NetworkPolicy networkPolicy, String networkPolicyId)
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
NetworkPolicy networkPolicy = NetworkPolicy.newBuilder().build();
String networkPolicyId = "networkPolicyId-727262661";
NetworkPolicy response =
vmwareEngineClient.createNetworkPolicyAsync(parent, networkPolicy, networkPolicyId).get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location (region) to create the new network
policy in. Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
networkPolicy | NetworkPolicy Required. The network policy configuration to use in the request. |
networkPolicyId | String Required. The user-provided identifier of the network policy to be
created. This identifier must be unique within parent
|
Returns | |
---|---|
Type | Description |
OperationFuture<NetworkPolicy,OperationMetadata> |
createNetworkPolicyCallable()
public final UnaryCallable<CreateNetworkPolicyRequest,Operation> createNetworkPolicyCallable()
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateNetworkPolicyRequest request =
CreateNetworkPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNetworkPolicyId("networkPolicyId-727262661")
.setNetworkPolicy(NetworkPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.createNetworkPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateNetworkPolicyRequest,Operation> |
createNetworkPolicyOperationCallable()
public final OperationCallable<CreateNetworkPolicyRequest,NetworkPolicy,OperationMetadata> createNetworkPolicyOperationCallable()
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateNetworkPolicyRequest request =
CreateNetworkPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNetworkPolicyId("networkPolicyId-727262661")
.setNetworkPolicy(NetworkPolicy.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<NetworkPolicy, OperationMetadata> future =
vmwareEngineClient.createNetworkPolicyOperationCallable().futureCall(request);
// Do something.
NetworkPolicy response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateNetworkPolicyRequest,NetworkPolicy,OperationMetadata> |
createPrivateCloudAsync(CreatePrivateCloudRequest request)
public final OperationFuture<PrivateCloud,OperationMetadata> createPrivateCloudAsync(CreatePrivateCloudRequest request)
Creates a new PrivateCloud
resource in a given project and location. Private clouds can only
be created in zones, regional private clouds are not supported.
Creating a private cloud also creates a management cluster for that private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateCloudRequest request =
CreatePrivateCloudRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateCloudId("privateCloudId573896493")
.setPrivateCloud(PrivateCloud.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
PrivateCloud response = vmwareEngineClient.createPrivateCloudAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreatePrivateCloudRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
createPrivateCloudAsync(LocationName parent, PrivateCloud privateCloud, String privateCloudId)
public final OperationFuture<PrivateCloud,OperationMetadata> createPrivateCloudAsync(LocationName parent, PrivateCloud privateCloud, String privateCloudId)
Creates a new PrivateCloud
resource in a given project and location. Private clouds can only
be created in zones, regional private clouds are not supported.
Creating a private cloud also creates a management cluster for that private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
PrivateCloud privateCloud = PrivateCloud.newBuilder().build();
String privateCloudId = "privateCloudId573896493";
PrivateCloud response =
vmwareEngineClient.createPrivateCloudAsync(parent, privateCloud, privateCloudId).get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location to create the new private cloud in.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
privateCloud | PrivateCloud Required. The initial description of the new private cloud. |
privateCloudId | String Required. The user-provided identifier of the private cloud to be
created. This identifier must be unique among each
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
createPrivateCloudAsync(String parent, PrivateCloud privateCloud, String privateCloudId)
public final OperationFuture<PrivateCloud,OperationMetadata> createPrivateCloudAsync(String parent, PrivateCloud privateCloud, String privateCloudId)
Creates a new PrivateCloud
resource in a given project and location. Private clouds can only
be created in zones, regional private clouds are not supported.
Creating a private cloud also creates a management cluster for that private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
PrivateCloud privateCloud = PrivateCloud.newBuilder().build();
String privateCloudId = "privateCloudId573896493";
PrivateCloud response =
vmwareEngineClient.createPrivateCloudAsync(parent, privateCloud, privateCloudId).get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location to create the new private cloud in.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
privateCloud | PrivateCloud Required. The initial description of the new private cloud. |
privateCloudId | String Required. The user-provided identifier of the private cloud to be
created. This identifier must be unique among each
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
createPrivateCloudCallable()
public final UnaryCallable<CreatePrivateCloudRequest,Operation> createPrivateCloudCallable()
Creates a new PrivateCloud
resource in a given project and location. Private clouds can only
be created in zones, regional private clouds are not supported.
Creating a private cloud also creates a management cluster for that private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateCloudRequest request =
CreatePrivateCloudRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateCloudId("privateCloudId573896493")
.setPrivateCloud(PrivateCloud.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
vmwareEngineClient.createPrivateCloudCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePrivateCloudRequest,Operation> |
createPrivateCloudOperationCallable()
public final OperationCallable<CreatePrivateCloudRequest,PrivateCloud,OperationMetadata> createPrivateCloudOperationCallable()
Creates a new PrivateCloud
resource in a given project and location. Private clouds can only
be created in zones, regional private clouds are not supported.
Creating a private cloud also creates a management cluster for that private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateCloudRequest request =
CreatePrivateCloudRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateCloudId("privateCloudId573896493")
.setPrivateCloud(PrivateCloud.newBuilder().build())
.setRequestId("requestId693933066")
.setValidateOnly(true)
.build();
OperationFuture<PrivateCloud, OperationMetadata> future =
vmwareEngineClient.createPrivateCloudOperationCallable().futureCall(request);
// Do something.
PrivateCloud response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePrivateCloudRequest,PrivateCloud,OperationMetadata> |
createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(CreatePrivateConnectionRequest request)
Creates a new private connection that can be used for accessing private Clouds.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
PrivateConnection response = vmwareEngineClient.createPrivateConnectionAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreatePrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(LocationName parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection that can be used for accessing private Clouds.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
vmwareEngineClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location to create the new private connection
in. Private connection is a regional resource. Resource names are schemeless URIs that
follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
|
privateConnection | PrivateConnection Required. The initial description of the new private connection. |
privateConnectionId | String Required. The user-provided identifier of the new private connection. This identifier must be unique among private connection resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
public final OperationFuture<PrivateConnection,OperationMetadata> createPrivateConnectionAsync(String parent, PrivateConnection privateConnection, String privateConnectionId)
Creates a new private connection that can be used for accessing private Clouds.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
PrivateConnection privateConnection = PrivateConnection.newBuilder().build();
String privateConnectionId = "privateConnectionId-1926654532";
PrivateConnection response =
vmwareEngineClient
.createPrivateConnectionAsync(parent, privateConnection, privateConnectionId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location to create the new private connection
in. Private connection is a regional resource. Resource names are schemeless URIs that
follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
|
privateConnection | PrivateConnection Required. The initial description of the new private connection. |
privateConnectionId | String Required. The user-provided identifier of the new private connection. This identifier must be unique among private connection resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateConnection,OperationMetadata> |
createPrivateConnectionCallable()
public final UnaryCallable<CreatePrivateConnectionRequest,Operation> createPrivateConnectionCallable()
Creates a new private connection that can be used for accessing private Clouds.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.createPrivateConnectionCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreatePrivateConnectionRequest,Operation> |
createPrivateConnectionOperationCallable()
public final OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> createPrivateConnectionOperationCallable()
Creates a new private connection that can be used for accessing private Clouds.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreatePrivateConnectionRequest request =
CreatePrivateConnectionRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPrivateConnectionId("privateConnectionId-1926654532")
.setPrivateConnection(PrivateConnection.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<PrivateConnection, OperationMetadata> future =
vmwareEngineClient.createPrivateConnectionOperationCallable().futureCall(request);
// Do something.
PrivateConnection response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreatePrivateConnectionRequest,PrivateConnection,OperationMetadata> |
createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest request)
public final OperationFuture<VmwareEngineNetwork,OperationMetadata> createVmwareEngineNetworkAsync(CreateVmwareEngineNetworkRequest request)
Creates a new VMware Engine network that can be used by a private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateVmwareEngineNetworkRequest request =
CreateVmwareEngineNetworkRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setVmwareEngineNetworkId("vmwareEngineNetworkId532532083")
.setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build())
.setRequestId("requestId693933066")
.build();
VmwareEngineNetwork response =
vmwareEngineClient.createVmwareEngineNetworkAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | CreateVmwareEngineNetworkRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<VmwareEngineNetwork,OperationMetadata> |
createVmwareEngineNetworkAsync(LocationName parent, VmwareEngineNetwork vmwareEngineNetwork, String vmwareEngineNetworkId)
public final OperationFuture<VmwareEngineNetwork,OperationMetadata> createVmwareEngineNetworkAsync(LocationName parent, VmwareEngineNetwork vmwareEngineNetwork, String vmwareEngineNetworkId)
Creates a new VMware Engine network that can be used by a private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
VmwareEngineNetwork vmwareEngineNetwork = VmwareEngineNetwork.newBuilder().build();
String vmwareEngineNetworkId = "vmwareEngineNetworkId532532083";
VmwareEngineNetwork response =
vmwareEngineClient
.createVmwareEngineNetworkAsync(parent, vmwareEngineNetwork, vmwareEngineNetworkId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the location to create the new VMware Engine
network in. A VMware Engine network of type |
vmwareEngineNetwork | VmwareEngineNetwork Required. The initial description of the new VMware Engine network. |
vmwareEngineNetworkId | String Required. The user-provided identifier of the new VMware Engine network. This identifier must be unique among VMware Engine network resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements:
|
Returns | |
---|---|
Type | Description |
OperationFuture<VmwareEngineNetwork,OperationMetadata> |
createVmwareEngineNetworkAsync(String parent, VmwareEngineNetwork vmwareEngineNetwork, String vmwareEngineNetworkId)
public final OperationFuture<VmwareEngineNetwork,OperationMetadata> createVmwareEngineNetworkAsync(String parent, VmwareEngineNetwork vmwareEngineNetwork, String vmwareEngineNetworkId)
Creates a new VMware Engine network that can be used by a private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
VmwareEngineNetwork vmwareEngineNetwork = VmwareEngineNetwork.newBuilder().build();
String vmwareEngineNetworkId = "vmwareEngineNetworkId532532083";
VmwareEngineNetwork response =
vmwareEngineClient
.createVmwareEngineNetworkAsync(parent, vmwareEngineNetwork, vmwareEngineNetworkId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent | String Required. The resource name of the location to create the new VMware Engine
network in. A VMware Engine network of type |
vmwareEngineNetwork | VmwareEngineNetwork Required. The initial description of the new VMware Engine network. |
vmwareEngineNetworkId | String Required. The user-provided identifier of the new VMware Engine network. This identifier must be unique among VMware Engine network resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements:
|
Returns | |
---|---|
Type | Description |
OperationFuture<VmwareEngineNetwork,OperationMetadata> |
createVmwareEngineNetworkCallable()
public final UnaryCallable<CreateVmwareEngineNetworkRequest,Operation> createVmwareEngineNetworkCallable()
Creates a new VMware Engine network that can be used by a private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateVmwareEngineNetworkRequest request =
CreateVmwareEngineNetworkRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setVmwareEngineNetworkId("vmwareEngineNetworkId532532083")
.setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.createVmwareEngineNetworkCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateVmwareEngineNetworkRequest,Operation> |
createVmwareEngineNetworkOperationCallable()
public final OperationCallable<CreateVmwareEngineNetworkRequest,VmwareEngineNetwork,OperationMetadata> createVmwareEngineNetworkOperationCallable()
Creates a new VMware Engine network that can be used by a private cloud.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
CreateVmwareEngineNetworkRequest request =
CreateVmwareEngineNetworkRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setVmwareEngineNetworkId("vmwareEngineNetworkId532532083")
.setVmwareEngineNetwork(VmwareEngineNetwork.newBuilder().build())
.setRequestId("requestId693933066")
.build();
OperationFuture<VmwareEngineNetwork, OperationMetadata> future =
vmwareEngineClient.createVmwareEngineNetworkOperationCallable().futureCall(request);
// Do something.
VmwareEngineNetwork response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateVmwareEngineNetworkRequest,VmwareEngineNetwork,OperationMetadata> |
deleteClusterAsync(ClusterName name)
public final OperationFuture<Empty,OperationMetadata> deleteClusterAsync(ClusterName name)
Deletes a Cluster
resource. To avoid unintended data loss, migrate or gracefully shut down
any workloads running on the cluster before deletion. You cannot delete the management cluster
of a private cloud using this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]");
vmwareEngineClient.deleteClusterAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | ClusterName Required. The resource name of the cluster to delete. Resource names are schemeless
URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteClusterAsync(DeleteClusterRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteClusterAsync(DeleteClusterRequest request)
Deletes a Cluster
resource. To avoid unintended data loss, migrate or gracefully shut down
any workloads running on the cluster before deletion. You cannot delete the management cluster
of a private cloud using this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.setRequestId("requestId693933066")
.build();
vmwareEngineClient.deleteClusterAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteClusterAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteClusterAsync(String name)
Deletes a Cluster
resource. To avoid unintended data loss, migrate or gracefully shut down
any workloads running on the cluster before deletion. You cannot delete the management cluster
of a private cloud using this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name =
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString();
vmwareEngineClient.deleteClusterAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the cluster to delete. Resource names are schemeless
URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names.
For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteClusterCallable()
public final UnaryCallable<DeleteClusterRequest,Operation> deleteClusterCallable()
Deletes a Cluster
resource. To avoid unintended data loss, migrate or gracefully shut down
any workloads running on the cluster before deletion. You cannot delete the management cluster
of a private cloud using this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = vmwareEngineClient.deleteClusterCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteClusterRequest,Operation> |
deleteClusterOperationCallable()
public final OperationCallable<DeleteClusterRequest,Empty,OperationMetadata> deleteClusterOperationCallable()
Deletes a Cluster
resource. To avoid unintended data loss, migrate or gracefully shut down
any workloads running on the cluster before deletion. You cannot delete the management cluster
of a private cloud using this method.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteClusterRequest request =
DeleteClusterRequest.newBuilder()
.setName(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
vmwareEngineClient.deleteClusterOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteClusterRequest,Empty,OperationMetadata> |
deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteNetworkPolicyAsync(DeleteNetworkPolicyRequest request)
Deletes a NetworkPolicy
resource. A network policy cannot be deleted when
NetworkService.state
is set to RECONCILING
for either its external IP or internet access
service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteNetworkPolicyRequest request =
DeleteNetworkPolicyRequest.newBuilder()
.setName(
NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
vmwareEngineClient.deleteNetworkPolicyAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteNetworkPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteNetworkPolicyAsync(NetworkPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteNetworkPolicyAsync(NetworkPolicyName name)
Deletes a NetworkPolicy
resource. A network policy cannot be deleted when
NetworkService.state
is set to RECONCILING
for either its external IP or internet access
service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
NetworkPolicyName name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]");
vmwareEngineClient.deleteNetworkPolicyAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | NetworkPolicyName Required. The resource name of the network policy to delete. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteNetworkPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteNetworkPolicyAsync(String name)
Deletes a NetworkPolicy
resource. A network policy cannot be deleted when
NetworkService.state
is set to RECONCILING
for either its external IP or internet access
service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString();
vmwareEngineClient.deleteNetworkPolicyAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the network policy to delete. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteNetworkPolicyCallable()
public final UnaryCallable<DeleteNetworkPolicyRequest,Operation> deleteNetworkPolicyCallable()
Deletes a NetworkPolicy
resource. A network policy cannot be deleted when
NetworkService.state
is set to RECONCILING
for either its external IP or internet access
service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteNetworkPolicyRequest request =
DeleteNetworkPolicyRequest.newBuilder()
.setName(
NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.deleteNetworkPolicyCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteNetworkPolicyRequest,Operation> |
deleteNetworkPolicyOperationCallable()
public final OperationCallable<DeleteNetworkPolicyRequest,Empty,OperationMetadata> deleteNetworkPolicyOperationCallable()
Deletes a NetworkPolicy
resource. A network policy cannot be deleted when
NetworkService.state
is set to RECONCILING
for either its external IP or internet access
service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteNetworkPolicyRequest request =
DeleteNetworkPolicyRequest.newBuilder()
.setName(
NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
vmwareEngineClient.deleteNetworkPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteNetworkPolicyRequest,Empty,OperationMetadata> |
deletePrivateCloudAsync(DeletePrivateCloudRequest request)
public final OperationFuture<PrivateCloud,OperationMetadata> deletePrivateCloudAsync(DeletePrivateCloudRequest request)
Schedules a PrivateCloud
resource for deletion.
A PrivateCloud
resource scheduled for deletion has PrivateCloud.state
set to DELETED
and expireTime
set to the time when deletion is final and can no longer be reversed. The
delete operation is marked as done as soon as the PrivateCloud
is successfully scheduled for
deletion (this also applies when delayHours
is set to zero), and the operation is not kept in
pending state until PrivateCloud
is purged. PrivateCloud
can be restored using
UndeletePrivateCloud
method before the expireTime
elapses. When expireTime
is reached,
deletion is final and all private cloud resources are irreversibly removed and billing stops.
During the final removal process, PrivateCloud.state
is set to PURGING
. PrivateCloud
can
be polled using standard GET
method for the whole period of deletion and purging. It will not
be returned only when it is completely purged.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateCloudRequest request =
DeletePrivateCloudRequest.newBuilder()
.setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.setDelayHours(475821395)
.build();
PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeletePrivateCloudRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
deletePrivateCloudAsync(PrivateCloudName name)
public final OperationFuture<PrivateCloud,OperationMetadata> deletePrivateCloudAsync(PrivateCloudName name)
Schedules a PrivateCloud
resource for deletion.
A PrivateCloud
resource scheduled for deletion has PrivateCloud.state
set to DELETED
and expireTime
set to the time when deletion is final and can no longer be reversed. The
delete operation is marked as done as soon as the PrivateCloud
is successfully scheduled for
deletion (this also applies when delayHours
is set to zero), and the operation is not kept in
pending state until PrivateCloud
is purged. PrivateCloud
can be restored using
UndeletePrivateCloud
method before the expireTime
elapses. When expireTime
is reached,
deletion is final and all private cloud resources are irreversibly removed and billing stops.
During the final removal process, PrivateCloud.state
is set to PURGING
. PrivateCloud
can
be polled using standard GET
method for the whole period of deletion and purging. It will not
be returned only when it is completely purged.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | PrivateCloudName Required. The resource name of the private cloud to delete. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
deletePrivateCloudAsync(String name)
public final OperationFuture<PrivateCloud,OperationMetadata> deletePrivateCloudAsync(String name)
Schedules a PrivateCloud
resource for deletion.
A PrivateCloud
resource scheduled for deletion has PrivateCloud.state
set to DELETED
and expireTime
set to the time when deletion is final and can no longer be reversed. The
delete operation is marked as done as soon as the PrivateCloud
is successfully scheduled for
deletion (this also applies when delayHours
is set to zero), and the operation is not kept in
pending state until PrivateCloud
is purged. PrivateCloud
can be restored using
UndeletePrivateCloud
method before the expireTime
elapses. When expireTime
is reached,
deletion is final and all private cloud resources are irreversibly removed and billing stops.
During the final removal process, PrivateCloud.state
is set to PURGING
. PrivateCloud
can
be polled using standard GET
method for the whole period of deletion and purging. It will not
be returned only when it is completely purged.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString();
PrivateCloud response = vmwareEngineClient.deletePrivateCloudAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the private cloud to delete. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<PrivateCloud,OperationMetadata> |
deletePrivateCloudCallable()
public final UnaryCallable<DeletePrivateCloudRequest,Operation> deletePrivateCloudCallable()
Schedules a PrivateCloud
resource for deletion.
A PrivateCloud
resource scheduled for deletion has PrivateCloud.state
set to DELETED
and expireTime
set to the time when deletion is final and can no longer be reversed. The
delete operation is marked as done as soon as the PrivateCloud
is successfully scheduled for
deletion (this also applies when delayHours
is set to zero), and the operation is not kept in
pending state until PrivateCloud
is purged. PrivateCloud
can be restored using
UndeletePrivateCloud
method before the expireTime
elapses. When expireTime
is reached,
deletion is final and all private cloud resources are irreversibly removed and billing stops.
During the final removal process, PrivateCloud.state
is set to PURGING
. PrivateCloud
can
be polled using standard GET
method for the whole period of deletion and purging. It will not
be returned only when it is completely purged.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateCloudRequest request =
DeletePrivateCloudRequest.newBuilder()
.setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.setDelayHours(475821395)
.build();
ApiFuture<Operation> future =
vmwareEngineClient.deletePrivateCloudCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeletePrivateCloudRequest,Operation> |
deletePrivateCloudOperationCallable()
public final OperationCallable<DeletePrivateCloudRequest,PrivateCloud,OperationMetadata> deletePrivateCloudOperationCallable()
Schedules a PrivateCloud
resource for deletion.
A PrivateCloud
resource scheduled for deletion has PrivateCloud.state
set to DELETED
and expireTime
set to the time when deletion is final and can no longer be reversed. The
delete operation is marked as done as soon as the PrivateCloud
is successfully scheduled for
deletion (this also applies when delayHours
is set to zero), and the operation is not kept in
pending state until PrivateCloud
is purged. PrivateCloud
can be restored using
UndeletePrivateCloud
method before the expireTime
elapses. When expireTime
is reached,
deletion is final and all private cloud resources are irreversibly removed and billing stops.
During the final removal process, PrivateCloud.state
is set to PURGING
. PrivateCloud
can
be polled using standard GET
method for the whole period of deletion and purging. It will not
be returned only when it is completely purged.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateCloudRequest request =
DeletePrivateCloudRequest.newBuilder()
.setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.setRequestId("requestId693933066")
.setForce(true)
.setDelayHours(475821395)
.build();
OperationFuture<PrivateCloud, OperationMetadata> future =
vmwareEngineClient.deletePrivateCloudOperationCallable().futureCall(request);
// Do something.
PrivateCloud response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeletePrivateCloudRequest,PrivateCloud,OperationMetadata> |
deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(DeletePrivateConnectionRequest request)
Deletes a PrivateConnection
resource. When a private connection is deleted for a VMware
Engine network, the connected network becomes inaccessible to that VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateConnectionRequest request =
DeletePrivateConnectionRequest.newBuilder()
.setName(
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
.toString())
.setRequestId("requestId693933066")
.build();
vmwareEngineClient.deletePrivateConnectionAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeletePrivateConnectionRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deletePrivateConnectionAsync(PrivateConnectionName name)
public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(PrivateConnectionName name)
Deletes a PrivateConnection
resource. When a private connection is deleted for a VMware
Engine network, the connected network becomes inaccessible to that VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateConnectionName name =
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]");
vmwareEngineClient.deletePrivateConnectionAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | PrivateConnectionName Required. The resource name of the private connection to be deleted. Resource names
are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deletePrivateConnectionAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deletePrivateConnectionAsync(String name)
Deletes a PrivateConnection
resource. When a private connection is deleted for a VMware
Engine network, the connected network becomes inaccessible to that VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name =
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]").toString();
vmwareEngineClient.deletePrivateConnectionAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the private connection to be deleted. Resource names
are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deletePrivateConnectionCallable()
public final UnaryCallable<DeletePrivateConnectionRequest,Operation> deletePrivateConnectionCallable()
Deletes a PrivateConnection
resource. When a private connection is deleted for a VMware
Engine network, the connected network becomes inaccessible to that VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateConnectionRequest request =
DeletePrivateConnectionRequest.newBuilder()
.setName(
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
.toString())
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.deletePrivateConnectionCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeletePrivateConnectionRequest,Operation> |
deletePrivateConnectionOperationCallable()
public final OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata> deletePrivateConnectionOperationCallable()
Deletes a PrivateConnection
resource. When a private connection is deleted for a VMware
Engine network, the connected network becomes inaccessible to that VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeletePrivateConnectionRequest request =
DeletePrivateConnectionRequest.newBuilder()
.setName(
PrivateConnectionName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CONNECTION]")
.toString())
.setRequestId("requestId693933066")
.build();
OperationFuture<Empty, OperationMetadata> future =
vmwareEngineClient.deletePrivateConnectionOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeletePrivateConnectionRequest,Empty,OperationMetadata> |
deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteVmwareEngineNetworkAsync(DeleteVmwareEngineNetworkRequest request)
Deletes a VmwareEngineNetwork
resource. You can only delete a VMware Engine network after all
resources that refer to it are deleted. For example, a private cloud, a network peering, and a
network policy can all refer to the same VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteVmwareEngineNetworkRequest request =
DeleteVmwareEngineNetworkRequest.newBuilder()
.setName(
VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]")
.toString())
.setRequestId("requestId693933066")
.setEtag("etag3123477")
.build();
vmwareEngineClient.deleteVmwareEngineNetworkAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteVmwareEngineNetworkRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteVmwareEngineNetworkAsync(VmwareEngineNetworkName name)
public final OperationFuture<Empty,OperationMetadata> deleteVmwareEngineNetworkAsync(VmwareEngineNetworkName name)
Deletes a VmwareEngineNetwork
resource. You can only delete a VMware Engine network after all
resources that refer to it are deleted. For example, a private cloud, a network peering, and a
network policy can all refer to the same VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
VmwareEngineNetworkName name =
VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]");
vmwareEngineClient.deleteVmwareEngineNetworkAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | VmwareEngineNetworkName Required. The resource name of the VMware Engine network to be deleted. Resource
names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteVmwareEngineNetworkAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteVmwareEngineNetworkAsync(String name)
Deletes a VmwareEngineNetwork
resource. You can only delete a VMware Engine network after all
resources that refer to it are deleted. For example, a private cloud, a network peering, and a
network policy can all refer to the same VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name =
VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]")
.toString();
vmwareEngineClient.deleteVmwareEngineNetworkAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the VMware Engine network to be deleted. Resource
names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteVmwareEngineNetworkCallable()
public final UnaryCallable<DeleteVmwareEngineNetworkRequest,Operation> deleteVmwareEngineNetworkCallable()
Deletes a VmwareEngineNetwork
resource. You can only delete a VMware Engine network after all
resources that refer to it are deleted. For example, a private cloud, a network peering, and a
network policy can all refer to the same VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteVmwareEngineNetworkRequest request =
DeleteVmwareEngineNetworkRequest.newBuilder()
.setName(
VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]")
.toString())
.setRequestId("requestId693933066")
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
vmwareEngineClient.deleteVmwareEngineNetworkCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteVmwareEngineNetworkRequest,Operation> |
deleteVmwareEngineNetworkOperationCallable()
public final OperationCallable<DeleteVmwareEngineNetworkRequest,Empty,OperationMetadata> deleteVmwareEngineNetworkOperationCallable()
Deletes a VmwareEngineNetwork
resource. You can only delete a VMware Engine network after all
resources that refer to it are deleted. For example, a private cloud, a network peering, and a
network policy can all refer to the same VMware Engine network.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
DeleteVmwareEngineNetworkRequest request =
DeleteVmwareEngineNetworkRequest.newBuilder()
.setName(
VmwareEngineNetworkName.of("[PROJECT]", "[LOCATION]", "[VMWARE_ENGINE_NETWORK]")
.toString())
.setRequestId("requestId693933066")
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
vmwareEngineClient.deleteVmwareEngineNetworkOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteVmwareEngineNetworkRequest,Empty,OperationMetadata> |
getCluster(ClusterName name)
public final Cluster getCluster(ClusterName name)
Retrieves a Cluster
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]");
Cluster response = vmwareEngineClient.getCluster(name);
}
Parameter | |
---|---|
Name | Description |
name | ClusterName Required. The cluster resource name to retrieve. Resource names are schemeless URIs
that follow the conventions in https://cloud.google.com/apis/design/resource_names. For
example:
|
Returns | |
---|---|
Type | Description |
Cluster |
getCluster(GetClusterRequest request)
public final Cluster getCluster(GetClusterRequest request)
Retrieves a Cluster
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setName(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.build();
Cluster response = vmwareEngineClient.getCluster(request);
}
Parameter | |
---|---|
Name | Description |
request | GetClusterRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Cluster |
getCluster(String name)
public final Cluster getCluster(String name)
Retrieves a Cluster
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name =
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]").toString();
Cluster response = vmwareEngineClient.getCluster(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The cluster resource name to retrieve. Resource names are schemeless URIs
that follow the conventions in https://cloud.google.com/apis/design/resource_names. For
example:
|
Returns | |
---|---|
Type | Description |
Cluster |
getClusterCallable()
public final UnaryCallable<GetClusterRequest,Cluster> getClusterCallable()
Retrieves a Cluster
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetClusterRequest request =
GetClusterRequest.newBuilder()
.setName(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.build();
ApiFuture<Cluster> future = vmwareEngineClient.getClusterCallable().futureCall(request);
// Do something.
Cluster response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetClusterRequest,Cluster> |
getHcxActivationKey(GetHcxActivationKeyRequest request)
public final HcxActivationKey getHcxActivationKey(GetHcxActivationKeyRequest request)
Retrieves a HcxActivationKey
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetHcxActivationKeyRequest request =
GetHcxActivationKeyRequest.newBuilder()
.setName(
HcxActivationKeyName.of(
"[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]")
.toString())
.build();
HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(request);
}
Parameter | |
---|---|
Name | Description |
request | GetHcxActivationKeyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
HcxActivationKey |
getHcxActivationKey(HcxActivationKeyName name)
public final HcxActivationKey getHcxActivationKey(HcxActivationKeyName name)
Retrieves a HcxActivationKey
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
HcxActivationKeyName name =
HcxActivationKeyName.of(
"[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]");
HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(name);
}
Parameter | |
---|---|
Name | Description |
name | HcxActivationKeyName Required. The resource name of the HCX activation key to retrieve. Resource names
are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
HcxActivationKey |
getHcxActivationKey(String name)
public final HcxActivationKey getHcxActivationKey(String name)
Retrieves a HcxActivationKey
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name =
HcxActivationKeyName.of(
"[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]")
.toString();
HcxActivationKey response = vmwareEngineClient.getHcxActivationKey(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the HCX activation key to retrieve. Resource names
are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
HcxActivationKey |
getHcxActivationKeyCallable()
public final UnaryCallable<GetHcxActivationKeyRequest,HcxActivationKey> getHcxActivationKeyCallable()
Retrieves a HcxActivationKey
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetHcxActivationKeyRequest request =
GetHcxActivationKeyRequest.newBuilder()
.setName(
HcxActivationKeyName.of(
"[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[HCX_ACTIVATION_KEY]")
.toString())
.build();
ApiFuture<HcxActivationKey> future =
vmwareEngineClient.getHcxActivationKeyCallable().futureCall(request);
// Do something.
HcxActivationKey response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetHcxActivationKeyRequest,HcxActivationKey> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getIamPolicy(GetIamPolicyRequest request)
public final Policy getIamPolicy(GetIamPolicyRequest request)
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
Policy response = vmwareEngineClient.getIamPolicy(request);
}
Parameter | |
---|---|
Name | Description |
request | com.google.iam.v1.GetIamPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.iam.v1.Policy |
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetIamPolicyRequest request =
GetIamPolicyRequest.newBuilder()
.setResource(
ClusterName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]", "[CLUSTER]")
.toString())
.setOptions(GetPolicyOptions.newBuilder().build())
.build();
ApiFuture<Policy> future = vmwareEngineClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getLocation(GetLocationRequest request)
public final Location getLocation(GetLocationRequest request)
Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = vmwareEngineClient.getLocation(request);
}
Parameter | |
---|---|
Name | Description |
request | com.google.cloud.location.GetLocationRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
com.google.cloud.location.Location |
getLocationCallable()
public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
Gets information about a location.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = vmwareEngineClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getNetworkPolicy(GetNetworkPolicyRequest request)
public final NetworkPolicy getNetworkPolicy(GetNetworkPolicyRequest request)
Retrieves a NetworkPolicy
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetNetworkPolicyRequest request =
GetNetworkPolicyRequest.newBuilder()
.setName(
NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString())
.build();
NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(request);
}
Parameter | |
---|---|
Name | Description |
request | GetNetworkPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
NetworkPolicy |
getNetworkPolicy(NetworkPolicyName name)
public final NetworkPolicy getNetworkPolicy(NetworkPolicyName name)
Retrieves a NetworkPolicy
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
NetworkPolicyName name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]");
NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(name);
}
Parameter | |
---|---|
Name | Description |
name | NetworkPolicyName Required. The resource name of the network policy to retrieve. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
NetworkPolicy |
getNetworkPolicy(String name)
public final NetworkPolicy getNetworkPolicy(String name)
Retrieves a NetworkPolicy
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name = NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString();
NetworkPolicy response = vmwareEngineClient.getNetworkPolicy(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the network policy to retrieve. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
NetworkPolicy |
getNetworkPolicyCallable()
public final UnaryCallable<GetNetworkPolicyRequest,NetworkPolicy> getNetworkPolicyCallable()
Retrieves a NetworkPolicy
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetNetworkPolicyRequest request =
GetNetworkPolicyRequest.newBuilder()
.setName(
NetworkPolicyName.of("[PROJECT]", "[LOCATION]", "[NETWORK_POLICY]").toString())
.build();
ApiFuture<NetworkPolicy> future =
vmwareEngineClient.getNetworkPolicyCallable().futureCall(request);
// Do something.
NetworkPolicy response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetNetworkPolicyRequest,NetworkPolicy> |
getNodeType(GetNodeTypeRequest request)
public final NodeType getNodeType(GetNodeTypeRequest request)
Gets details of a single NodeType
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetNodeTypeRequest request =
GetNodeTypeRequest.newBuilder()
.setName(NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString())
.build();
NodeType response = vmwareEngineClient.getNodeType(request);
}
Parameter | |
---|---|
Name | Description |
request | GetNodeTypeRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
NodeType |
getNodeType(NodeTypeName name)
public final NodeType getNodeType(NodeTypeName name)
Gets details of a single NodeType
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
NodeTypeName name = NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]");
NodeType response = vmwareEngineClient.getNodeType(name);
}
Parameter | |
---|---|
Name | Description |
name | NodeTypeName Required. The resource name of the node type to retrieve. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
NodeType |
getNodeType(String name)
public final NodeType getNodeType(String name)
Gets details of a single NodeType
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name = NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString();
NodeType response = vmwareEngineClient.getNodeType(name);
}
Parameter | |
---|---|
Name | Description |
name | String Required. The resource name of the node type to retrieve. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
NodeType |
getNodeTypeCallable()
public final UnaryCallable<GetNodeTypeRequest,NodeType> getNodeTypeCallable()
Gets details of a single NodeType
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetNodeTypeRequest request =
GetNodeTypeRequest.newBuilder()
.setName(NodeTypeName.of("[PROJECT]", "[LOCATION]", "[NODE_TYPE]").toString())
.build();
ApiFuture<NodeType> future = vmwareEngineClient.getNodeTypeCallable().futureCall(request);
// Do something.
NodeType response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetNodeTypeRequest,NodeType> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getPrivateCloud(GetPrivateCloudRequest request)
public final PrivateCloud getPrivateCloud(GetPrivateCloudRequest request)
Retrieves a PrivateCloud
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
GetPrivateCloudRequest request =
GetPrivateCloudRequest.newBuilder()
.setName(PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]").toString())
.build();
PrivateCloud response = vmwareEngineClient.getPrivateCloud(request);
}
Parameter | |
---|---|
Name | Description |
request | GetPrivateCloudRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
PrivateCloud |
getPrivateCloud(PrivateCloudName name)
public final PrivateCloud getPrivateCloud(PrivateCloudName name)
Retrieves a PrivateCloud
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
PrivateCloudName name = PrivateCloudName.of("[PROJECT]", "[LOCATION]", "[PRIVATE_CLOUD]");
PrivateCloud response = vmwareEngineClient.getPrivateCloud(name);
}
Parameter | |
---|---|
Name | Description |
name | PrivateCloudName Required. The resource name of the private cloud to retrieve. Resource names are
schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names. For example:
|
Returns | |
---|---|
Type | Description |
PrivateCloud |
getPrivateCloud(String name)
public final PrivateCloud getPrivateCloud(String name)
Retrieves a PrivateCloud
resource by its resource 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 (VmwareEngineClient vmwareEngineClient = VmwareEngineClient.create()) {
String name = PrivateCloudName.of("[PROJECT]", "[LOCATION