okta.app.User
Explore with Pulumi AI
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)
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:
- App
Id string - App to associate user with
- User
Id string - User associated with the application
- Password string
- The password to use.
- Profile string
- 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 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 string - App to associate user with
- User
Id string - User associated with the application
- Password string
- The password to use.
- Profile string
- 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 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 String - App to associate user with
- user
Id String - User associated with the application
- password String
- The password to use.
- profile String
- The JSON profile of the App User.
- retain
Assignment 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 string - App to associate user with
- user
Id string - User associated with the application
- password string
- The password to use.
- profile string
- The JSON profile of the App User.
- retain
Assignment 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.
- app
Id String - App to associate user with
- user
Id String - User associated with the application
- password String
- The password to use.
- profile String
- The JSON profile of the App User.
- retain
Assignment 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:
- bool
- Id string
- The provider-assigned unique ID for this managed resource.
- bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Boolean
- id String
- The provider-assigned unique ID for this managed resource.
- boolean
- id string
- The provider-assigned unique ID for this managed resource.
- bool
- id str
- The provider-assigned unique ID for this managed resource.
- 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.
- App
Id string - App to associate user with
- bool
- Password string
- The password to use.
- Profile string
- 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 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 string - App to associate user with
- bool
- Password string
- The password to use.
- Profile string
- 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 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 String - App to associate user with
- Boolean
- password String
- The password to use.
- profile String
- The JSON profile of the App User.
- retain
Assignment Boolean - 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 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 string - App to associate user with
- boolean
- password string
- The password to use.
- profile string
- The JSON profile of the App User.
- retain
Assignment boolean - 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 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
- 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.
- app
Id String - App to associate user with
- Boolean
- password String
- The password to use.
- profile String
- The JSON profile of the App User.
- retain
Assignment Boolean - 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 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 <app id>/<user id>
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.