Class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview

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

OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview

Returns a new instance of GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.



1395
1396
1397
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1395

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

Instance Attribute Details

#nameString

Output only. The resource name of the OrgPolicyViolationsPreview. It has the following format: organizations/organization/locations/location/ orgPolicyViolationsPreviews/orgPolicyViolationsPreview`Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/ 506a5f7f Corresponds to the JSON propertyname`

Returns:

  • (String)


1367
1368
1369
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1367

def name
  @name
end

#overlayGoogle::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay

The proposed changes to OrgPolicy. Corresponds to the JSON property overlay



1372
1373
1374
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1372

def overlay
  @overlay
end

#resource_countsGoogle::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts

A summary of the state of all resources scanned for compliance with the changed OrgPolicy. Corresponds to the JSON property resourceCounts



1378
1379
1380
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1378

def resource_counts
  @resource_counts
end

#stateString

Output only. The state of the OrgPolicyViolationsPreview. Corresponds to the JSON property state

Returns:

  • (String)


1383
1384
1385
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1383

def state
  @state
end

#violations_countFixnum

Output only. The number of OrgPolicyViolations in this OrgPolicyViolationsPreview. This count may differ from resource_summary. noncompliant_count because each OrgPolicyViolation is specific to a resource * and* constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints. Corresponds to the JSON property violationsCount

Returns:

  • (Fixnum)


1393
1394
1395
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1393

def violations_count
  @violations_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1400
1401
1402
1403
1404
1405
1406
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1400

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @overlay = args[:overlay] if args.key?(:overlay)
  @resource_counts = args[:resource_counts] if args.key?(:resource_counts)
  @state = args[:state] if args.key?(:state)
  @violations_count = args[:violations_count] if args.key?(:violations_count)
end