1. Packages
  2. StrongDM
  3. API Docs
  4. getAccount
StrongDM v1.11.0 published on Tuesday, Apr 9, 2024 by Piers Karsenbarg

sdm.getAccount

Explore with Pulumi AI

sdm logo
StrongDM v1.11.0 published on Tuesday, Apr 9, 2024 by Piers Karsenbarg

    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

    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",
    });
    
    import pulumi
    import pulumi_sdm as sdm
    
    user_queries = sdm.get_account(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
    	})
    }
    
    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 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());
    
        }
    }
    
    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,
                    permission_level: 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,
                    permission_level: 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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    Suspended bool
    The Service'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 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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    Suspended bool
    The Service'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 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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended Boolean
    The Service'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 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.
    permissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended boolean
    The Service'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 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.
    permission_level str
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended bool
    The Service'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 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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended Boolean
    The Service'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 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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    Suspended bool
    Suspended is a read only field for 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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    Suspended bool
    Suspended is a read only field for 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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended Boolean
    Suspended is a read only field for 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.
    permissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended boolean
    Suspended is a read only field for 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.
    permission_level str
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended bool
    Suspended is a read only field for 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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    suspended Boolean
    Suspended is a read only field for the User's suspended state.
    tags Map<Any>
    Tags is a map of key, value pairs.
    type String

    Supporting Types

    GetAccountAccount

    Services List<PiersKarsenbarg.Sdm.Inputs.GetAccountAccountService>
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    Users List<PiersKarsenbarg.Sdm.Inputs.GetAccountAccountUser>
    A User can connect to resources they are granted directly, or granted via roles.
    Services []GetAccountAccountService
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    Users []GetAccountAccountUser
    A User can connect to resources they are granted directly, or granted via roles.
    services List<GetAccountAccountService>
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    users List<GetAccountAccountUser>
    A User can connect to resources they are granted directly, or granted via roles.
    services GetAccountAccountService[]
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    users GetAccountAccountUser[]
    A User can connect to resources they are granted directly, or granted via roles.
    services Sequence[GetAccountAccountService]
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    users Sequence[GetAccountAccountUser]
    A User can connect to resources they are granted directly, or granted via roles.
    services List<Property Map>
    A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
    users List<Property Map>
    A User can connect to resources they are granted directly, or granted via roles.

    GetAccountAccountService

    Id string
    Unique identifier of the User.
    Name string
    Unique human-readable name of the Service.
    Suspended bool
    The Service'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 Service'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 Service'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 Service'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 Service'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 Service'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.
    Suspended bool
    The Service's suspended state.
    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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    Suspended bool
    The Service's suspended state.
    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.
    PermissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    suspended Boolean
    The Service's suspended state.
    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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    suspended boolean
    The Service's suspended state.
    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.
    permissionLevel string
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    suspended bool
    The Service's suspended state.
    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.
    permission_level str
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    suspended Boolean
    The Service's suspended state.
    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.
    permissionLevel String
    PermissionLevel is the user's permission level e.g. admin, DBA, user.
    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.
    sdm logo
    StrongDM v1.11.0 published on Tuesday, Apr 9, 2024 by Piers Karsenbarg