Policy Simulator V1 API - Class Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview (v1.4.0)

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
Returns

#custom_constraints

def custom_constraints() -> ::Array<::String>
Returns
  • (::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

#name

def name() -> ::String
Returns
  • (::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
Returns

#overlay=

def overlay=(value) -> ::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay
Parameter
Returns

#resource_counts

def resource_counts() -> ::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts
Returns

#state

def state() -> ::Google::Cloud::PolicySimulator::V1::PreviewState
Returns

#violations_count

def violations_count() -> ::Integer
Returns
  • (::Integer) — 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.