Class: Google::Apis::CloudassetV1::RelatedAsset
- Inherits:
-
Object
- Object
- Google::Apis::CloudassetV1::RelatedAsset
- 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
An asset identifier 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
-
#ancestors ⇒ Array<String>
The ancestors of an asset in Google Cloud resource hierarchy, represented as a list of relative resource names.
-
#asset ⇒ String
The full name of the asset.
-
#asset_type ⇒ String
The type of the asset.
-
#relationship_type ⇒ String
The unique identifier of the relationship type.
Instance Method Summary collapse
-
#initialize(**args) ⇒ RelatedAsset
constructor
A new instance of RelatedAsset.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ RelatedAsset
Returns a new instance of RelatedAsset.
5128 5129 5130 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5128 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ancestors ⇒ Array<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
5105 5106 5107 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5105 def ancestors @ancestors end |
#asset ⇒ String
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
5113 5114 5115 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5113 def asset @asset end |
#asset_type ⇒ String
The type of the asset. Example: compute.googleapis.com/Disk
See Supported
asset types for more information.
Corresponds to the JSON property assetType
5120 5121 5122 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5120 def asset_type @asset_type end |
#relationship_type ⇒ String
The unique identifier of the relationship type. Example:
INSTANCE_TO_INSTANCEGROUP
Corresponds to the JSON property relationshipType
5126 5127 5128 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5126 def relationship_type @relationship_type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5133 5134 5135 5136 5137 5138 |
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 5133 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) @relationship_type = args[:relationship_type] if args.key?(:relationship_type) end |