Class: Google::Cloud::Asset::V1::ResourceSearchResult
- Inherits:
-
Object
- Object
- Google::Cloud::Asset::V1::ResourceSearchResult
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/asset/v1/assets.rb
Overview
A result of Resource Search, containing information of a cloud resource.
Defined Under Namespace
Classes: LabelsEntry
Instance Attribute Summary collapse
-
#additional_attributes ⇒ ::Google::Protobuf::Struct
The additional searchable attributes of this resource.
-
#asset_type ⇒ ::String
The type of this resource.
-
#description ⇒ ::String
One or more paragraphs of text description of this resource.
-
#display_name ⇒ ::String
The display name of this resource.
-
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Labels associated with this resource.
-
#location ⇒ ::String
Location can be
global
, regional likeus-east1
, or zonal likeus-west1-b
. -
#name ⇒ ::String
The full resource name of this resource.
-
#network_tags ⇒ ::Array<::String>
Network tags associated with this resource.
-
#project ⇒ ::String
The project that this resource belongs to, in the form of projects/{PROJECT_NUMBER}.
Instance Attribute Details
#additional_attributes ⇒ ::Google::Protobuf::Struct
Returns 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
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#asset_type ⇒ ::String
Returns 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.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#description ⇒ ::String
Returns 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*"
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#display_name ⇒ ::String
Returns 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"
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#labels ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns 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:*
- query on any label's key or value. Example:
- use a free text query. Example:
prod
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#location ⇒ ::String
Returns 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*
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#name ⇒ ::String
Returns 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
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#network_tags ⇒ ::Array<::String>
Returns 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
.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#project ⇒ ::String
Returns 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.
309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'proto_docs/google/cloud/asset/v1/assets.rb', line 309 class ResourceSearchResult include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |