1. Packages
  2. OpenStack
  3. API Docs
  4. identity
  5. getUser
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

openstack.identity.getUser

Explore with Pulumi AI

openstack logo
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

    Use this data source to get the ID of an OpenStack user.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const user1 = openstack.identity.getUser({
        name: "user_1",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    user1 = openstack.identity.get_user(name="user_1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := identity.LookupUser(ctx, &identity.LookupUserArgs{
    			Name: pulumi.StringRef("user_1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var user1 = OpenStack.Identity.GetUser.Invoke(new()
        {
            Name = "user_1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.identity.IdentityFunctions;
    import com.pulumi.openstack.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 user1 = IdentityFunctions.getUser(GetUserArgs.builder()
                .name("user_1")
                .build());
    
        }
    }
    
    variables:
      user1:
        fn::invoke:
          Function: openstack:identity:getUser
          Arguments:
            name: user_1
    

    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(domain_id: Optional[str] = None,
                 enabled: Optional[bool] = None,
                 idp_id: Optional[str] = None,
                 name: Optional[str] = None,
                 password_expires_at: Optional[str] = None,
                 protocol_id: Optional[str] = None,
                 region: Optional[str] = None,
                 unique_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetUserResult
    def get_user_output(domain_id: Optional[pulumi.Input[str]] = None,
                 enabled: Optional[pulumi.Input[bool]] = None,
                 idp_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 password_expires_at: Optional[pulumi.Input[str]] = None,
                 protocol_id: Optional[pulumi.Input[str]] = None,
                 region: Optional[pulumi.Input[str]] = None,
                 unique_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
    func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
    func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput

    > Note: This function is named LookupUser 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: openstack:identity/getUser:getUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainId string
    The domain this user belongs to.
    Enabled bool
    Whether the user is enabled or disabled. Valid values are true and false.
    IdpId string
    The identity provider ID of the user.
    Name string
    The name of the user.
    PasswordExpiresAt string
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    ProtocolId string
    The protocol ID of the user.
    Region string
    The region the user is located in.
    UniqueId string
    The unique ID of the user.
    DomainId string
    The domain this user belongs to.
    Enabled bool
    Whether the user is enabled or disabled. Valid values are true and false.
    IdpId string
    The identity provider ID of the user.
    Name string
    The name of the user.
    PasswordExpiresAt string
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    ProtocolId string
    The protocol ID of the user.
    Region string
    The region the user is located in.
    UniqueId string
    The unique ID of the user.
    domainId String
    The domain this user belongs to.
    enabled Boolean
    Whether the user is enabled or disabled. Valid values are true and false.
    idpId String
    The identity provider ID of the user.
    name String
    The name of the user.
    passwordExpiresAt String
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    protocolId String
    The protocol ID of the user.
    region String
    The region the user is located in.
    uniqueId String
    The unique ID of the user.
    domainId string
    The domain this user belongs to.
    enabled boolean
    Whether the user is enabled or disabled. Valid values are true and false.
    idpId string
    The identity provider ID of the user.
    name string
    The name of the user.
    passwordExpiresAt string
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    protocolId string
    The protocol ID of the user.
    region string
    The region the user is located in.
    uniqueId string
    The unique ID of the user.
    domain_id str
    The domain this user belongs to.
    enabled bool
    Whether the user is enabled or disabled. Valid values are true and false.
    idp_id str
    The identity provider ID of the user.
    name str
    The name of the user.
    password_expires_at str
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    protocol_id str
    The protocol ID of the user.
    region str
    The region the user is located in.
    unique_id str
    The unique ID of the user.
    domainId String
    The domain this user belongs to.
    enabled Boolean
    Whether the user is enabled or disabled. Valid values are true and false.
    idpId String
    The identity provider ID of the user.
    name String
    The name of the user.
    passwordExpiresAt String
    Query for expired passwords. See the OpenStack API docs for more information on the query format.
    protocolId String
    The protocol ID of the user.
    region String
    The region the user is located in.
    uniqueId String
    The unique ID of the user.

    getUser Result

    The following output properties are available:

    DefaultProjectId string
    See Argument Reference above.
    Description string
    A description of the user.
    DomainId string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region the user is located in.
    Enabled bool
    See Argument Reference above.
    IdpId string
    See Argument Reference above.
    Name string
    See Argument Reference above.
    PasswordExpiresAt string
    See Argument Reference above.
    ProtocolId string
    See Argument Reference above.
    UniqueId string
    See Argument Reference above.
    DefaultProjectId string
    See Argument Reference above.
    Description string
    A description of the user.
    DomainId string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    The region the user is located in.
    Enabled bool
    See Argument Reference above.
    IdpId string
    See Argument Reference above.
    Name string
    See Argument Reference above.
    PasswordExpiresAt string
    See Argument Reference above.
    ProtocolId string
    See Argument Reference above.
    UniqueId string
    See Argument Reference above.
    defaultProjectId String
    See Argument Reference above.
    description String
    A description of the user.
    domainId String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region the user is located in.
    enabled Boolean
    See Argument Reference above.
    idpId String
    See Argument Reference above.
    name String
    See Argument Reference above.
    passwordExpiresAt String
    See Argument Reference above.
    protocolId String
    See Argument Reference above.
    uniqueId String
    See Argument Reference above.
    defaultProjectId string
    See Argument Reference above.
    description string
    A description of the user.
    domainId string
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    The region the user is located in.
    enabled boolean
    See Argument Reference above.
    idpId string
    See Argument Reference above.
    name string
    See Argument Reference above.
    passwordExpiresAt string
    See Argument Reference above.
    protocolId string
    See Argument Reference above.
    uniqueId string
    See Argument Reference above.
    default_project_id str
    See Argument Reference above.
    description str
    A description of the user.
    domain_id str
    See Argument Reference above.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    The region the user is located in.
    enabled bool
    See Argument Reference above.
    idp_id str
    See Argument Reference above.
    name str
    See Argument Reference above.
    password_expires_at str
    See Argument Reference above.
    protocol_id str
    See Argument Reference above.
    unique_id str
    See Argument Reference above.
    defaultProjectId String
    See Argument Reference above.
    description String
    A description of the user.
    domainId String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    The region the user is located in.
    enabled Boolean
    See Argument Reference above.
    idpId String
    See Argument Reference above.
    name String
    See Argument Reference above.
    passwordExpiresAt String
    See Argument Reference above.
    protocolId String
    See Argument Reference above.
    uniqueId String
    See Argument Reference above.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi