sdm logo
StrongDM v1.1.2, May 11 23

sdm.getAccount

Explore with Pulumi AI

Accounts are users that have access to strongDM. There are two types of accounts:

  1. Users: humans who are authenticated through username and password or SSO.
  2. Service Accounts: machines that are authenticated using a service token.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sdm = Pulumi.Sdm;

return await Deployment.RunAsync(() => 
{
    var user_queries = Sdm.GetAccount.Invoke(new()
    {
        Email = "*@strongdm.com",
        Tags = 
        {
            { "env", "dev" },
            { "region", "us-west" },
        },
        Type = "user",
    });

});
package main

import (
	"github.com/pierskarsenbarg/pulumi-sdm/sdk/go/sdm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sdm.LookupAccount(ctx, &sdm.LookupAccountArgs{
			Email: pulumi.StringRef("*@strongdm.com"),
			Tags: map[string]interface{}{
				"env":    "dev",
				"region": "us-west",
			},
			Type: pulumi.StringRef("user"),
		}, 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.sdm.SdmFunctions;
import com.pulumi.sdm.inputs.GetAccountArgs;
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 user-queries = SdmFunctions.getAccount(GetAccountArgs.builder()
            .email("*@strongdm.com")
            .tags(Map.ofEntries(
                Map.entry("env", "dev"),
                Map.entry("region", "us-west")
            ))
            .type("user")
            .build());

    }
}
import pulumi
import pulumi_sdm as sdm

user_queries = sdm.get_account(email="*@strongdm.com",
    tags={
        "env": "dev",
        "region": "us-west",
    },
    type="user")
import * as pulumi from "@pulumi/pulumi";
import * as sdm from "@pulumi/sdm";

const user-queries = sdm.getAccount({
    email: "*@strongdm.com",
    tags: {
        env: "dev",
        region: "us-west",
    },
    type: "user",
});
variables:
  user-queries:
    fn::invoke:
      Function: sdm:getAccount
      Arguments:
        email: '*@strongdm.com'
        tags:
          env: dev
          region: us-west
        type: user

Using getAccount

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 getAccount(args: GetAccountArgs, opts?: InvokeOptions): Promise<GetAccountResult>
function getAccountOutput(args: GetAccountOutputArgs, opts?: InvokeOptions): Output<GetAccountResult>
def get_account(email: Optional[str] = None,
                external_id: Optional[str] = None,
                first_name: Optional[str] = None,
                id: Optional[str] = None,
                last_name: Optional[str] = None,
                name: Optional[str] = None,
                suspended: Optional[bool] = None,
                tags: Optional[Mapping[str, Any]] = None,
                type: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetAccountResult
def get_account_output(email: Optional[pulumi.Input[str]] = None,
                external_id: Optional[pulumi.Input[str]] = None,
                first_name: Optional[pulumi.Input[str]] = None,
                id: Optional[pulumi.Input[str]] = None,
                last_name: Optional[pulumi.Input[str]] = None,
                name: Optional[pulumi.Input[str]] = None,
                suspended: Optional[pulumi.Input[bool]] = None,
                tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                type: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetAccountResult]
func LookupAccount(ctx *Context, args *LookupAccountArgs, opts ...InvokeOption) (*LookupAccountResult, error)
func LookupAccountOutput(ctx *Context, args *LookupAccountOutputArgs, opts ...InvokeOption) LookupAccountResultOutput

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

public static class GetAccount 
{
    public static Task<GetAccountResult> InvokeAsync(GetAccountArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountResult> Invoke(GetAccountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccountResult> getAccount(GetAccountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: sdm:index/getAccount:getAccount
  arguments:
    # arguments dictionary

The following arguments are supported:

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags Dictionary<string, object>

Tags is a map of key, value pairs.

Type string

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags map[string]interface{}

Tags is a map of key, value pairs.

Type string

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<String,Object>

Tags is a map of key, value pairs.

type String

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

email string

The User's email address. Must be unique.

externalId string

External ID is an alternative unique ID this user is represented by within an external service.

firstName string

The User's first name.

id string

Unique identifier of the User.

lastName string

The User's last name.

name string

Unique human-readable name of the Service.

suspended boolean

The User's suspended state.

tags {[key: string]: any}

Tags is a map of key, value pairs.

type string

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

email str

The User's email address. Must be unique.

external_id str

External ID is an alternative unique ID this user is represented by within an external service.

first_name str

The User's first name.

id str

Unique identifier of the User.

last_name str

The User's last name.

name str

Unique human-readable name of the Service.

suspended bool

The User's suspended state.

tags Mapping[str, Any]

Tags is a map of key, value pairs.

type str

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<Any>

Tags is a map of key, value pairs.

type String

a filter to select all items of a certain subtype. See the [filter documentation](https://www.strongdm.com/docs/automation/getting-started/filters for more information.

getAccount Result

The following output properties are available:

Accounts List<PiersKarsenbarg.Sdm.Outputs.GetAccountAccount>

A single element list containing a map, where each key lists one of the following objects:

  • service:
Ids List<string>

a list of strings of ids of data sources that match the given arguments.

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags Dictionary<string, object>

Tags is a map of key, value pairs.

Type string
Accounts []GetAccountAccount

A single element list containing a map, where each key lists one of the following objects:

  • service:
Ids []string

a list of strings of ids of data sources that match the given arguments.

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags map[string]interface{}

Tags is a map of key, value pairs.

Type string
accounts List<GetAccountAccount>

A single element list containing a map, where each key lists one of the following objects:

  • service:
ids List<String>

a list of strings of ids of data sources that match the given arguments.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<String,Object>

Tags is a map of key, value pairs.

type String
accounts GetAccountAccount[]

A single element list containing a map, where each key lists one of the following objects:

  • service:
ids string[]

a list of strings of ids of data sources that match the given arguments.

email string

The User's email address. Must be unique.

externalId string

External ID is an alternative unique ID this user is represented by within an external service.

firstName string

The User's first name.

id string

Unique identifier of the User.

lastName string

The User's last name.

name string

Unique human-readable name of the Service.

suspended boolean

The User's suspended state.

tags {[key: string]: any}

Tags is a map of key, value pairs.

type string
accounts Sequence[GetAccountAccount]

A single element list containing a map, where each key lists one of the following objects:

  • service:
ids Sequence[str]

a list of strings of ids of data sources that match the given arguments.

email str

The User's email address. Must be unique.

external_id str

External ID is an alternative unique ID this user is represented by within an external service.

first_name str

The User's first name.

id str

Unique identifier of the User.

last_name str

The User's last name.

name str

Unique human-readable name of the Service.

suspended bool

The User's suspended state.

tags Mapping[str, Any]

Tags is a map of key, value pairs.

type str
accounts List<Property Map>

A single element list containing a map, where each key lists one of the following objects:

  • service:
ids List<String>

a list of strings of ids of data sources that match the given arguments.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<Any>

Tags is a map of key, value pairs.

type String

Supporting Types

GetAccountAccount

GetAccountAccountService

Id string

Unique identifier of the User.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags Dictionary<string, string>

Tags is a map of key, value pairs.

Id string

Unique identifier of the User.

Name string

Unique human-readable name of the Service.

Suspended bool

The User's suspended state.

Tags map[string]string

Tags is a map of key, value pairs.

id String

Unique identifier of the User.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<String,String>

Tags is a map of key, value pairs.

id string

Unique identifier of the User.

name string

Unique human-readable name of the Service.

suspended boolean

The User's suspended state.

tags {[key: string]: string}

Tags is a map of key, value pairs.

id str

Unique identifier of the User.

name str

Unique human-readable name of the Service.

suspended bool

The User's suspended state.

tags Mapping[str, str]

Tags is a map of key, value pairs.

id String

Unique identifier of the User.

name String

Unique human-readable name of the Service.

suspended Boolean

The User's suspended state.

tags Map<String>

Tags is a map of key, value pairs.

GetAccountAccountUser

ManagedBy string

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

PermissionLevel string

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Suspended bool

The User's suspended state.

Tags Dictionary<string, string>

Tags is a map of key, value pairs.

ManagedBy string

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

PermissionLevel string

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

Email string

The User's email address. Must be unique.

ExternalId string

External ID is an alternative unique ID this user is represented by within an external service.

FirstName string

The User's first name.

Id string

Unique identifier of the User.

LastName string

The User's last name.

Suspended bool

The User's suspended state.

Tags map[string]string

Tags is a map of key, value pairs.

managedBy String

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

permissionLevel String

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

suspended Boolean

The User's suspended state.

tags Map<String,String>

Tags is a map of key, value pairs.

managedBy string

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

permissionLevel string

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

email string

The User's email address. Must be unique.

externalId string

External ID is an alternative unique ID this user is represented by within an external service.

firstName string

The User's first name.

id string

Unique identifier of the User.

lastName string

The User's last name.

suspended boolean

The User's suspended state.

tags {[key: string]: string}

Tags is a map of key, value pairs.

managed_by str

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

permission_level str

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

email str

The User's email address. Must be unique.

external_id str

External ID is an alternative unique ID this user is represented by within an external service.

first_name str

The User's first name.

id str

Unique identifier of the User.

last_name str

The User's last name.

suspended bool

The User's suspended state.

tags Mapping[str, str]

Tags is a map of key, value pairs.

managedBy String

Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.

permissionLevel String

PermissionLevel is a read only field for the user's permission level e.g. admin, DBA, user.

email String

The User's email address. Must be unique.

externalId String

External ID is an alternative unique ID this user is represented by within an external service.

firstName String

The User's first name.

id String

Unique identifier of the User.

lastName String

The User's last name.

suspended Boolean

The User's suspended state.

tags Map<String>

Tags is a map of key, value pairs.

Package Details

Repository
sdm pierskarsenbarg/pulumi-sdm
License
Apache-2.0
Notes

This Pulumi package is based on the sdm Terraform Provider.