1. Packages
  2. Volcengine
  3. API Docs
  4. iam
  5. LoginProfile
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

volcengine.iam.LoginProfile

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine

    Provides a resource to manage iam login profile

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooUser = new Volcengine.Iam.User("fooUser", new()
        {
            UserName = "acc-test-user",
            Description = "acc-test",
            DisplayName = "name",
        });
    
        var fooLoginProfile = new Volcengine.Iam.LoginProfile("fooLoginProfile", new()
        {
            UserName = fooUser.UserName,
            Password = "93f0cb0614Aab12",
            LoginAllowed = true,
            PasswordResetRequired = false,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooUser, err := iam.NewUser(ctx, "fooUser", &iam.UserArgs{
    			UserName:    pulumi.String("acc-test-user"),
    			Description: pulumi.String("acc-test"),
    			DisplayName: pulumi.String("name"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = iam.NewLoginProfile(ctx, "fooLoginProfile", &iam.LoginProfileArgs{
    			UserName:              fooUser.UserName,
    			Password:              pulumi.String("93f0cb0614Aab12"),
    			LoginAllowed:          pulumi.Bool(true),
    			PasswordResetRequired: pulumi.Bool(false),
    		})
    		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.volcengine.iam.User;
    import com.pulumi.volcengine.iam.UserArgs;
    import com.pulumi.volcengine.iam.LoginProfile;
    import com.pulumi.volcengine.iam.LoginProfileArgs;
    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 fooUser = new User("fooUser", UserArgs.builder()        
                .userName("acc-test-user")
                .description("acc-test")
                .displayName("name")
                .build());
    
            var fooLoginProfile = new LoginProfile("fooLoginProfile", LoginProfileArgs.builder()        
                .userName(fooUser.userName())
                .password("93f0cb0614Aab12")
                .loginAllowed(true)
                .passwordResetRequired(false)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_user = volcengine.iam.User("fooUser",
        user_name="acc-test-user",
        description="acc-test",
        display_name="name")
    foo_login_profile = volcengine.iam.LoginProfile("fooLoginProfile",
        user_name=foo_user.user_name,
        password="93f0cb0614Aab12",
        login_allowed=True,
        password_reset_required=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooUser = new volcengine.iam.User("fooUser", {
        userName: "acc-test-user",
        description: "acc-test",
        displayName: "name",
    });
    const fooLoginProfile = new volcengine.iam.LoginProfile("fooLoginProfile", {
        userName: fooUser.userName,
        password: "93f0cb0614Aab12",
        loginAllowed: true,
        passwordResetRequired: false,
    });
    
    resources:
      fooUser:
        type: volcengine:iam:User
        properties:
          userName: acc-test-user
          description: acc-test
          displayName: name
      fooLoginProfile:
        type: volcengine:iam:LoginProfile
        properties:
          userName: ${fooUser.userName}
          password: 93f0cb0614Aab12
          loginAllowed: true
          passwordResetRequired: false
    

    Create LoginProfile Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new LoginProfile(name: string, args: LoginProfileArgs, opts?: CustomResourceOptions);
    @overload
    def LoginProfile(resource_name: str,
                     args: LoginProfileArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def LoginProfile(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     password: Optional[str] = None,
                     user_name: Optional[str] = None,
                     login_allowed: Optional[bool] = None,
                     password_reset_required: Optional[bool] = None)
    func NewLoginProfile(ctx *Context, name string, args LoginProfileArgs, opts ...ResourceOption) (*LoginProfile, error)
    public LoginProfile(string name, LoginProfileArgs args, CustomResourceOptions? opts = null)
    public LoginProfile(String name, LoginProfileArgs args)
    public LoginProfile(String name, LoginProfileArgs args, CustomResourceOptions options)
    
    type: volcengine:iam:LoginProfile
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args LoginProfileArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var loginProfileResource = new Volcengine.Iam.LoginProfile("loginProfileResource", new()
    {
        Password = "string",
        UserName = "string",
        LoginAllowed = false,
        PasswordResetRequired = false,
    });
    
    example, err := iam.NewLoginProfile(ctx, "loginProfileResource", &iam.LoginProfileArgs{
    	Password:              pulumi.String("string"),
    	UserName:              pulumi.String("string"),
    	LoginAllowed:          pulumi.Bool(false),
    	PasswordResetRequired: pulumi.Bool(false),
    })
    
    var loginProfileResource = new LoginProfile("loginProfileResource", LoginProfileArgs.builder()
        .password("string")
        .userName("string")
        .loginAllowed(false)
        .passwordResetRequired(false)
        .build());
    
    login_profile_resource = volcengine.iam.LoginProfile("loginProfileResource",
        password="string",
        user_name="string",
        login_allowed=False,
        password_reset_required=False)
    
    const loginProfileResource = new volcengine.iam.LoginProfile("loginProfileResource", {
        password: "string",
        userName: "string",
        loginAllowed: false,
        passwordResetRequired: false,
    });
    
    type: volcengine:iam:LoginProfile
    properties:
        loginAllowed: false
        password: string
        passwordResetRequired: false
        userName: string
    

    LoginProfile Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The LoginProfile resource accepts the following input properties:

    Password string
    The password.
    UserName string
    The user name.
    LoginAllowed bool
    The flag of login allowed.
    PasswordResetRequired bool
    Is required reset password when next time login in.
    Password string
    The password.
    UserName string
    The user name.
    LoginAllowed bool
    The flag of login allowed.
    PasswordResetRequired bool
    Is required reset password when next time login in.
    password String
    The password.
    userName String
    The user name.
    loginAllowed Boolean
    The flag of login allowed.
    passwordResetRequired Boolean
    Is required reset password when next time login in.
    password string
    The password.
    userName string
    The user name.
    loginAllowed boolean
    The flag of login allowed.
    passwordResetRequired boolean
    Is required reset password when next time login in.
    password str
    The password.
    user_name str
    The user name.
    login_allowed bool
    The flag of login allowed.
    password_reset_required bool
    Is required reset password when next time login in.
    password String
    The password.
    userName String
    The user name.
    loginAllowed Boolean
    The flag of login allowed.
    passwordResetRequired Boolean
    Is required reset password when next time login in.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the LoginProfile resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing LoginProfile Resource

    Get an existing LoginProfile resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: LoginProfileState, opts?: CustomResourceOptions): LoginProfile
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            login_allowed: Optional[bool] = None,
            password: Optional[str] = None,
            password_reset_required: Optional[bool] = None,
            user_name: Optional[str] = None) -> LoginProfile
    func GetLoginProfile(ctx *Context, name string, id IDInput, state *LoginProfileState, opts ...ResourceOption) (*LoginProfile, error)
    public static LoginProfile Get(string name, Input<string> id, LoginProfileState? state, CustomResourceOptions? opts = null)
    public static LoginProfile get(String name, Output<String> id, LoginProfileState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    LoginAllowed bool
    The flag of login allowed.
    Password string
    The password.
    PasswordResetRequired bool
    Is required reset password when next time login in.
    UserName string
    The user name.
    LoginAllowed bool
    The flag of login allowed.
    Password string
    The password.
    PasswordResetRequired bool
    Is required reset password when next time login in.
    UserName string
    The user name.
    loginAllowed Boolean
    The flag of login allowed.
    password String
    The password.
    passwordResetRequired Boolean
    Is required reset password when next time login in.
    userName String
    The user name.
    loginAllowed boolean
    The flag of login allowed.
    password string
    The password.
    passwordResetRequired boolean
    Is required reset password when next time login in.
    userName string
    The user name.
    login_allowed bool
    The flag of login allowed.
    password str
    The password.
    password_reset_required bool
    Is required reset password when next time login in.
    user_name str
    The user name.
    loginAllowed Boolean
    The flag of login allowed.
    password String
    The password.
    passwordResetRequired Boolean
    Is required reset password when next time login in.
    userName String
    The user name.

    Import

    Login profile can be imported using the UserName, e.g.

     $ pulumi import volcengine:iam/loginProfile:LoginProfile default user_name
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.24 published on Tuesday, Jun 25, 2024 by Volcengine