Class AccountPasswordPolicy
Note: There is only a single policy allowed per AWS account. An existing policy will be lost when using this resource as an effect of this limitation.
Manages Password Policy for the AWS Account. See more about Account Password Policy in the official AWS docs.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var strict = new Aws.Iam.AccountPasswordPolicy("strict", new Aws.Iam.AccountPasswordPolicyArgs
{
AllowUsersToChangePassword = true,
MinimumPasswordLength = 8,
RequireLowercaseCharacters = true,
RequireNumbers = true,
RequireSymbols = true,
RequireUppercaseCharacters = true,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class AccountPasswordPolicy : CustomResource
Constructors
View SourceAccountPasswordPolicy(String, AccountPasswordPolicyArgs, CustomResourceOptions)
Create a AccountPasswordPolicy resource with the given unique name, arguments, and options.
Declaration
public AccountPasswordPolicy(string name, AccountPasswordPolicyArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| AccountPasswordPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAllowUsersToChangePassword
Whether to allow users to change their own password
Declaration
public Output<bool?> AllowUsersToChangePassword { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
ExpirePasswords
Indicates whether passwords in the account expire.
Returns true if max_password_age contains a value greater than 0.
Returns false if it is 0 or not present.
Declaration
public Output<bool> ExpirePasswords { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
HardExpiry
Whether users are prevented from setting a new password after their password has expired (i.e. require administrator reset)
Declaration
public Output<bool> HardExpiry { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
MaxPasswordAge
The number of days that an user password is valid.
Declaration
public Output<int> MaxPasswordAge { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
MinimumPasswordLength
Minimum length to require for user passwords.
Declaration
public Output<int?> MinimumPasswordLength { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
PasswordReusePrevention
The number of previous passwords that users are prevented from reusing.
Declaration
public Output<int> PasswordReusePrevention { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
RequireLowercaseCharacters
Whether to require lowercase characters for user passwords.
Declaration
public Output<bool> RequireLowercaseCharacters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
RequireNumbers
Whether to require numbers for user passwords.
Declaration
public Output<bool> RequireNumbers { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
RequireSymbols
Whether to require symbols for user passwords.
Declaration
public Output<bool> RequireSymbols { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
RequireUppercaseCharacters
Whether to require uppercase characters for user passwords.
Declaration
public Output<bool> RequireUppercaseCharacters { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
Methods
View SourceGet(String, Input<String>, AccountPasswordPolicyState, CustomResourceOptions)
Get an existing AccountPasswordPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static AccountPasswordPolicy Get(string name, Input<string> id, AccountPasswordPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| AccountPasswordPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| AccountPasswordPolicy |