Class: Google::Apis::RedisV1beta1::AclRule

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

Overview

A single ACL rule which defines the policy for a user.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AclRule

Returns a new instance of AclRule.



248
249
250
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 248

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

Instance Attribute Details

#ruleString

Required. The rule to be applied to the username. Ex: "on >password123 ~* +@ all" The format of the rule is defined by Redis OSS: https://redis.io/docs/ latest/operate/oss_and_stack/management/security/acl/ Corresponds to the JSON property rule

Returns:

  • (String)


240
241
242
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 240

def rule
  @rule
end

#usernameString

Required. Specifies the IAM user or service account to be added to the ACL policy. This username will be directly set on the Redis OSS. Corresponds to the JSON property username

Returns:

  • (String)


246
247
248
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 246

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



253
254
255
256
# File 'lib/google/apis/redis_v1beta1/classes.rb', line 253

def update!(**args)
  @rule = args[:rule] if args.key?(:rule)
  @username = args[:username] if args.key?(:username)
end