Class InterconnectsClient (1.56.0)

GitHub RepositoryProduct Reference

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().

Methods
Method Description Method Variants

Delete

Deletes the specified Interconnect.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteAsync(DeleteInterconnectRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • deleteAsync(String project, String interconnect)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteOperationCallable()

  • deleteCallable()

Get

Returns the specified Interconnect. Get a list of available Interconnects by making a list() request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • get(GetInterconnectRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • get(String project, String interconnect)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getCallable()

GetDiagnostics

Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getDiagnostics(GetDiagnosticsInterconnectRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getDiagnostics(String project, String interconnect)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getDiagnosticsCallable()

GetMacsecConfig

Returns the interconnectMacsecConfig for the specified Interconnect.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getMacsecConfig(GetMacsecConfigInterconnectRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getMacsecConfig(String project, String interconnect)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getMacsecConfigCallable()

Insert

Creates an Interconnect in the specified project using the data included in the request.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • insertAsync(InsertInterconnectRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • insertAsync(String project, Interconnect interconnectResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • insertOperationCallable()

  • insertCallable()

List

Retrieves the list of Interconnects available to the specified project.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • list(ListInterconnectsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • list(String project)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listPagedCallable()

  • listCallable()

Patch

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.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • patchAsync(PatchInterconnectRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • patchAsync(String project, String interconnect, Interconnect interconnectResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • patchOperationCallable()

  • patchCallable()

SetLabels

Sets the labels on an Interconnect. To learn more about labels, read the Labeling Resources documentation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setLabelsAsync(SetLabelsInterconnectRequest request)

Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

  • setLabelsAsync(String project, String resource, GlobalSetLabelsRequest globalSetLabelsRequestResource)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setLabelsOperationCallable()

  • setLabelsCallable()

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.

Inheritance

java.lang.Object > InterconnectsClient

Static Methods

create()

public static final InterconnectsClient create()

Constructs an instance of InterconnectsClient with default settings.

Returns
Type Description
InterconnectsClient
Exceptions
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.

Parameter
Name Description
settings InterconnectsSettings
Returns
Type Description
InterconnectsClient
Exceptions
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).

Parameter
Name Description
stub InterconnectsStub
Returns
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.

Parameter
Name Description
settings InterconnectsSettings

InterconnectsClient(InterconnectsStub stub)

protected InterconnectsClient(InterconnectsStub stub)
Parameter
Name Description
stub InterconnectsStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

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();
 }
 
Parameter
Name Description
request DeleteInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
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();
 }
 
Parameters
Name Description
project String

Project ID for this request.

interconnect String

Name of the interconnect to delete.

Returns
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();
 }
 
Returns
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();
 }
 
Returns
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);
 }
 
Parameter
Name Description
request GetInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
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);
 }
 
Parameters
Name Description
project String

Project ID for this request.

interconnect String

Name of the interconnect to return.

Returns
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();
 }
 
Returns
Type Description
UnaryCallable<GetInterconnectRequest,Interconnect>

getDiagnostics(GetDiagnosticsInterconnectRequest request)

public final InterconnectsGetDiagnosticsResponse getDiagnostics(GetDiagnosticsInterconnectRequest request)

Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameter
Name Description
request GetDiagnosticsInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
InterconnectsGetDiagnosticsResponse

getDiagnostics(String project, String interconnect)

public final InterconnectsGetDiagnosticsResponse getDiagnostics(String project, String interconnect)

Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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);
 }
 
Parameters
Name Description
project String

Project ID for this request.

interconnect String

Name of the interconnect resource to query.

Returns
Type Description
InterconnectsGetDiagnosticsResponse

getDiagnosticsCallable()

public final UnaryCallable<GetDiagnosticsInterconnectRequest,InterconnectsGetDiagnosticsResponse> getDiagnosticsCallable()

Returns the interconnectDiagnostics for the specified Interconnect. In the event of a global outage, do not use this API to make decisions about where to redirect your network traffic. Unlike a VLAN attachment, which is regional, a Cloud Interconnect connection is a global resource. A global outage can prevent this API from functioning properly.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying 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();
 }
 
Returns
Type Description
UnaryCallable<GetDiagnosticsInterconnectRequest,InterconnectsGetDiagnosticsResponse>

getMacsecConfig(GetMacsecConfigInterconnectRequest request)

public final InterconnectsGetMacsecConfigResponse getMacsecConfig(GetMacsecConfigInterconnectRequest request)

Returns the interconnectMacsecConfig 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()) {
   GetMacsecConfigInterconnectRequest request =
       GetMacsecConfigInterconnectRequest.newBuilder()
           .setInterconnect("interconnect-849140594")
           .setProject("project-309310695")
           .build();
   InterconnectsGetMacsecConfigResponse response = interconnectsClient.getMacsecConfig(request);
 }
 
Parameter
Name Description
request GetMacsecConfigInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
InterconnectsGetMacsecConfigResponse

getMacsecConfig(String project, String interconnect)

public final InterconnectsGetMacsecConfigResponse getMacsecConfig(String project, String interconnect)

Returns the interconnectMacsecConfig 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";
   InterconnectsGetMacsecConfigResponse response =
       interconnectsClient.getMacsecConfig(project, interconnect);
 }
 
Parameters
Name Description
project String

Project ID for this request.

interconnect String

Name of the interconnect resource to query.

Returns
Type Description
InterconnectsGetMacsecConfigResponse

getMacsecConfigCallable()

public final UnaryCallable<GetMacsecConfigInterconnectRequest,InterconnectsGetMacsecConfigResponse> getMacsecConfigCallable()

Returns the interconnectMacsecConfig 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()) {
   GetMacsecConfigInterconnectRequest request =
       GetMacsecConfigInterconnectRequest.newBuilder()
           .setInterconnect("interconnect-849140594")
           .setProject("project-309310695")
           .build();
   ApiFuture<InterconnectsGetMacsecConfigResponse> future =
       interconnectsClient.getMacsecConfigCallable().futureCall(request);
   // Do something.
   InterconnectsGetMacsecConfigResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetMacsecConfigInterconnectRequest,InterconnectsGetMacsecConfigResponse>

getSettings()

public final InterconnectsSettings getSettings()
Returns
Type Description
InterconnectsSettings

getStub()

public InterconnectsStub getStub()
Returns
Type Description
InterconnectsStub

insertAsync(InsertInterconnectRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertInterconnectRequest request)

Creates an 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();
 }
 
Parameter
Name Description
request InsertInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Operation,Operation>

insertAsync(String project, Interconnect interconnectResource)

public final OperationFuture<Operation,Operation> insertAsync(String project, Interconnect interconnectResource)

Creates an 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();
 }
 
Parameters
Name Description
project String

Project ID for this request.

interconnectResource Interconnect

The body resource for this request

Returns
Type Description
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertInterconnectRequest,Operation> insertCallable()

Creates an 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();
 }
 
Returns
Type Description
UnaryCallable<InsertInterconnectRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertInterconnectRequest,Operation,Operation> insertOperationCallable()

Creates an 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();
 }
 
Returns
Type Description
OperationCallable<InsertInterconnectRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

list(ListInterconnectsRequest request)

public final InterconnectsClient.ListPagedResponse list(ListInterconnectsRequest request)

Retrieves the list of Interconnects 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);
   }
 }
 
Parameter
Name Description
request ListInterconnectsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
InterconnectsClient.ListPagedResponse

list(String project)

public final InterconnectsClient.ListPagedResponse list(String project)

Retrieves the list of Interconnects 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);
   }
 }
 
Parameter
Name Description
project String

Project ID for this request.

Returns
Type Description
InterconnectsClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListInterconnectsRequest,InterconnectList> listCallable()

Retrieves the list of Interconnects 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListInterconnectsRequest,InterconnectList>

listPagedCallable()

public final UnaryCallable<ListInterconnectsRequest,InterconnectsClient.ListPagedResponse> listPagedCallable()

Retrieves the list of Interconnects 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);
   }
 }
 
Returns
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();
 }
 
Parameter
Name Description
request PatchInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
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();
 }
 
Parameters
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

Returns
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();
 }
 
Returns
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();
 }
 
Returns
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();
 }
 
Parameter
Name Description
request SetLabelsInterconnectRequest

The request object containing all of the parameters for the API call.

Returns
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();
 }
 
Parameters
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

Returns
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();
 }
 
Returns
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();
 }
 
Returns
Type Description
OperationCallable<SetLabelsInterconnectRequest,Operation,Operation>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()