/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the iam-2010-05-08.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.IdentityManagement.Model
{
///
/// Contains information about the account password policy.
///
///
///
/// This data type is used as a response element in the GetAccountPasswordPolicy
/// operation.
///
///
public partial class PasswordPolicy
{
private bool? _allowUsersToChangePassword;
private bool? _expirePasswords;
private bool? _hardExpiry;
private int? _maxPasswordAge;
private int? _minimumPasswordLength;
private int? _passwordReusePrevention;
private bool? _requireLowercaseCharacters;
private bool? _requireNumbers;
private bool? _requireSymbols;
private bool? _requireUppercaseCharacters;
///
/// Gets and sets the property AllowUsersToChangePassword.
///
/// Specifies whether IAM users are allowed to change their own password. Gives IAM users
/// permissions to iam:ChangePassword
for only their user and to the iam:GetAccountPasswordPolicy
/// action. This option does not attach a permissions policy to each user, rather the
/// permissions are applied at the account-level for all users by IAM.
///
///
public bool AllowUsersToChangePassword
{
get { return this._allowUsersToChangePassword.GetValueOrDefault(); }
set { this._allowUsersToChangePassword = value; }
}
// Check to see if AllowUsersToChangePassword property is set
internal bool IsSetAllowUsersToChangePassword()
{
return this._allowUsersToChangePassword.HasValue;
}
///
/// Gets and sets the property ExpirePasswords.
///
/// Indicates whether passwords in the account expire. Returns true if MaxPasswordAge
/// contains a value greater than 0. Returns false if MaxPasswordAge is 0 or not present.
///
///
public bool ExpirePasswords
{
get { return this._expirePasswords.GetValueOrDefault(); }
set { this._expirePasswords = value; }
}
// Check to see if ExpirePasswords property is set
internal bool IsSetExpirePasswords()
{
return this._expirePasswords.HasValue;
}
///
/// Gets and sets the property HardExpiry.
///
/// Specifies whether IAM users are prevented from setting a new password via the Amazon
/// Web Services Management Console after their password has expired. The IAM user cannot
/// access the console until an administrator resets the password. IAM users with iam:ChangePassword
/// permission and active access keys can reset their own expired console password using
/// the CLI or API.
///
///
public bool HardExpiry
{
get { return this._hardExpiry.GetValueOrDefault(); }
set { this._hardExpiry = value; }
}
// Check to see if HardExpiry property is set
internal bool IsSetHardExpiry()
{
return this._hardExpiry.HasValue;
}
///
/// Gets and sets the property MaxPasswordAge.
///
/// The number of days that an IAM user password is valid.
///
///
[AWSProperty(Min=1, Max=1095)]
public int MaxPasswordAge
{
get { return this._maxPasswordAge.GetValueOrDefault(); }
set { this._maxPasswordAge = value; }
}
// Check to see if MaxPasswordAge property is set
internal bool IsSetMaxPasswordAge()
{
return this._maxPasswordAge.HasValue;
}
///
/// Gets and sets the property MinimumPasswordLength.
///
/// Minimum length to require for IAM user passwords.
///
///
[AWSProperty(Min=6, Max=128)]
public int MinimumPasswordLength
{
get { return this._minimumPasswordLength.GetValueOrDefault(); }
set { this._minimumPasswordLength = value; }
}
// Check to see if MinimumPasswordLength property is set
internal bool IsSetMinimumPasswordLength()
{
return this._minimumPasswordLength.HasValue;
}
///
/// Gets and sets the property PasswordReusePrevention.
///
/// Specifies the number of previous passwords that IAM users are prevented from reusing.
///
///
[AWSProperty(Min=1, Max=24)]
public int PasswordReusePrevention
{
get { return this._passwordReusePrevention.GetValueOrDefault(); }
set { this._passwordReusePrevention = value; }
}
// Check to see if PasswordReusePrevention property is set
internal bool IsSetPasswordReusePrevention()
{
return this._passwordReusePrevention.HasValue;
}
///
/// Gets and sets the property RequireLowercaseCharacters.
///
/// Specifies whether IAM user passwords must contain at least one lowercase character
/// (a to z).
///
///
public bool RequireLowercaseCharacters
{
get { return this._requireLowercaseCharacters.GetValueOrDefault(); }
set { this._requireLowercaseCharacters = value; }
}
// Check to see if RequireLowercaseCharacters property is set
internal bool IsSetRequireLowercaseCharacters()
{
return this._requireLowercaseCharacters.HasValue;
}
///
/// Gets and sets the property RequireNumbers.
///
/// Specifies whether IAM user passwords must contain at least one numeric character (0
/// to 9).
///
///
public bool RequireNumbers
{
get { return this._requireNumbers.GetValueOrDefault(); }
set { this._requireNumbers = value; }
}
// Check to see if RequireNumbers property is set
internal bool IsSetRequireNumbers()
{
return this._requireNumbers.HasValue;
}
///
/// Gets and sets the property RequireSymbols.
///
/// Specifies whether IAM user passwords must contain at least one of the following symbols:
///
///
///
/// ! @ # $ % ^ & * ( ) _ + - = [ ] { } | '
///
///
public bool RequireSymbols
{
get { return this._requireSymbols.GetValueOrDefault(); }
set { this._requireSymbols = value; }
}
// Check to see if RequireSymbols property is set
internal bool IsSetRequireSymbols()
{
return this._requireSymbols.HasValue;
}
///
/// Gets and sets the property RequireUppercaseCharacters.
///
/// Specifies whether IAM user passwords must contain at least one uppercase character
/// (A to Z).
///
///
public bool RequireUppercaseCharacters
{
get { return this._requireUppercaseCharacters.GetValueOrDefault(); }
set { this._requireUppercaseCharacters = value; }
}
// Check to see if RequireUppercaseCharacters property is set
internal bool IsSetRequireUppercaseCharacters()
{
return this._requireUppercaseCharacters.HasValue;
}
}
}