Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Identity.getUser
Explore with Pulumi AI
This data source provides details about a specific User resource in Oracle Cloud Infrastructure Identity service.
Gets the specified user’s information.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testUser = oci.Identity.getUser({
userId: testUserOciIdentityUser.id,
});
import pulumi
import pulumi_oci as oci
test_user = oci.Identity.get_user(user_id=test_user_oci_identity_user["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Identity.GetUser(ctx, &identity.GetUserArgs{
UserId: testUserOciIdentityUser.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testUser = Oci.Identity.GetUser.Invoke(new()
{
UserId = testUserOciIdentityUser.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.IdentityFunctions;
import com.pulumi.oci.Identity.inputs.GetUserArgs;
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) {
final var testUser = IdentityFunctions.getUser(GetUserArgs.builder()
.userId(testUserOciIdentityUser.id())
.build());
}
}
variables:
testUser:
fn::invoke:
Function: oci:Identity:getUser
Arguments:
userId: ${testUserOciIdentityUser.id}
Using getUser
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOptions): Output<GetUserResult>
def get_user(user_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(user_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
func GetUser(ctx *Context, args *GetUserArgs, opts ...InvokeOption) (*GetUserResult, error)
func GetUserOutput(ctx *Context, args *GetUserOutputArgs, opts ...InvokeOption) GetUserResultOutput
> Note: This function is named GetUser
in the Go SDK.
public static class GetUser
{
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Identity/getUser:getUser
arguments:
# arguments dictionary
The following arguments are supported:
- User
Id string - The OCID of the user.
- User
Id string - The OCID of the user.
- user
Id String - The OCID of the user.
- user
Id string - The OCID of the user.
- user_
id str - The OCID of the user.
- user
Id String - The OCID of the user.
getUser Result
The following output properties are available:
- Capabilities
List<Get
User Capability> - Properties indicating how the user is allowed to authenticate.
- Compartment
Id string - The OCID of the tenancy containing the user.
- Db
User stringName - DB username of the DB credential. Has to be unique across the tenancy.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- The description you assign to the user. Does not have to be unique, and it's changeable.
- Email string
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- Email
Verified bool - Whether the email address has been validated.
- External
Identifier string - Identifier of the user in the identity provider
- Dictionary<string, string>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the user.
- Identity
Provider stringId - The OCID of the
IdentityProvider
this user belongs to. - Inactive
State string - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- Last
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - Name string
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- Previous
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - State string
- The user's current state.
- Time
Created string - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- User
Id string
- Capabilities
[]Get
User Capability - Properties indicating how the user is allowed to authenticate.
- Compartment
Id string - The OCID of the tenancy containing the user.
- Db
User stringName - DB username of the DB credential. Has to be unique across the tenancy.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- The description you assign to the user. Does not have to be unique, and it's changeable.
- Email string
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- Email
Verified bool - Whether the email address has been validated.
- External
Identifier string - Identifier of the user in the identity provider
- map[string]string
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Id string
- The OCID of the user.
- Identity
Provider stringId - The OCID of the
IdentityProvider
this user belongs to. - Inactive
State string - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- Last
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - Name string
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- Previous
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - State string
- The user's current state.
- Time
Created string - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- User
Id string
- capabilities
List<Get
User Capability> - Properties indicating how the user is allowed to authenticate.
- compartment
Id String - The OCID of the tenancy containing the user.
- db
User StringName - DB username of the DB credential. Has to be unique across the tenancy.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- The description you assign to the user. Does not have to be unique, and it's changeable.
- email String
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- email
Verified Boolean - Whether the email address has been validated.
- external
Identifier String - Identifier of the user in the identity provider
- Map<String,String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the user.
- identity
Provider StringId - The OCID of the
IdentityProvider
this user belongs to. - inactive
State String - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- last
Successful StringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - name String
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- previous
Successful StringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - state String
- The user's current state.
- time
Created String - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- user
Id String
- capabilities
Get
User Capability[] - Properties indicating how the user is allowed to authenticate.
- compartment
Id string - The OCID of the tenancy containing the user.
- db
User stringName - DB username of the DB credential. Has to be unique across the tenancy.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- The description you assign to the user. Does not have to be unique, and it's changeable.
- email string
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- email
Verified boolean - Whether the email address has been validated.
- external
Identifier string - Identifier of the user in the identity provider
- {[key: string]: string}
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id string
- The OCID of the user.
- identity
Provider stringId - The OCID of the
IdentityProvider
this user belongs to. - inactive
State string - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- last
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - name string
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- previous
Successful stringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - state string
- The user's current state.
- time
Created string - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- user
Id string
- capabilities
Sequence[identity.
Get User Capability] - Properties indicating how the user is allowed to authenticate.
- compartment_
id str - The OCID of the tenancy containing the user.
- db_
user_ strname - DB username of the DB credential. Has to be unique across the tenancy.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- The description you assign to the user. Does not have to be unique, and it's changeable.
- email str
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- email_
verified bool - Whether the email address has been validated.
- external_
identifier str - Identifier of the user in the identity provider
- Mapping[str, str]
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id str
- The OCID of the user.
- identity_
provider_ strid - The OCID of the
IdentityProvider
this user belongs to. - inactive_
state str - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- last_
successful_ strlogin_ time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - name str
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- previous_
successful_ strlogin_ time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - state str
- The user's current state.
- time_
created str - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- user_
id str
- capabilities List<Property Map>
- Properties indicating how the user is allowed to authenticate.
- compartment
Id String - The OCID of the tenancy containing the user.
- db
User StringName - DB username of the DB credential. Has to be unique across the tenancy.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- The description you assign to the user. Does not have to be unique, and it's changeable.
- email String
- The email address you assign to the user. The email address must be unique across all users in the tenancy.
- email
Verified Boolean - Whether the email address has been validated.
- external
Identifier String - Identifier of the user in the identity provider
- Map<String>
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- id String
- The OCID of the user.
- identity
Provider StringId - The OCID of the
IdentityProvider
this user belongs to. - inactive
State String - Returned only if the user's
lifecycleState
is INACTIVE. A 16-bit value showing the reason why the user is inactive:- bit 0: SUSPENDED (reserved for future use)
- bit 1: DISABLED (reserved for future use)
- bit 2: BLOCKED (the user has exceeded the maximum number of failed login attempts for the Console)
- last
Successful StringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - name String
- The name you assign to the user during creation. This is the user's login for the Console. The name must be unique across all users in the tenancy and cannot be changed.
- previous
Successful StringLogin Time - The date and time of when the user most recently logged in the format defined by RFC3339 (ex.
2016-08-25T21:10:29.600Z
). If there is no login history, this field is null. - state String
- The user's current state.
- time
Created String - Date and time the user was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- user
Id String
Supporting Types
GetUserCapability
- Can
Use boolApi Keys - Indicates if the user can use API keys.
- Can
Use boolAuth Tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- Can
Use boolConsole Password - Indicates if the user can log in to the console.
- Can
Use boolCustomer Secret Keys - Indicates if the user can use SigV4 symmetric keys.
- Can
Use boolDb Credentials - Indicates if the user can use DB passwords.
- Can
Use boolOauth2client Credentials - Indicates if the user can use OAuth2 credentials and tokens.
- Can
Use boolSmtp Credentials - Indicates if the user can use SMTP passwords.
- Can
Use boolApi Keys - Indicates if the user can use API keys.
- Can
Use boolAuth Tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- Can
Use boolConsole Password - Indicates if the user can log in to the console.
- Can
Use boolCustomer Secret Keys - Indicates if the user can use SigV4 symmetric keys.
- Can
Use boolDb Credentials - Indicates if the user can use DB passwords.
- Can
Use boolOauth2client Credentials - Indicates if the user can use OAuth2 credentials and tokens.
- Can
Use boolSmtp Credentials - Indicates if the user can use SMTP passwords.
- can
Use BooleanApi Keys - Indicates if the user can use API keys.
- can
Use BooleanAuth Tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- can
Use BooleanConsole Password - Indicates if the user can log in to the console.
- can
Use BooleanCustomer Secret Keys - Indicates if the user can use SigV4 symmetric keys.
- can
Use BooleanDb Credentials - Indicates if the user can use DB passwords.
- can
Use BooleanOauth2client Credentials - Indicates if the user can use OAuth2 credentials and tokens.
- can
Use BooleanSmtp Credentials - Indicates if the user can use SMTP passwords.
- can
Use booleanApi Keys - Indicates if the user can use API keys.
- can
Use booleanAuth Tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- can
Use booleanConsole Password - Indicates if the user can log in to the console.
- can
Use booleanCustomer Secret Keys - Indicates if the user can use SigV4 symmetric keys.
- can
Use booleanDb Credentials - Indicates if the user can use DB passwords.
- can
Use booleanOauth2client Credentials - Indicates if the user can use OAuth2 credentials and tokens.
- can
Use booleanSmtp Credentials - Indicates if the user can use SMTP passwords.
- can_
use_ boolapi_ keys - Indicates if the user can use API keys.
- can_
use_ boolauth_ tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- can_
use_ boolconsole_ password - Indicates if the user can log in to the console.
- can_
use_ boolcustomer_ secret_ keys - Indicates if the user can use SigV4 symmetric keys.
- can_
use_ booldb_ credentials - Indicates if the user can use DB passwords.
- can_
use_ booloauth2client_ credentials - Indicates if the user can use OAuth2 credentials and tokens.
- can_
use_ boolsmtp_ credentials - Indicates if the user can use SMTP passwords.
- can
Use BooleanApi Keys - Indicates if the user can use API keys.
- can
Use BooleanAuth Tokens - Indicates if the user can use SWIFT passwords / auth tokens.
- can
Use BooleanConsole Password - Indicates if the user can log in to the console.
- can
Use BooleanCustomer Secret Keys - Indicates if the user can use SigV4 symmetric keys.
- can
Use BooleanDb Credentials - Indicates if the user can use DB passwords.
- can
Use BooleanOauth2client Credentials - Indicates if the user can use OAuth2 credentials and tokens.
- can
Use BooleanSmtp Credentials - Indicates if the user can use SMTP passwords.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.