- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- GraphPattern
- NodePattern
- LabelPropertiesPattern
- ConnectedNodePattern
- EdgePattern
- Direction
- Graph
- Node
- EntityContext
- Edge
- Try it!
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.
HTTP request
POST https://apptopology.googleapis.com/v1/{name=projects/*/locations/*/discoveredResourcesTopology}:generate
The URL uses gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The project to query discoverable resources on. Expected format: |
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{
"topologyDomains": [
string
],
// The following is a list of mutually exclusive fields. At most one of the
// fields will be set in a response:
"filter": {
object ( |
| Fields | |
|---|---|
topologyDomains[] |
Required. The full resource name of the domain of the app topology. Format: |
| Query the topology by building a graph pattern filter or pre-defined topology view. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
filter |
Filters for the topology nodes and edges; Detail format see GraphPattern proto. A separate 'LookupSchema' method will be added that will return the necessary information to be able to construct these filters. |
| End of mutually exclusive fields. | |
Response body
Response for discoveredResourcesTopology.generate.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"graph": {
object ( |
| Fields | |
|---|---|
graph |
The generated topology graph. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/apptopology.read-writehttps://www.googleapis.com/auth/apptopology.read-only
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name resource:
apptopology.discoveredResourcesTopologies.generate
For more information, see the IAM documentation.
GraphPattern
Recursive graph pattern matcher to select and constrain the returned topology. AppTopology API allows cycle in the graph traversal and will return unique node and edge results in the response. SLO is guaranteed for at most 5 hops in the graph traversal.
| JSON representation |
|---|
{ "startingNode": { object ( |
| Fields | |
|---|---|
startingNode |
Required. Pattern matcher to select the starting nodes in the graph. |
neighbors[] |
Optional. Pattern matcher to match the connected subgraphs; all of these are ANDed. |
NodePattern
Node pattern matcher to match the node id, labels and properties.
| JSON representation |
|---|
{
"alias": string,
"labelPropertiesPattern": {
object ( |
| Fields | |
|---|---|
alias |
Optional. Represents an identifier to be referenced in |
labelPropertiesPattern |
Optional. Matcher for labels/properties. |
LabelPropertiesPattern
Matcher for label and property. The matcher accepts both exact match and expression.
| JSON representation |
|---|
{ "labelMatcherExpr": string, "propertyMatcherExpr": string } |
| Fields | |
|---|---|
labelMatcherExpr |
Required. Matcher expression for labels. Allow OR / AND operators; The syntax is defined by the following grammar: - The label expression can use either |
propertyMatcherExpr |
Optional. The syntax of the filter is defined by the following grammar: https://google.aip.dev/160. Referencing properties of graph elements using traversal operator The following properties are supported for all node and edge types:
Other properties types can be found at https://apptopology.googleapis.com/v1/GetSchema The following operators are supported on properties: 1. Checking if a non-repeated property of a graph element is equal to a scalar value using the equality operator
NOTE: - For Alert nodes, only the equality operator |
ConnectedNodePattern
Edge pattern matcher to match the edge direction, labels and properties.
| JSON representation |
|---|
{ "edge": { object ( |
| Fields | |
|---|---|
edge |
Required. To match the edge connected the neighbor subgraph. |
graph |
Required. Recursive matcher to match the neighbor subgraph. |
EdgePattern
Edge pattern matcher to match the edge direction, labels and properties.
| JSON representation |
|---|
{ "direction": enum ( |
| Fields | |
|---|---|
direction |
Required. The direction of the edge to match. |
labelPropertiesPattern |
Required. Matcher for labels/properties. |
alias |
Optional. Represents an identifier to be referenced in |
Direction
The direction of the edge to match.
| Enums | |
|---|---|
DIRECTION_UNSPECIFIED |
Defaults to DIRECTION_UNSPECIFIED. |
ANY |
Match any edge direction. |
TO |
Match the edge direction from source to destination. |
FROM |
Match the edge direction from destination to source. |
Graph
Represents a graph structure composed of nodes and edges.
| JSON representation |
|---|
{ "nodes": [ { object ( |
| Fields | |
|---|---|
nodes[] |
A collection of unique nodes that make up the graph. |
edges[] |
Collection of unique edges connecting the |
Node
Represents a single node in the graph.
| JSON representation |
|---|
{
"properties": {
object
},
"name": string,
"labels": [
string
],
"context": {
object ( |
| Fields | |
|---|---|
properties |
Properties associated with the node. Refer to https://apptopology.googleapis.com/v1/GetSchema for a detailed list of node properties. |
name |
The global unique name of the node. For standard Google Cloud Platform resources, this MUST be the canonical Full Resource Name. Examples:
|
labels[] |
Labels attached to the node. Composable, namespaced building blocks that define core attributes through associated properties. Multiple labels aggregate to fully specify the functional traits and property schema of the node type. |
context |
The context of the node. |
EntityContext
Represents the context of an entity (node or edge) in the graph.
| JSON representation |
|---|
{ "type": string } |
| Fields | |
|---|---|
type |
The primary, namespaced type dictating the node naming format and supported labels, and defined in the |
Edge
Represents a single edge connecting two nodes in the graph.
| JSON representation |
|---|
{
"properties": {
object
},
"sourceNodeName": string,
"destinationNodeName": string,
"labels": [
string
],
"context": {
object ( |
| Fields | |
|---|---|
properties |
Properties associated with the edge. Refer to https://apptopology.googleapis.com/v1/GetSchema for a detailed list of edge properties. |
sourceNodeName |
The name of the source node for this edge. This is the |
destinationNodeName |
The name of the destination node for this edge. This is the |
labels[] |
Labels attached to the edge. Composable, namespaced building blocks that define core attributes through associated properties. Multiple labels aggregate to fully specify the functional traits and property schema of the edge type. |
context |
The context of the edge. |