Class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
- Inherits:
-
Object
- Object
- Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
- 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
-
#create_time ⇒ String
Output only.
-
#custom_constraints ⇒ Array<String>
Output only.
-
#name ⇒ String
Output only.
-
#overlay ⇒ Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
The proposed changes to OrgPolicy.
-
#resource_counts ⇒ Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
-
#state ⇒ String
Output only.
-
#violations_count ⇒ Fixnum
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
constructor
A new instance of GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview
Returns a new instance of GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview.
1563 1564 1565 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1563 def initialize(**args) update!(**args) end |
Instance Attribute Details
#create_time ⇒ String
Output only. Time when this OrgPolicyViolationsPreview was created.
Corresponds to the JSON property createTime
1515 1516 1517 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1515 def create_time @create_time end |
#custom_constraints ⇒ Array<String>
Output only. The names of the constraints against which all
OrgPolicyViolations were evaluated. If OrgPolicyOverlay only contains
PolicyOverlay then it contains the name of the configured custom constraint,
applicable to the specified policies. Otherwise it contains the name of the
constraint specified in CustomConstraintOverlay. Format: organizations/
organization_id/customConstraints/custom_constraint_id`Example:
organizations/123/customConstraints/custom.createOnlyE2TypeVms
Corresponds to the JSON propertycustomConstraints`
1526 1527 1528 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1526 def custom_constraints @custom_constraints end |
#name ⇒ String
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`
1535 1536 1537 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1535 def name @name end |
#overlay ⇒ Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay
The proposed changes to OrgPolicy.
Corresponds to the JSON property overlay
1540 1541 1542 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1540 def @overlay end |
#resource_counts ⇒ Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts
A summary of the state of all resources scanned for compliance with the
changed OrgPolicy.
Corresponds to the JSON property resourceCounts
1546 1547 1548 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1546 def resource_counts @resource_counts end |
#state ⇒ String
Output only. The state of the OrgPolicyViolationsPreview.
Corresponds to the JSON property state
1551 1552 1553 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1551 def state @state end |
#violations_count ⇒ Fixnum
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
1561 1562 1563 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1561 def violations_count @violations_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1568 1569 1570 1571 1572 1573 1574 1575 1576 |
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1568 def update!(**args) @create_time = args[:create_time] if args.key?(:create_time) @custom_constraints = args[:custom_constraints] if args.key?(:custom_constraints) @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 |