Class: Google::Apis::SqladminV1::PasswordValidationPolicy

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

Overview

Database instance local user password validation policy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PasswordValidationPolicy

Returns a new instance of PasswordValidationPolicy.



2605
2606
2607
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2605

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

Instance Attribute Details

#complexityString

The complexity of the password. Corresponds to the JSON property complexity

Returns:

  • (String)


2575
2576
2577
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2575

def complexity
  @complexity
end

#disallow_username_substringBoolean Also known as: disallow_username_substring?

Disallow username as a part of the password. Corresponds to the JSON property disallowUsernameSubstring

Returns:

  • (Boolean)


2580
2581
2582
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2580

def disallow_username_substring
  @disallow_username_substring
end

#enable_password_policyBoolean Also known as: enable_password_policy?

Whether the password policy is enabled or not. Corresponds to the JSON property enablePasswordPolicy

Returns:

  • (Boolean)


2586
2587
2588
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2586

def enable_password_policy
  @enable_password_policy
end

#min_lengthFixnum

Minimum number of characters allowed. Corresponds to the JSON property minLength

Returns:

  • (Fixnum)


2592
2593
2594
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2592

def min_length
  @min_length
end

#password_change_intervalString

Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. Corresponds to the JSON property passwordChangeInterval

Returns:

  • (String)


2598
2599
2600
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2598

def password_change_interval
  @password_change_interval
end

#reuse_intervalFixnum

Number of previous passwords that cannot be reused. Corresponds to the JSON property reuseInterval

Returns:

  • (Fixnum)


2603
2604
2605
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2603

def reuse_interval
  @reuse_interval
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2610
2611
2612
2613
2614
2615
2616
2617
# File 'lib/google/apis/sqladmin_v1/classes.rb', line 2610

def update!(**args)
  @complexity = args[:complexity] if args.key?(:complexity)
  @disallow_username_substring = args[:disallow_username_substring] if args.key?(:disallow_username_substring)
  @enable_password_policy = args[:enable_password_policy] if args.key?(:enable_password_policy)
  @min_length = args[:min_length] if args.key?(:min_length)
  @password_change_interval = args[:password_change_interval] if args.key?(:password_change_interval)
  @reuse_interval = args[:reuse_interval] if args.key?(:reuse_interval)
end