Skip to main content
Version: 4.2.0

descendants Command

The descendants command selects all descendants of nodes returned in a query.

Usage​

descendants [--with-origin] <edge_type>

Parameters​

ParameterDescriptionRequired?Default Value
edge_typeEdge type by which to traverse❌delete

Options​

OptionDescriptionRequired?
--with-originInclude current element in the result set❌

Examples​

Equivalent to query is(aws_region) -[1:]->
> search is(aws_region) | descendants
Equivalent to query is(aws_region) -[0:]->
> search is(aws_region) | descendants --with-origin
> search is(volume_type) limit 1 | descendants --with-origin
​kind=gcp_disk_type, name=pd-standard, age=52yr1mo, cloud=gcp, account=sre, region=us-central1, zone=us-central1-a
​kind=gcp_disk, id=881, name=disk-1, age=1yr2mo, cloud=gcp, account=sre, region=us-central1, zone=us-central1-a

Further Reading​