Class AppTopologyClient (0.3.0)

GitHub RepositoryProduct Reference

Service Description: Service describing handlers for resources

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   DiscoveredResourcesTopologyName name =
       DiscoveredResourcesTopologyName.of("[PROJECT]", "[LOCATION]");
   List<String> topologyDomains = new ArrayList<>();
   GenerateDiscoveredResourcesTopologyResponse response =
       appTopologyClient.generateDiscoveredResourcesTopology(name, topologyDomains);
 }
 

Note: close() needs to be called on the AppTopologyClient 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

GenerateDiscoveredResourcesTopology

Generate the topology for all resources in the given project. If the project represents an app boundary, the topology is generated for all resources in the boundary.

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

  • generateDiscoveredResourcesTopology(GenerateDiscoveredResourcesTopologyRequest request)

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

  • generateDiscoveredResourcesTopology(DiscoveredResourcesTopologyName name, List<String> topologyDomains)

  • generateDiscoveredResourcesTopology(String name, List<String> topologyDomains)

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

  • generateDiscoveredResourcesTopologyCallable()

GetSchema

Retrieves the schema for the specified topology domain. The schema defines the NodeTypes and EdgeTypes that are supported in GenerateDiscoveredResourcesTopology requests and responses for a given domain.

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

  • getSchema(GetSchemaRequest request)

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

  • getSchema(SchemaName name)

  • getSchema(String name)

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

  • getSchemaCallable()

GetDomain

Retrieves the specified topology domain.

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

  • getDomain(GetDomainRequest request)

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

  • getDomain(DomainName name)

  • getDomain(String name)

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

  • getDomainCallable()

ListDomains

Lists the topology domains available in a specific location. Only global location is supported.

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

  • listDomains(ListDomainsRequest request)

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

  • listDomains(LocationName parent)

  • listDomains(String parent)

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

  • listDomainsPagedCallable()

  • listDomainsCallable()

ListLocations

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If name is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If name follows the formatprojects/{project}, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the name field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

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

  • listLocations(ListLocationsRequest request)

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

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

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

  • getLocation(GetLocationRequest request)

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

  • getLocationCallable()

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 AppTopologySettings 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
 AppTopologySettings appTopologySettings =
     AppTopologySettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 AppTopologyClient appTopologyClient = AppTopologyClient.create(appTopologySettings);
 

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
 AppTopologySettings appTopologySettings =
     AppTopologySettings.newBuilder().setEndpoint(myEndpoint).build();
 AppTopologyClient appTopologyClient = AppTopologyClient.create(appTopologySettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 AppTopologySettings appTopologySettings = AppTopologySettings.newHttpJsonBuilder().build();
 AppTopologyClient appTopologyClient = AppTopologyClient.create(appTopologySettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

Inheritance

java.lang.Object > AppTopologyClient

Static Methods

create()

public static final AppTopologyClient create()

Constructs an instance of AppTopologyClient with default settings.

Returns
Type Description
AppTopologyClient
Exceptions
Type Description
IOException

create(AppTopologySettings settings)

public static final AppTopologyClient create(AppTopologySettings settings)

Constructs an instance of AppTopologyClient, 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 AppTopologySettings
Returns
Type Description
AppTopologyClient
Exceptions
Type Description
IOException

create(AppTopologyStub stub)

public static final AppTopologyClient create(AppTopologyStub stub)

Constructs an instance of AppTopologyClient, using the given stub for making calls. This is for advanced usage - prefer using create(AppTopologySettings).

Parameter
Name Description
stub AppTopologyStub
Returns
Type Description
AppTopologyClient

Constructors

AppTopologyClient(AppTopologySettings settings)

protected AppTopologyClient(AppTopologySettings settings)

Constructs an instance of AppTopologyClient, 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 AppTopologySettings

AppTopologyClient(AppTopologyStub stub)

protected AppTopologyClient(AppTopologyStub stub)
Parameter
Name Description
stub AppTopologyStub

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

generateDiscoveredResourcesTopology(@Nullable DiscoveredResourcesTopologyName name, List<String> topologyDomains)

public final GenerateDiscoveredResourcesTopologyResponse generateDiscoveredResourcesTopology(@Nullable DiscoveredResourcesTopologyName name, List<String> topologyDomains)

Generate the topology for all resources in the given project. If the project represents an app boundary, the topology is generated for all resources in the boundary.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   DiscoveredResourcesTopologyName name =
       DiscoveredResourcesTopologyName.of("[PROJECT]", "[LOCATION]");
   List<String> topologyDomains = new ArrayList<>();
   GenerateDiscoveredResourcesTopologyResponse response =
       appTopologyClient.generateDiscoveredResourcesTopology(name, topologyDomains);
 }
 
Parameters
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.apptopology.v1.DiscoveredResourcesTopologyName

Required. The project to query discoverable resources on. Expected format: projects/{project}/locations/{location}/discoveredResourcesTopology. Only global location is supported.

topologyDomains List<String>

Required. The full resource name of the domain of the app topology. Format: projects/{project}/locations/{location}/domains/{domain} Caller must have apptopology.domains.get permission on each of the domains.

Returns
Type Description
GenerateDiscoveredResourcesTopologyResponse

generateDiscoveredResourcesTopology(GenerateDiscoveredResourcesTopologyRequest request)

public final GenerateDiscoveredResourcesTopologyResponse generateDiscoveredResourcesTopology(GenerateDiscoveredResourcesTopologyRequest request)

Generate the topology for all resources in the given project. If the project represents an app boundary, the topology is generated for all resources in the boundary.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GenerateDiscoveredResourcesTopologyRequest request =
       GenerateDiscoveredResourcesTopologyRequest.newBuilder()
           .setName(DiscoveredResourcesTopologyName.of("[PROJECT]", "[LOCATION]").toString())
           .addAllTopologyDomains(new ArrayList<String>())
           .build();
   GenerateDiscoveredResourcesTopologyResponse response =
       appTopologyClient.generateDiscoveredResourcesTopology(request);
 }
 
Parameter
Name Description
request GenerateDiscoveredResourcesTopologyRequest

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

Returns
Type Description
GenerateDiscoveredResourcesTopologyResponse

generateDiscoveredResourcesTopology(String name, List<String> topologyDomains)

public final GenerateDiscoveredResourcesTopologyResponse generateDiscoveredResourcesTopology(String name, List<String> topologyDomains)

Generate the topology for all resources in the given project. If the project represents an app boundary, the topology is generated for all resources in the boundary.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   String name = DiscoveredResourcesTopologyName.of("[PROJECT]", "[LOCATION]").toString();
   List<String> topologyDomains = new ArrayList<>();
   GenerateDiscoveredResourcesTopologyResponse response =
       appTopologyClient.generateDiscoveredResourcesTopology(name, topologyDomains);
 }
 
Parameters
Name Description
name String

Required. The project to query discoverable resources on. Expected format: projects/{project}/locations/{location}/discoveredResourcesTopology. Only global location is supported.

topologyDomains List<String>

Required. The full resource name of the domain of the app topology. Format: projects/{project}/locations/{location}/domains/{domain} Caller must have apptopology.domains.get permission on each of the domains.

Returns
Type Description
GenerateDiscoveredResourcesTopologyResponse

generateDiscoveredResourcesTopologyCallable()

public final UnaryCallable<GenerateDiscoveredResourcesTopologyRequest,GenerateDiscoveredResourcesTopologyResponse> generateDiscoveredResourcesTopologyCallable()

Generate the topology for all resources in the given project. If the project represents an app boundary, the topology is generated for all resources in the boundary.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GenerateDiscoveredResourcesTopologyRequest request =
       GenerateDiscoveredResourcesTopologyRequest.newBuilder()
           .setName(DiscoveredResourcesTopologyName.of("[PROJECT]", "[LOCATION]").toString())
           .addAllTopologyDomains(new ArrayList<String>())
           .build();
   ApiFuture<GenerateDiscoveredResourcesTopologyResponse> future =
       appTopologyClient.generateDiscoveredResourcesTopologyCallable().futureCall(request);
   // Do something.
   GenerateDiscoveredResourcesTopologyResponse response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GenerateDiscoveredResourcesTopologyRequest,GenerateDiscoveredResourcesTopologyResponse>

getDomain(@Nullable DomainName name)

public final Domain getDomain(@Nullable DomainName name)

Retrieves the specified topology domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   DomainName name = DomainName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]");
   Domain response = appTopologyClient.getDomain(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.apptopology.v1.DomainName

Required. The name of the domain to retrieve. Format: projects/{project}/locations/{location}/domains/{domain}

Returns
Type Description
Domain

getDomain(GetDomainRequest request)

public final Domain getDomain(GetDomainRequest request)

Retrieves the specified topology domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetDomainRequest request =
       GetDomainRequest.newBuilder()
           .setName(DomainName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString())
           .build();
   Domain response = appTopologyClient.getDomain(request);
 }
 
Parameter
Name Description
request GetDomainRequest

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

Returns
Type Description
Domain

getDomain(String name)

public final Domain getDomain(String name)

Retrieves the specified topology domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   String name = DomainName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString();
   Domain response = appTopologyClient.getDomain(name);
 }
 
Parameter
Name Description
name String

Required. The name of the domain to retrieve. Format: projects/{project}/locations/{location}/domains/{domain}

Returns
Type Description
Domain

getDomainCallable()

public final UnaryCallable<GetDomainRequest,Domain> getDomainCallable()

Retrieves the specified topology domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetDomainRequest request =
       GetDomainRequest.newBuilder()
           .setName(DomainName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString())
           .build();
   ApiFuture<Domain> future = appTopologyClient.getDomainCallable().futureCall(request);
   // Do something.
   Domain response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetDomainRequest,Domain>

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   Location response = appTopologyClient.getLocation(request);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

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

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
   ApiFuture<Location> future = appTopologyClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getSchema(@Nullable SchemaName name)

public final Schema getSchema(@Nullable SchemaName name)

Retrieves the schema for the specified topology domain. The schema defines the NodeTypes and EdgeTypes that are supported in GenerateDiscoveredResourcesTopology requests and responses for a given domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   SchemaName name = SchemaName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]");
   Schema response = appTopologyClient.getSchema(name);
 }
 
Parameter
Name Description
name @org.jspecify.annotations.Nullable com.google.cloud.apptopology.v1.SchemaName

Required. The name of the singleton domain schema resource. Format: projects/{project}/locations/{location}/domains/{domain}/schema

Returns
Type Description
Schema

getSchema(GetSchemaRequest request)

public final Schema getSchema(GetSchemaRequest request)

Retrieves the schema for the specified topology domain. The schema defines the NodeTypes and EdgeTypes that are supported in GenerateDiscoveredResourcesTopology requests and responses for a given domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetSchemaRequest request =
       GetSchemaRequest.newBuilder()
           .setName(SchemaName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString())
           .build();
   Schema response = appTopologyClient.getSchema(request);
 }
 
Parameter
Name Description
request GetSchemaRequest

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

Returns
Type Description
Schema

getSchema(String name)

public final Schema getSchema(String name)

Retrieves the schema for the specified topology domain. The schema defines the NodeTypes and EdgeTypes that are supported in GenerateDiscoveredResourcesTopology requests and responses for a given domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   String name = SchemaName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString();
   Schema response = appTopologyClient.getSchema(name);
 }
 
Parameter
Name Description
name String

Required. The name of the singleton domain schema resource. Format: projects/{project}/locations/{location}/domains/{domain}/schema

Returns
Type Description
Schema

getSchemaCallable()

public final UnaryCallable<GetSchemaRequest,Schema> getSchemaCallable()

Retrieves the schema for the specified topology domain. The schema defines the NodeTypes and EdgeTypes that are supported in GenerateDiscoveredResourcesTopology requests and responses for a given domain.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   GetSchemaRequest request =
       GetSchemaRequest.newBuilder()
           .setName(SchemaName.of("[PROJECT]", "[LOCATION]", "[DOMAIN]").toString())
           .build();
   ApiFuture<Schema> future = appTopologyClient.getSchemaCallable().futureCall(request);
   // Do something.
   Schema response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetSchemaRequest,Schema>

getSettings()

public final @Nullable AppTopologySettings getSettings()
Returns
Type Description
@org.jspecify.annotations.Nullable com.google.cloud.apptopology.v1.AppTopologySettings

getStub()

public AppTopologyStub getStub()
Returns
Type Description
AppTopologyStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listDomains(@Nullable LocationName parent)

public final AppTopologyClient.ListDomainsPagedResponse listDomains(@Nullable LocationName parent)

Lists the topology domains available in a specific location. Only global location is supported.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (Domain element : appTopologyClient.listDomains(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent @org.jspecify.annotations.Nullable com.google.cloud.apptopology.v1.LocationName

Required. The parent location to list domains for. Format: projects/{project}/locations/{location} Only global location is supported.

Returns
Type Description
AppTopologyClient.ListDomainsPagedResponse

listDomains(ListDomainsRequest request)

public final AppTopologyClient.ListDomainsPagedResponse listDomains(ListDomainsRequest request)

Lists the topology domains available in a specific location. Only global location is supported.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListDomainsRequest request =
       ListDomainsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Domain element : appTopologyClient.listDomains(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request ListDomainsRequest

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

Returns
Type Description
AppTopologyClient.ListDomainsPagedResponse

listDomains(String parent)

public final AppTopologyClient.ListDomainsPagedResponse listDomains(String parent)

Lists the topology domains available in a specific location. Only global location is supported.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
   for (Domain element : appTopologyClient.listDomains(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
parent String

Required. The parent location to list domains for. Format: projects/{project}/locations/{location} Only global location is supported.

Returns
Type Description
AppTopologyClient.ListDomainsPagedResponse

listDomainsCallable()

public final UnaryCallable<ListDomainsRequest,ListDomainsResponse> listDomainsCallable()

Lists the topology domains available in a specific location. Only global location is supported.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListDomainsRequest request =
       ListDomainsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListDomainsResponse response = appTopologyClient.listDomainsCallable().call(request);
     for (Domain element : response.getDomainsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListDomainsRequest,ListDomainsResponse>

listDomainsPagedCallable()

public final UnaryCallable<ListDomainsRequest,AppTopologyClient.ListDomainsPagedResponse> listDomainsPagedCallable()

Lists the topology domains available in a specific location. Only global location is supported.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListDomainsRequest request =
       ListDomainsRequest.newBuilder()
           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Domain> future = appTopologyClient.listDomainsPagedCallable().futureCall(request);
   // Do something.
   for (Domain element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListDomainsRequest,ListDomainsPagedResponse>

listLocations(ListLocationsRequest request)

public final AppTopologyClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If name is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If name follows the formatprojects/{project}, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the name field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (Location element : appTopologyClient.listLocations(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

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

Returns
Type Description
AppTopologyClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If name is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If name follows the formatprojects/{project}, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the name field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListLocationsResponse response = appTopologyClient.listLocationsCallable().call(request);
     for (Location element : response.getLocationsList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,AppTopologyClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: ***Global locations**: If name is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If name follows the formatprojects/{project}, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the name field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

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 (AppTopologyClient appTopologyClient = AppTopologyClient.create()) {
   ListLocationsRequest request =
       ListLocationsRequest.newBuilder()
           .setName("name3373707")
           .setFilter("filter-1274492040")
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<Location> future =
       appTopologyClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()