Class: Google::Apis::ComputeV1::Rule

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

Overview

A rule to be applied in a Policy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rule

Returns a new instance of Rule.



28925
28926
28927
# File 'lib/google/apis/compute_v1/classes.rb', line 28925

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

Instance Attribute Details

#actionString

Required Corresponds to the JSON property action

Returns:

  • (String)


28887
28888
28889
# File 'lib/google/apis/compute_v1/classes.rb', line 28887

def action
  @action
end

#conditionsArray<Google::Apis::ComputeV1::Condition>

Additional restrictions that must be met. All conditions must pass for the rule to match. Corresponds to the JSON property conditions



28893
28894
28895
# File 'lib/google/apis/compute_v1/classes.rb', line 28893

def conditions
  @conditions
end

#descriptionString

Human-readable description of the rule. Corresponds to the JSON property description

Returns:

  • (String)


28898
28899
28900
# File 'lib/google/apis/compute_v1/classes.rb', line 28898

def description
  @description
end

#insArray<String>

If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/ AUTHORITY_SELECTOR is in at least one of these entries. Corresponds to the JSON property ins

Returns:

  • (Array<String>)


28904
28905
28906
# File 'lib/google/apis/compute_v1/classes.rb', line 28904

def ins
  @ins
end

#log_configsArray<Google::Apis::ComputeV1::LogConfig>

The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG action. Corresponds to the JSON property logConfigs



28910
28911
28912
# File 'lib/google/apis/compute_v1/classes.rb', line 28910

def log_configs
  @log_configs
end

#not_insArray<String>

If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is in none of the entries. Corresponds to the JSON property notIns

Returns:

  • (Array<String>)


28916
28917
28918
# File 'lib/google/apis/compute_v1/classes.rb', line 28916

def not_ins
  @not_ins
end

#permissionsArray<String>

A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '' matches all permissions, and a verb part of '' (e.g., 'storage.buckets. *') matches all verbs. Corresponds to the JSON property permissions

Returns:

  • (Array<String>)


28923
28924
28925
# File 'lib/google/apis/compute_v1/classes.rb', line 28923

def permissions
  @permissions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



28930
28931
28932
28933
28934
28935
28936
28937
28938
# File 'lib/google/apis/compute_v1/classes.rb', line 28930

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @conditions = args[:conditions] if args.key?(:conditions)
  @description = args[:description] if args.key?(:description)
  @ins = args[:ins] if args.key?(:ins)
  @log_configs = args[:log_configs] if args.key?(:log_configs)
  @not_ins = args[:not_ins] if args.key?(:not_ins)
  @permissions = args[:permissions] if args.key?(:permissions)
end