OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi
openstack.identity.getUser
Explore with Pulumi AI
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/v4/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:
- Domain
Id string - The domain this user belongs to.
- Enabled bool
- Whether the user is enabled or disabled. Valid
values are
true
andfalse
. - Idp
Id string - The identity provider ID of the user.
- Name string
- The name of the user.
- Password
Expires stringAt - Query for expired passwords. See the OpenStack API docs for more information on the query format.
- Protocol
Id string - The protocol ID of the user.
- Region string
- The region the user is located in.
- Unique
Id string - The unique ID of the user.
- Domain
Id string - The domain this user belongs to.
- Enabled bool
- Whether the user is enabled or disabled. Valid
values are
true
andfalse
. - Idp
Id string - The identity provider ID of the user.
- Name string
- The name of the user.
- Password
Expires stringAt - Query for expired passwords. See the OpenStack API docs for more information on the query format.
- Protocol
Id string - The protocol ID of the user.
- Region string
- The region the user is located in.
- Unique
Id string - The unique ID of the user.
- domain
Id String - The domain this user belongs to.
- enabled Boolean
- Whether the user is enabled or disabled. Valid
values are
true
andfalse
. - idp
Id String - The identity provider ID of the user.
- name String
- The name of the user.
- password
Expires StringAt - Query for expired passwords. See the OpenStack API docs for more information on the query format.
- protocol
Id String - The protocol ID of the user.
- region String
- The region the user is located in.
- unique
Id String - The unique ID of the user.
- domain
Id string - The domain this user belongs to.
- enabled boolean
- Whether the user is enabled or disabled. Valid
values are
true
andfalse
. - idp
Id string - The identity provider ID of the user.
- name string
- The name of the user.
- password
Expires stringAt - Query for expired passwords. See the OpenStack API docs for more information on the query format.
- protocol
Id string - The protocol ID of the user.
- region string
- The region the user is located in.
- unique
Id 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
andfalse
. - idp_
id str - The identity provider ID of the user.
- name str
- The name of the user.
- password_
expires_ strat - 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.
- domain
Id String - The domain this user belongs to.
- enabled Boolean
- Whether the user is enabled or disabled. Valid
values are
true
andfalse
. - idp
Id String - The identity provider ID of the user.
- name String
- The name of the user.
- password
Expires StringAt - Query for expired passwords. See the OpenStack API docs for more information on the query format.
- protocol
Id String - The protocol ID of the user.
- region String
- The region the user is located in.
- unique
Id String - The unique ID of the user.
getUser Result
The following output properties are available:
- Default
Project stringId - See Argument Reference above.
- Description string
- A description of the user.
- Domain
Id 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.
- Idp
Id string - See Argument Reference above.
- Name string
- See Argument Reference above.
- Password
Expires stringAt - See Argument Reference above.
- Protocol
Id string - See Argument Reference above.
- Unique
Id string - See Argument Reference above.
- Default
Project stringId - See Argument Reference above.
- Description string
- A description of the user.
- Domain
Id 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.
- Idp
Id string - See Argument Reference above.
- Name string
- See Argument Reference above.
- Password
Expires stringAt - See Argument Reference above.
- Protocol
Id string - See Argument Reference above.
- Unique
Id string - See Argument Reference above.
- default
Project StringId - See Argument Reference above.
- description String
- A description of the user.
- domain
Id 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.
- idp
Id String - See Argument Reference above.
- name String
- See Argument Reference above.
- password
Expires StringAt - See Argument Reference above.
- protocol
Id String - See Argument Reference above.
- unique
Id String - See Argument Reference above.
- default
Project stringId - See Argument Reference above.
- description string
- A description of the user.
- domain
Id 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.
- idp
Id string - See Argument Reference above.
- name string
- See Argument Reference above.
- password
Expires stringAt - See Argument Reference above.
- protocol
Id string - See Argument Reference above.
- unique
Id string - See Argument Reference above.
- default_
project_ strid - 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_ strat - See Argument Reference above.
- protocol_
id str - See Argument Reference above.
- unique_
id str - See Argument Reference above.
- default
Project StringId - See Argument Reference above.
- description String
- A description of the user.
- domain
Id 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.
- idp
Id String - See Argument Reference above.
- name String
- See Argument Reference above.
- password
Expires StringAt - See Argument Reference above.
- protocol
Id String - See Argument Reference above.
- unique
Id 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.