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

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({});
Copy
import pulumi
import pulumi_bitbucket as bitbucket

example = bitbucket.get_current_user()
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Bitbucket = Pulumi.Bitbucket;

return await Deployment.RunAsync(() => 
{
    var example = Bitbucket.GetCurrentUser.Invoke();

});
Copy
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();

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: bitbucket:getCurrentUser
      arguments: {}
Copy

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>
Copy
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]
Copy
func GetCurrentUser(ctx *Context, args *GetCurrentUserArgs, opts ...InvokeOption) (*GetCurrentUserResult, error)
func GetCurrentUserOutput(ctx *Context, args *GetCurrentUserOutputArgs, opts ...InvokeOption) GetCurrentUserResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
public static Output<GetCurrentUserResult> getCurrentUser(GetCurrentUserArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: bitbucket:index/getCurrentUser:getCurrentUser
  arguments:
    # arguments dictionary
Copy

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 This property is required. string
The email address.
IsConfirmed This property is required. bool
Whether the email is confirmed.
IsPrimary This property is required. bool
Whether is primary email for the user.
Email This property is required. string
The email address.
IsConfirmed This property is required. bool
Whether the email is confirmed.
IsPrimary This property is required. bool
Whether is primary email for the user.
email This property is required. String
The email address.
isConfirmed This property is required. Boolean
Whether the email is confirmed.
isPrimary This property is required. Boolean
Whether is primary email for the user.
email This property is required. string
The email address.
isConfirmed This property is required. boolean
Whether the email is confirmed.
isPrimary This property is required. boolean
Whether is primary email for the user.
email This property is required. str
The email address.
is_confirmed This property is required. bool
Whether the email is confirmed.
is_primary This property is required. bool
Whether is primary email for the user.
email This property is required. String
The email address.
isConfirmed This property is required. Boolean
Whether the email is confirmed.
isPrimary This property is required. 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.