public sealed class ResourceSearchResult : IMessage<ResourceSearchResult>, IEquatable<ResourceSearchResult>, IDeepCloneable<ResourceSearchResult>, IBufferMessage, IMessage
A result of Resource Search, containing information of a cloud resource.
Implements
IMessage<ResourceSearchResult>, IEquatable<ResourceSearchResult>, IDeepCloneable<ResourceSearchResult>, IBufferMessage, IMessageNamespace
Google.Cloud.Asset.V1Assembly
Google.Cloud.Asset.V1.dll
Constructors
ResourceSearchResult()
public ResourceSearchResult()
ResourceSearchResult(ResourceSearchResult)
public ResourceSearchResult(ResourceSearchResult other)
Parameter | |
---|---|
Name | Description |
other | ResourceSearchResult |
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: "foobar" }
, you can issue a queryfoobar
.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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:"*important instance*"
- use a free text query. Example:
"*important instance*"
Property Value | |
---|---|
Type | Description |
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:"My Instance"
- use a free text query. Example:
"My Instance"
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |