GitHub Repository | Product Reference |
Service Description: Service describing handlers for resources.
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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
EndpointPolicyName name =
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
EndpointPolicy response = networkServicesClient.getEndpointPolicy(name);
}
Note: close() needs to be called on the NetworkServicesClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
Method | Description | Method Variants |
---|---|---|
ListEndpointPolicies |
Lists EndpointPolicies in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetEndpointPolicy |
Gets details of a single EndpointPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateEndpointPolicy |
Creates a new EndpointPolicy in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateEndpointPolicy |
Updates the parameters of a single EndpointPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteEndpointPolicy |
Deletes a single EndpointPolicy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGateways |
Lists Gateways in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGateway |
Gets details of a single Gateway. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateGateway |
Creates a new Gateway in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGateway |
Updates the parameters of a single Gateway. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGateway |
Deletes a single Gateway. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListGrpcRoutes |
Lists GrpcRoutes in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetGrpcRoute |
Gets details of a single GrpcRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateGrpcRoute |
Creates a new GrpcRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateGrpcRoute |
Updates the parameters of a single GrpcRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteGrpcRoute |
Deletes a single GrpcRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListHttpRoutes |
Lists HttpRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetHttpRoute |
Gets details of a single HttpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateHttpRoute |
Creates a new HttpRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateHttpRoute |
Updates the parameters of a single HttpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteHttpRoute |
Deletes a single HttpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTcpRoutes |
Lists TcpRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTcpRoute |
Gets details of a single TcpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTcpRoute |
Creates a new TcpRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTcpRoute |
Updates the parameters of a single TcpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTcpRoute |
Deletes a single TcpRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTlsRoutes |
Lists TlsRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetTlsRoute |
Gets details of a single TlsRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateTlsRoute |
Creates a new TlsRoute in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateTlsRoute |
Updates the parameters of a single TlsRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTlsRoute |
Deletes a single TlsRoute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListServiceBindings |
Lists ServiceBinding in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetServiceBinding |
Gets details of a single ServiceBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateServiceBinding |
Creates a new ServiceBinding in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteServiceBinding |
Deletes a single ServiceBinding. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListMeshes |
Lists Meshes in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetMesh |
Gets details of a single Mesh. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateMesh |
Creates a new Mesh in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateMesh |
Updates the parameters of a single Mesh. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteMesh |
Deletes a single Mesh. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListLocations |
Lists information about the supported locations for this service. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the access control policy on the specified resource. Replacesany existing policy. Can return |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return 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 NetworkServicesSettings 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
NetworkServicesSettings networkServicesSettings =
NetworkServicesSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
NetworkServicesClient networkServicesClient =
NetworkServicesClient.create(networkServicesSettings);
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
NetworkServicesSettings networkServicesSettings =
NetworkServicesSettings.newBuilder().setEndpoint(myEndpoint).build();
NetworkServicesClient networkServicesClient =
NetworkServicesClient.create(networkServicesSettings);
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
NetworkServicesSettings networkServicesSettings =
NetworkServicesSettings.newHttpJsonBuilder().build();
NetworkServicesClient networkServicesClient =
NetworkServicesClient.create(networkServicesSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final NetworkServicesClient create()
Constructs an instance of NetworkServicesClient with default settings.
Returns | |
---|---|
Type | Description |
NetworkServicesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(NetworkServicesSettings settings)
public static final NetworkServicesClient create(NetworkServicesSettings settings)
Constructs an instance of NetworkServicesClient, 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 |
NetworkServicesSettings |
Returns | |
---|---|
Type | Description |
NetworkServicesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(NetworkServicesStub stub)
public static final NetworkServicesClient create(NetworkServicesStub stub)
Constructs an instance of NetworkServicesClient, using the given stub for making calls. This is for advanced usage - prefer using create(NetworkServicesSettings).
Parameter | |
---|---|
Name | Description |
stub |
NetworkServicesStub |
Returns | |
---|---|
Type | Description |
NetworkServicesClient |
Constructors
NetworkServicesClient(NetworkServicesSettings settings)
protected NetworkServicesClient(NetworkServicesSettings settings)
Constructs an instance of NetworkServicesClient, 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 |
NetworkServicesSettings |
NetworkServicesClient(NetworkServicesStub stub)
protected NetworkServicesClient(NetworkServicesStub stub)
Parameter | |
---|---|
Name | Description |
stub |
NetworkServicesStub |
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()
createEndpointPolicyAsync(CreateEndpointPolicyRequest request)
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(CreateEndpointPolicyRequest request)
Creates a new EndpointPolicy in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateEndpointPolicyRequest request =
CreateEndpointPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEndpointPolicyId("endpointPolicyId-509458782")
.setEndpointPolicy(EndpointPolicy.newBuilder().build())
.build();
EndpointPolicy response = networkServicesClient.createEndpointPolicyAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateEndpointPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<EndpointPolicy,OperationMetadata> |
createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(LocationName parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
Creates a new EndpointPolicy in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
String endpointPolicyId = "endpointPolicyId-509458782";
EndpointPolicy response =
networkServicesClient
.createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the EndpointPolicy. Must be in the format
|
endpointPolicy |
EndpointPolicy Required. EndpointPolicy resource to be created. |
endpointPolicyId |
String Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS". |
Returns | |
---|---|
Type | Description |
OperationFuture<EndpointPolicy,OperationMetadata> |
createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
public final OperationFuture<EndpointPolicy,OperationMetadata> createEndpointPolicyAsync(String parent, EndpointPolicy endpointPolicy, String endpointPolicyId)
Creates a new EndpointPolicy in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
EndpointPolicy endpointPolicy = EndpointPolicy.newBuilder().build();
String endpointPolicyId = "endpointPolicyId-509458782";
EndpointPolicy response =
networkServicesClient
.createEndpointPolicyAsync(parent, endpointPolicy, endpointPolicyId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the EndpointPolicy. Must be in the format
|
endpointPolicy |
EndpointPolicy Required. EndpointPolicy resource to be created. |
endpointPolicyId |
String Required. Short name of the EndpointPolicy resource to be created. E.g. "CustomECS". |
Returns | |
---|---|
Type | Description |
OperationFuture<EndpointPolicy,OperationMetadata> |
createEndpointPolicyCallable()
public final UnaryCallable<CreateEndpointPolicyRequest,Operation> createEndpointPolicyCallable()
Creates a new EndpointPolicy in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateEndpointPolicyRequest request =
CreateEndpointPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEndpointPolicyId("endpointPolicyId-509458782")
.setEndpointPolicy(EndpointPolicy.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createEndpointPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateEndpointPolicyRequest,Operation> |
createEndpointPolicyOperationCallable()
public final OperationCallable<CreateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> createEndpointPolicyOperationCallable()
Creates a new EndpointPolicy in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateEndpointPolicyRequest request =
CreateEndpointPolicyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEndpointPolicyId("endpointPolicyId-509458782")
.setEndpointPolicy(EndpointPolicy.newBuilder().build())
.build();
OperationFuture<EndpointPolicy, OperationMetadata> future =
networkServicesClient.createEndpointPolicyOperationCallable().futureCall(request);
// Do something.
EndpointPolicy response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateEndpointPolicyRequest,EndpointPolicy,OperationMetadata> |
createGatewayAsync(CreateGatewayRequest request)
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(CreateGatewayRequest request)
Creates a new Gateway in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGatewayRequest request =
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
Gateway response = networkServicesClient.createGatewayAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateGatewayRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Gateway,OperationMetadata> |
createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(LocationName parent, Gateway gateway, String gatewayId)
Creates a new Gateway in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Gateway gateway = Gateway.newBuilder().build();
String gatewayId = "gatewayId-1354641793";
Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the Gateway. Must be in the format
|
gateway |
Gateway Required. Gateway resource to be created. |
gatewayId |
String Required. Short name of the Gateway resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Gateway,OperationMetadata> |
createGatewayAsync(String parent, Gateway gateway, String gatewayId)
public final OperationFuture<Gateway,OperationMetadata> createGatewayAsync(String parent, Gateway gateway, String gatewayId)
Creates a new Gateway in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Gateway gateway = Gateway.newBuilder().build();
String gatewayId = "gatewayId-1354641793";
Gateway response = networkServicesClient.createGatewayAsync(parent, gateway, gatewayId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the Gateway. Must be in the format
|
gateway |
Gateway Required. Gateway resource to be created. |
gatewayId |
String Required. Short name of the Gateway resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Gateway,OperationMetadata> |
createGatewayCallable()
public final UnaryCallable<CreateGatewayRequest,Operation> createGatewayCallable()
Creates a new Gateway in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGatewayRequest request =
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createGatewayCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateGatewayRequest,Operation> |
createGatewayOperationCallable()
public final OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata> createGatewayOperationCallable()
Creates a new Gateway in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGatewayRequest request =
CreateGatewayRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGatewayId("gatewayId-1354641793")
.setGateway(Gateway.newBuilder().build())
.build();
OperationFuture<Gateway, OperationMetadata> future =
networkServicesClient.createGatewayOperationCallable().futureCall(request);
// Do something.
Gateway response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateGatewayRequest,Gateway,OperationMetadata> |
createGrpcRouteAsync(CreateGrpcRouteRequest request)
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(CreateGrpcRouteRequest request)
Creates a new GrpcRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGrpcRouteRequest request =
CreateGrpcRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGrpcRouteId("grpcRouteId1888295750")
.setGrpcRoute(GrpcRoute.newBuilder().build())
.build();
GrpcRoute response = networkServicesClient.createGrpcRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateGrpcRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<GrpcRoute,OperationMetadata> |
createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId)
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(LocationName parent, GrpcRoute grpcRoute, String grpcRouteId)
Creates a new GrpcRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
GrpcRoute grpcRoute = GrpcRoute.newBuilder().build();
String grpcRouteId = "grpcRouteId1888295750";
GrpcRoute response =
networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the GrpcRoute. Must be in the format
|
grpcRoute |
GrpcRoute Required. GrpcRoute resource to be created. |
grpcRouteId |
String Required. Short name of the GrpcRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<GrpcRoute,OperationMetadata> |
createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId)
public final OperationFuture<GrpcRoute,OperationMetadata> createGrpcRouteAsync(String parent, GrpcRoute grpcRoute, String grpcRouteId)
Creates a new GrpcRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
GrpcRoute grpcRoute = GrpcRoute.newBuilder().build();
String grpcRouteId = "grpcRouteId1888295750";
GrpcRoute response =
networkServicesClient.createGrpcRouteAsync(parent, grpcRoute, grpcRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the GrpcRoute. Must be in the format
|
grpcRoute |
GrpcRoute Required. GrpcRoute resource to be created. |
grpcRouteId |
String Required. Short name of the GrpcRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<GrpcRoute,OperationMetadata> |
createGrpcRouteCallable()
public final UnaryCallable<CreateGrpcRouteRequest,Operation> createGrpcRouteCallable()
Creates a new GrpcRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGrpcRouteRequest request =
CreateGrpcRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGrpcRouteId("grpcRouteId1888295750")
.setGrpcRoute(GrpcRoute.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createGrpcRouteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateGrpcRouteRequest,Operation> |
createGrpcRouteOperationCallable()
public final OperationCallable<CreateGrpcRouteRequest,GrpcRoute,OperationMetadata> createGrpcRouteOperationCallable()
Creates a new GrpcRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateGrpcRouteRequest request =
CreateGrpcRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setGrpcRouteId("grpcRouteId1888295750")
.setGrpcRoute(GrpcRoute.newBuilder().build())
.build();
OperationFuture<GrpcRoute, OperationMetadata> future =
networkServicesClient.createGrpcRouteOperationCallable().futureCall(request);
// Do something.
GrpcRoute response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateGrpcRouteRequest,GrpcRoute,OperationMetadata> |
createHttpRouteAsync(CreateHttpRouteRequest request)
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(CreateHttpRouteRequest request)
Creates a new HttpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateHttpRouteRequest request =
CreateHttpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHttpRouteId("httpRouteId-2054835300")
.setHttpRoute(HttpRoute.newBuilder().build())
.build();
HttpRoute response = networkServicesClient.createHttpRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateHttpRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<HttpRoute,OperationMetadata> |
createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId)
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(LocationName parent, HttpRoute httpRoute, String httpRouteId)
Creates a new HttpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
HttpRoute httpRoute = HttpRoute.newBuilder().build();
String httpRouteId = "httpRouteId-2054835300";
HttpRoute response =
networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the HttpRoute. Must be in the format
|
httpRoute |
HttpRoute Required. HttpRoute resource to be created. |
httpRouteId |
String Required. Short name of the HttpRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<HttpRoute,OperationMetadata> |
createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId)
public final OperationFuture<HttpRoute,OperationMetadata> createHttpRouteAsync(String parent, HttpRoute httpRoute, String httpRouteId)
Creates a new HttpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
HttpRoute httpRoute = HttpRoute.newBuilder().build();
String httpRouteId = "httpRouteId-2054835300";
HttpRoute response =
networkServicesClient.createHttpRouteAsync(parent, httpRoute, httpRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the HttpRoute. Must be in the format
|
httpRoute |
HttpRoute Required. HttpRoute resource to be created. |
httpRouteId |
String Required. Short name of the HttpRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<HttpRoute,OperationMetadata> |
createHttpRouteCallable()
public final UnaryCallable<CreateHttpRouteRequest,Operation> createHttpRouteCallable()
Creates a new HttpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateHttpRouteRequest request =
CreateHttpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHttpRouteId("httpRouteId-2054835300")
.setHttpRoute(HttpRoute.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createHttpRouteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateHttpRouteRequest,Operation> |
createHttpRouteOperationCallable()
public final OperationCallable<CreateHttpRouteRequest,HttpRoute,OperationMetadata> createHttpRouteOperationCallable()
Creates a new HttpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateHttpRouteRequest request =
CreateHttpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setHttpRouteId("httpRouteId-2054835300")
.setHttpRoute(HttpRoute.newBuilder().build())
.build();
OperationFuture<HttpRoute, OperationMetadata> future =
networkServicesClient.createHttpRouteOperationCallable().futureCall(request);
// Do something.
HttpRoute response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateHttpRouteRequest,HttpRoute,OperationMetadata> |
createMeshAsync(CreateMeshRequest request)
public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(CreateMeshRequest request)
Creates a new Mesh in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateMeshRequest request =
CreateMeshRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMeshId("meshId-1077585944")
.setMesh(Mesh.newBuilder().build())
.build();
Mesh response = networkServicesClient.createMeshAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateMeshRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Mesh,OperationMetadata> |
createMeshAsync(LocationName parent, Mesh mesh, String meshId)
public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(LocationName parent, Mesh mesh, String meshId)
Creates a new Mesh in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Mesh mesh = Mesh.newBuilder().build();
String meshId = "meshId-1077585944";
Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the Mesh. Must be in the format
|
mesh |
Mesh Required. Mesh resource to be created. |
meshId |
String Required. Short name of the Mesh resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Mesh,OperationMetadata> |
createMeshAsync(String parent, Mesh mesh, String meshId)
public final OperationFuture<Mesh,OperationMetadata> createMeshAsync(String parent, Mesh mesh, String meshId)
Creates a new Mesh in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Mesh mesh = Mesh.newBuilder().build();
String meshId = "meshId-1077585944";
Mesh response = networkServicesClient.createMeshAsync(parent, mesh, meshId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the Mesh. Must be in the format
|
mesh |
Mesh Required. Mesh resource to be created. |
meshId |
String Required. Short name of the Mesh resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<Mesh,OperationMetadata> |
createMeshCallable()
public final UnaryCallable<CreateMeshRequest,Operation> createMeshCallable()
Creates a new Mesh in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateMeshRequest request =
CreateMeshRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMeshId("meshId-1077585944")
.setMesh(Mesh.newBuilder().build())
.build();
ApiFuture<Operation> future = networkServicesClient.createMeshCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateMeshRequest,Operation> |
createMeshOperationCallable()
public final OperationCallable<CreateMeshRequest,Mesh,OperationMetadata> createMeshOperationCallable()
Creates a new Mesh in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateMeshRequest request =
CreateMeshRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setMeshId("meshId-1077585944")
.setMesh(Mesh.newBuilder().build())
.build();
OperationFuture<Mesh, OperationMetadata> future =
networkServicesClient.createMeshOperationCallable().futureCall(request);
// Do something.
Mesh response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateMeshRequest,Mesh,OperationMetadata> |
createServiceBindingAsync(CreateServiceBindingRequest request)
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(CreateServiceBindingRequest request)
Creates a new ServiceBinding in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateServiceBindingRequest request =
CreateServiceBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServiceBindingId("serviceBindingId-1424670901")
.setServiceBinding(ServiceBinding.newBuilder().build())
.build();
ServiceBinding response = networkServicesClient.createServiceBindingAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateServiceBindingRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<ServiceBinding,OperationMetadata> |
createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId)
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(LocationName parent, ServiceBinding serviceBinding, String serviceBindingId)
Creates a new ServiceBinding in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
ServiceBinding serviceBinding = ServiceBinding.newBuilder().build();
String serviceBindingId = "serviceBindingId-1424670901";
ServiceBinding response =
networkServicesClient
.createServiceBindingAsync(parent, serviceBinding, serviceBindingId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the ServiceBinding. Must be in the format
|
serviceBinding |
ServiceBinding Required. ServiceBinding resource to be created. |
serviceBindingId |
String Required. Short name of the ServiceBinding resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<ServiceBinding,OperationMetadata> |
createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId)
public final OperationFuture<ServiceBinding,OperationMetadata> createServiceBindingAsync(String parent, ServiceBinding serviceBinding, String serviceBindingId)
Creates a new ServiceBinding in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
ServiceBinding serviceBinding = ServiceBinding.newBuilder().build();
String serviceBindingId = "serviceBindingId-1424670901";
ServiceBinding response =
networkServicesClient
.createServiceBindingAsync(parent, serviceBinding, serviceBindingId)
.get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the ServiceBinding. Must be in the format
|
serviceBinding |
ServiceBinding Required. ServiceBinding resource to be created. |
serviceBindingId |
String Required. Short name of the ServiceBinding resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<ServiceBinding,OperationMetadata> |
createServiceBindingCallable()
public final UnaryCallable<CreateServiceBindingRequest,Operation> createServiceBindingCallable()
Creates a new ServiceBinding in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateServiceBindingRequest request =
CreateServiceBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServiceBindingId("serviceBindingId-1424670901")
.setServiceBinding(ServiceBinding.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createServiceBindingCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateServiceBindingRequest,Operation> |
createServiceBindingOperationCallable()
public final OperationCallable<CreateServiceBindingRequest,ServiceBinding,OperationMetadata> createServiceBindingOperationCallable()
Creates a new ServiceBinding in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateServiceBindingRequest request =
CreateServiceBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setServiceBindingId("serviceBindingId-1424670901")
.setServiceBinding(ServiceBinding.newBuilder().build())
.build();
OperationFuture<ServiceBinding, OperationMetadata> future =
networkServicesClient.createServiceBindingOperationCallable().futureCall(request);
// Do something.
ServiceBinding response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateServiceBindingRequest,ServiceBinding,OperationMetadata> |
createTcpRouteAsync(CreateTcpRouteRequest request)
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(CreateTcpRouteRequest request)
Creates a new TcpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTcpRouteRequest request =
CreateTcpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTcpRouteId("tcpRouteId806467107")
.setTcpRoute(TcpRoute.newBuilder().build())
.build();
TcpRoute response = networkServicesClient.createTcpRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateTcpRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<TcpRoute,OperationMetadata> |
createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId)
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(LocationName parent, TcpRoute tcpRoute, String tcpRouteId)
Creates a new TcpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TcpRoute tcpRoute = TcpRoute.newBuilder().build();
String tcpRouteId = "tcpRouteId806467107";
TcpRoute response =
networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the TcpRoute. Must be in the format
|
tcpRoute |
TcpRoute Required. TcpRoute resource to be created. |
tcpRouteId |
String Required. Short name of the TcpRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<TcpRoute,OperationMetadata> |
createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId)
public final OperationFuture<TcpRoute,OperationMetadata> createTcpRouteAsync(String parent, TcpRoute tcpRoute, String tcpRouteId)
Creates a new TcpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
TcpRoute tcpRoute = TcpRoute.newBuilder().build();
String tcpRouteId = "tcpRouteId806467107";
TcpRoute response =
networkServicesClient.createTcpRouteAsync(parent, tcpRoute, tcpRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the TcpRoute. Must be in the format
|
tcpRoute |
TcpRoute Required. TcpRoute resource to be created. |
tcpRouteId |
String Required. Short name of the TcpRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<TcpRoute,OperationMetadata> |
createTcpRouteCallable()
public final UnaryCallable<CreateTcpRouteRequest,Operation> createTcpRouteCallable()
Creates a new TcpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTcpRouteRequest request =
CreateTcpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTcpRouteId("tcpRouteId806467107")
.setTcpRoute(TcpRoute.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createTcpRouteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTcpRouteRequest,Operation> |
createTcpRouteOperationCallable()
public final OperationCallable<CreateTcpRouteRequest,TcpRoute,OperationMetadata> createTcpRouteOperationCallable()
Creates a new TcpRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTcpRouteRequest request =
CreateTcpRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTcpRouteId("tcpRouteId806467107")
.setTcpRoute(TcpRoute.newBuilder().build())
.build();
OperationFuture<TcpRoute, OperationMetadata> future =
networkServicesClient.createTcpRouteOperationCallable().futureCall(request);
// Do something.
TcpRoute response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateTcpRouteRequest,TcpRoute,OperationMetadata> |
createTlsRouteAsync(CreateTlsRouteRequest request)
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(CreateTlsRouteRequest request)
Creates a new TlsRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTlsRouteRequest request =
CreateTlsRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsRouteId("tlsRouteId-1642257463")
.setTlsRoute(TlsRoute.newBuilder().build())
.build();
TlsRoute response = networkServicesClient.createTlsRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateTlsRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<TlsRoute,OperationMetadata> |
createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId)
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(LocationName parent, TlsRoute tlsRoute, String tlsRouteId)
Creates a new TlsRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
TlsRoute tlsRoute = TlsRoute.newBuilder().build();
String tlsRouteId = "tlsRouteId-1642257463";
TlsRoute response =
networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
LocationName Required. The parent resource of the TlsRoute. Must be in the format
|
tlsRoute |
TlsRoute Required. TlsRoute resource to be created. |
tlsRouteId |
String Required. Short name of the TlsRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<TlsRoute,OperationMetadata> |
createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId)
public final OperationFuture<TlsRoute,OperationMetadata> createTlsRouteAsync(String parent, TlsRoute tlsRoute, String tlsRouteId)
Creates a new TlsRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
TlsRoute tlsRoute = TlsRoute.newBuilder().build();
String tlsRouteId = "tlsRouteId-1642257463";
TlsRoute response =
networkServicesClient.createTlsRouteAsync(parent, tlsRoute, tlsRouteId).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. The parent resource of the TlsRoute. Must be in the format
|
tlsRoute |
TlsRoute Required. TlsRoute resource to be created. |
tlsRouteId |
String Required. Short name of the TlsRoute resource to be created. |
Returns | |
---|---|
Type | Description |
OperationFuture<TlsRoute,OperationMetadata> |
createTlsRouteCallable()
public final UnaryCallable<CreateTlsRouteRequest,Operation> createTlsRouteCallable()
Creates a new TlsRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTlsRouteRequest request =
CreateTlsRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsRouteId("tlsRouteId-1642257463")
.setTlsRoute(TlsRoute.newBuilder().build())
.build();
ApiFuture<Operation> future =
networkServicesClient.createTlsRouteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTlsRouteRequest,Operation> |
createTlsRouteOperationCallable()
public final OperationCallable<CreateTlsRouteRequest,TlsRoute,OperationMetadata> createTlsRouteOperationCallable()
Creates a new TlsRoute in a given project and 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 (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
CreateTlsRouteRequest request =
CreateTlsRouteRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setTlsRouteId("tlsRouteId-1642257463")
.setTlsRoute(TlsRoute.newBuilder().build())
.build();
OperationFuture<TlsRoute, OperationMetadata> future =
networkServicesClient.createTlsRouteOperationCallable().futureCall(request);
// Do something.
TlsRoute response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateTlsRouteRequest,TlsRoute,OperationMetadata> |
deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteEndpointPolicyAsync(DeleteEndpointPolicyRequest request)
Deletes a single EndpointPolicy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteEndpointPolicyRequest request =
DeleteEndpointPolicyRequest.newBuilder()
.setName(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.build();
networkServicesClient.deleteEndpointPolicyAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteEndpointPolicyRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteEndpointPolicyAsync(EndpointPolicyName name)
public final OperationFuture<Empty,OperationMetadata> deleteEndpointPolicyAsync(EndpointPolicyName name)
Deletes a single EndpointPolicy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
EndpointPolicyName name =
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]");
networkServicesClient.deleteEndpointPolicyAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
EndpointPolicyName Required. A name of the EndpointPolicy to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteEndpointPolicyAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteEndpointPolicyAsync(String name)
Deletes a single EndpointPolicy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String name =
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString();
networkServicesClient.deleteEndpointPolicyAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. A name of the EndpointPolicy to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteEndpointPolicyCallable()
public final UnaryCallable<DeleteEndpointPolicyRequest,Operation> deleteEndpointPolicyCallable()
Deletes a single EndpointPolicy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteEndpointPolicyRequest request =
DeleteEndpointPolicyRequest.newBuilder()
.setName(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.build();
ApiFuture<Operation> future =
networkServicesClient.deleteEndpointPolicyCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteEndpointPolicyRequest,Operation> |
deleteEndpointPolicyOperationCallable()
public final OperationCallable<DeleteEndpointPolicyRequest,Empty,OperationMetadata> deleteEndpointPolicyOperationCallable()
Deletes a single EndpointPolicy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteEndpointPolicyRequest request =
DeleteEndpointPolicyRequest.newBuilder()
.setName(
EndpointPolicyName.of("[PROJECT]", "[LOCATION]", "[ENDPOINT_POLICY]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkServicesClient.deleteEndpointPolicyOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteEndpointPolicyRequest,Empty,OperationMetadata> |
deleteGatewayAsync(DeleteGatewayRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(DeleteGatewayRequest request)
Deletes a single Gateway.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGatewayRequest request =
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
.build();
networkServicesClient.deleteGatewayAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteGatewayRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGatewayAsync(GatewayName name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(GatewayName name)
Deletes a single Gateway.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
GatewayName name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]");
networkServicesClient.deleteGatewayAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
GatewayName Required. A name of the Gateway to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGatewayAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteGatewayAsync(String name)
Deletes a single Gateway.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String name = GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString();
networkServicesClient.deleteGatewayAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. A name of the Gateway to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGatewayCallable()
public final UnaryCallable<DeleteGatewayRequest,Operation> deleteGatewayCallable()
Deletes a single Gateway.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGatewayRequest request =
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
.build();
ApiFuture<Operation> future =
networkServicesClient.deleteGatewayCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteGatewayRequest,Operation> |
deleteGatewayOperationCallable()
public final OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata> deleteGatewayOperationCallable()
Deletes a single Gateway.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGatewayRequest request =
DeleteGatewayRequest.newBuilder()
.setName(GatewayName.of("[PROJECT]", "[LOCATION]", "[GATEWAY]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkServicesClient.deleteGatewayOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteGatewayRequest,Empty,OperationMetadata> |
deleteGrpcRouteAsync(DeleteGrpcRouteRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteGrpcRouteAsync(DeleteGrpcRouteRequest request)
Deletes a single GrpcRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGrpcRouteRequest request =
DeleteGrpcRouteRequest.newBuilder()
.setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
.build();
networkServicesClient.deleteGrpcRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteGrpcRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGrpcRouteAsync(GrpcRouteName name)
public final OperationFuture<Empty,OperationMetadata> deleteGrpcRouteAsync(GrpcRouteName name)
Deletes a single GrpcRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
GrpcRouteName name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]");
networkServicesClient.deleteGrpcRouteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
GrpcRouteName Required. A name of the GrpcRoute to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGrpcRouteAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteGrpcRouteAsync(String name)
Deletes a single GrpcRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String name = GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString();
networkServicesClient.deleteGrpcRouteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. A name of the GrpcRoute to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteGrpcRouteCallable()
public final UnaryCallable<DeleteGrpcRouteRequest,Operation> deleteGrpcRouteCallable()
Deletes a single GrpcRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGrpcRouteRequest request =
DeleteGrpcRouteRequest.newBuilder()
.setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
.build();
ApiFuture<Operation> future =
networkServicesClient.deleteGrpcRouteCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteGrpcRouteRequest,Operation> |
deleteGrpcRouteOperationCallable()
public final OperationCallable<DeleteGrpcRouteRequest,Empty,OperationMetadata> deleteGrpcRouteOperationCallable()
Deletes a single GrpcRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteGrpcRouteRequest request =
DeleteGrpcRouteRequest.newBuilder()
.setName(GrpcRouteName.of("[PROJECT]", "[LOCATION]", "[GRPC_ROUTE]").toString())
.build();
OperationFuture<Empty, OperationMetadata> future =
networkServicesClient.deleteGrpcRouteOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteGrpcRouteRequest,Empty,OperationMetadata> |
deleteHttpRouteAsync(DeleteHttpRouteRequest request)
public final OperationFuture<Empty,OperationMetadata> deleteHttpRouteAsync(DeleteHttpRouteRequest request)
Deletes a single HttpRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteHttpRouteRequest request =
DeleteHttpRouteRequest.newBuilder()
.setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
.build();
networkServicesClient.deleteHttpRouteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteHttpRouteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHttpRouteAsync(HttpRouteName name)
public final OperationFuture<Empty,OperationMetadata> deleteHttpRouteAsync(HttpRouteName name)
Deletes a single HttpRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
HttpRouteName name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]");
networkServicesClient.deleteHttpRouteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
HttpRouteName Required. A name of the HttpRoute to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHttpRouteAsync(String name)
public final OperationFuture<Empty,OperationMetadata> deleteHttpRouteAsync(String name)
Deletes a single HttpRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
String name = HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString();
networkServicesClient.deleteHttpRouteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. A name of the HttpRoute to delete. Must be in the format
|
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,OperationMetadata> |
deleteHttpRouteCallable()
public final UnaryCallable<DeleteHttpRouteRequest,Operation> deleteHttpRouteCallable()
Deletes a single HttpRoute.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (NetworkServicesClient networkServicesClient = NetworkServicesClient.create()) {
DeleteHttpRouteRequest request =
DeleteHttpRouteRequest.newBuilder()
.setName(HttpRouteName.of("[PROJECT]", "[LOCATION]", "[HTTP_ROUTE]").toString())
.build