1. Packages
  2. Bitbucket Provider
  3. API Docs
  4. getCurrentUser
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

bitbucket.getCurrentUser

Explore with Pulumi AI

bitbucket logo
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

    Provides a way to fetch data of the current user.

    OAuth2 Scopes: account

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitbucket from "@pulumi/bitbucket";
    
    const example = bitbucket.getCurrentUser({});
    
    import pulumi
    import pulumi_bitbucket as bitbucket
    
    example = bitbucket.get_current_user()
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := bitbucket.GetCurrentUser(ctx, &bitbucket.GetCurrentUserArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitbucket = Pulumi.Bitbucket;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Bitbucket.GetCurrentUser.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.bitbucket.BitbucketFunctions;
    import com.pulumi.bitbucket.inputs.GetCurrentUserArgs;
    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 example = BitbucketFunctions.getCurrentUser();
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: bitbucket:getCurrentUser
          arguments: {}
    

    Using getCurrentUser

    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 getCurrentUser(args: GetCurrentUserArgs, opts?: InvokeOptions): Promise<GetCurrentUserResult>
    function getCurrentUserOutput(args: GetCurrentUserOutputArgs, opts?: InvokeOptions): Output<GetCurrentUserResult>
    def get_current_user(id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCurrentUserResult
    def get_current_user_output(id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCurrentUserResult]
    func GetCurrentUser(ctx *Context, args *GetCurrentUserArgs, opts ...InvokeOption) (*GetCurrentUserResult, error)
    func GetCurrentUserOutput(ctx *Context, args *GetCurrentUserOutputArgs, opts ...InvokeOption) GetCurrentUserResultOutput

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

    public static class GetCurrentUser 
    {
        public static Task<GetCurrentUserResult> InvokeAsync(GetCurrentUserArgs args, InvokeOptions? opts = null)
        public static Output<GetCurrentUserResult> Invoke(GetCurrentUserInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
    public static Output<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
    
    fn::invoke:
      function: bitbucket:index/getCurrentUser:getCurrentUser
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    Id string
    id String
    id string
    id str
    id String

    getCurrentUser Result

    The following output properties are available:

    DisplayName string
    the display name that the user wants to use for GDPR
    Emails List<GetCurrentUserEmail>
    The email address.
    Id string
    Username string
    The Username.
    Uuid string
    the uuid that bitbucket users to connect a user to various objects
    DisplayName string
    the display name that the user wants to use for GDPR
    Emails []GetCurrentUserEmail
    The email address.
    Id string
    Username string
    The Username.
    Uuid string
    the uuid that bitbucket users to connect a user to various objects
    displayName String
    the display name that the user wants to use for GDPR
    emails List<GetCurrentUserEmail>
    The email address.
    id String
    username String
    The Username.
    uuid String
    the uuid that bitbucket users to connect a user to various objects
    displayName string
    the display name that the user wants to use for GDPR
    emails GetCurrentUserEmail[]
    The email address.
    id string
    username string
    The Username.
    uuid string
    the uuid that bitbucket users to connect a user to various objects
    display_name str
    the display name that the user wants to use for GDPR
    emails Sequence[GetCurrentUserEmail]
    The email address.
    id str
    username str
    The Username.
    uuid str
    the uuid that bitbucket users to connect a user to various objects
    displayName String
    the display name that the user wants to use for GDPR
    emails List<Property Map>
    The email address.
    id String
    username String
    The Username.
    uuid String
    the uuid that bitbucket users to connect a user to various objects

    Supporting Types

    GetCurrentUserEmail

    Email string
    The email address.
    IsConfirmed bool
    Whether the email is confirmed.
    IsPrimary bool
    Whether is primary email for the user.
    Email string
    The email address.
    IsConfirmed bool
    Whether the email is confirmed.
    IsPrimary bool
    Whether is primary email for the user.
    email String
    The email address.
    isConfirmed Boolean
    Whether the email is confirmed.
    isPrimary Boolean
    Whether is primary email for the user.
    email string
    The email address.
    isConfirmed boolean
    Whether the email is confirmed.
    isPrimary boolean
    Whether is primary email for the user.
    email str
    The email address.
    is_confirmed bool
    Whether the email is confirmed.
    is_primary bool
    Whether is primary email for the user.
    email String
    The email address.
    isConfirmed Boolean
    Whether the email is confirmed.
    isPrimary Boolean
    Whether is primary email for the user.

    Package Details

    Repository
    bitbucket drfaust92/terraform-provider-bitbucket
    License
    Notes
    This Pulumi package is based on the bitbucket Terraform Provider.
    bitbucket logo
    bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92