Class: Google::Apis::CloudassetV1p7beta1::GoogleCloudAssetV1p7beta1RelatedAsset

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

Overview

An asset identify in Google Cloud which contains its name, type and ancestors. An asset can be any resource in the Google Cloud resource hierarchy, a resource outside the Google Cloud resource hierarchy (such as Google Kubernetes Engine clusters and objects), or a policy (e.g. IAM policy). See Supported asset types for more information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAssetV1p7beta1RelatedAsset

Returns a new instance of GoogleCloudAssetV1p7beta1RelatedAsset.



673
674
675
# File 'lib/google/apis/cloudasset_v1p7beta1/classes.rb', line 673

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

Instance Attribute Details

#ancestorsArray<String>

The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. Example: ["projects/ 123456789", "folders/5432", "organizations/1234"] Corresponds to the JSON property ancestors

Returns:

  • (Array<String>)


656
657
658
# File 'lib/google/apis/cloudasset_v1p7beta1/classes.rb', line 656

def ancestors
  @ancestors
end

#assetString

The full name of the asset. Example: //compute.googleapis.com/projects/ my_project_123/zones/zone1/instances/instance1 See Resource names for more information. Corresponds to the JSON property asset

Returns:

  • (String)


664
665
666
# File 'lib/google/apis/cloudasset_v1p7beta1/classes.rb', line 664

def asset
  @asset
end

#asset_typeString

The type of the asset. Example: compute.googleapis.com/Disk See Supported asset types for more information. Corresponds to the JSON property assetType

Returns:

  • (String)


671
672
673
# File 'lib/google/apis/cloudasset_v1p7beta1/classes.rb', line 671

def asset_type
  @asset_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



678
679
680
681
682
# File 'lib/google/apis/cloudasset_v1p7beta1/classes.rb', line 678

def update!(**args)
  @ancestors = args[:ancestors] if args.key?(:ancestors)
  @asset = args[:asset] if args.key?(:asset)
  @asset_type = args[:asset_type] if args.key?(:asset_type)
end