1. Packages
  2. Okta
  3. API Docs
  4. app
  5. User
Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi

okta.app.User

Explore with Pulumi AI

okta logo
Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const example = new okta.app.User("example", {
        appId: "<app_id>",
        userId: "<user id>",
        username: "example",
    });
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.app.User("example",
        app_id="<app_id>",
        user_id="<user id>",
        username="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/app"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := app.NewUser(ctx, "example", &app.UserArgs{
    			AppId:    pulumi.String("<app_id>"),
    			UserId:   pulumi.String("<user id>"),
    			Username: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Okta.App.User("example", new()
        {
            AppId = "<app_id>",
            UserId = "<user id>",
            Username = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.app.User;
    import com.pulumi.okta.app.UserArgs;
    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 User("example", UserArgs.builder()
                .appId("<app_id>")
                .userId("<user id>")
                .username("example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: okta:app:User
        properties:
          appId: <app_id>
          userId: <user id>
          username: example
    

    Create User Resource

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

    Constructor syntax

    new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             args: UserArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def User(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             app_id: Optional[str] = None,
             user_id: Optional[str] = None,
             password: Optional[str] = None,
             profile: Optional[str] = None,
             retain_assignment: Optional[bool] = None,
             username: Optional[str] = None)
    func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
    public User(string name, UserArgs args, CustomResourceOptions? opts = null)
    public User(String name, UserArgs args)
    public User(String name, UserArgs args, CustomResourceOptions options)
    
    type: okta:app:User
    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 UserArgs
    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 UserArgs
    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 UserArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args UserArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args UserArgs
    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 userResource = new Okta.App.User("userResource", new()
    {
        AppId = "string",
        UserId = "string",
        Password = "string",
        Profile = "string",
        RetainAssignment = false,
        Username = "string",
    });
    
    example, err := app.NewUser(ctx, "userResource", &app.UserArgs{
    	AppId:            pulumi.String("string"),
    	UserId:           pulumi.String("string"),
    	Password:         pulumi.String("string"),
    	Profile:          pulumi.String("string"),
    	RetainAssignment: pulumi.Bool(false),
    	Username:         pulumi.String("string"),
    })
    
    var userResource = new User("userResource", UserArgs.builder()
        .appId("string")
        .userId("string")
        .password("string")
        .profile("string")
        .retainAssignment(false)
        .username("string")
        .build());
    
    user_resource = okta.app.User("userResource",
        app_id="string",
        user_id="string",
        password="string",
        profile="string",
        retain_assignment=False,
        username="string")
    
    const userResource = new okta.app.User("userResource", {
        appId: "string",
        userId: "string",
        password: "string",
        profile: "string",
        retainAssignment: false,
        username: "string",
    });
    
    type: okta:app:User
    properties:
        appId: string
        password: string
        profile: string
        retainAssignment: false
        userId: string
        username: string
    

    User 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 User resource accepts the following input properties:

    AppId string
    App to associate user with
    UserId string
    User associated with the application
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    Username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    AppId string
    App to associate user with
    UserId string
    User associated with the application
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    Username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId String
    App to associate user with
    userId String
    User associated with the application
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    username String
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId string
    App to associate user with
    userId string
    User associated with the application
    password string
    The password to use.
    profile string
    The JSON profile of the App User.
    retainAssignment boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    app_id str
    App to associate user with
    user_id str
    User associated with the application
    password str
    The password to use.
    profile str
    The JSON profile of the App User.
    retain_assignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    username str
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId String
    App to associate user with
    userId String
    User associated with the application
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    username String
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.

    Outputs

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

    HasSharedUsername bool
    Id string
    The provider-assigned unique ID for this managed resource.
    HasSharedUsername bool
    Id string
    The provider-assigned unique ID for this managed resource.
    hasSharedUsername Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    hasSharedUsername boolean
    id string
    The provider-assigned unique ID for this managed resource.
    has_shared_username bool
    id str
    The provider-assigned unique ID for this managed resource.
    hasSharedUsername Boolean
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing User Resource

    Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            has_shared_username: Optional[bool] = None,
            password: Optional[str] = None,
            profile: Optional[str] = None,
            retain_assignment: Optional[bool] = None,
            user_id: Optional[str] = None,
            username: Optional[str] = None) -> User
    func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
    public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
    public static User get(String name, Output<String> id, UserState 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:
    AppId string
    App to associate user with
    HasSharedUsername bool
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    UserId string
    User associated with the application
    Username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    AppId string
    App to associate user with
    HasSharedUsername bool
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    UserId string
    User associated with the application
    Username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId String
    App to associate user with
    hasSharedUsername Boolean
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId String
    User associated with the application
    username String
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId string
    App to associate user with
    hasSharedUsername boolean
    password string
    The password to use.
    profile string
    The JSON profile of the App User.
    retainAssignment boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId string
    User associated with the application
    username string
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    app_id str
    App to associate user with
    has_shared_username bool
    password str
    The password to use.
    profile str
    The JSON profile of the App User.
    retain_assignment bool
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    user_id str
    User associated with the application
    username str
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.
    appId String
    App to associate user with
    hasSharedUsername Boolean
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user assignment on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId String
    User associated with the application
    username String
    The username to use for the app user. In case the user is assigned to the app with SHARED_USERNAME_AND_PASSWORD credentials scheme, this field will be computed and should not be set.

    Import

    $ pulumi import okta:app/user:User example &#60;app id&#62;/&#60;user id&#62;
    

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

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v4.9.2 published on Tuesday, Jun 25, 2024 by Pulumi