1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. getUser
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Identity.getUser

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    UserId string
    The OCID of the user.
    UserId string
    The OCID of the user.
    userId String
    The OCID of the user.
    userId string
    The OCID of the user.
    user_id str
    The OCID of the user.
    userId String
    The OCID of the user.

    getUser Result

    The following output properties are available:

    Capabilities List<GetUserCapability>
    Properties indicating how the user is allowed to authenticate.
    CompartmentId string
    The OCID of the tenancy containing the user.
    DbUserName string
    DB username of the DB credential. Has to be unique across the tenancy.
    DefinedTags 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.
    EmailVerified bool
    Whether the email address has been validated.
    ExternalIdentifier string
    Identifier of the user in the identity provider
    FreeformTags 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.
    IdentityProviderId string
    The OCID of the IdentityProvider this user belongs to.
    InactiveState 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)
    LastSuccessfulLoginTime string
    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.
    PreviousSuccessfulLoginTime string
    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.
    TimeCreated string
    Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    UserId string
    Capabilities []GetUserCapability
    Properties indicating how the user is allowed to authenticate.
    CompartmentId string
    The OCID of the tenancy containing the user.
    DbUserName string
    DB username of the DB credential. Has to be unique across the tenancy.
    DefinedTags 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.
    EmailVerified bool
    Whether the email address has been validated.
    ExternalIdentifier string
    Identifier of the user in the identity provider
    FreeformTags 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.
    IdentityProviderId string
    The OCID of the IdentityProvider this user belongs to.
    InactiveState 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)
    LastSuccessfulLoginTime string
    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.
    PreviousSuccessfulLoginTime string
    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.
    TimeCreated string
    Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    UserId string
    capabilities List<GetUserCapability>
    Properties indicating how the user is allowed to authenticate.
    compartmentId String
    The OCID of the tenancy containing the user.
    dbUserName String
    DB username of the DB credential. Has to be unique across the tenancy.
    definedTags 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.
    emailVerified Boolean
    Whether the email address has been validated.
    externalIdentifier String
    Identifier of the user in the identity provider
    freeformTags 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.
    identityProviderId String
    The OCID of the IdentityProvider this user belongs to.
    inactiveState 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)
    lastSuccessfulLoginTime String
    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.
    previousSuccessfulLoginTime String
    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.
    timeCreated String
    Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    userId String
    capabilities GetUserCapability[]
    Properties indicating how the user is allowed to authenticate.
    compartmentId string
    The OCID of the tenancy containing the user.
    dbUserName string
    DB username of the DB credential. Has to be unique across the tenancy.
    definedTags {[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.
    emailVerified boolean
    Whether the email address has been validated.
    externalIdentifier string
    Identifier of the user in the identity provider
    freeformTags {[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.
    identityProviderId string
    The OCID of the IdentityProvider this user belongs to.
    inactiveState 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)
    lastSuccessfulLoginTime string
    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.
    previousSuccessfulLoginTime string
    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.
    timeCreated string
    Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    userId string
    capabilities Sequence[identity.GetUserCapability]
    Properties indicating how the user is allowed to authenticate.
    compartment_id str
    The OCID of the tenancy containing the user.
    db_user_name str
    DB username of the DB credential. Has to be unique across the tenancy.
    defined_tags 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
    freeform_tags 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_id str
    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_login_time str
    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_login_time str
    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.
    compartmentId String
    The OCID of the tenancy containing the user.
    dbUserName String
    DB username of the DB credential. Has to be unique across the tenancy.
    definedTags 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.
    emailVerified Boolean
    Whether the email address has been validated.
    externalIdentifier String
    Identifier of the user in the identity provider
    freeformTags 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.
    identityProviderId String
    The OCID of the IdentityProvider this user belongs to.
    inactiveState 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)
    lastSuccessfulLoginTime String
    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.
    previousSuccessfulLoginTime String
    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.
    timeCreated String
    Date and time the user was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    userId String

    Supporting Types

    GetUserCapability

    CanUseApiKeys bool
    Indicates if the user can use API keys.
    CanUseAuthTokens bool
    Indicates if the user can use SWIFT passwords / auth tokens.
    CanUseConsolePassword bool
    Indicates if the user can log in to the console.
    CanUseCustomerSecretKeys bool
    Indicates if the user can use SigV4 symmetric keys.
    CanUseDbCredentials bool
    Indicates if the user can use DB passwords.
    CanUseOauth2clientCredentials bool
    Indicates if the user can use OAuth2 credentials and tokens.
    CanUseSmtpCredentials bool
    Indicates if the user can use SMTP passwords.
    CanUseApiKeys bool
    Indicates if the user can use API keys.
    CanUseAuthTokens bool
    Indicates if the user can use SWIFT passwords / auth tokens.
    CanUseConsolePassword bool
    Indicates if the user can log in to the console.
    CanUseCustomerSecretKeys bool
    Indicates if the user can use SigV4 symmetric keys.
    CanUseDbCredentials bool
    Indicates if the user can use DB passwords.
    CanUseOauth2clientCredentials bool
    Indicates if the user can use OAuth2 credentials and tokens.
    CanUseSmtpCredentials bool
    Indicates if the user can use SMTP passwords.
    canUseApiKeys Boolean
    Indicates if the user can use API keys.
    canUseAuthTokens Boolean
    Indicates if the user can use SWIFT passwords / auth tokens.
    canUseConsolePassword Boolean
    Indicates if the user can log in to the console.
    canUseCustomerSecretKeys Boolean
    Indicates if the user can use SigV4 symmetric keys.
    canUseDbCredentials Boolean
    Indicates if the user can use DB passwords.
    canUseOauth2clientCredentials Boolean
    Indicates if the user can use OAuth2 credentials and tokens.
    canUseSmtpCredentials Boolean
    Indicates if the user can use SMTP passwords.
    canUseApiKeys boolean
    Indicates if the user can use API keys.
    canUseAuthTokens boolean
    Indicates if the user can use SWIFT passwords / auth tokens.
    canUseConsolePassword boolean
    Indicates if the user can log in to the console.
    canUseCustomerSecretKeys boolean
    Indicates if the user can use SigV4 symmetric keys.
    canUseDbCredentials boolean
    Indicates if the user can use DB passwords.
    canUseOauth2clientCredentials boolean
    Indicates if the user can use OAuth2 credentials and tokens.
    canUseSmtpCredentials boolean
    Indicates if the user can use SMTP passwords.
    can_use_api_keys bool
    Indicates if the user can use API keys.
    can_use_auth_tokens bool
    Indicates if the user can use SWIFT passwords / auth tokens.
    can_use_console_password bool
    Indicates if the user can log in to the console.
    can_use_customer_secret_keys bool
    Indicates if the user can use SigV4 symmetric keys.
    can_use_db_credentials bool
    Indicates if the user can use DB passwords.
    can_use_oauth2client_credentials bool
    Indicates if the user can use OAuth2 credentials and tokens.
    can_use_smtp_credentials bool
    Indicates if the user can use SMTP passwords.
    canUseApiKeys Boolean
    Indicates if the user can use API keys.
    canUseAuthTokens Boolean
    Indicates if the user can use SWIFT passwords / auth tokens.
    canUseConsolePassword Boolean
    Indicates if the user can log in to the console.
    canUseCustomerSecretKeys Boolean
    Indicates if the user can use SigV4 symmetric keys.
    canUseDbCredentials Boolean
    Indicates if the user can use DB passwords.
    canUseOauth2clientCredentials Boolean
    Indicates if the user can use OAuth2 credentials and tokens.
    canUseSmtpCredentials Boolean
    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.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi