Class: Google::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaOrgPolicyViolation

Inherits:
Object
  • Object
show all
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

OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudPolicysimulatorV1betaOrgPolicyViolation

Returns a new instance of GoogleCloudPolicysimulatorV1betaOrgPolicyViolation.



1339
1340
1341
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1339

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

Instance Attribute Details

#custom_constraintGoogle::Apis::PolicysimulatorV1beta::GoogleCloudOrgpolicyV2CustomConstraint

A custom constraint defined by customers which can only be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. Creating a custom constraint itself does NOT apply any policy enforcement. Corresponds to the JSON property customConstraint



1314
1315
1316
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1314

def custom_constraint
  @custom_constraint
end

#errorGoogle::Apis::PolicysimulatorV1beta::GoogleRpcStatus

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide. Corresponds to the JSON property error



1324
1325
1326
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1324

def error
  @error
end

#nameString

The name of the OrgPolicyViolation. Example: organizations/my-example-org/ locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce Corresponds to the JSON propertyname`

Returns:

  • (String)


1330
1331
1332
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1330

def name
  @name
end

#resourceGoogle::Apis::PolicysimulatorV1beta::GoogleCloudPolicysimulatorV1betaResourceContext

ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator. Corresponds to the JSON property resource



1337
1338
1339
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1337

def resource
  @resource
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1344
1345
1346
1347
1348
1349
# File 'lib/google/apis/policysimulator_v1beta/classes.rb', line 1344

def update!(**args)
  @custom_constraint = args[:custom_constraint] if args.key?(:custom_constraint)
  @error = args[:error] if args.key?(:error)
  @name = args[:name] if args.key?(:name)
  @resource = args[:resource] if args.key?(:resource)
end