Class: Google::Apis::SqladminV1beta4::PasswordValidationPolicy

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

Overview

Database instance local user password validation policy. This message defines the password policy for local database users. When enabled, it enforces constraints on password complexity, length, and reuse. Keep this policy enabled to help prevent unauthorized access.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PasswordValidationPolicy

Returns a new instance of PasswordValidationPolicy.



4406
4407
4408
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4406

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

Instance Attribute Details

#complexityString

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

Returns:

  • (String)


4368
4369
4370
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4368

def complexity
  @complexity
end

#disallow_compromised_credentialsBoolean Also known as: disallow_compromised_credentials?

This field is deprecated and will be removed in a future version of the API. Corresponds to the JSON property disallowCompromisedCredentials

Returns:

  • (Boolean)


4373
4374
4375
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4373

def disallow_compromised_credentials
  @disallow_compromised_credentials
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)


4379
4380
4381
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4379

def disallow_username_substring
  @disallow_username_substring
end

#enable_password_policyBoolean Also known as: enable_password_policy?

Whether to enable the password policy or not. When enabled, passwords must meet complexity requirements. Keep this policy enabled to help prevent unauthorized access. Disabling this policy allows weak passwords. Corresponds to the JSON property enablePasswordPolicy

Returns:

  • (Boolean)


4387
4388
4389
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4387

def enable_password_policy
  @enable_password_policy
end

#min_lengthFixnum

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

Returns:

  • (Fixnum)


4393
4394
4395
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4393

def min_length
  @min_length
end

#password_change_intervalString

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

Returns:

  • (String)


4399
4400
4401
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4399

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)


4404
4405
4406
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4404

def reuse_interval
  @reuse_interval
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4411
4412
4413
4414
4415
4416
4417
4418
4419
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4411

def update!(**args)
  @complexity = args[:complexity] if args.key?(:complexity)
  @disallow_compromised_credentials = args[:disallow_compromised_credentials] if args.key?(:disallow_compromised_credentials)
  @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