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

Constructor Details

#initialize(**args) ⇒ ResourceSearchResult

Returns a new instance of ResourceSearchResult.



3105
3106
3107
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3105

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>)


3036
3037
3038
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3036

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)


3043
3044
3045
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3043

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)


3051
3052
3053
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3051

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)


3058
3059
3060
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3058

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>)


3069
3070
3071
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3069

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)


3076
3077
3078
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3076

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)


3086
3087
3088
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3086

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>)


3096
3097
3098
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3096

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)


3103
3104
3105
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3103

def project
  @project
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
# File 'generated/google/apis/cloudasset_v1/classes.rb', line 3110

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