Class: Aws::IAM::AccountPasswordPolicy
- Inherits:
-
Object
- Object
- Aws::IAM::AccountPasswordPolicy
- Extended by:
- Deprecations
- Defined in:
- lib/aws-sdk-iam/account_password_policy.rb
Defined Under Namespace
Classes: Collection
Read-Only Attributes collapse
-
#allow_users_to_change_password ⇒ Boolean
Specifies whether IAM users are allowed to change their own password.
-
#expire_passwords ⇒ Boolean
Indicates whether passwords in the account expire.
-
#hard_expiry ⇒ Boolean
Specifies whether IAM users are prevented from setting a new password after their password has expired.
-
#max_password_age ⇒ Integer
The number of days that an IAM user password is valid.
-
#minimum_password_length ⇒ Integer
Minimum length to require for IAM user passwords.
-
#password_reuse_prevention ⇒ Integer
Specifies the number of previous passwords that IAM users are prevented from reusing.
-
#require_lowercase_characters ⇒ Boolean
Specifies whether to require lowercase characters for IAM user passwords.
-
#require_numbers ⇒ Boolean
Specifies whether to require numbers for IAM user passwords.
-
#require_symbols ⇒ Boolean
Specifies whether to require symbols for IAM user passwords.
-
#require_uppercase_characters ⇒ Boolean
Specifies whether to require uppercase characters for IAM user passwords.
Actions collapse
- #delete(options = {}) ⇒ EmptyStructure
- #identifiers ⇒ Object deprecated private Deprecated.
- #update(options = {}) ⇒ EmptyStructure
Instance Method Summary collapse
- #client ⇒ Client
-
#data ⇒ Types::PasswordPolicy
Returns the data for this AccountPasswordPolicy.
-
#data_loaded? ⇒ Boolean
Returns ‘true` if this resource is loaded.
-
#initialize(options = {}) ⇒ AccountPasswordPolicy
constructor
A new instance of AccountPasswordPolicy.
-
#load ⇒ self
(also: #reload)
Loads, or reloads #data for the current AccountPasswordPolicy.
Constructor Details
#initialize(options = {}) ⇒ AccountPasswordPolicy
Returns a new instance of AccountPasswordPolicy.
15 16 17 18 19 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 15 def initialize(*args) = Hash === args.last ? args.pop.dup : {} @data = .delete(:data) @client = .delete(:client) || Client.new() end |
Instance Method Details
#allow_users_to_change_password ⇒ Boolean
Specifies whether IAM users are allowed to change their own password.
57 58 59 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 57 def allow_users_to_change_password data.allow_users_to_change_password end |
#client ⇒ Client
92 93 94 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 92 def client @client end |
#data ⇒ Types::PasswordPolicy
Returns the data for this Aws::IAM::AccountPasswordPolicy. Calls Client#get_account_password_policy if #data_loaded? is ‘false`.
112 113 114 115 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 112 def data load unless @data @data end |
#data_loaded? ⇒ Boolean
120 121 122 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 120 def data_loaded? !!@data end |
#delete(options = {}) ⇒ EmptyStructure
131 132 133 134 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 131 def delete( = {}) resp = @client.delete_account_password_policy() resp.data end |
#expire_passwords ⇒ Boolean
Indicates whether passwords in the account expire. Returns true if MaxPasswordAge is contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
65 66 67 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 65 def expire_passwords data.expire_passwords end |
#hard_expiry ⇒ Boolean
Specifies whether IAM users are prevented from setting a new password after their password has expired.
85 86 87 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 85 def hard_expiry data.hard_expiry end |
#identifiers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
210 211 212 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 210 def identifiers {} end |
#load ⇒ self Also known as: reload
Loads, or reloads #data for the current Aws::IAM::AccountPasswordPolicy. Returns ‘self` making it possible to chain methods.
account_password_policy.reload.data
102 103 104 105 106 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 102 def load resp = @client.get_account_password_policy @data = resp.password_policy self end |
#max_password_age ⇒ Integer
The number of days that an IAM user password is valid.
71 72 73 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 71 def max_password_age data.max_password_age end |
#minimum_password_length ⇒ Integer
Minimum length to require for IAM user passwords.
25 26 27 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 25 def minimum_password_length data.minimum_password_length end |
#password_reuse_prevention ⇒ Integer
Specifies the number of previous passwords that IAM users are prevented from reusing.
78 79 80 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 78 def password_reuse_prevention data.password_reuse_prevention end |
#require_lowercase_characters ⇒ Boolean
Specifies whether to require lowercase characters for IAM user passwords.
51 52 53 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 51 def require_lowercase_characters data.require_lowercase_characters end |
#require_numbers ⇒ Boolean
Specifies whether to require numbers for IAM user passwords.
37 38 39 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 37 def require_numbers data.require_numbers end |
#require_symbols ⇒ Boolean
Specifies whether to require symbols for IAM user passwords.
31 32 33 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 31 def require_symbols data.require_symbols end |
#require_uppercase_characters ⇒ Boolean
Specifies whether to require uppercase characters for IAM user passwords.
44 45 46 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 44 def require_uppercase_characters data.require_uppercase_characters end |
#update(options = {}) ⇒ EmptyStructure
203 204 205 206 |
# File 'lib/aws-sdk-iam/account_password_policy.rb', line 203 def update( = {}) resp = @client.update_account_password_policy() resp.data end |