Class: Google::Apis::RedisV1::AclRule

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/redis_v1/classes.rb,
lib/google/apis/redis_v1/representations.rb,
lib/google/apis/redis_v1/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.



104
105
106
# File 'lib/google/apis/redis_v1/classes.rb', line 104

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)


96
97
98
# File 'lib/google/apis/redis_v1/classes.rb', line 96

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)


102
103
104
# File 'lib/google/apis/redis_v1/classes.rb', line 102

def username
  @username
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



109
110
111
112
# File 'lib/google/apis/redis_v1/classes.rb', line 109

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