Class: Google::Apis::SqladminV1beta4::PasswordValidationPolicy
- Inherits:
-
Object
- Object
- Google::Apis::SqladminV1beta4::PasswordValidationPolicy
- 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
-
#complexity ⇒ String
The complexity of the password.
-
#disallow_compromised_credentials ⇒ Boolean
(also: #disallow_compromised_credentials?)
This field is deprecated and will be removed in a future version of the API.
-
#disallow_username_substring ⇒ Boolean
(also: #disallow_username_substring?)
Disallow username as a part of the password.
-
#enable_password_policy ⇒ Boolean
(also: #enable_password_policy?)
Whether to enable the password policy or not.
-
#min_length ⇒ Fixnum
Minimum number of characters allowed.
-
#password_change_interval ⇒ String
Minimum interval after which the password can be changed.
-
#reuse_interval ⇒ Fixnum
Number of previous passwords that cannot be reused.
Instance Method Summary collapse
-
#initialize(**args) ⇒ PasswordValidationPolicy
constructor
A new instance of PasswordValidationPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ PasswordValidationPolicy
Returns a new instance of PasswordValidationPolicy.
4347 4348 4349 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4347 def initialize(**args) update!(**args) end |
Instance Attribute Details
#complexity ⇒ String
The complexity of the password.
Corresponds to the JSON property complexity
4309 4310 4311 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4309 def complexity @complexity end |
#disallow_compromised_credentials ⇒ Boolean 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
4314 4315 4316 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4314 def disallow_compromised_credentials @disallow_compromised_credentials end |
#disallow_username_substring ⇒ Boolean Also known as: disallow_username_substring?
Disallow username as a part of the password.
Corresponds to the JSON property disallowUsernameSubstring
4320 4321 4322 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4320 def disallow_username_substring @disallow_username_substring end |
#enable_password_policy ⇒ Boolean 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
4328 4329 4330 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4328 def enable_password_policy @enable_password_policy end |
#min_length ⇒ Fixnum
Minimum number of characters allowed.
Corresponds to the JSON property minLength
4334 4335 4336 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4334 def min_length @min_length end |
#password_change_interval ⇒ String
Minimum interval after which the password can be changed. This flag is only
supported for PostgreSQL.
Corresponds to the JSON property passwordChangeInterval
4340 4341 4342 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4340 def password_change_interval @password_change_interval end |
#reuse_interval ⇒ Fixnum
Number of previous passwords that cannot be reused.
Corresponds to the JSON property reuseInterval
4345 4346 4347 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4345 def reuse_interval @reuse_interval end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4352 4353 4354 4355 4356 4357 4358 4359 4360 |
# File 'lib/google/apis/sqladmin_v1beta4/classes.rb', line 4352 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 |