Class: Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy
- Inherits:
-
Object
- Object
- Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2Policy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/policysimulator_v1/classes.rb,
lib/google/apis/policysimulator_v1/representations.rb,
lib/google/apis/policysimulator_v1/representations.rb
Overview
Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.
Instance Attribute Summary collapse
-
#alternate ⇒ Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2AlternatePolicySpec
Similar to PolicySpec but with an extra 'launch' field for launch reference.
-
#dry_run_spec ⇒ Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec
Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.
-
#etag ⇒ String
Optional.
-
#name ⇒ String
Immutable.
-
#spec ⇒ Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec
Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudOrgpolicyV2Policy
constructor
A new instance of GoogleCloudOrgpolicyV2Policy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudOrgpolicyV2Policy
Returns a new instance of GoogleCloudOrgpolicyV2Policy.
172 173 174 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 172 def initialize(**args) update!(**args) end |
Instance Attribute Details
#alternate ⇒ Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2AlternatePolicySpec
Similar to PolicySpec but with an extra 'launch' field for launch reference.
The PolicySpec here is specific for dry-run/darklaunch.
Corresponds to the JSON property alternate
138 139 140 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 138 def alternate @alternate end |
#dry_run_spec ⇒ Google::Apis::PolicysimulatorV1::GoogleCloudOrgpolicyV2PolicySpec
Defines a Google Cloud policy specification which is used to specify
constraints for configurations of Google Cloud resources.
Corresponds to the JSON property dryRunSpec
144 145 146 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 144 def dry_run_spec @dry_run_spec end |
#etag ⇒ String
Optional. An opaque tag indicating the current state of the policy, used for
concurrency control. This 'etag' is computed by the server based on the value
of other fields, and may be sent on update and delete requests to ensure the
client has an up-to-date value before proceeding.
Corresponds to the JSON property etag
152 153 154 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 152 def etag @etag end |
#name ⇒ String
Immutable. The resource name of the policy. Must be one of the following forms,
where constraint_name
is the name of the constraint which this policy
configures: * projects/
project_number/policies/
constraint_name* `
folders/`folder_id`/policies/`constraint_name
* organizations/
organization_id/policies/
constraint_nameFor example, `projects/123/
policies/compute.disableSerialPortAccess`. Note: `projects/`project_id`/
policies/`constraint_name
is also an acceptable name for API requests, but
responses will return the name using the equivalent project number.
Corresponds to the JSON property name
164 165 166 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 164 def name @name end |
#spec ⇒ Google::Apis::PolicysimulatorV1::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
170 171 172 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 170 def spec @spec end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
177 178 179 180 181 182 183 |
# File 'lib/google/apis/policysimulator_v1/classes.rb', line 177 def update!(**args) @alternate = args[:alternate] if args.key?(:alternate) @dry_run_spec = args[:dry_run_spec] if args.key?(:dry_run_spec) @etag = args[:etag] if args.key?(:etag) @name = args[:name] if args.key?(:name) @spec = args[:spec] if args.key?(:spec) end |