Class: Google::Apis::CloudassetV1::ResourceSearchResult
- Inherits:
-
Object
- Object
- Google::Apis::CloudassetV1::ResourceSearchResult
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudasset_v1/classes.rb,
lib/google/apis/cloudasset_v1/representations.rb,
lib/google/apis/cloudasset_v1/representations.rb
Overview
A result of Resource Search, containing information of a cloud resource.
Instance Attribute Summary collapse
-
#additional_attributes ⇒ Hash<String,Object>
Optional.
-
#asset_type ⇒ String
Required.
-
#description ⇒ String
Optional.
-
#display_name ⇒ String
Optional.
-
#labels ⇒ Hash<String,String>
Optional.
-
#location ⇒ String
Optional.
-
#name ⇒ String
Required.
-
#network_tags ⇒ Array<String>
Optional.
-
#project ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ResourceSearchResult
constructor
A new instance of ResourceSearchResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ResourceSearchResult
Returns a new instance of ResourceSearchResult.
3111 3112 3113 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3111 def initialize(**args) update!(**args) end |
Instance Attribute Details
#additional_attributes ⇒ Hash<String,Object>
Optional. 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.
Corresponds to the JSON propertyadditionalAttributes`
3036 3037 3038 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3036 def additional_attributes @additional_attributes end |
#asset_type ⇒ String
Required. 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.
Corresponds to the JSON property assetType
3043 3044 3045 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3043 def asset_type @asset_type end |
#description ⇒ String
Optional. One or more paragraphs of text description of this resource. Maximum
length could be up to 1M bytes. This field is available only when the resource'
s proto contains it. To search against the description: * use a field query.
Example: description:"*important instance*" * use a free text query. Example:
"*important instance*"
Corresponds to the JSON property description
3052 3053 3054 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3052 def description @description end |
#display_name ⇒ String
Optional. The display name of this resource. This field is available only when
the resource's proto contains it. To search against the display_name: * use
a field query. Example: displayName:"My Instance" * use a free text query.
Example: "My Instance"
Corresponds to the JSON property displayName
3060 3061 3062 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3060 def display_name @display_name end |
#labels ⇒ Hash<String,String>
Optional. Labels associated with this resource. See Labelling and grouping
GCP resources for more information. This
field is available only when the resource's proto contains it. 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
Corresponds to the JSON property labels
3072 3073 3074 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3072 def labels @labels end |
#location ⇒ String
Optional. Location can be global, regional like us-east1, or zonal like
us-west1-b. This field is available only when the resource's proto contains
it. To search against the location: * use a field query. Example: location:
us-west* * use a free text query. Example: us-west*
Corresponds to the JSON property location
3080 3081 3082 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3080 def location @location end |
#name ⇒ String
Required. 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
Corresponds to the JSON property name
3090 3091 3092 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3090 def name @name end |
#network_tags ⇒ Array<String>
Optional. 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. This field is
available only when the resource's proto contains it. To search against the
network_tags: * use a field query. Example: networkTags:internal * use a
free text query. Example: internal
Corresponds to the JSON property networkTags
3101 3102 3103 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3101 def @network_tags end |
#project ⇒ String
Optional. The project that this resource belongs to, in the form of projects/
PROJECT_NUMBER. This field is available when the resource belongs to a
project. To search against the project: * specify the scope field as this
project in your search request.
Corresponds to the JSON property project
3109 3110 3111 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3109 def project @project end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 3116 def update!(**args) @additional_attributes = args[:additional_attributes] if args.key?(:additional_attributes) @asset_type = args[:asset_type] if args.key?(:asset_type) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @labels = args[:labels] if args.key?(:labels) @location = args[:location] if args.key?(:location) @name = args[:name] if args.key?(:name) @network_tags = args[:network_tags] if args.key?(:network_tags) @project = args[:project] if args.key?(:project) end |