class Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2Policy

Defines a Cloud Organization `Policy` which is used to specify `Constraints` for configurations of Cloud Platform resources.

Attributes

name[RW]

Immutable. The resource name of the Policy. Must be one of the following forms, where constraint_name is the name of the constraint which this Policy configures: * `projects/`project_number`/policies/`constraint_name“ * ` folders/`folder_id`/policies/`constraint_name“ * `organizations/` organization_id`/policies/`constraint_name“ For example, “projects/123/ policies/compute.disableSerialPortAccess”. Note: `projects/`project_id`/ policies/`constraint_name“ is also an acceptable name for API requests, but responses will return the name using the equivalent project number. Corresponds to the JSON property `name` @return [String]

spec[RW]

Defines a Cloud Organization `PolicySpec` which is used to specify ` Constraints` for configurations of Cloud Platform resources. Corresponds to the JSON property `spec` @return [Google::Apis::OrgpolicyV2::GoogleCloudOrgpolicyV2PolicySpec]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/orgpolicy_v2/classes.rb, line 216
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/orgpolicy_v2/classes.rb, line 221
def update!(**args)
  @name = args[:name] if args.key?(:name)
  @spec = args[:spec] if args.key?(:spec)
end