- 1.64.0 (latest)
- 1.63.0
- 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
public class InterconnectsClient implements BackgroundResource
Service Description: The Interconnects 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String interconnect = "interconnect-849140594";
Interconnect response = interconnectsClient.get(project, interconnect);
}
Note: close() needs to be called on the InterconnectsClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of InterconnectsSettings 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
InterconnectsSettings interconnectsSettings =
InterconnectsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
InterconnectsClient interconnectsClient = InterconnectsClient.create(interconnectsSettings);
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
InterconnectsSettings interconnectsSettings =
InterconnectsSettings.newBuilder().setEndpoint(myEndpoint).build();
InterconnectsClient interconnectsClient = InterconnectsClient.create(interconnectsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final InterconnectsClient create()
Constructs an instance of InterconnectsClient with default settings.
Type | Description |
InterconnectsClient |
Type | Description |
IOException |
create(InterconnectsSettings settings)
public static final InterconnectsClient create(InterconnectsSettings settings)
Constructs an instance of InterconnectsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | InterconnectsSettings |
Type | Description |
InterconnectsClient |
Type | Description |
IOException |
create(InterconnectsStub stub)
public static final InterconnectsClient create(InterconnectsStub stub)
Constructs an instance of InterconnectsClient, using the given stub for making calls. This is for advanced usage - prefer using create(InterconnectsSettings).
Name | Description |
stub | InterconnectsStub |
Type | Description |
InterconnectsClient |
Constructors
InterconnectsClient(InterconnectsSettings settings)
protected InterconnectsClient(InterconnectsSettings settings)
Constructs an instance of InterconnectsClient, 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.
Name | Description |
settings | InterconnectsSettings |
InterconnectsClient(InterconnectsStub stub)
protected InterconnectsClient(InterconnectsStub stub)
Name | Description |
stub | InterconnectsStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
deleteAsync(DeleteInterconnectRequest request)
public final OperationFuture<Operation,Operation> deleteAsync(DeleteInterconnectRequest request)
Deletes the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
DeleteInterconnectRequest request =
DeleteInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = interconnectsClient.deleteAsync(request).get();
}
Name | Description |
request | DeleteInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
deleteAsync(String project, String interconnect)
public final OperationFuture<Operation,Operation> deleteAsync(String project, String interconnect)
Deletes the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String interconnect = "interconnect-849140594";
Operation response = interconnectsClient.deleteAsync(project, interconnect).get();
}
Name | Description |
project | String Project ID for this request. |
interconnect | String Name of the interconnect to delete. |
Type | Description |
OperationFuture<Operation,Operation> |
deleteCallable()
public final UnaryCallable<DeleteInterconnectRequest,Operation> deleteCallable()
Deletes the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
DeleteInterconnectRequest request =
DeleteInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = interconnectsClient.deleteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<DeleteInterconnectRequest,Operation> |
deleteOperationCallable()
public final OperationCallable<DeleteInterconnectRequest,Operation,Operation> deleteOperationCallable()
Deletes the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
DeleteInterconnectRequest request =
DeleteInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
interconnectsClient.deleteOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
OperationCallable<DeleteInterconnectRequest,Operation,Operation> |
get(GetInterconnectRequest request)
public final Interconnect get(GetInterconnectRequest request)
Returns the specified interconnect. Get a list of available interconnects by making a list() request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
GetInterconnectRequest request =
GetInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.build();
Interconnect response = interconnectsClient.get(request);
}
Name | Description |
request | GetInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
Interconnect |
get(String project, String interconnect)
public final Interconnect get(String project, String interconnect)
Returns the specified interconnect. Get a list of available interconnects by making a list() request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String interconnect = "interconnect-849140594";
Interconnect response = interconnectsClient.get(project, interconnect);
}
Name | Description |
project | String Project ID for this request. |
interconnect | String Name of the interconnect to return. |
Type | Description |
Interconnect |
getCallable()
public final UnaryCallable<GetInterconnectRequest,Interconnect> getCallable()
Returns the specified interconnect. Get a list of available interconnects by making a list() request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
GetInterconnectRequest request =
GetInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.build();
ApiFuture<Interconnect> future = interconnectsClient.getCallable().futureCall(request);
// Do something.
Interconnect response = future.get();
}
Type | Description |
UnaryCallable<GetInterconnectRequest,Interconnect> |
getDiagnostics(GetDiagnosticsInterconnectRequest request)
public final InterconnectsGetDiagnosticsResponse getDiagnostics(GetDiagnosticsInterconnectRequest request)
Returns the interconnectDiagnostics for the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
GetDiagnosticsInterconnectRequest request =
GetDiagnosticsInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.build();
InterconnectsGetDiagnosticsResponse response = interconnectsClient.getDiagnostics(request);
}
Name | Description |
request | GetDiagnosticsInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
InterconnectsGetDiagnosticsResponse |
getDiagnostics(String project, String interconnect)
public final InterconnectsGetDiagnosticsResponse getDiagnostics(String project, String interconnect)
Returns the interconnectDiagnostics for the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String interconnect = "interconnect-849140594";
InterconnectsGetDiagnosticsResponse response =
interconnectsClient.getDiagnostics(project, interconnect);
}
Name | Description |
project | String Project ID for this request. |
interconnect | String Name of the interconnect resource to query. |
Type | Description |
InterconnectsGetDiagnosticsResponse |
getDiagnosticsCallable()
public final UnaryCallable<GetDiagnosticsInterconnectRequest,InterconnectsGetDiagnosticsResponse> getDiagnosticsCallable()
Returns the interconnectDiagnostics for the specified interconnect.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
GetDiagnosticsInterconnectRequest request =
GetDiagnosticsInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setProject("project-309310695")
.build();
ApiFuture<InterconnectsGetDiagnosticsResponse> future =
interconnectsClient.getDiagnosticsCallable().futureCall(request);
// Do something.
InterconnectsGetDiagnosticsResponse response = future.get();
}
Type | Description |
UnaryCallable<GetDiagnosticsInterconnectRequest,InterconnectsGetDiagnosticsResponse> |
getSettings()
public final InterconnectsSettings getSettings()
Type | Description |
InterconnectsSettings |
getStub()
public InterconnectsStub getStub()
Type | Description |
InterconnectsStub |
insertAsync(InsertInterconnectRequest request)
public final OperationFuture<Operation,Operation> insertAsync(InsertInterconnectRequest request)
Creates a Interconnect in the specified project using the data included in the request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
InsertInterconnectRequest request =
InsertInterconnectRequest.newBuilder()
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = interconnectsClient.insertAsync(request).get();
}
Name | Description |
request | InsertInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
insertAsync(String project, Interconnect interconnectResource)
public final OperationFuture<Operation,Operation> insertAsync(String project, Interconnect interconnectResource)
Creates a Interconnect in the specified project using the data included in the request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
Interconnect interconnectResource = Interconnect.newBuilder().build();
Operation response = interconnectsClient.insertAsync(project, interconnectResource).get();
}
Name | Description |
project | String Project ID for this request. |
interconnectResource | Interconnect The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
insertCallable()
public final UnaryCallable<InsertInterconnectRequest,Operation> insertCallable()
Creates a Interconnect in the specified project using the data included in the request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
InsertInterconnectRequest request =
InsertInterconnectRequest.newBuilder()
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = interconnectsClient.insertCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<InsertInterconnectRequest,Operation> |
insertOperationCallable()
public final OperationCallable<InsertInterconnectRequest,Operation,Operation> insertOperationCallable()
Creates a Interconnect in the specified project using the data included in the request.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
InsertInterconnectRequest request =
InsertInterconnectRequest.newBuilder()
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
interconnectsClient.insertOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
OperationCallable<InsertInterconnectRequest,Operation,Operation> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
list(ListInterconnectsRequest request)
public final InterconnectsClient.ListPagedResponse list(ListInterconnectsRequest request)
Retrieves the list of interconnect 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
ListInterconnectsRequest request =
ListInterconnectsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
for (Interconnect element : interconnectsClient.list(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListInterconnectsRequest The request object containing all of the parameters for the API call. |
Type | Description |
InterconnectsClient.ListPagedResponse |
list(String project)
public final InterconnectsClient.ListPagedResponse list(String project)
Retrieves the list of interconnect 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
for (Interconnect element : interconnectsClient.list(project).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
project | String Project ID for this request. |
Type | Description |
InterconnectsClient.ListPagedResponse |
listCallable()
public final UnaryCallable<ListInterconnectsRequest,InterconnectList> listCallable()
Retrieves the list of interconnect 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
ListInterconnectsRequest request =
ListInterconnectsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
while (true) {
InterconnectList response = interconnectsClient.listCallable().call(request);
for (Interconnect element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListInterconnectsRequest,InterconnectList> |
listPagedCallable()
public final UnaryCallable<ListInterconnectsRequest,InterconnectsClient.ListPagedResponse> listPagedCallable()
Retrieves the list of interconnect 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
ListInterconnectsRequest request =
ListInterconnectsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setReturnPartialSuccess(true)
.build();
ApiFuture<Interconnect> future = interconnectsClient.listPagedCallable().futureCall(request);
// Do something.
for (Interconnect element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListInterconnectsRequest,ListPagedResponse> |
patchAsync(PatchInterconnectRequest request)
public final OperationFuture<Operation,Operation> patchAsync(PatchInterconnectRequest request)
Updates the specified interconnect with the data included in the request. 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
PatchInterconnectRequest request =
PatchInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
Operation response = interconnectsClient.patchAsync(request).get();
}
Name | Description |
request | PatchInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
patchAsync(String project, String interconnect, Interconnect interconnectResource)
public final OperationFuture<Operation,Operation> patchAsync(String project, String interconnect, Interconnect interconnectResource)
Updates the specified interconnect with the data included in the request. 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String interconnect = "interconnect-849140594";
Interconnect interconnectResource = Interconnect.newBuilder().build();
Operation response =
interconnectsClient.patchAsync(project, interconnect, interconnectResource).get();
}
Name | Description |
project | String Project ID for this request. |
interconnect | String Name of the interconnect to update. |
interconnectResource | Interconnect The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
patchCallable()
public final UnaryCallable<PatchInterconnectRequest,Operation> patchCallable()
Updates the specified interconnect with the data included in the request. 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
PatchInterconnectRequest request =
PatchInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
ApiFuture<Operation> future = interconnectsClient.patchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<PatchInterconnectRequest,Operation> |
patchOperationCallable()
public final OperationCallable<PatchInterconnectRequest,Operation,Operation> patchOperationCallable()
Updates the specified interconnect with the data included in the request. 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 (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
PatchInterconnectRequest request =
PatchInterconnectRequest.newBuilder()
.setInterconnect("interconnect-849140594")
.setInterconnectResource(Interconnect.newBuilder().build())
.setProject("project-309310695")
.setRequestId("requestId693933066")
.build();
OperationFuture<Operation, Operation> future =
interconnectsClient.patchOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
OperationCallable<PatchInterconnectRequest,Operation,Operation> |
setLabelsAsync(SetLabelsInterconnectRequest request)
public final OperationFuture<Operation,Operation> setLabelsAsync(SetLabelsInterconnectRequest request)
Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
SetLabelsInterconnectRequest request =
SetLabelsInterconnectRequest.newBuilder()
.setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
Operation response = interconnectsClient.setLabelsAsync(request).get();
}
Name | Description |
request | SetLabelsInterconnectRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Operation,Operation> |
setLabelsAsync(String project, String resource, GlobalSetLabelsRequest globalSetLabelsRequestResource)
public final OperationFuture<Operation,Operation> setLabelsAsync(String project, String resource, GlobalSetLabelsRequest globalSetLabelsRequestResource)
Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
String project = "project-309310695";
String resource = "resource-341064690";
GlobalSetLabelsRequest globalSetLabelsRequestResource =
GlobalSetLabelsRequest.newBuilder().build();
Operation response =
interconnectsClient
.setLabelsAsync(project, resource, globalSetLabelsRequestResource)
.get();
}
Name | Description |
project | String Project ID for this request. |
resource | String Name or id of the resource for this request. |
globalSetLabelsRequestResource | GlobalSetLabelsRequest The body resource for this request |
Type | Description |
OperationFuture<Operation,Operation> |
setLabelsCallable()
public final UnaryCallable<SetLabelsInterconnectRequest,Operation> setLabelsCallable()
Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
SetLabelsInterconnectRequest request =
SetLabelsInterconnectRequest.newBuilder()
.setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
ApiFuture<Operation> future = interconnectsClient.setLabelsCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<SetLabelsInterconnectRequest,Operation> |
setLabelsOperationCallable()
public final OperationCallable<SetLabelsInterconnectRequest,Operation,Operation> setLabelsOperationCallable()
Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (InterconnectsClient interconnectsClient = InterconnectsClient.create()) {
SetLabelsInterconnectRequest request =
SetLabelsInterconnectRequest.newBuilder()
.setGlobalSetLabelsRequestResource(GlobalSetLabelsRequest.newBuilder().build())
.setProject("project-309310695")
.setResource("resource-341064690")
.build();
OperationFuture<Operation, Operation> future =
interconnectsClient.setLabelsOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
OperationCallable<SetLabelsInterconnectRequest,Operation,Operation> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()