sumologic.User
Explore with Pulumi AI
Provides a Sumologic User.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const exampleRole = new sumologic.Role("example_role", {
name: "TestRole123",
description: "Testing resource sumologic_role",
});
const exampleUser1 = new sumologic.User("example_user1", {
firstName: "Jon",
lastName: "Doe",
email: "jon.doe@gmail.com",
isActive: true,
roleIds: [exampleRole.id],
transferTo: "",
});
const exampleUser2 = new sumologic.User("example_user2", {
firstName: "Jane",
lastName: "Smith",
email: "jane.smith@gmail.com",
roleIds: [exampleRole.id],
transferTo: exampleUser1.id,
});
import pulumi
import pulumi_sumologic as sumologic
example_role = sumologic.Role("example_role",
name="TestRole123",
description="Testing resource sumologic_role")
example_user1 = sumologic.User("example_user1",
first_name="Jon",
last_name="Doe",
email="jon.doe@gmail.com",
is_active=True,
role_ids=[example_role.id],
transfer_to="")
example_user2 = sumologic.User("example_user2",
first_name="Jane",
last_name="Smith",
email="jane.smith@gmail.com",
role_ids=[example_role.id],
transfer_to=example_user1.id)
package main
import (
"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleRole, err := sumologic.NewRole(ctx, "example_role", &sumologic.RoleArgs{
Name: pulumi.String("TestRole123"),
Description: pulumi.String("Testing resource sumologic_role"),
})
if err != nil {
return err
}
exampleUser1, err := sumologic.NewUser(ctx, "example_user1", &sumologic.UserArgs{
FirstName: pulumi.String("Jon"),
LastName: pulumi.String("Doe"),
Email: pulumi.String("jon.doe@gmail.com"),
IsActive: pulumi.Bool(true),
RoleIds: pulumi.StringArray{
exampleRole.ID(),
},
TransferTo: pulumi.String(""),
})
if err != nil {
return err
}
_, err = sumologic.NewUser(ctx, "example_user2", &sumologic.UserArgs{
FirstName: pulumi.String("Jane"),
LastName: pulumi.String("Smith"),
Email: pulumi.String("jane.smith@gmail.com"),
RoleIds: pulumi.StringArray{
exampleRole.ID(),
},
TransferTo: exampleUser1.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SumoLogic = Pulumi.SumoLogic;
return await Deployment.RunAsync(() =>
{
var exampleRole = new SumoLogic.Role("example_role", new()
{
Name = "TestRole123",
Description = "Testing resource sumologic_role",
});
var exampleUser1 = new SumoLogic.User("example_user1", new()
{
FirstName = "Jon",
LastName = "Doe",
Email = "jon.doe@gmail.com",
IsActive = true,
RoleIds = new[]
{
exampleRole.Id,
},
TransferTo = "",
});
var exampleUser2 = new SumoLogic.User("example_user2", new()
{
FirstName = "Jane",
LastName = "Smith",
Email = "jane.smith@gmail.com",
RoleIds = new[]
{
exampleRole.Id,
},
TransferTo = exampleUser1.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Role;
import com.pulumi.sumologic.RoleArgs;
import com.pulumi.sumologic.User;
import com.pulumi.sumologic.UserArgs;
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 exampleRole = new Role("exampleRole", RoleArgs.builder()
.name("TestRole123")
.description("Testing resource sumologic_role")
.build());
var exampleUser1 = new User("exampleUser1", UserArgs.builder()
.firstName("Jon")
.lastName("Doe")
.email("jon.doe@gmail.com")
.isActive(true)
.roleIds(exampleRole.id())
.transferTo("")
.build());
var exampleUser2 = new User("exampleUser2", UserArgs.builder()
.firstName("Jane")
.lastName("Smith")
.email("jane.smith@gmail.com")
.roleIds(exampleRole.id())
.transferTo(exampleUser1.id())
.build());
}
}
resources:
exampleRole:
type: sumologic:Role
name: example_role
properties:
name: TestRole123
description: Testing resource sumologic_role
exampleUser1:
type: sumologic:User
name: example_user1
properties:
firstName: Jon
lastName: Doe
email: jon.doe@gmail.com
isActive: true
roleIds:
- ${exampleRole.id}
transferTo:
exampleUser2:
type: sumologic:User
name: example_user2
properties:
firstName: Jane
lastName: Smith
email: jane.smith@gmail.com
roleIds:
- ${exampleRole.id}
transferTo: ${exampleUser1.id}
Create User Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
args: UserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def User(resource_name: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
first_name: Optional[str] = None,
is_active: Optional[bool] = None,
last_name: Optional[str] = None,
role_ids: Optional[Sequence[str]] = None,
transfer_to: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
type: sumologic:User
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 UserArgs
- 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 UserArgs
- 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 UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UserArgs
- 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 userResource = new SumoLogic.User("userResource", new()
{
Email = "string",
FirstName = "string",
IsActive = false,
LastName = "string",
RoleIds = new[]
{
"string",
},
TransferTo = "string",
});
example, err := sumologic.NewUser(ctx, "userResource", &sumologic.UserArgs{
Email: pulumi.String("string"),
FirstName: pulumi.String("string"),
IsActive: pulumi.Bool(false),
LastName: pulumi.String("string"),
RoleIds: pulumi.StringArray{
pulumi.String("string"),
},
TransferTo: pulumi.String("string"),
})
var userResource = new User("userResource", UserArgs.builder()
.email("string")
.firstName("string")
.isActive(false)
.lastName("string")
.roleIds("string")
.transferTo("string")
.build());
user_resource = sumologic.User("userResource",
email="string",
first_name="string",
is_active=False,
last_name="string",
role_ids=["string"],
transfer_to="string")
const userResource = new sumologic.User("userResource", {
email: "string",
firstName: "string",
isActive: false,
lastName: "string",
roleIds: ["string"],
transferTo: "string",
});
type: sumologic:User
properties:
email: string
firstName: string
isActive: false
lastName: string
roleIds:
- string
transferTo: string
User 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 User resource accepts the following input properties:
- Email string
- Email of the user.
- First
Name string - First name of the user.
- Is
Active bool - This has the value true if the user is active and false if they have been deactivated.
- Last
Name string - Last name of the user.
- Role
Ids List<string> - List of roleIds associated with the user.
- Transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- Email string
- Email of the user.
- First
Name string - First name of the user.
- Is
Active bool - This has the value true if the user is active and false if they have been deactivated.
- Last
Name string - Last name of the user.
- Role
Ids []string - List of roleIds associated with the user.
- Transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email String
- Email of the user.
- first
Name String - First name of the user.
- is
Active Boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name String - Last name of the user.
- role
Ids List<String> - List of roleIds associated with the user.
- transfer
To String UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email string
- Email of the user.
- first
Name string - First name of the user.
- is
Active boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name string - Last name of the user.
- role
Ids string[] - List of roleIds associated with the user.
- transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email str
- Email of the user.
- first_
name str - First name of the user.
- is_
active bool - This has the value true if the user is active and false if they have been deactivated.
- last_
name str - Last name of the user.
- role_
ids Sequence[str] - List of roleIds associated with the user.
- transfer_
to str UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email String
- Email of the user.
- first
Name String - First name of the user.
- is
Active Boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name String - Last name of the user.
- role
Ids List<String> - List of roleIds associated with the user.
- transfer
To String UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
Outputs
All input properties are implicitly available as output properties. Additionally, the User 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 User Resource
Get an existing User 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?: UserState, opts?: CustomResourceOptions): User
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
email: Optional[str] = None,
first_name: Optional[str] = None,
is_active: Optional[bool] = None,
last_name: Optional[str] = None,
role_ids: Optional[Sequence[str]] = None,
transfer_to: Optional[str] = None) -> User
func GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)
public static User Get(string name, Input<string> id, UserState? state, CustomResourceOptions? opts = null)
public static User get(String name, Output<String> id, UserState 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.
- Email string
- Email of the user.
- First
Name string - First name of the user.
- Is
Active bool - This has the value true if the user is active and false if they have been deactivated.
- Last
Name string - Last name of the user.
- Role
Ids List<string> - List of roleIds associated with the user.
- Transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- Email string
- Email of the user.
- First
Name string - First name of the user.
- Is
Active bool - This has the value true if the user is active and false if they have been deactivated.
- Last
Name string - Last name of the user.
- Role
Ids []string - List of roleIds associated with the user.
- Transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email String
- Email of the user.
- first
Name String - First name of the user.
- is
Active Boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name String - Last name of the user.
- role
Ids List<String> - List of roleIds associated with the user.
- transfer
To String UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email string
- Email of the user.
- first
Name string - First name of the user.
- is
Active boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name string - Last name of the user.
- role
Ids string[] - List of roleIds associated with the user.
- transfer
To string UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email str
- Email of the user.
- first_
name str - First name of the user.
- is_
active bool - This has the value true if the user is active and false if they have been deactivated.
- last_
name str - Last name of the user.
- role_
ids Sequence[str] - List of roleIds associated with the user.
- transfer_
to str UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
- email String
- Email of the user.
- first
Name String - First name of the user.
- is
Active Boolean - This has the value true if the user is active and false if they have been deactivated.
- last
Name String - Last name of the user.
- role
Ids List<String> - List of roleIds associated with the user.
- transfer
To String UserId of user to transfer this user's content to on deletion, can be empty. Must be applied prior to deletion to take effect.
The following attributes are exported:
Import
Users can be imported using the user id, e.g.:
hcl
$ pulumi import sumologic:index/user:User user 1234567890
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Sumo Logic pulumi/pulumi-sumologic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.