Class: Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/policysimulator/v1/orgpolicy.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.

Defined Under Namespace

Classes: ResourceCounts

Instance Attribute Summary collapse

Instance Attribute Details

#create_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. Time when this OrgPolicyViolationsPreview was created.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#custom_constraints::Array<::String> (readonly)

Returns 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.

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



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#name::String (readonly)

Returns 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.

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



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#overlay::Google::Cloud::PolicySimulator::V1::OrgPolicyOverlay

Returns Required. The proposed changes we are previewing violations for.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#resource_counts::Google::Cloud::PolicySimulator::V1::OrgPolicyViolationsPreview::ResourceCounts (readonly)

Returns Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#state::Google::Cloud::PolicySimulator::V1::PreviewState (readonly)

Returns Output only. The state of the OrgPolicyViolationsPreview.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#violations_count::Integer (readonly)

Returns 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.

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.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'proto_docs/google/cloud/policysimulator/v1/orgpolicy.rb', line 76

class OrgPolicyViolationsPreview
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # A summary of the state of all resources scanned for compliance with the
  # changed OrgPolicy.
  # @!attribute [r] scanned
  #   @return [::Integer]
  #     Output only. Number of resources checked for compliance.
  #
  #     Must equal:  unenforced + noncompliant + compliant + error
  # @!attribute [r] noncompliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with at least one violation.
  # @!attribute [r] compliant
  #   @return [::Integer]
  #     Output only. Number of scanned resources with zero violations.
  # @!attribute [r] unenforced
  #   @return [::Integer]
  #     Output only. Number of resources where the constraint was not enforced,
  #     i.e. the Policy set `enforced: false` for that resource.
  # @!attribute [r] errors
  #   @return [::Integer]
  #     Output only. Number of resources that returned an error when scanned.
  class ResourceCounts
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end