Class: Google::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/policysimulator_v1alpha/classes.rb,
lib/google/apis/policysimulator_v1alpha/representations.rb,
lib/google/apis/policysimulator_v1alpha/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) ⇒ GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview

Returns a new instance of GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview.



1248
1249
1250
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1248

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

Instance Attribute Details

#create_timeString

Output only. Time when this OrgPolicyViolationsPreview was created. Corresponds to the JSON property createTime

Returns:

  • (String)


1200
1201
1202
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1200

def create_time
  @create_time
end

#custom_constraintsArray<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`

Returns:

  • (Array<String>)


1211
1212
1213
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1211

def custom_constraints
  @custom_constraints
end

#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)


1220
1221
1222
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1220

def name
  @name
end

#overlayGoogle::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay

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



1225
1226
1227
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1225

def overlay
  @overlay
end

#resource_countsGoogle::Apis::PolicysimulatorV1alpha::GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts

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



1231
1232
1233
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1231

def resource_counts
  @resource_counts
end

#stateString

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

Returns:

  • (String)


1236
1237
1238
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1236

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)


1246
1247
1248
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1246

def violations_count
  @violations_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/google/apis/policysimulator_v1alpha/classes.rb', line 1253

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