Reference documentation and code samples for the Policy Simulator V1 API class Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview.
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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
-
(::Google::Protobuf::Timestamp) — Output only. Time when this
OrgPolicyViolationsPreview
was created.
#custom_constraints
def custom_constraints() -> ::Array<::String>
-
(::Array<::String>) — Output only. The names of the constraints against which all
OrgPolicyViolations
were evaluated.If
OrgPolicyOverlay
only containsPolicyOverlay
then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified inCustomConstraintOverlay
.Format:
organizations/{organization_id}/customConstraints/{custom_constraint_id}
Example:
organizations/123/customConstraints/custom.createOnlyE2TypeVms
#name
def name() -> ::String
-
(::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
#overlay
def overlay() -> ::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay
- (::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay) — Required. The proposed changes we are previewing violations for.
#overlay=
def overlay=(value) -> ::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay
- value (::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay) — Required. The proposed changes we are previewing violations for.
- (::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay) — Required. The proposed changes we are previewing violations for.
#resource_counts
def resource_counts() -> ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts
- (::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts) — Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.
#state
def state() -> ::Google::Cloud::PolicySimulator::V1::PreviewState
-
(::Google::Cloud::PolicySimulator::V1::PreviewState) — Output only. The state of the
OrgPolicyViolationsPreview
.
#violations_count
def violations_count() -> ::Integer
-
(::Integer) — Output only. The number of [OrgPolicyViolations][] in this
OrgPolicyViolationsPreview
. This count may differ fromresource_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.