- 1.63.0 (latest)
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
GitHub Repository | Product Reference |
Service Description: The BackendServices API.
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
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 |
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
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
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
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
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
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
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
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.
Static Methods
create()
public static final BackendServicesClient create()
Constructs an instance of BackendServicesClient with default settings.
Returns | |
---|---|
Type | Description |
BackendServicesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(BackendServicesSettings settings)
public static final BackendServicesClient create(BackendServicesSettings settings)
Constructs an instance of BackendServicesClient, 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 | BackendServicesSettings |
Returns | |
---|---|
Type | Description |
BackendServicesClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(BackendServicesStub stub)
public static final BackendServicesClient create(BackendServicesStub stub)
Constructs an instance of BackendServicesClient, using the given stub for making calls. This is for advanced usage - prefer using create(BackendServicesSettings).
Parameter | |
---|---|
Name | Description |
stub | BackendServicesStub |
Returns | |
---|---|
Type | Description |
BackendServicesClient |
Constructors
BackendServicesClient(BackendServicesSettings settings)
protected BackendServicesClient(BackendServicesSettings settings)
Constructs an instance of BackendServicesClient, 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 | BackendServicesSettings |
BackendServicesClient(BackendServicesStub stub)
protected BackendServicesClient(BackendServicesStub stub)
Parameter | |
---|---|
Name | Description |
stub | BackendServicesStub |
Methods
addSignedUrlKeyAsync(AddSignedUrlKeyBackendServiceRequest request)
public final OperationFuture<Operation,Operation> addSignedUrlKeyAsync(AddSignedUrlKeyBackendServiceRequest request)
Adds a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Parameter | |
---|---|
Name | Description |
request | AddSignedUrlKeyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
addSignedUrlKeyAsync(String project, String backendService, SignedUrlKey signedUrlKeyResource)
public final OperationFuture<Operation,Operation> addSignedUrlKeyAsync(String project, String backendService, SignedUrlKey signedUrlKeyResource)
Adds a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. |
signedUrlKeyResource | SignedUrlKey The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
addSignedUrlKeyCallable()
public final UnaryCallable<AddSignedUrlKeyBackendServiceRequest,Operation> addSignedUrlKeyCallable()
Adds a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AddSignedUrlKeyBackendServiceRequest,Operation> |
addSignedUrlKeyOperationCallable()
public final OperationCallable<AddSignedUrlKeyBackendServiceRequest,Operation,Operation> addSignedUrlKeyOperationCallable()
Adds a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<AddSignedUrlKeyBackendServiceRequest,Operation,Operation> |
aggregatedList(AggregatedListBackendServicesRequest request)
public final BackendServicesClient.AggregatedListPagedResponse aggregatedList(AggregatedListBackendServicesRequest request)
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
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
Parameter | |
---|---|
Name | Description |
request | AggregatedListBackendServicesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.AggregatedListPagedResponse |
aggregatedList(String project)
public final BackendServicesClient.AggregatedListPagedResponse aggregatedList(String project)
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
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
Parameter | |
---|---|
Name | Description |
project | String Name of the project scoping this request. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.AggregatedListPagedResponse |
aggregatedListCallable()
public final UnaryCallable<AggregatedListBackendServicesRequest,BackendServiceAggregatedList> aggregatedListCallable()
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
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AggregatedListBackendServicesRequest,BackendServiceAggregatedList> |
aggregatedListPagedCallable()
public final UnaryCallable<AggregatedListBackendServicesRequest,BackendServicesClient.AggregatedListPagedResponse> aggregatedListPagedCallable()
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
.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<AggregatedListBackendServicesRequest,AggregatedListPagedResponse> |
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()
deleteAsync(DeleteBackendServiceRequest request)
public final OperationFuture<Operation,Operation> deleteAsync(DeleteBackendServiceRequest request)
Deletes the specified BackendService 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()) {
DeleteBackendServiceRequest request =
DeleteBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = backendServicesClient.deleteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request | DeleteBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
deleteAsync(String project, String backendService)
public final OperationFuture<Operation,Operation> deleteAsync(String project, String backendService)
Deletes the specified BackendService 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 backendService = "backendService-1884714623";
Operation response = backendServicesClient.deleteAsync(project, backendService).get();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
deleteCallable()
public final UnaryCallable<DeleteBackendServiceRequest,Operation> deleteCallable()
Deletes the specified BackendService 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteBackendServiceRequest,Operation> |
deleteOperationCallable()
public final OperationCallable<DeleteBackendServiceRequest,Operation,Operation> deleteOperationCallable()
Deletes the specified BackendService 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()) {
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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteBackendServiceRequest,Operation,Operation> |
deleteSignedUrlKeyAsync(DeleteSignedUrlKeyBackendServiceRequest request)
public final OperationFuture<Operation,Operation> deleteSignedUrlKeyAsync(DeleteSignedUrlKeyBackendServiceRequest request)
Deletes a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Parameter | |
---|---|
Name | Description |
request | DeleteSignedUrlKeyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
deleteSignedUrlKeyAsync(String project, String backendService, String keyName)
public final OperationFuture<Operation,Operation> deleteSignedUrlKeyAsync(String project, String backendService, String keyName)
Deletes a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
String project = "project-309310695";
String backendService = "backendService-1884714623";
String keyName = "keyName-815643254";
Operation response =
backendServicesClient.deleteSignedUrlKeyAsync(project, backendService, keyName).get();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to which the Signed URL Key should be added. The name should conform to RFC1035. |
keyName | String The name of the Signed URL Key to delete. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
deleteSignedUrlKeyCallable()
public final UnaryCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation> deleteSignedUrlKeyCallable()
Deletes a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation> |
deleteSignedUrlKeyOperationCallable()
public final OperationCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation,Operation> deleteSignedUrlKeyOperationCallable()
Deletes a key for validating requests with signed URLs for this backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteSignedUrlKeyBackendServiceRequest,Operation,Operation> |
get(GetBackendServiceRequest request)
public final BackendService get(GetBackendServiceRequest request)
Returns the specified BackendService 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()) {
GetBackendServiceRequest request =
GetBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.build();
BackendService response = backendServicesClient.get(request);
}
Parameter | |
---|---|
Name | Description |
request | GetBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BackendService |
get(String project, String backendService)
public final BackendService get(String project, String backendService)
Returns the specified BackendService 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 backendService = "backendService-1884714623";
BackendService response = backendServicesClient.get(project, backendService);
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to return. |
Returns | |
---|---|
Type | Description |
BackendService |
getCallable()
public final UnaryCallable<GetBackendServiceRequest,BackendService> getCallable()
Returns the specified BackendService 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()) {
GetBackendServiceRequest request =
GetBackendServiceRequest.newBuilder()
.setBackendService("backendService-1884714623")
.setProject("project-309310695")
.build();
ApiFuture<BackendService> future = backendServicesClient.getCallable().futureCall(request);
// Do something.
BackendService response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetBackendServiceRequest,BackendService> |
getHealth(GetHealthBackendServiceRequest request)
public final BackendServiceGroupHealth getHealth(GetHealthBackendServiceRequest request)
Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameter | |
---|---|
Name | Description |
request | GetHealthBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BackendServiceGroupHealth |
getHealth(String project, String backendService, ResourceGroupReference resourceGroupReferenceResource)
public final BackendServiceGroupHealth getHealth(String project, String backendService, ResourceGroupReference resourceGroupReferenceResource)
Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameters | |
---|---|
Name | Description |
project | String |
backendService | String Name of the BackendService resource to which the queried instance belongs. |
resourceGroupReferenceResource | ResourceGroupReference The body resource for this request |
Returns | |
---|---|
Type | Description |
BackendServiceGroupHealth |
getHealthCallable()
public final UnaryCallable<GetHealthBackendServiceRequest,BackendServiceGroupHealth> getHealthCallable()
Gets the most recent health check results for this BackendService. Example request body: { "group": "/zones/us-east1-b/instanceGroups/lb-backend-example" }
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetHealthBackendServiceRequest,BackendServiceGroupHealth> |
getIamPolicy(GetIamPolicyBackendServiceRequest request)
public final Policy getIamPolicy(GetIamPolicyBackendServiceRequest request)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameter | |
---|---|
Name | Description |
request | GetIamPolicyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Policy |
getIamPolicy(String project, String resource)
public final Policy getIamPolicy(String project, String resource)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
resource | String Name or id of the resource for this request. |
Returns | |
---|---|
Type | Description |
Policy |
getIamPolicyCallable()
public final UnaryCallable<GetIamPolicyBackendServiceRequest,Policy> getIamPolicyCallable()
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetIamPolicyBackendServiceRequest,Policy> |
getSettings()
public final BackendServicesSettings getSettings()
Returns | |
---|---|
Type | Description |
BackendServicesSettings |
getStub()
public BackendServicesStub getStub()
Returns | |
---|---|
Type | Description |
BackendServicesStub |
insertAsync(InsertBackendServiceRequest request)
public final OperationFuture<Operation,Operation> insertAsync(InsertBackendServiceRequest request)
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameter | |
---|---|
Name | Description |
request | InsertBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
insertAsync(String project, BackendService backendServiceResource)
public final OperationFuture<Operation,Operation> insertAsync(String project, BackendService backendServiceResource)
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendServiceResource | BackendService The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
insertCallable()
public final UnaryCallable<InsertBackendServiceRequest,Operation> insertCallable()
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<InsertBackendServiceRequest,Operation> |
insertOperationCallable()
public final OperationCallable<InsertBackendServiceRequest,Operation,Operation> insertOperationCallable()
Creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<InsertBackendServiceRequest,Operation,Operation> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
list(ListBackendServicesRequest request)
public final BackendServicesClient.ListPagedResponse list(ListBackendServicesRequest request)
Retrieves the list of BackendService resources available to the specified 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()) {
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);
}
}
Parameter | |
---|---|
Name | Description |
request | ListBackendServicesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.ListPagedResponse |
list(String project)
public final BackendServicesClient.ListPagedResponse list(String project)
Retrieves the list of BackendService resources available to the specified 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);
}
}
Parameter | |
---|---|
Name | Description |
project | String Project ID for this request. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.ListPagedResponse |
listCallable()
public final UnaryCallable<ListBackendServicesRequest,BackendServiceList> listCallable()
Retrieves the list of BackendService resources available to the specified 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()) {
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListBackendServicesRequest,BackendServiceList> |
listPagedCallable()
public final UnaryCallable<ListBackendServicesRequest,BackendServicesClient.ListPagedResponse> listPagedCallable()
Retrieves the list of BackendService resources available to the specified 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()) {
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListBackendServicesRequest,ListPagedResponse> |
listUsable(ListUsableBackendServicesRequest request)
public final BackendServicesClient.ListUsablePagedResponse listUsable(ListUsableBackendServicesRequest request)
Retrieves an aggregated list of all usable backend services in the specified 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()) {
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);
}
}
Parameter | |
---|---|
Name | Description |
request | ListUsableBackendServicesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.ListUsablePagedResponse |
listUsable(String project)
public final BackendServicesClient.ListUsablePagedResponse listUsable(String project)
Retrieves an aggregated list of all usable backend services in the specified 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);
}
}
Parameter | |
---|---|
Name | Description |
project | String Project ID for this request. |
Returns | |
---|---|
Type | Description |
BackendServicesClient.ListUsablePagedResponse |
listUsableCallable()
public final UnaryCallable<ListUsableBackendServicesRequest,BackendServiceListUsable> listUsableCallable()
Retrieves an aggregated list of all usable backend services in the specified 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()) {
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;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListUsableBackendServicesRequest,BackendServiceListUsable> |
listUsablePagedCallable()
public final UnaryCallable<ListUsableBackendServicesRequest,BackendServicesClient.ListUsablePagedResponse> listUsablePagedCallable()
Retrieves an aggregated list of all usable backend services in the specified 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()) {
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);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListUsableBackendServicesRequest,ListUsablePagedResponse> |
patchAsync(PatchBackendServiceRequest request)
public final OperationFuture<Operation,Operation> patchAsync(PatchBackendServiceRequest request)
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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameter | |
---|---|
Name | Description |
request | PatchBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
patchAsync(String project, String backendService, BackendService backendServiceResource)
public final OperationFuture<Operation,Operation> patchAsync(String project, String backendService, BackendService backendServiceResource)
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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to patch. |
backendServiceResource | BackendService The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
patchCallable()
public final UnaryCallable<PatchBackendServiceRequest,Operation> patchCallable()
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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<PatchBackendServiceRequest,Operation> |
patchOperationCallable()
public final OperationCallable<PatchBackendServiceRequest,Operation,Operation> patchOperationCallable()
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.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<PatchBackendServiceRequest,Operation,Operation> |
setEdgeSecurityPolicyAsync(SetEdgeSecurityPolicyBackendServiceRequest request)
public final OperationFuture<Operation,Operation> setEdgeSecurityPolicyAsync(SetEdgeSecurityPolicyBackendServiceRequest request)
Sets the edge security policy for the specified backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Parameter | |
---|---|
Name | Description |
request | SetEdgeSecurityPolicyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
setEdgeSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
public final OperationFuture<Operation,Operation> setEdgeSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
Sets the edge security policy for the specified backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to which the edge security policy should be set. The name should conform to RFC1035. |
securityPolicyReferenceResource | SecurityPolicyReference The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
setEdgeSecurityPolicyCallable()
public final UnaryCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation> setEdgeSecurityPolicyCallable()
Sets the edge security policy for the specified backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation> |
setEdgeSecurityPolicyOperationCallable()
public final OperationCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation,Operation> setEdgeSecurityPolicyOperationCallable()
Sets the edge security policy for the specified backend service.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<SetEdgeSecurityPolicyBackendServiceRequest,Operation,Operation> |
setIamPolicy(SetIamPolicyBackendServiceRequest request)
public final Policy setIamPolicy(SetIamPolicyBackendServiceRequest request)
Sets the access control policy on the specified resource. Replaces any existing policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameter | |
---|---|
Name | Description |
request | SetIamPolicyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
Policy |
setIamPolicy(String project, String resource, GlobalSetPolicyRequest globalSetPolicyRequestResource)
public final Policy setIamPolicy(String project, String resource, GlobalSetPolicyRequest globalSetPolicyRequestResource)
Sets the access control policy on the specified resource. Replaces any existing policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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);
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
resource | String Name or id of the resource for this request. |
globalSetPolicyRequestResource | GlobalSetPolicyRequest The body resource for this request |
Returns | |
---|---|
Type | Description |
Policy |
setIamPolicyCallable()
public final UnaryCallable<SetIamPolicyBackendServiceRequest,Policy> setIamPolicyCallable()
Sets the access control policy on the specified resource. Replaces any existing policy.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SetIamPolicyBackendServiceRequest,Policy> |
setSecurityPolicyAsync(SetSecurityPolicyBackendServiceRequest request)
public final OperationFuture<Operation,Operation> setSecurityPolicyAsync(SetSecurityPolicyBackendServiceRequest request)
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameter | |
---|---|
Name | Description |
request | SetSecurityPolicyBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
setSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
public final OperationFuture<Operation,Operation> setSecurityPolicyAsync(String project, String backendService, SecurityPolicyReference securityPolicyReferenceResource)
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to which the security policy should be set. The name should conform to RFC1035. |
securityPolicyReferenceResource | SecurityPolicyReference The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
setSecurityPolicyCallable()
public final UnaryCallable<SetSecurityPolicyBackendServiceRequest,Operation> setSecurityPolicyCallable()
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<SetSecurityPolicyBackendServiceRequest,Operation> |
setSecurityPolicyOperationCallable()
public final OperationCallable<SetSecurityPolicyBackendServiceRequest,Operation,Operation> setSecurityPolicyOperationCallable()
Sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<SetSecurityPolicyBackendServiceRequest,Operation,Operation> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
testIamPermissions(TestIamPermissionsBackendServiceRequest request)
public final TestPermissionsResponse testIamPermissions(TestIamPermissionsBackendServiceRequest request)
Returns permissions that a caller has on the specified 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()) {
TestIamPermissionsBackendServiceRequest request =
TestIamPermissionsBackendServiceRequest.newBuilder()
.setProject("project-309310695")
.setResource("resource-341064690")
.setTestPermissionsRequestResource(TestPermissionsRequest.newBuilder().build())
.build();
TestPermissionsResponse response = backendServicesClient.testIamPermissions(request);
}
Parameter | |
---|---|
Name | Description |
request | TestIamPermissionsBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse |
testIamPermissions(String project, String resource, TestPermissionsRequest testPermissionsRequestResource)
public final TestPermissionsResponse testIamPermissions(String project, String resource, TestPermissionsRequest testPermissionsRequestResource)
Returns permissions that a caller has on the specified 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";
TestPermissionsRequest testPermissionsRequestResource =
TestPermissionsRequest.newBuilder().build();
TestPermissionsResponse response =
backendServicesClient.testIamPermissions(
project, resource, testPermissionsRequestResource);
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
resource | String Name or id of the resource for this request. |
testPermissionsRequestResource | TestPermissionsRequest The body resource for this request |
Returns | |
---|---|
Type | Description |
TestPermissionsResponse |
testIamPermissionsCallable()
public final UnaryCallable<TestIamPermissionsBackendServiceRequest,TestPermissionsResponse> testIamPermissionsCallable()
Returns permissions that a caller has on the specified 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()) {
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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<TestIamPermissionsBackendServiceRequest,TestPermissionsResponse> |
updateAsync(UpdateBackendServiceRequest request)
public final OperationFuture<Operation,Operation> updateAsync(UpdateBackendServiceRequest request)
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameter | |
---|---|
Name | Description |
request | UpdateBackendServiceRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
updateAsync(String project, String backendService, BackendService backendServiceResource)
public final OperationFuture<Operation,Operation> updateAsync(String project, String backendService, BackendService backendServiceResource)
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Parameters | |
---|---|
Name | Description |
project | String Project ID for this request. |
backendService | String Name of the BackendService resource to update. |
backendServiceResource | BackendService The body resource for this request |
Returns | |
---|---|
Type | Description |
OperationFuture<Operation,Operation> |
updateCallable()
public final UnaryCallable<UpdateBackendServiceRequest,Operation> updateCallable()
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateBackendServiceRequest,Operation> |
updateOperationCallable()
public final OperationCallable<UpdateBackendServiceRequest,Operation,Operation> updateOperationCallable()
Updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying 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();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateBackendServiceRequest,Operation,Operation> |