1. Packages
  2. Okta
  3. API Docs
  4. app
  5. User
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

okta.app.User

Explore with Pulumi AI

okta logo
Okta v4.7.0 published on Tuesday, Feb 13, 2024 by Pulumi

    Import

    An Application User can be imported via the Okta ID.

    $ pulumi import okta:app/user:User example <app id>/<user id>
    

    Example Usage

    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 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
    	})
    }
    
    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());
    
        }
    }
    
    import pulumi
    import pulumi_okta as okta
    
    example = okta.app.User("example",
        app_id="<app_id>",
        user_id="<user id>",
        username="example")
    
    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",
    });
    
    resources:
      example:
        type: okta:app:User
        properties:
          appId: <app_id>
          userId: <user id>
          username: example
    

    Create User Resource

    new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
    @overload
    def User(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             app_id: Optional[str] = None,
             password: Optional[str] = None,
             profile: Optional[str] = None,
             retain_assignment: Optional[bool] = None,
             user_id: Optional[str] = None,
             username: Optional[str] = None)
    @overload
    def User(resource_name: str,
             args: UserArgs,
             opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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 to associate the application with.
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user association 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 to associate the application with.
    Password string
    The password to use.
    Profile string
    The JSON profile of the App User.
    RetainAssignment bool
    Retain the user association 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 to associate the application with.
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user association 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 to associate the application with.
    password string
    The password to use.
    profile string
    The JSON profile of the App User.
    retainAssignment boolean
    Retain the user association 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 to associate the application with.
    password str
    The password to use.
    profile str
    The JSON profile of the App User.
    retain_assignment bool
    Retain the user association 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 to associate the application with.
    password String
    The password to use.
    profile String
    The JSON profile of the App User.
    retainAssignment Boolean
    Retain the user association 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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    UserId string
    User to associate the application with.
    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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    UserId string
    User to associate the application with.
    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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId String
    User to associate the application with.
    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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId string
    User to associate the application with.
    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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    user_id str
    User to associate the application with.
    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 association on destroy. If set to true, the resource will be removed from state but not from the Okta app.
    userId String
    User to associate the application with.
    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.

    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.7.0 published on Tuesday, Feb 13, 2024 by Pulumi