| GitHub Repository | Product 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().
| 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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDomain |
Retrieves the specified topology domain. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListDomains |
Lists the topology domains available in a specific location. Only |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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 For gRPC and client library implementations, the resource name ispassed as the |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
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.DiscoveredResourcesTopologyNameRequired. The project to query discoverable resources on. Expected format:
|
topologyDomains |
List<String>Required. The full resource name of the domain of the app topology.
Format: |
| 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 |
GenerateDiscoveredResourcesTopologyRequestThe 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 |
StringRequired. The project to query discoverable resources on. Expected format:
|
topologyDomains |
List<String>Required. The full resource name of the domain of the app topology.
Format: |
| 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.DomainNameRequired. The name of the domain to retrieve. Format:
|
| 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 |
GetDomainRequestThe 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 |
StringRequired. The name of the domain to retrieve. Format:
|
| 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.GetLocationRequestThe 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.SchemaNameRequired. The name of the singleton domain schema resource. Format:
|
| 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 |
GetSchemaRequestThe 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 |
StringRequired. The name of the singleton domain schema resource. Format:
|
| 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.LocationNameRequired. The parent location to list domains for. Format:
|
| 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 |
ListDomainsRequestThe 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 |
StringRequired. The parent location to list domains for. Format:
|
| 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.ListLocationsRequestThe 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()