Class: Google::Apis::CloudassetV1::GoogleCloudAssetV1Rule

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

Overview

This rule message is a customized version of the one defined in the Organization Policy system. In addition to the fields defined in the original organization policy, it contains additional field(s) under specific circumstances to support analysis results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAssetV1Rule

Returns a new instance of GoogleCloudAssetV1Rule.



2154
2155
2156
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2154

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

Instance Attribute Details

#allow_allBoolean Also known as: allow_all?

Setting this to true means that all values are allowed. This field can be set only in Policies for list constraints. Corresponds to the JSON property allowAll

Returns:

  • (Boolean)


2108
2109
2110
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2108

def allow_all
  @allow_all
end

#conditionGoogle::Apis::CloudassetV1::Expr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: " Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example ( Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information. Corresponds to the JSON property condition



2128
2129
2130
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2128

def condition
  @condition
end

#condition_evaluationGoogle::Apis::CloudassetV1::ConditionEvaluation

The condition evaluation. Corresponds to the JSON property conditionEvaluation



2133
2134
2135
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2133

def condition_evaluation
  @condition_evaluation
end

#deny_allBoolean Also known as: deny_all?

Setting this to true means that all values are denied. This field can be set only in Policies for list constraints. Corresponds to the JSON property denyAll

Returns:

  • (Boolean)


2139
2140
2141
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2139

def deny_all
  @deny_all
end

#enforceBoolean Also known as: enforce?

If true, then the Policy is enforced. If false, then any configuration is acceptable. This field can be set only in Policies for boolean constraints. Corresponds to the JSON property enforce

Returns:

  • (Boolean)


2146
2147
2148
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2146

def enforce
  @enforce
end

#valuesGoogle::Apis::CloudassetV1::GoogleCloudAssetV1StringValues

The string values for the list constraints. Corresponds to the JSON property values



2152
2153
2154
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2152

def values
  @values
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2159
2160
2161
2162
2163
2164
2165
2166
# File 'lib/google/apis/cloudasset_v1/classes.rb', line 2159

def update!(**args)
  @allow_all = args[:allow_all] if args.key?(:allow_all)
  @condition = args[:condition] if args.key?(:condition)
  @condition_evaluation = args[:condition_evaluation] if args.key?(:condition_evaluation)
  @deny_all = args[:deny_all] if args.key?(:deny_all)
  @enforce = args[:enforce] if args.key?(:enforce)
  @values = args[:values] if args.key?(:values)
end