1. Packages
  2. Zitadel
  3. API Docs
  4. getMachineUser
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

zitadel.getMachineUser

Explore with Pulumi AI

zitadel logo
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

    Datasource representing a serviceaccount situated under an organization, which then can be authorized through memberships or direct grants on other resources.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumi.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Zitadel.GetMachineUser.Invoke(new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            UserId = "123456789012345678",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := zitadel.LookupMachineUser(ctx, &zitadel.LookupMachineUserArgs{
    			OrgId:  pulumi.StringRef(data.Zitadel_org.Default.Id),
    			UserId: "123456789012345678",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zitadel.ZitadelFunctions;
    import com.pulumi.zitadel.inputs.GetMachineUserArgs;
    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 default = ZitadelFunctions.getMachineUser(GetMachineUserArgs.builder()
                .orgId(data.zitadel_org().default().id())
                .userId("123456789012345678")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_zitadel as zitadel
    
    default = zitadel.get_machine_user(org_id=data["zitadel_org"]["default"]["id"],
        user_id="123456789012345678")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumi/zitadel";
    
    const default = zitadel.getMachineUser({
        orgId: data.zitadel_org["default"].id,
        userId: "123456789012345678",
    });
    
    variables:
      default:
        fn::invoke:
          Function: zitadel:getMachineUser
          Arguments:
            orgId: ${data.zitadel_org.default.id}
            userId: '123456789012345678'
    

    Using getMachineUser

    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 getMachineUser(args: GetMachineUserArgs, opts?: InvokeOptions): Promise<GetMachineUserResult>
    function getMachineUserOutput(args: GetMachineUserOutputArgs, opts?: InvokeOptions): Output<GetMachineUserResult>
    def get_machine_user(org_id: Optional[str] = None,
                         user_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetMachineUserResult
    def get_machine_user_output(org_id: Optional[pulumi.Input[str]] = None,
                         user_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetMachineUserResult]
    func LookupMachineUser(ctx *Context, args *LookupMachineUserArgs, opts ...InvokeOption) (*LookupMachineUserResult, error)
    func LookupMachineUserOutput(ctx *Context, args *LookupMachineUserOutputArgs, opts ...InvokeOption) LookupMachineUserResultOutput

    > Note: This function is named LookupMachineUser in the Go SDK.

    public static class GetMachineUser 
    {
        public static Task<GetMachineUserResult> InvokeAsync(GetMachineUserArgs args, InvokeOptions? opts = null)
        public static Output<GetMachineUserResult> Invoke(GetMachineUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMachineUserResult> getMachineUser(GetMachineUserArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: zitadel:index/getMachineUser:getMachineUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    UserId string
    The ID of this resource.
    OrgId string
    ID of the organization
    UserId string
    The ID of this resource.
    OrgId string
    ID of the organization
    userId String
    The ID of this resource.
    orgId String
    ID of the organization
    userId string
    The ID of this resource.
    orgId string
    ID of the organization
    user_id str
    The ID of this resource.
    org_id str
    ID of the organization
    userId String
    The ID of this resource.
    orgId String
    ID of the organization

    getMachineUser Result

    The following output properties are available:

    AccessTokenType string
    Access token type
    Description string
    Description of the user
    Id string
    The provider-assigned unique ID for this managed resource.
    LoginNames List<string>
    Loginnames
    Name string
    Name of the machine user
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    UserId string
    The ID of this resource.
    UserName string
    Username
    OrgId string
    ID of the organization
    AccessTokenType string
    Access token type
    Description string
    Description of the user
    Id string
    The provider-assigned unique ID for this managed resource.
    LoginNames []string
    Loginnames
    Name string
    Name of the machine user
    PreferredLoginName string
    Preferred login name
    State string
    State of the user
    UserId string
    The ID of this resource.
    UserName string
    Username
    OrgId string
    ID of the organization
    accessTokenType String
    Access token type
    description String
    Description of the user
    id String
    The provider-assigned unique ID for this managed resource.
    loginNames List<String>
    Loginnames
    name String
    Name of the machine user
    preferredLoginName String
    Preferred login name
    state String
    State of the user
    userId String
    The ID of this resource.
    userName String
    Username
    orgId String
    ID of the organization
    accessTokenType string
    Access token type
    description string
    Description of the user
    id string
    The provider-assigned unique ID for this managed resource.
    loginNames string[]
    Loginnames
    name string
    Name of the machine user
    preferredLoginName string
    Preferred login name
    state string
    State of the user
    userId string
    The ID of this resource.
    userName string
    Username
    orgId string
    ID of the organization
    access_token_type str
    Access token type
    description str
    Description of the user
    id str
    The provider-assigned unique ID for this managed resource.
    login_names Sequence[str]
    Loginnames
    name str
    Name of the machine user
    preferred_login_name str
    Preferred login name
    state str
    State of the user
    user_id str
    The ID of this resource.
    user_name str
    Username
    org_id str
    ID of the organization
    accessTokenType String
    Access token type
    description String
    Description of the user
    id String
    The provider-assigned unique ID for this managed resource.
    loginNames List<String>
    Loginnames
    name String
    Name of the machine user
    preferredLoginName String
    Preferred login name
    state String
    State of the user
    userId String
    The ID of this resource.
    userName String
    Username
    orgId String
    ID of the organization

    Package Details

    Repository
    zitadel pulumiverse/pulumi-zitadel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the zitadel Terraform Provider.
    zitadel logo
    zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse