SecurityPreferenceArgs

data class SecurityPreferenceArgs(val allowUserToChangePassword: Output<Boolean>? = null, val allowUserToManageAccessKeys: Output<Boolean>? = null, val allowUserToManageMfaDevices: Output<Boolean>? = null, val enableSaveMfaTicket: Output<Boolean>? = null, val enforceMfaForLogin: Output<Boolean>? = null, val loginNetworkMasks: Output<String>? = null, val loginSessionDuration: Output<Int>? = null) : ConvertibleToJava<SecurityPreferenceArgs>

Provides a RAM Security Preference resource. For information about RAM Security Preference and how to use it, see What is Security Preference.

NOTE: Available since v1.152.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ram.SecurityPreference("example", {
enableSaveMfaTicket: false,
allowUserToChangePassword: true,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ram.SecurityPreference("example",
enable_save_mfa_ticket=False,
allow_user_to_change_password=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ram.SecurityPreference("example", new()
{
EnableSaveMfaTicket = false,
AllowUserToChangePassword = true,
});
});
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.NewSecurityPreference(ctx, "example", &ram.SecurityPreferenceArgs{
EnableSaveMfaTicket: pulumi.Bool(false),
AllowUserToChangePassword: pulumi.Bool(true),
})
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.SecurityPreference;
import com.pulumi.alicloud.ram.SecurityPreferenceArgs;
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 example = new SecurityPreference("example", SecurityPreferenceArgs.builder()
.enableSaveMfaTicket(false)
.allowUserToChangePassword(true)
.build());
}
}
resources:
example:
type: alicloud:ram:SecurityPreference
properties:
enableSaveMfaTicket: false
allowUserToChangePassword: true

Import

RAM Security Preference can be imported using the id, e.g.

$ pulumi import alicloud:ram/securityPreference:SecurityPreference example <id>

Constructors

Link copied to clipboard
constructor(allowUserToChangePassword: Output<Boolean>? = null, allowUserToManageAccessKeys: Output<Boolean>? = null, allowUserToManageMfaDevices: Output<Boolean>? = null, enableSaveMfaTicket: Output<Boolean>? = null, enforceMfaForLogin: Output<Boolean>? = null, loginNetworkMasks: Output<String>? = null, loginSessionDuration: Output<Int>? = null)

Properties

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

Specifies whether RAM users can change their passwords. Valid values: true and false

Link copied to clipboard

Specifies whether RAM users can manage their AccessKey pairs. Valid values: true and false

Link copied to clipboard

Specifies whether RAM users can manage their MFA devices. Valid values: true and false

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

Specifies whether to remember the MFA devices for seven days. Valid values: true and false

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

Specifies whether MFA is required for all RAM users when they log on to the Alibaba Cloud Management Console by using usernames and passwords. Valid values: true and false

Link copied to clipboard
val loginNetworkMasks: Output<String>? = null

The subnet mask that specifies the IP addresses from which you can log on to the Alibaba Cloud Management Console. This parameter takes effect on password-based logon and single sign-on (SSO). However, this parameter does not take effect on API calls that are authenticated by using AccessKey pairs.NOTE: You can specify up to 25 subnet masks. The total length of the subnet masks can be a maximum of 512 characters.

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

The validity period of the logon session of RAM users. Valid values: 6 to 24. Unit: hours. Default value: 6.

Functions

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