From 9c7eb1f9a78060a15cc309ab51ee0600c2e6f4f7 Mon Sep 17 00:00:00 2001 From: Google APIs Date: Thu, 2 Sep 2021 17:31:30 -0700 Subject: [PATCH] feat: Release of relationships in v1, Add content type Relationship to support relationship search Committer: yuwangyw@ PiperOrigin-RevId: 394579113 --- google/cloud/asset/v1/assets.proto | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/google/cloud/asset/v1/assets.proto b/google/cloud/asset/v1/assets.proto index 97bc4872d..3d433b8f3 100644 --- a/google/cloud/asset/v1/assets.proto +++ b/google/cloud/asset/v1/assets.proto @@ -503,6 +503,14 @@ message ResourceSearchResult { // as to allow users to search on them. repeated AttachedResource attached_resources = 20; + // A map of related resources of this resource, keyed by the + // relationship type. A relationship type is in the format of + // {SourceType}_{ACTION}_{DestType}. Example: `DISK_TO_INSTANCE`, + // `DISK_TO_NETWORK`, `INSTANCE_TO_INSTANCEGROUP`. + // See [supported relationship + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#supported_relationship_types). + map relationships = 21; + // The type of this resource's immediate parent, if there is one. // // To search against the `parent_asset_type`: @@ -558,6 +566,22 @@ message AttachedResource { repeated VersionedResource versioned_resources = 3; } +// The related resources of the primary resource. +message RelatedResources { + // The detailed related resources of the primary resource. + repeated RelatedResource related_resources = 1; +} + +// The detailed related resource. +message RelatedResource { + // The type of the asset. Example: `compute.googleapis.com/Instance` + string asset_type = 1; + + // The full resource name of the related resource. Example: + // `//compute.googleapis.com/projects/my_proj_123/zones/instance/instance123` + string full_resource_name = 2; +} + // A result of IAM Policy search, containing information of an IAM policy. message IamPolicySearchResult { // Explanation about the IAM policy search result.