1. Packages
  2. Planetscale Provider
  3. API Docs
  4. getUser
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale

planetscale.getUser

Explore with Pulumi AI

planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale

A PlanetScale user.

Known limitations:

  • Does not work when the provider is configured with a service token.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";

const example = planetscale.getUser({});
export const currentUser = example;
Copy
import pulumi
import pulumi_planetscale as planetscale

example = planetscale.get_user()
pulumi.export("currentUser", example)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := planetscale.GetUser(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("currentUser", example)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;

return await Deployment.RunAsync(() => 
{
    var example = Planetscale.GetUser.Invoke();

    return new Dictionary<string, object?>
    {
        ["currentUser"] = example,
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.PlanetscaleFunctions;
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 = PlanetscaleFunctions.getUser();

        ctx.export("currentUser", example.applyValue(getUserResult -> getUserResult));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: planetscale:getUser
      arguments: {}
outputs:
  currentUser: ${example}
Copy

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(opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(opts?: InvokeOptions): Output<GetUserResult>
Copy
def get_user(opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(opts: Optional[InvokeOptions] = None) -> Output[GetUserResult]
Copy
func GetUser(ctx *Context, opts ...InvokeOption) (*GetUserResult, error)
func GetUserOutput(ctx *Context, opts ...InvokeOption) GetUserResultOutput
Copy

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

public static class GetUser 
{
    public static Task<GetUserResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetUserResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetUserResult> getUser(InvokeOptions options)
public static Output<GetUserResult> getUser(InvokeOptions options)
Copy
fn::invoke:
  function: planetscale:index/getUser:getUser
  arguments:
    # arguments dictionary
Copy

getUser Result

The following output properties are available:

AvatarUrl string
The URL source of the user's avatar.
CreatedAt string
When the user was created.
DefaultOrganization GetUserDefaultOrganization
The default organization for the user.
DirectoryManaged bool
Whether or not the user is managed by a WorkOS directory.
DisplayName string
The display name of the user.
Email string
The email of the user.
EmailVerified bool
Whether or not the user is verified by email.
Id string
The ID of the user.
Managed bool
Whether or not the user is managed by an authentication provider.
Name string
The name of the user.
Sso bool
Whether or not the user is managed by WorkOS.
TwoFactorAuthConfigured bool
Whether or not the user has configured two factor authentication.
UpdatedAt string
When the user was last updated.
AvatarUrl string
The URL source of the user's avatar.
CreatedAt string
When the user was created.
DefaultOrganization GetUserDefaultOrganization
The default organization for the user.
DirectoryManaged bool
Whether or not the user is managed by a WorkOS directory.
DisplayName string
The display name of the user.
Email string
The email of the user.
EmailVerified bool
Whether or not the user is verified by email.
Id string
The ID of the user.
Managed bool
Whether or not the user is managed by an authentication provider.
Name string
The name of the user.
Sso bool
Whether or not the user is managed by WorkOS.
TwoFactorAuthConfigured bool
Whether or not the user has configured two factor authentication.
UpdatedAt string
When the user was last updated.
avatarUrl String
The URL source of the user's avatar.
createdAt String
When the user was created.
defaultOrganization GetUserDefaultOrganization
The default organization for the user.
directoryManaged Boolean
Whether or not the user is managed by a WorkOS directory.
displayName String
The display name of the user.
email String
The email of the user.
emailVerified Boolean
Whether or not the user is verified by email.
id String
The ID of the user.
managed Boolean
Whether or not the user is managed by an authentication provider.
name String
The name of the user.
sso Boolean
Whether or not the user is managed by WorkOS.
twoFactorAuthConfigured Boolean
Whether or not the user has configured two factor authentication.
updatedAt String
When the user was last updated.
avatarUrl string
The URL source of the user's avatar.
createdAt string
When the user was created.
defaultOrganization GetUserDefaultOrganization
The default organization for the user.
directoryManaged boolean
Whether or not the user is managed by a WorkOS directory.
displayName string
The display name of the user.
email string
The email of the user.
emailVerified boolean
Whether or not the user is verified by email.
id string
The ID of the user.
managed boolean
Whether or not the user is managed by an authentication provider.
name string
The name of the user.
sso boolean
Whether or not the user is managed by WorkOS.
twoFactorAuthConfigured boolean
Whether or not the user has configured two factor authentication.
updatedAt string
When the user was last updated.
avatar_url str
The URL source of the user's avatar.
created_at str
When the user was created.
default_organization GetUserDefaultOrganization
The default organization for the user.
directory_managed bool
Whether or not the user is managed by a WorkOS directory.
display_name str
The display name of the user.
email str
The email of the user.
email_verified bool
Whether or not the user is verified by email.
id str
The ID of the user.
managed bool
Whether or not the user is managed by an authentication provider.
name str
The name of the user.
sso bool
Whether or not the user is managed by WorkOS.
two_factor_auth_configured bool
Whether or not the user has configured two factor authentication.
updated_at str
When the user was last updated.
avatarUrl String
The URL source of the user's avatar.
createdAt String
When the user was created.
defaultOrganization Property Map
The default organization for the user.
directoryManaged Boolean
Whether or not the user is managed by a WorkOS directory.
displayName String
The display name of the user.
email String
The email of the user.
emailVerified Boolean
Whether or not the user is verified by email.
id String
The ID of the user.
managed Boolean
Whether or not the user is managed by an authentication provider.
name String
The name of the user.
sso Boolean
Whether or not the user is managed by WorkOS.
twoFactorAuthConfigured Boolean
Whether or not the user has configured two factor authentication.
updatedAt String
When the user was last updated.

Supporting Types

GetUserDefaultOrganization

CreatedAt This property is required. string
When the organization was created.
DeletedAt This property is required. string
When the organization was last deleted.
Id This property is required. string
The ID of the organization.
Name This property is required. string
The name of the organization.
UpdatedAt This property is required. string
When the organization was last updated.
CreatedAt This property is required. string
When the organization was created.
DeletedAt This property is required. string
When the organization was last deleted.
Id This property is required. string
The ID of the organization.
Name This property is required. string
The name of the organization.
UpdatedAt This property is required. string
When the organization was last updated.
createdAt This property is required. String
When the organization was created.
deletedAt This property is required. String
When the organization was last deleted.
id This property is required. String
The ID of the organization.
name This property is required. String
The name of the organization.
updatedAt This property is required. String
When the organization was last updated.
createdAt This property is required. string
When the organization was created.
deletedAt This property is required. string
When the organization was last deleted.
id This property is required. string
The ID of the organization.
name This property is required. string
The name of the organization.
updatedAt This property is required. string
When the organization was last updated.
created_at This property is required. str
When the organization was created.
deleted_at This property is required. str
When the organization was last deleted.
id This property is required. str
The ID of the organization.
name This property is required. str
The name of the organization.
updated_at This property is required. str
When the organization was last updated.
createdAt This property is required. String
When the organization was created.
deletedAt This property is required. String
When the organization was last deleted.
id This property is required. String
The ID of the organization.
name This property is required. String
The name of the organization.
updatedAt This property is required. String
When the organization was last updated.

Package Details

Repository
planetscale planetscale/terraform-provider-planetscale
License
Notes
This Pulumi package is based on the planetscale Terraform Provider.
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale