UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

184 lines (183 loc) 7 kB
import * as pulumi from "@pulumi/pulumi"; /** * > **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](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_account-policy.html) * in the official AWS docs. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const strict = new aws.iam.AccountPasswordPolicy("strict", { * minimumPasswordLength: 8, * requireLowercaseCharacters: true, * requireNumbers: true, * requireUppercaseCharacters: true, * requireSymbols: true, * allowUsersToChangePassword: true, * }); * ``` * * ## Import * * Using `pulumi import`, import IAM Account Password Policy using the word `iam-account-password-policy`. For example: * * ```sh * $ pulumi import aws:iam/accountPasswordPolicy:AccountPasswordPolicy strict iam-account-password-policy * ``` */ export declare class AccountPasswordPolicy extends pulumi.CustomResource { /** * Get an existing AccountPasswordPolicy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AccountPasswordPolicyState, opts?: pulumi.CustomResourceOptions): AccountPasswordPolicy; /** * Returns true if the given object is an instance of AccountPasswordPolicy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is AccountPasswordPolicy; /** * Whether to allow users to change their own password */ readonly allowUsersToChangePassword: pulumi.Output<boolean | undefined>; /** * Indicates whether passwords in the account expire. Returns `true` if `maxPasswordAge` contains a value greater than `0`. Returns `false` if it is `0` or _not present_. */ readonly expirePasswords: pulumi.Output<boolean>; /** * Whether users are prevented from setting a new password after their password has expired (i.e., require administrator reset) */ readonly hardExpiry: pulumi.Output<boolean>; /** * The number of days that an user password is valid. */ readonly maxPasswordAge: pulumi.Output<number>; /** * Minimum length to require for user passwords. */ readonly minimumPasswordLength: pulumi.Output<number | undefined>; /** * The number of previous passwords that users are prevented from reusing. */ readonly passwordReusePrevention: pulumi.Output<number>; /** * Whether to require lowercase characters for user passwords. */ readonly requireLowercaseCharacters: pulumi.Output<boolean>; /** * Whether to require numbers for user passwords. */ readonly requireNumbers: pulumi.Output<boolean>; /** * Whether to require symbols for user passwords. */ readonly requireSymbols: pulumi.Output<boolean>; /** * Whether to require uppercase characters for user passwords. */ readonly requireUppercaseCharacters: pulumi.Output<boolean>; /** * Create a AccountPasswordPolicy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: AccountPasswordPolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AccountPasswordPolicy resources. */ export interface AccountPasswordPolicyState { /** * Whether to allow users to change their own password */ allowUsersToChangePassword?: pulumi.Input<boolean>; /** * Indicates whether passwords in the account expire. Returns `true` if `maxPasswordAge` contains a value greater than `0`. Returns `false` if it is `0` or _not present_. */ expirePasswords?: pulumi.Input<boolean>; /** * Whether users are prevented from setting a new password after their password has expired (i.e., require administrator reset) */ hardExpiry?: pulumi.Input<boolean>; /** * The number of days that an user password is valid. */ maxPasswordAge?: pulumi.Input<number>; /** * Minimum length to require for user passwords. */ minimumPasswordLength?: pulumi.Input<number>; /** * The number of previous passwords that users are prevented from reusing. */ passwordReusePrevention?: pulumi.Input<number>; /** * Whether to require lowercase characters for user passwords. */ requireLowercaseCharacters?: pulumi.Input<boolean>; /** * Whether to require numbers for user passwords. */ requireNumbers?: pulumi.Input<boolean>; /** * Whether to require symbols for user passwords. */ requireSymbols?: pulumi.Input<boolean>; /** * Whether to require uppercase characters for user passwords. */ requireUppercaseCharacters?: pulumi.Input<boolean>; } /** * The set of arguments for constructing a AccountPasswordPolicy resource. */ export interface AccountPasswordPolicyArgs { /** * Whether to allow users to change their own password */ allowUsersToChangePassword?: pulumi.Input<boolean>; /** * Whether users are prevented from setting a new password after their password has expired (i.e., require administrator reset) */ hardExpiry?: pulumi.Input<boolean>; /** * The number of days that an user password is valid. */ maxPasswordAge?: pulumi.Input<number>; /** * Minimum length to require for user passwords. */ minimumPasswordLength?: pulumi.Input<number>; /** * The number of previous passwords that users are prevented from reusing. */ passwordReusePrevention?: pulumi.Input<number>; /** * Whether to require lowercase characters for user passwords. */ requireLowercaseCharacters?: pulumi.Input<boolean>; /** * Whether to require numbers for user passwords. */ requireNumbers?: pulumi.Input<boolean>; /** * Whether to require symbols for user passwords. */ requireSymbols?: pulumi.Input<boolean>; /** * Whether to require uppercase characters for user passwords. */ requireUppercaseCharacters?: pulumi.Input<boolean>; }