Class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaResourceContext

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

Overview

ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaResourceContext

Returns a new instance of GoogleCloudPolicysimulatorV1betaResourceContext.



1774
1775
1776
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1774

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

Instance Attribute Details

#ancestorsArray<String>

The ancestry path of the resource 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. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: ["projects/123456789", "folders/5432", "organizations/1234"] Corresponds to the JSON property ancestors

Returns:

  • (Array<String>)


1757
1758
1759
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1757

def ancestors
  @ancestors
end

#asset_typeString

The asset type of the resource as defined by CAIS. Example: compute. googleapis.com/Firewall See Supported asset types for more information. Corresponds to the JSON property assetType

Returns:

  • (String)


1764
1765
1766
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1764

def asset_type
  @asset_type
end

#resourceString

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

Returns:

  • (String)


1772
1773
1774
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1772

def resource
  @resource
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1779
1780
1781
1782
1783
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1779

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