@Generated(value="by gapic-generator-java") public class BackendServicesClient extends Object implements com.google.api.gax.core.BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
BackendService response = backendServicesClient.get(project, backendService);
}
Note: close() needs to be called on the BackendServicesClient 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 |
|---|---|---|
AddSignedUrlKey |
Adds a key for validating requests with signed URLs for this backend service. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
AggregatedList |
Retrieves the list of all BackendService resources, regional and global, available to the specified project. To prevent failure, Google recommends that you set the `returnPartialSuccess` parameter to `true`. |
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.
|
Delete |
Deletes the specified BackendService resource. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSignedUrlKey |
Deletes a key for validating requests with signed URLs for this backend service. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
Get |
Returns the specified BackendService resource. |
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.
|
GetHealth |
Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" } |
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.
|
GetIamPolicy |
Gets the access control policy for a resource. May be empty if no such policy or resource exists. |
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.
|
Insert |
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview . |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
List |
Retrieves the list of BackendService resources available to the specified project. |
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.
|
ListUsable |
Retrieves an aggregated list of all usable backend services in the specified project. |
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.
|
Patch |
Patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. |
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 `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetEdgeSecurityPolicy |
Sets the edge security policy for the specified backend service. |
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 `OperationFuture`, which is used to track polling of the service.
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. Replaces any existing policy. |
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.
|
SetSecurityPolicy |
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview |
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 `OperationFuture`, which is used to track polling of the service.
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. |
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.
|
Update |
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview. |
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 `OperationFuture`, which is used to track polling of the service.
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 BackendServicesSettings 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
BackendServicesSettings backendServicesSettings =
BackendServicesSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BackendServicesClient backendServicesClient =
BackendServicesClient.create(backendServicesSettings);
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
BackendServicesSettings backendServicesSettings =
BackendServicesSettings.newBuilder().setEndpoint(myEndpoint).build();
BackendServicesClient backendServicesClient =
BackendServicesClient.create(backendServicesSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
BackendServicesClient.AggregatedListFixedSizeCollection |
static class |
BackendServicesClient.AggregatedListPage |
static class |
BackendServicesClient.AggregatedListPagedResponse |
static class |
BackendServicesClient.ListFixedSizeCollection |
static class |
BackendServicesClient.ListPage |
static class |
BackendServicesClient.ListPagedResponse |
static class |
BackendServicesClient.ListUsableFixedSizeCollection |
static class |
BackendServicesClient.ListUsablePage |
static class |
BackendServicesClient.ListUsablePagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
BackendServicesClient(BackendServicesSettings settings)
Constructs an instance of BackendServicesClient, using the given settings.
|
protected |
BackendServicesClient(BackendServicesStub stub) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
addSignedUrlKeyAsync(AddSignedUrlKeyBackendServiceRequest request)
Adds a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
addSignedUrlKeyAsync(String project,
String backendService,
SignedUrlKey signedUrlKeyResource)
Adds a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.rpc.UnaryCallable<AddSignedUrlKeyBackendServiceRequest,Operation> |
addSignedUrlKeyCallable()
Adds a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.rpc.OperationCallable<AddSignedUrlKeyBackendServiceRequest,Operation,Operation> |
addSignedUrlKeyOperationCallable()
Adds a key for validating requests with signed URLs for this backend service.
|
BackendServicesClient.AggregatedListPagedResponse |
aggregatedList(AggregatedListBackendServicesRequest request)
Retrieves the list of all BackendService resources, regional and global, available to the
specified project.
|
BackendServicesClient.AggregatedListPagedResponse |
aggregatedList(String project)
Retrieves the list of all BackendService resources, regional and global, available to the
specified project.
|
com.google.api.gax.rpc.UnaryCallable<AggregatedListBackendServicesRequest,BackendServiceAggregatedList> |
aggregatedListCallable()
Retrieves the list of all BackendService resources, regional and global, available to the
specified project.
|
com.google.api.gax.rpc.UnaryCallable<AggregatedListBackendServicesRequest,BackendServicesClient.AggregatedListPagedResponse> |
aggregatedListPagedCallable()
Retrieves the list of all BackendService resources, regional and global, available to the
specified project.
|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static BackendServicesClient |
create()
Constructs an instance of BackendServicesClient with default settings.
|
static BackendServicesClient |
create(BackendServicesSettings settings)
Constructs an instance of BackendServicesClient, using the given settings.
|
static BackendServicesClient |
create(BackendServicesStub stub)
Constructs an instance of BackendServicesClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteAsync(DeleteBackendServiceRequest request)
Deletes the specified BackendService resource.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteAsync(String project,
String backendService)
Deletes the specified BackendService resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteBackendServiceRequest,Operation> |
deleteCallable()
Deletes the specified BackendService resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteBackendServiceRequest,Operation,Operation> |
deleteOperationCallable()
Deletes the specified BackendService resource.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteSignedUrlKeyAsync(DeleteSignedUrlKeyBackendServiceRequest request)
Deletes a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteSignedUrlKeyAsync(String project,
String backendService,
String keyName)
Deletes a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.rpc.UnaryCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation> |
deleteSignedUrlKeyCallable()
Deletes a key for validating requests with signed URLs for this backend service.
|
com.google.api.gax.rpc.OperationCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation,Operation> |
deleteSignedUrlKeyOperationCallable()
Deletes a key for validating requests with signed URLs for this backend service.
|
BackendService |
get(GetBackendServiceRequest request)
Returns the specified BackendService resource.
|
BackendService |
get(String project,
String backendService)
Returns the specified BackendService resource.
|
com.google.api.gax.rpc.UnaryCallable<GetBackendServiceRequest,BackendService> |
getCallable()
Returns the specified BackendService resource.
|
BackendServiceGroupHealth |
getHealth(GetHealthBackendServiceRequest request)
Gets the most recent health check results for this BackendService.
|
BackendServiceGroupHealth |
getHealth(String project,
String backendService,
ResourceGroupReference resourceGroupReferenceResource)
Gets the most recent health check results for this BackendService.
|
com.google.api.gax.rpc.UnaryCallable<GetHealthBackendServiceRequest,BackendServiceGroupHealth> |
getHealthCallable()
Gets the most recent health check results for this BackendService.
|
Policy |
getIamPolicy(GetIamPolicyBackendServiceRequest request)
Gets the access control policy for a resource.
|
Policy |
getIamPolicy(String project,
String resource)
Gets the access control policy for a resource.
|
com.google.api.gax.rpc.UnaryCallable<GetIamPolicyBackendServiceRequest,Policy> |
getIamPolicyCallable()
Gets the access control policy for a resource.
|
BackendServicesSettings |
getSettings() |
BackendServicesStub |
getStub() |
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
insertAsync(InsertBackendServiceRequest request)
Creates a BackendService resource in the specified project using the data included in the
request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
insertAsync(String project,
BackendService backendServiceResource)
Creates a BackendService resource in the specified project using the data included in the
request.
|
com.google.api.gax.rpc.UnaryCallable<InsertBackendServiceRequest,Operation> |
insertCallable()
Creates a BackendService resource in the specified project using the data included in the
request.
|
com.google.api.gax.rpc.OperationCallable<InsertBackendServiceRequest,Operation,Operation> |
insertOperationCallable()
Creates a BackendService resource in the specified project using the data included in the
request.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
BackendServicesClient.ListPagedResponse |
list(ListBackendServicesRequest request)
Retrieves the list of BackendService resources available to the specified project.
|
BackendServicesClient.ListPagedResponse |
list(String project)
Retrieves the list of BackendService resources available to the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListBackendServicesRequest,BackendServiceList> |
listCallable()
Retrieves the list of BackendService resources available to the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListBackendServicesRequest,BackendServicesClient.ListPagedResponse> |
listPagedCallable()
Retrieves the list of BackendService resources available to the specified project.
|
BackendServicesClient.ListUsablePagedResponse |
listUsable(ListUsableBackendServicesRequest request)
Retrieves an aggregated list of all usable backend services in the specified project.
|
BackendServicesClient.ListUsablePagedResponse |
listUsable(String project)
Retrieves an aggregated list of all usable backend services in the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListUsableBackendServicesRequest,BackendServiceListUsable> |
listUsableCallable()
Retrieves an aggregated list of all usable backend services in the specified project.
|
com.google.api.gax.rpc.UnaryCallable<ListUsableBackendServicesRequest,BackendServicesClient.ListUsablePagedResponse> |
listUsablePagedCallable()
Retrieves an aggregated list of all usable backend services in the specified project.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
patchAsync(PatchBackendServiceRequest request)
Patches the specified BackendService resource with the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
patchAsync(String project,
String backendService,
BackendService backendServiceResource)
Patches the specified BackendService resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<PatchBackendServiceRequest,Operation> |
patchCallable()
Patches the specified BackendService resource with the data included in the request.
|
com.google.api.gax.rpc.OperationCallable<PatchBackendServiceRequest,Operation,Operation> |
patchOperationCallable()
Patches the specified BackendService resource with the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
setEdgeSecurityPolicyAsync(SetEdgeSecurityPolicyBackendServiceRequest request)
Sets the edge security policy for the specified backend service.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
setEdgeSecurityPolicyAsync(String project,
String backendService,
SecurityPolicyReference securityPolicyReferenceResource)
Sets the edge security policy for the specified backend service.
|
com.google.api.gax.rpc.UnaryCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation> |
setEdgeSecurityPolicyCallable()
Sets the edge security policy for the specified backend service.
|
com.google.api.gax.rpc.OperationCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation,Operation> |
setEdgeSecurityPolicyOperationCallable()
Sets the edge security policy for the specified backend service.
|
Policy |
setIamPolicy(SetIamPolicyBackendServiceRequest request)
Sets the access control policy on the specified resource.
|
Policy |
setIamPolicy(String project,
String resource,
GlobalSetPolicyRequest globalSetPolicyRequestResource)
Sets the access control policy on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<SetIamPolicyBackendServiceRequest,Policy> |
setIamPolicyCallable()
Sets the access control policy on the specified resource.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
setSecurityPolicyAsync(SetSecurityPolicyBackendServiceRequest request)
Sets the Google Cloud Armor security policy for the specified backend service.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
setSecurityPolicyAsync(String project,
String backendService,
SecurityPolicyReference securityPolicyReferenceResource)
Sets the Google Cloud Armor security policy for the specified backend service.
|
com.google.api.gax.rpc.UnaryCallable<SetSecurityPolicyBackendServiceRequest,Operation> |
setSecurityPolicyCallable()
Sets the Google Cloud Armor security policy for the specified backend service.
|
com.google.api.gax.rpc.OperationCallable<SetSecurityPolicyBackendServiceRequest,Operation,Operation> |
setSecurityPolicyOperationCallable()
Sets the Google Cloud Armor security policy for the specified backend service.
|
void |
shutdown() |
void |
shutdownNow() |
TestPermissionsResponse |
testIamPermissions(String project,
String resource,
TestPermissionsRequest testPermissionsRequestResource)
Returns permissions that a caller has on the specified resource.
|
TestPermissionsResponse |
testIamPermissions(TestIamPermissionsBackendServiceRequest request)
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.rpc.UnaryCallable<TestIamPermissionsBackendServiceRequest,TestPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that a caller has on the specified resource.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
updateAsync(String project,
String backendService,
BackendService backendServiceResource)
Updates the specified BackendService resource with the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
updateAsync(UpdateBackendServiceRequest request)
Updates the specified BackendService resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<UpdateBackendServiceRequest,Operation> |
updateCallable()
Updates the specified BackendService resource with the data included in the request.
|
com.google.api.gax.rpc.OperationCallable<UpdateBackendServiceRequest,Operation,Operation> |
updateOperationCallable()
Updates the specified BackendService resource with the data included in the request.
|
protected BackendServicesClient(BackendServicesSettings settings) throws IOException
IOExceptionprotected BackendServicesClient(BackendServicesStub stub)
public static final BackendServicesClient create() throws IOException
IOExceptionpublic static final BackendServicesClient create(BackendServicesSettings settings) throws IOException
IOExceptionpublic static final BackendServicesClient create(BackendServicesStub stub)
public final BackendServicesSettings getSettings()
public BackendServicesStub getStub()
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> addSignedUrlKeyAsync(String project, String backendService, SignedUrlKey signedUrlKeyResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
SignedUrlKey signedUrlKeyResource = SignedUrlKey.newBuilder().build();
Operation response =
backendServicesClient
.addSignedUrlKeyAsync(project, backendService, signedUrlKeyResource)
.get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to which the Signed URL Key should be
added. The name should conform to RFC1035.signedUrlKeyResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> addSignedUrlKeyAsync(AddSignedUrlKeyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AddSignedUrlKeyBackendServiceRequest request =
AddSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSignedUrlKeyResource(SignedUrlKey.newBuilder().build())
.build();
Operation response = backendServicesClient.addSignedUrlKeyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<AddSignedUrlKeyBackendServiceRequest,Operation,Operation> addSignedUrlKeyOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AddSignedUrlKeyBackendServiceRequest request =
AddSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSignedUrlKeyResource(SignedUrlKey.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.addSignedUrlKeyOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<AddSignedUrlKeyBackendServiceRequest,Operation> addSignedUrlKeyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AddSignedUrlKeyBackendServiceRequest request =
AddSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSignedUrlKeyResource(SignedUrlKey.newBuilder().build())
.build();
ApiFuture<Operation> future =
backendServicesClient.addSignedUrlKeyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final BackendServicesClient.AggregatedListPagedResponse aggregatedList(String project)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
for (Map.Entry<String, BackendServicesScopedList> element :
backendServicesClient.aggregatedList(project).iterateAll()) {
// doThingsWith(element);
}
}
project - Name of the project scoping this request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BackendServicesClient.AggregatedListPagedResponse aggregatedList(AggregatedListBackendServicesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AggregatedListBackendServicesRequest request =
AggregatedListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setIncludeAllScopes(true)
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.setServiceProjectNumber(-1293855239)
.build();
for (Map.Entry<String, BackendServicesScopedList> element :
backendServicesClient.aggregatedList(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<AggregatedListBackendServicesRequest,BackendServicesClient.AggregatedListPagedResponse> aggregatedListPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AggregatedListBackendServicesRequest request =
AggregatedListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setIncludeAllScopes(true)
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.setServiceProjectNumber(-1293855239)
.build();
ApiFuture<Map.Entry<String, BackendServicesScopedList>> future =
backendServicesClient.aggregatedListPagedCallable().futureCall(request);
// Do something.
for (Map.Entry<String, BackendServicesScopedList> element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<AggregatedListBackendServicesRequest,BackendServiceAggregatedList> aggregatedListCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
AggregatedListBackendServicesRequest request =
AggregatedListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setIncludeAllScopes(true)
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.setServiceProjectNumber(-1293855239)
.build();
while (true) {
BackendServiceAggregatedList response =
backendServicesClient.aggregatedListCallable().call(request);
for (Map.Entry<String, BackendServicesScopedList> element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteAsync(String project, String backendService)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
Operation response = backendServicesClient.deleteAsync(project, backendService).get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteAsync(DeleteBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteBackendServiceRequest request =
DeleteBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.deleteAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteBackendServiceRequest,Operation,Operation> deleteOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteBackendServiceRequest request =
DeleteBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.deleteOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteBackendServiceRequest,Operation> deleteCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteBackendServiceRequest request =
DeleteBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backendServicesClient.deleteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteSignedUrlKeyAsync(String project, String backendService, String keyName)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
String keyName = "keyName-815643254";
Operation response =
backendServicesClient.deleteSignedUrlKeyAsync(project, backendService, keyName).get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to which the Signed URL Key should be
added. The name should conform to RFC1035.keyName - The name of the Signed URL Key to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteSignedUrlKeyAsync(DeleteSignedUrlKeyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteSignedUrlKeyBackendServiceRequest request =
DeleteSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setKeyName("keyName-815643254")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.deleteSignedUrlKeyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation,Operation> deleteSignedUrlKeyOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteSignedUrlKeyBackendServiceRequest request =
DeleteSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setKeyName("keyName-815643254")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.deleteSignedUrlKeyOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation> deleteSignedUrlKeyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
DeleteSignedUrlKeyBackendServiceRequest request =
DeleteSignedUrlKeyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setKeyName("keyName-815643254")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future =
backendServicesClient.deleteSignedUrlKeyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final BackendService get(String project, String backendService)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
BackendService response = backendServicesClient.get(project, backendService);
}
project - Project ID for this request.backendService - Name of the BackendService resource to return.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BackendService get(GetBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetBackendServiceRequest request =
GetBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.build();
BackendService response = backendServicesClient.get(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetBackendServiceRequest,BackendService> getCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetBackendServiceRequest request =
GetBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.build();
ApiFuture<BackendService> future = backendServicesClient.getCallable().futureCall(request);
// Do something.
BackendService response = future.get();
}
public final BackendServiceGroupHealth getHealth(String project, String backendService, ResourceGroupReference resourceGroupReferenceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
ResourceGroupReference resourceGroupReferenceResource =
ResourceGroupReference.newBuilder().build();
BackendServiceGroupHealth response =
backendServicesClient.getHealth(project, backendService, resourceGroupReferenceResource);
}
project - backendService - Name of the BackendService resource to which the queried instance
belongs.resourceGroupReferenceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final BackendServiceGroupHealth getHealth(GetHealthBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetHealthBackendServiceRequest request =
GetHealthBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build())
.build();
BackendServiceGroupHealth response = backendServicesClient.getHealth(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetHealthBackendServiceRequest,BackendServiceGroupHealth> getHealthCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetHealthBackendServiceRequest request =
GetHealthBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setResourceGroupReferenceResource(ResourceGroupReference.newBuilder().build())
.build();
ApiFuture<BackendServiceGroupHealth> future =
backendServicesClient.getHealthCallable().futureCall(request);
// Do something.
BackendServiceGroupHealth response = future.get();
}
public final Policy getIamPolicy(String project, String resource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String resource = "resource-341064690";
Policy response = backendServicesClient.getIamPolicy(project, resource);
}
project - Project ID for this request.resource - Name or id of the resource for this request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Policy getIamPolicy(GetIamPolicyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetIamPolicyBackendServiceRequest request =
GetIamPolicyBackendServiceRequest.newBuilder()
.setOptionsRequestedPolicyVersion(-574521795)
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
Policy response = backendServicesClient.getIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetIamPolicyBackendServiceRequest,Policy> getIamPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
GetIamPolicyBackendServiceRequest request =
GetIamPolicyBackendServiceRequest.newBuilder()
.setOptionsRequestedPolicyVersion(-574521795)
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
ApiFuture<Policy> future = backendServicesClient.getIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> insertAsync(String project, BackendService backendServiceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
BackendService backendServiceResource = BackendService.newBuilder().build();
Operation response = backendServicesClient.insertAsync(project, backendServiceResource).get();
}
project - Project ID for this request.backendServiceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> insertAsync(InsertBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
InsertBackendServiceRequest request =
InsertBackendServiceRequest.newBuilder()
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.insertAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<InsertBackendServiceRequest,Operation,Operation> insertOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
InsertBackendServiceRequest request =
InsertBackendServiceRequest.newBuilder()
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.insertOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<InsertBackendServiceRequest,Operation> insertCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
InsertBackendServiceRequest request =
InsertBackendServiceRequest.newBuilder()
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backendServicesClient.insertCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final BackendServicesClient.ListPagedResponse list(String project)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
for (BackendService element : backendServicesClient.list(project).iterateAll()) {
// doThingsWith(element);
}
}
project - Project ID for this request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BackendServicesClient.ListPagedResponse list(ListBackendServicesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListBackendServicesRequest request =
ListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
for (BackendService element : backendServicesClient.list(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListBackendServicesRequest,BackendServicesClient.ListPagedResponse> listPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListBackendServicesRequest request =
ListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
ApiFuture<BackendService> future =
backendServicesClient.listPagedCallable().futureCall(request);
// Do something.
for (BackendService element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListBackendServicesRequest,BackendServiceList> listCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListBackendServicesRequest request =
ListBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
while (true) {
BackendServiceList response = backendServicesClient.listCallable().call(request);
for (BackendService element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final BackendServicesClient.ListUsablePagedResponse listUsable(String project)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
for (BackendService element : backendServicesClient.listUsable(project).iterateAll()) {
// doThingsWith(element);
}
}
project - Project ID for this request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final BackendServicesClient.ListUsablePagedResponse listUsable(ListUsableBackendServicesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListUsableBackendServicesRequest request =
ListUsableBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
for (BackendService element : backendServicesClient.listUsable(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListUsableBackendServicesRequest,BackendServicesClient.ListUsablePagedResponse> listUsablePagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListUsableBackendServicesRequest request =
ListUsableBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
ApiFuture<BackendService> future =
backendServicesClient.listUsablePagedCallable().futureCall(request);
// Do something.
for (BackendService element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListUsableBackendServicesRequest,BackendServiceListUsable> listUsableCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
ListUsableBackendServicesRequest request =
ListUsableBackendServicesRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
while (true) {
BackendServiceListUsable response =
backendServicesClient.listUsableCallable().call(request);
for (BackendService element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> patchAsync(String project, String backendService, BackendService backendServiceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
BackendService backendServiceResource = BackendService.newBuilder().build();
Operation response =
backendServicesClient.patchAsync(project, backendService, backendServiceResource).get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to patch.backendServiceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> patchAsync(PatchBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
PatchBackendServiceRequest request =
PatchBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.patchAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<PatchBackendServiceRequest,Operation,Operation> patchOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
PatchBackendServiceRequest request =
PatchBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.patchOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<PatchBackendServiceRequest,Operation> patchCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
PatchBackendServiceRequest request =
PatchBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backendServicesClient.patchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> setEdgeSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
SecurityPolicyReference securityPolicyReferenceResource =
SecurityPolicyReference.newBuilder().build();
Operation response =
backendServicesClient
.setEdgeSecurityPolicyAsync(project, backendService, securityPolicyReferenceResource)
.get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to which the edge security policy
should be set. The name should conform to RFC1035.securityPolicyReferenceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> setEdgeSecurityPolicyAsync(SetEdgeSecurityPolicyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetEdgeSecurityPolicyBackendServiceRequest request =
SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
Operation response = backendServicesClient.setEdgeSecurityPolicyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation,Operation> setEdgeSecurityPolicyOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetEdgeSecurityPolicyBackendServiceRequest request =
SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.setEdgeSecurityPolicyOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation> setEdgeSecurityPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetEdgeSecurityPolicyBackendServiceRequest request =
SetEdgeSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
ApiFuture<Operation> future =
backendServicesClient.setEdgeSecurityPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final Policy setIamPolicy(String project, String resource, GlobalSetPolicyRequest globalSetPolicyRequestResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String resource = "resource-341064690";
GlobalSetPolicyRequest globalSetPolicyRequestResource =
GlobalSetPolicyRequest.newBuilder().build();
Policy response =
backendServicesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource);
}
project - Project ID for this request.resource - Name or id of the resource for this request.globalSetPolicyRequestResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final Policy setIamPolicy(SetIamPolicyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetIamPolicyBackendServiceRequest request =
SetIamPolicyBackendServiceRequest.newBuilder()
.setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
Policy response = backendServicesClient.setIamPolicy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SetIamPolicyBackendServiceRequest,Policy> setIamPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetIamPolicyBackendServiceRequest request =
SetIamPolicyBackendServiceRequest.newBuilder()
.setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
ApiFuture<Policy> future = backendServicesClient.setIamPolicyCallable().futureCall(request);
// Do something.
Policy response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> setSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
SecurityPolicyReference securityPolicyReferenceResource =
SecurityPolicyReference.newBuilder().build();
Operation response =
backendServicesClient
.setSecurityPolicyAsync(project, backendService, securityPolicyReferenceResource)
.get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to which the security policy should
be set. The name should conform to RFC1035.securityPolicyReferenceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> setSecurityPolicyAsync(SetSecurityPolicyBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetSecurityPolicyBackendServiceRequest request =
SetSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
Operation response = backendServicesClient.setSecurityPolicyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<SetSecurityPolicyBackendServiceRequest,Operation,Operation> setSecurityPolicyOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetSecurityPolicyBackendServiceRequest request =
SetSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.setSecurityPolicyOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<SetSecurityPolicyBackendServiceRequest,Operation> setSecurityPolicyCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
SetSecurityPolicyBackendServiceRequest request =
SetSecurityPolicyBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.setSecurityPolicyReferenceResource(SecurityPolicyReference.newBuilder().build())
.build();
ApiFuture<Operation> future =
backendServicesClient.setSecurityPolicyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final TestPermissionsResponse testIamPermissions(String project, String resource, TestPermissionsRequest testPermissionsRequestResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String resource = "resource-341064690";
TestPermissionsRequest testPermissionsRequestResource =
TestPermissionsRequest.newBuilder().build();
TestPermissionsResponse response =
backendServicesClient.testIamPermissions(
project, resource, testPermissionsRequestResource);
}
project - Project ID for this request.resource - Name or id of the resource for this request.testPermissionsRequestResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final TestPermissionsResponse testIamPermissions(TestIamPermissionsBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
TestIamPermissionsBackendServiceRequest request =
TestIamPermissionsBackendServiceRequest.newBuilder()
.setProject("project-309310695")
.setResource("resource-341064690")
.setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
.build();
TestPermissionsResponse response = backendServicesClient.testIamPermissions(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<TestIamPermissionsBackendServiceRequest,TestPermissionsResponse> testIamPermissionsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
TestIamPermissionsBackendServiceRequest request =
TestIamPermissionsBackendServiceRequest.newBuilder()
.setProject("project-309310695")
.setResource("resource-341064690")
.setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
.build();
ApiFuture<TestPermissionsResponse> future =
backendServicesClient.testIamPermissionsCallable().futureCall(request);
// Do something.
TestPermissionsResponse response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> updateAsync(String project, String backendService, BackendService backendServiceResource)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
BackendService backendServiceResource = BackendService.newBuilder().build();
Operation response =
backendServicesClient.updateAsync(project, backendService, backendServiceResource).get();
}
project - Project ID for this request.backendService - Name of the BackendService resource to update.backendServiceResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> updateAsync(UpdateBackendServiceRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
UpdateBackendServiceRequest request =
UpdateBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.updateAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateBackendServiceRequest,Operation,Operation> updateOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
UpdateBackendServiceRequest request =
UpdateBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
backendServicesClient.updateOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateBackendServiceRequest,Operation> updateCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
UpdateBackendServiceRequest request =
UpdateBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setBackendServiceResource(BackendService.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = backendServicesClient.updateCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.