Class: Google::Apis::AssuredworkloadsV1::GoogleCloudAssuredworkloadsV1OrgPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/assuredworkloads_v1/classes.rb,
lib/google/apis/assuredworkloads_v1/representations.rb,
lib/google/apis/assuredworkloads_v1/representations.rb

Overview

This assured workload service object is used to represent the org policy attached to a resource. It servces the same purpose as the orgpolicy.v2.Policy object but with functionality that is limited to what is supported by Assured Workloads(e.g. only one rule under one OrgPolicy object, no conditions, etc).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAssuredworkloadsV1OrgPolicy

Returns a new instance of GoogleCloudAssuredworkloadsV1OrgPolicy.



1291
1292
1293
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1291

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

Instance Attribute Details

#constraintString

The constraint name of the OrgPolicy. e.g. "constraints/gcp.resourceLocations". Corresponds to the JSON property constraint

Returns:

  • (String)


1264
1265
1266
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1264

def constraint
  @constraint
end

#inheritBoolean Also known as: inherit?

If inherit is true, policy rules of the lowest ancestor in the resource hierarchy chain are inherited. If it is false, policy rules are not inherited. Corresponds to the JSON property inherit

Returns:

  • (Boolean)


1270
1271
1272
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1270

def inherit
  @inherit
end

#resetBoolean Also known as: reset?

Ignores policies set above this resource and restores to the constraint_default value. reset can only be true when rules is empty and inherit is false. Corresponds to the JSON property reset

Returns:

  • (Boolean)


1278
1279
1280
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1278

def reset
  @reset
end

#resourceString

Resource that the OrgPolicy attaches to. Format: folders/123" projects/123". Corresponds to the JSON property resource

Returns:

  • (String)


1284
1285
1286
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1284

def resource
  @resource
end

#ruleGoogle::Apis::AssuredworkloadsV1::GoogleCloudAssuredworkloadsV1OrgPolicyPolicyRule

A rule used to express this policy. Corresponds to the JSON property rule



1289
1290
1291
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1289

def rule
  @rule
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1296
1297
1298
1299
1300
1301
1302
# File 'lib/google/apis/assuredworkloads_v1/classes.rb', line 1296

def update!(**args)
  @constraint = args[:constraint] if args.key?(:constraint)
  @inherit = args[:inherit] if args.key?(:inherit)
  @reset = args[:reset] if args.key?(:reset)
  @resource = args[:resource] if args.key?(:resource)
  @rule = args[:rule] if args.key?(:rule)
end