def usedby(ctx, id, **kwargs):
resp = AssociationAPI(ecx_session=ctx.ecx_session).get_using_resources(ctx.restype, id)["resources"]
if ctx.json:
ctx.print_response(resp)
return
table_data = [(x["type"], x["resourceId"], x["name"]) for x in resp]
print
click.echo_via_pager(tabulate(table_data, headers=["Type", "ID", "Name"]))
print
评论列表
文章目录