Class: Google::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2AlternatePolicySpec

Inherits:
Object
  • Object
show all
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

Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudOrgpolicyV2AlternatePolicySpec

Returns a new instance of GoogleCloudOrgpolicyV2AlternatePolicySpec.



42
43
44
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 42

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

Instance Attribute Details

#launchString

Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy. Corresponds to the JSON property launch

Returns:

  • (String)


34
35
36
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 34

def launch
  @launch
end

#specGoogle::Apis::PolicysimulatorV1alpha::GoogleCloudOrgpolicyV2PolicySpec

Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources. Corresponds to the JSON property spec



40
41
42
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 40

def spec
  @spec
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



47
48
49
50
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 47

def update!(**args)
  @launch = args[:launch] if args.key?(:launch)
  @spec = args[:spec] if args.key?(:spec)
end