Class: Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaResourceContext
- Inherits:
-
Object
- Object
- Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaResourceContext
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/policysimulator_v1alpha/classes.rb,
lib/google/apis/policysimulator_v1alpha/representations.rb,
lib/google/apis/policysimulator_v1alpha/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
-
#ancestors ⇒ Array<String>
The ancestry path of the resource in Google Cloud resource hierarchy, represented as a list of relative resource names.
-
#asset_type ⇒ String
The asset type of the resource as defined by CAIS.
-
#resource ⇒ String
The full name of the resource.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1alphaResourceContext
constructor
A new instance of GoogleCloudPolicysimulatorV1alphaResourceContext.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1alphaResourceContext
Returns a new instance of GoogleCloudPolicysimulatorV1alphaResourceContext.
1563 1564 1565 |
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1563 def initialize(**args) update!(**args) end |
Instance Attribute Details
#ancestors ⇒ Array<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
1546 1547 1548 |
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1546 def ancestors @ancestors end |
#asset_type ⇒ String
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
1553 1554 1555 |
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1553 def asset_type @asset_type end |
#resource ⇒ String
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
1561 1562 1563 |
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1561 def resource @resource end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1568 1569 1570 1571 1572 |
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1568 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 |