AccountPasswordPolicyArgs

data class AccountPasswordPolicyArgs(val hardExpiry: Output<Boolean>? = null, val maxLoginAttempts: Output<Int>? = null, val maxPasswordAge: Output<Int>? = null, val minimumPasswordLength: Output<Int>? = null, val passwordReusePrevention: Output<Int>? = null, val requireLowercaseCharacters: Output<Boolean>? = null, val requireNumbers: Output<Boolean>? = null, val requireSymbols: Output<Boolean>? = null, val requireUppercaseCharacters: Output<Boolean>? = null) : ConvertibleToJava<AccountPasswordPolicyArgs>

Example Usage

Empty resource sets defaults values for every property.

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = new alicloud.ram.AccountPasswordPolicy("default", {});
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.ram.AccountPasswordPolicy("default")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = new AliCloud.Ram.AccountPasswordPolicy("default");
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ram.NewAccountPasswordPolicy(ctx, "default", nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.AccountPasswordPolicy;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new AccountPasswordPolicy("default");
}
}
resources:
default:
type: alicloud:ram:AccountPasswordPolicy
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const corporate = new alicloud.ram.AccountPasswordPolicy("corporate", {
minimumPasswordLength: 9,
requireLowercaseCharacters: false,
requireUppercaseCharacters: false,
requireNumbers: false,
requireSymbols: false,
hardExpiry: true,
maxPasswordAge: 12,
passwordReusePrevention: 5,
maxLoginAttempts: 3,
});
import pulumi
import pulumi_alicloud as alicloud
corporate = alicloud.ram.AccountPasswordPolicy("corporate",
minimum_password_length=9,
require_lowercase_characters=False,
require_uppercase_characters=False,
require_numbers=False,
require_symbols=False,
hard_expiry=True,
max_password_age=12,
password_reuse_prevention=5,
max_login_attempts=3)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var corporate = new AliCloud.Ram.AccountPasswordPolicy("corporate", new()
{
MinimumPasswordLength = 9,
RequireLowercaseCharacters = false,
RequireUppercaseCharacters = false,
RequireNumbers = false,
RequireSymbols = false,
HardExpiry = true,
MaxPasswordAge = 12,
PasswordReusePrevention = 5,
MaxLoginAttempts = 3,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ram"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ram.NewAccountPasswordPolicy(ctx, "corporate", &ram.AccountPasswordPolicyArgs{
MinimumPasswordLength: pulumi.Int(9),
RequireLowercaseCharacters: pulumi.Bool(false),
RequireUppercaseCharacters: pulumi.Bool(false),
RequireNumbers: pulumi.Bool(false),
RequireSymbols: pulumi.Bool(false),
HardExpiry: pulumi.Bool(true),
MaxPasswordAge: pulumi.Int(12),
PasswordReusePrevention: pulumi.Int(5),
MaxLoginAttempts: pulumi.Int(3),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ram.AccountPasswordPolicy;
import com.pulumi.alicloud.ram.AccountPasswordPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var corporate = new AccountPasswordPolicy("corporate", AccountPasswordPolicyArgs.builder()
.minimumPasswordLength(9)
.requireLowercaseCharacters(false)
.requireUppercaseCharacters(false)
.requireNumbers(false)
.requireSymbols(false)
.hardExpiry(true)
.maxPasswordAge(12)
.passwordReusePrevention(5)
.maxLoginAttempts(3)
.build());
}
}
resources:
corporate:
type: alicloud:ram:AccountPasswordPolicy
properties:
minimumPasswordLength: 9
requireLowercaseCharacters: false
requireUppercaseCharacters: false
requireNumbers: false
requireSymbols: false
hardExpiry: true
maxPasswordAge: 12
passwordReusePrevention: 5
maxLoginAttempts: 3

For not specified values sets defaults.

Import

RAM account password policy can be imported using the id, e.g. bash

$ pulumi import alicloud:ram/accountPasswordPolicy:AccountPasswordPolicy example ram-account-password-policy

Constructors

Link copied to clipboard
constructor(hardExpiry: Output<Boolean>? = null, maxLoginAttempts: Output<Int>? = null, maxPasswordAge: Output<Int>? = null, minimumPasswordLength: Output<Int>? = null, passwordReusePrevention: Output<Int>? = null, requireLowercaseCharacters: Output<Boolean>? = null, requireNumbers: Output<Boolean>? = null, requireSymbols: Output<Boolean>? = null, requireUppercaseCharacters: Output<Boolean>? = null)

Properties

Link copied to clipboard
val hardExpiry: Output<Boolean>? = null

Specifies if a password can expire in a hard way. Default to false.

Link copied to clipboard
val maxLoginAttempts: Output<Int>? = null

Maximum logon attempts with an incorrect password within an hour. Valid value range: 0-32. Default to 5.

Link copied to clipboard
val maxPasswordAge: Output<Int>? = null

The number of days after which password expires. A value of 0 indicates that the password never expires. Valid value range: 0-1095. Default to 0.

Link copied to clipboard
val minimumPasswordLength: Output<Int>? = null

Minimal required length of password for a user. Valid value range: 8-32. Default to 12.

Link copied to clipboard
val passwordReusePrevention: Output<Int>? = null

User is not allowed to use the latest number of passwords specified in this parameter. A value of 0 indicates the password history check policy is disabled. Valid value range: 0-24. Default to 0.

Link copied to clipboard
val requireLowercaseCharacters: Output<Boolean>? = null

Specifies if the occurrence of a lowercase character in the password is mandatory. Default to true.

Link copied to clipboard
val requireNumbers: Output<Boolean>? = null

Specifies if the occurrence of a number in the password is mandatory. Default to true.

Link copied to clipboard
val requireSymbols: Output<Boolean>? = null

Specifies if the occurrence of a special character in the password is mandatory. Default to true.

Link copied to clipboard
val requireUppercaseCharacters: Output<Boolean>? = null

Specifies if the occurrence of an uppercase character in the password is mandatory. Default to true.

Functions

Link copied to clipboard
open override fun toJava(): AccountPasswordPolicyArgs