sdm.Account
Explore with Pulumi AI
Accounts are users that have access to strongDM. The types of accounts are:
- Users: humans who are authenticated through username and password or SSO.
- Service Accounts: machines that are authenticated using a service token.
- Tokens are access keys with permissions that can be used for authentication.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sdm from "@pierskarsenbarg/sdm";
const test_user = new sdm.Account("test-user", {user: {
email: "albob@strongdm.com",
firstName: "al",
lastName: "bob",
tags: {
env: "dev",
region: "us-west",
},
}});
const test_service = new sdm.Account("test-service", {service: {
name: "test-service",
tags: {
env: "dev",
region: "us-west",
},
}});
import pulumi
import pierskarsenbarg_pulumi_sdm as sdm
test_user = sdm.Account("test-user", user={
"email": "albob@strongdm.com",
"first_name": "al",
"last_name": "bob",
"tags": {
"env": "dev",
"region": "us-west",
},
})
test_service = sdm.Account("test-service", service={
"name": "test-service",
"tags": {
"env": "dev",
"region": "us-west",
},
})
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.NewAccount(ctx, "test-user", &sdm.AccountArgs{
User: &sdm.AccountUserArgs{
Email: pulumi.String("albob@strongdm.com"),
FirstName: pulumi.String("al"),
LastName: pulumi.String("bob"),
Tags: pulumi.StringMap{
"env": pulumi.String("dev"),
"region": pulumi.String("us-west"),
},
},
})
if err != nil {
return err
}
_, err = sdm.NewAccount(ctx, "test-service", &sdm.AccountArgs{
Service: &sdm.AccountServiceArgs{
Name: pulumi.String("test-service"),
Tags: pulumi.StringMap{
"env": pulumi.String("dev"),
"region": pulumi.String("us-west"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sdm = PiersKarsenbarg.Sdm;
return await Deployment.RunAsync(() =>
{
var test_user = new Sdm.Account("test-user", new()
{
User = new Sdm.Inputs.AccountUserArgs
{
Email = "albob@strongdm.com",
FirstName = "al",
LastName = "bob",
Tags =
{
{ "env", "dev" },
{ "region", "us-west" },
},
},
});
var test_service = new Sdm.Account("test-service", new()
{
Service = new Sdm.Inputs.AccountServiceArgs
{
Name = "test-service",
Tags =
{
{ "env", "dev" },
{ "region", "us-west" },
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdm.Account;
import com.pulumi.sdm.AccountArgs;
import com.pulumi.sdm.inputs.AccountUserArgs;
import com.pulumi.sdm.inputs.AccountServiceArgs;
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) {
var test_user = new Account("test-user", AccountArgs.builder()
.user(AccountUserArgs.builder()
.email("albob@strongdm.com")
.firstName("al")
.lastName("bob")
.tags(Map.ofEntries(
Map.entry("env", "dev"),
Map.entry("region", "us-west")
))
.build())
.build());
var test_service = new Account("test-service", AccountArgs.builder()
.service(AccountServiceArgs.builder()
.name("test-service")
.tags(Map.ofEntries(
Map.entry("env", "dev"),
Map.entry("region", "us-west")
))
.build())
.build());
}
}
resources:
test-user:
type: sdm:Account
properties:
user:
email: albob@strongdm.com
firstName: al
lastName: bob
tags:
env: dev
region: us-west
test-service:
type: sdm:Account
properties:
service:
name: test-service
tags:
env: dev
region: us-west
This resource can be imported using the import command.
Create Account Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Account(name: string, args?: AccountArgs, opts?: CustomResourceOptions);
@overload
def Account(resource_name: str,
args: Optional[AccountArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Account(resource_name: str,
opts: Optional[ResourceOptions] = None,
service: Optional[AccountServiceArgs] = None,
user: Optional[AccountUserArgs] = None)
func NewAccount(ctx *Context, name string, args *AccountArgs, opts ...ResourceOption) (*Account, error)
public Account(string name, AccountArgs? args = null, CustomResourceOptions? opts = null)
public Account(String name, AccountArgs args)
public Account(String name, AccountArgs args, CustomResourceOptions options)
type: sdm:Account
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var accountResource = new Sdm.Account("accountResource", new()
{
Service = new Sdm.Inputs.AccountServiceArgs
{
Name = "string",
Suspended = false,
Tags =
{
{ "string", "string" },
},
Token = "string",
},
User = new Sdm.Inputs.AccountUserArgs
{
Email = "string",
FirstName = "string",
LastName = "string",
ExternalId = "string",
ManagedBy = "string",
PermissionLevel = "string",
Suspended = false,
Tags =
{
{ "string", "string" },
},
},
});
example, err := sdm.NewAccount(ctx, "accountResource", &sdm.AccountArgs{
Service: &sdm.AccountServiceArgs{
Name: pulumi.String("string"),
Suspended: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Token: pulumi.String("string"),
},
User: &sdm.AccountUserArgs{
Email: pulumi.String("string"),
FirstName: pulumi.String("string"),
LastName: pulumi.String("string"),
ExternalId: pulumi.String("string"),
ManagedBy: pulumi.String("string"),
PermissionLevel: pulumi.String("string"),
Suspended: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
})
var accountResource = new Account("accountResource", AccountArgs.builder()
.service(AccountServiceArgs.builder()
.name("string")
.suspended(false)
.tags(Map.of("string", "string"))
.token("string")
.build())
.user(AccountUserArgs.builder()
.email("string")
.firstName("string")
.lastName("string")
.externalId("string")
.managedBy("string")
.permissionLevel("string")
.suspended(false)
.tags(Map.of("string", "string"))
.build())
.build());
account_resource = sdm.Account("accountResource",
service=sdm.AccountServiceArgs(
name="string",
suspended=False,
tags={
"string": "string",
},
token="string",
),
user=sdm.AccountUserArgs(
email="string",
first_name="string",
last_name="string",
external_id="string",
managed_by="string",
permission_level="string",
suspended=False,
tags={
"string": "string",
},
))
const accountResource = new sdm.Account("accountResource", {
service: {
name: "string",
suspended: false,
tags: {
string: "string",
},
token: "string",
},
user: {
email: "string",
firstName: "string",
lastName: "string",
externalId: "string",
managedBy: "string",
permissionLevel: "string",
suspended: false,
tags: {
string: "string",
},
},
});
type: sdm:Account
properties:
service:
name: string
suspended: false
tags:
string: string
token: string
user:
email: string
externalId: string
firstName: string
lastName: string
managedBy: string
permissionLevel: string
suspended: false
tags:
string: string
Account Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Account resource accepts the following input properties:
- Service
Piers
Karsenbarg. Sdm. Inputs. Account Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- User
Piers
Karsenbarg. Sdm. Inputs. Account User - A User can connect to resources they are granted directly, or granted via roles.
- Service
Account
Service Args - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- User
Account
User Args - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service Args - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User Args - A User can connect to resources they are granted directly, or granted via roles.
- service 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.
- user Property Map
- A User can connect to resources they are granted directly, or granted via roles.
Outputs
All input properties are implicitly available as output properties. Additionally, the Account resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing Account Resource
Get an existing Account resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccountState, opts?: CustomResourceOptions): Account
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
service: Optional[AccountServiceArgs] = None,
user: Optional[AccountUserArgs] = None) -> Account
func GetAccount(ctx *Context, name string, id IDInput, state *AccountState, opts ...ResourceOption) (*Account, error)
public static Account Get(string name, Input<string> id, AccountState? state, CustomResourceOptions? opts = null)
public static Account get(String name, Output<String> id, AccountState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Service
Piers
Karsenbarg. Sdm. Inputs. Account Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- User
Piers
Karsenbarg. Sdm. Inputs. Account User - A User can connect to resources they are granted directly, or granted via roles.
- Service
Account
Service Args - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- User
Account
User Args - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User - A User can connect to resources they are granted directly, or granted via roles.
- service
Account
Service Args - A Service is a service account that can connect to resources they are granted directly, or granted via roles. Services are typically automated jobs.
- user
Account
User Args - A User can connect to resources they are granted directly, or granted via roles.
- service 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.
- user Property Map
- A User can connect to resources they are granted directly, or granted via roles.
Supporting Types
AccountService, AccountServiceArgs
AccountUser, AccountUserArgs
- Email string
- The User's email address. Must be unique.
- First
Name string - The User's first name.
- Last
Name string - The User's last name.
- External
Id string - External ID is an alternative unique ID this user is represented by within an external service.
- Managed
By string - Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.
- Permission
Level string - PermissionLevel is the user's permission level e.g. admin, DBA, user.
- Suspended bool
- The Service's suspended state.
- Dictionary<string, string>
- Tags is a map of key, value pairs.
- Email string
- The User's email address. Must be unique.
- First
Name string - The User's first name.
- Last
Name string - The User's last name.
- External
Id string - External ID is an alternative unique ID this user is represented by within an external service.
- Managed
By string - Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.
- Permission
Level string - PermissionLevel is the user's permission level e.g. admin, DBA, user.
- Suspended bool
- The Service's suspended state.
- map[string]string
- Tags is a map of key, value pairs.
- email String
- The User's email address. Must be unique.
- first
Name String - The User's first name.
- last
Name String - The User's last name.
- external
Id String - External ID is an alternative unique ID this user is represented by within an external service.
- managed
By String - Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.
- permission
Level String - PermissionLevel is the user's permission level e.g. admin, DBA, user.
- suspended Boolean
- The Service's suspended state.
- Map<String,String>
- Tags is a map of key, value pairs.
- email string
- The User's email address. Must be unique.
- first
Name string - The User's first name.
- last
Name string - The User's last name.
- external
Id string - External ID is an alternative unique ID this user is represented by within an external service.
- managed
By string - Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.
- permission
Level string - PermissionLevel is the user's permission level e.g. admin, DBA, user.
- suspended boolean
- The Service's suspended state.
- {[key: string]: string}
- Tags is a map of key, value pairs.
- email str
- The User's email address. Must be unique.
- first_
name str - The User's first name.
- last_
name str - The User's last name.
- external_
id str - External ID is an alternative unique ID this user is represented by within an external service.
- 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 the user's permission level e.g. admin, DBA, user.
- suspended bool
- The Service's suspended state.
- Mapping[str, str]
- Tags is a map of key, value pairs.
- email String
- The User's email address. Must be unique.
- first
Name String - The User's first name.
- last
Name String - The User's last name.
- external
Id String - External ID is an alternative unique ID this user is represented by within an external service.
- managed
By String - Managed By is a read only field for what service manages this user, e.g. StrongDM, Okta, Azure.
- permission
Level String - PermissionLevel is the user's permission level e.g. admin, DBA, user.
- suspended Boolean
- The Service's suspended state.
- Map<String>
- Tags is a map of key, value pairs.
Import
A Account can be imported using the id, e.g.,
$ pulumi import sdm:index/account:Account example a-12345678
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- sdm pierskarsenbarg/pulumi-sdm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sdm
Terraform Provider.