Class ResourceSearchResult (2.7.0)

public sealed class ResourceSearchResult : IMessage<ResourceSearchResult>, IEquatable<ResourceSearchResult>, IDeepCloneable<ResourceSearchResult>, IBufferMessage, IMessage

A result of Resource Search, containing information of a cloud resource.

Inheritance

Object > ResourceSearchResult

Namespace

Google.Cloud.Asset.V1

Assembly

Google.Cloud.Asset.V1.dll

Constructors

ResourceSearchResult()

public ResourceSearchResult()

ResourceSearchResult(ResourceSearchResult)

public ResourceSearchResult(ResourceSearchResult other)
Parameter
NameDescription
otherResourceSearchResult

Properties

AdditionalAttributes

public Struct AdditionalAttributes { get; set; }

The additional searchable attributes of this resource. The attributes may vary from one resource type to another. Examples: projectId for Project, dnsName for DNS ManagedZone. This field contains a subset of the resource metadata fields that are returned by the List or Get APIs provided by the corresponding GCP service (e.g., Compute Engine). see API references and supported searchable attributes for more information.

You can search values of these fields through free text search. However, you should not consume the field programically as the field names and values may change as the GCP service updates to a new incompatible API version.

To search against the additional_attributes:

  • use a free text query to match the attributes values. Example: to search additional_attributes = { dnsName: &quot;foobar&quot; }, you can issue a query foobar.
Property Value
TypeDescription
Struct

AssetType

public string AssetType { get; set; }

The type of this resource. Example: compute.googleapis.com/Disk.

To search against the asset_type:

  • specify the asset_type field in your search request.
Property Value
TypeDescription
String

Description

public string Description { get; set; }

One or more paragraphs of text description of this resource. Maximum length could be up to 1M bytes.

To search against the description:

  • use a field query. Example: description:&quot;*important instance*&quot;
  • use a free text query. Example: &quot;*important instance*&quot;
Property Value
TypeDescription
String

DisplayName

public string DisplayName { get; set; }

The display name of this resource.

To search against the display_name:

  • use a field query. Example: displayName:&quot;My Instance&quot;
  • use a free text query. Example: &quot;My Instance&quot;
Property Value
TypeDescription
String

Labels

public MapField<string, string> Labels { get; }

Labels associated with this resource. See Labelling and grouping GCP resources for more information.

To search against the labels:

  • use a field query:
  • query on any label's key or value. Example: labels:prod
  • query by a given label. Example: labels.env:prod
  • query by a given label's existence. Example: labels.env:*
  • use a free text query. Example: prod
Property Value
TypeDescription
MapField<String, String>

Location

public string Location { get; set; }

Location can be global, regional like us-east1, or zonal like us-west1-b.

To search against the location:

  • use a field query. Example: location:us-west*
  • use a free text query. Example: us-west*
Property Value
TypeDescription
String

Name

public string Name { get; set; }

The full resource name of this resource. Example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See Cloud Asset Inventory Resource Name Format for more information.

To search against the name:

  • use a field query. Example: name:instance1
  • use a free text query. Example: instance1
Property Value
TypeDescription
String

NetworkTags

public RepeatedField<string> NetworkTags { get; }

Network tags associated with this resource. Like labels, network tags are a type of annotations used to group GCP resources. See Labelling GCP resources for more information.

To search against the network_tags:

  • use a field query. Example: networkTags:internal
  • use a free text query. Example: internal
Property Value
TypeDescription
RepeatedField<String>

Project

public string Project { get; set; }

The project that this resource belongs to, in the form of projects/{PROJECT_NUMBER}.

To search against the project:

  • specify the scope field as this project in your search request.
Property Value
TypeDescription
String