Show / Hide Table of Contents

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,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
AccountPasswordPolicy
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Iam
Assembly: Pulumi.Aws.dll
Syntax
public class AccountPasswordPolicy : CustomResource

Constructors

View Source

AccountPasswordPolicy(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 Source

AllowUsersToChangePassword

Whether to allow users to change their own password

Declaration
public Output<bool?> AllowUsersToChangePassword { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

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>
View Source

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>
View Source

MaxPasswordAge

The number of days that an user password is valid.

Declaration
public Output<int> MaxPasswordAge { get; }
Property Value
Type Description
Output<System.Int32>
View Source

MinimumPasswordLength

Minimum length to require for user passwords.

Declaration
public Output<int?> MinimumPasswordLength { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

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>
View Source

RequireLowercaseCharacters

Whether to require lowercase characters for user passwords.

Declaration
public Output<bool> RequireLowercaseCharacters { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

RequireNumbers

Whether to require numbers for user passwords.

Declaration
public Output<bool> RequireNumbers { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

RequireSymbols

Whether to require symbols for user passwords.

Declaration
public Output<bool> RequireSymbols { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

RequireUppercaseCharacters

Whether to require uppercase characters for user passwords.

Declaration
public Output<bool> RequireUppercaseCharacters { get; }
Property Value
Type Description
Output<System.Boolean>

Methods

View Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.