Class: Google::Apis::CloudassetV1::ResourceSearchResult

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/cloudasset_v1/classes.rb,
generated/google/apis/cloudasset_v1/representations.rb,
generated/google/apis/cloudasset_v1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ResourceSearchResult

Returns a new instance of ResourceSearchResult.


1901
1902
1903
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1901

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#additional_attributesHash<String,Object>

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`

Returns:

  • (Hash<String,Object>)

1832
1833
1834
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1832

def additional_attributes
  @additional_attributes
end

#asset_typeString

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

Returns:

  • (String)

1839
1840
1841
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1839

def asset_type
  @asset_type
end

#descriptionString

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*" Corresponds to the JSON property description

Returns:

  • (String)

1847
1848
1849
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1847

def description
  @description
end

#display_nameString

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" Corresponds to the JSON property displayName

Returns:

  • (String)

1854
1855
1856
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1854

def display_name
  @display_name
end

#labelsHash<String,String>

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 Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)

1865
1866
1867
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1865

def labels
  @labels
end

#locationString

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* Corresponds to the JSON property location

Returns:

  • (String)

1872
1873
1874
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1872

def location
  @location
end

#nameString

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

Returns:

  • (String)

1882
1883
1884
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1882

def name
  @name
end

#network_tagsArray<String>

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 Corresponds to the JSON property networkTags

Returns:

  • (Array<String>)

1892
1893
1894
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1892

def network_tags
  @network_tags
end

#projectString

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. Corresponds to the JSON property project

Returns:

  • (String)

1899
1900
1901
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1899

def project
  @project
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 1906

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