1. Packages
  2. Logzio Provider
  3. API Docs
  4. User
logzio 1.17.1 published on Monday, Apr 14, 2025 by logzio

logzio.User

Explore with Pulumi AI

# User Provider

Provides a Logz.io user resource. This can be used to create and manage Logz.io users.

Example Usage

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

const config = new pulumi.Config();
const apiToken = config.require("apiToken");
const accountId = config.requireObject("accountId");
const myUser = new logzio.User("myUser", {
    username: "test.user@this.test",
    fullname: "test user",
    role: "USER_ROLE_READONLY",
    accountId: 1234,
});
Copy
import pulumi
import pulumi_logzio as logzio

config = pulumi.Config()
api_token = config.require("apiToken")
account_id = config.require_object("accountId")
my_user = logzio.User("myUser",
    username="test.user@this.test",
    fullname="test user",
    role="USER_ROLE_READONLY",
    account_id=1234)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		apiToken := cfg.Require("apiToken")
		accountId := cfg.RequireObject("accountId")
		_, err := logzio.NewUser(ctx, "myUser", &logzio.UserArgs{
			Username:  pulumi.String("test.user@this.test"),
			Fullname:  pulumi.String("test user"),
			Role:      pulumi.String("USER_ROLE_READONLY"),
			AccountId: pulumi.Float64(1234),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Logzio = Pulumi.Logzio;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var apiToken = config.Require("apiToken");
    var accountId = config.RequireObject<dynamic>("accountId");
    var myUser = new Logzio.User("myUser", new()
    {
        Username = "test.user@this.test",
        Fullname = "test user",
        Role = "USER_ROLE_READONLY",
        AccountId = 1234,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.logzio.User;
import com.pulumi.logzio.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) {
        final var config = ctx.config();
        final var apiToken = config.get("apiToken");
        final var accountId = config.get("accountId");
        var myUser = new User("myUser", UserArgs.builder()
            .username("test.user@this.test")
            .fullname("test user")
            .role("USER_ROLE_READONLY")
            .accountId(1234)
            .build());

    }
}
Copy
configuration:
  # Create a new user
  apiToken:
    type: string
  accountId:
    type: dynamic
resources:
  myUser:
    type: logzio:User
    properties:
      username: test.user@this.test
      fullname: test user
      role: USER_ROLE_READONLY
      accountId: 1234
Copy

Attribute Reference

  • id - ID of the user in the Logz.io platform.

Endpoints used

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,
         account_id: Optional[float] = None,
         fullname: Optional[str] = None,
         role: Optional[str] = None,
         username: Optional[str] = None,
         active: Optional[bool] = None,
         user_id: Optional[str] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: logzio:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 Logzio.User("userResource", new()
{
    AccountId = 0,
    Fullname = "string",
    Role = "string",
    Username = "string",
    Active = false,
    UserId = "string",
});
Copy
example, err := logzio.NewUser(ctx, "userResource", &logzio.UserArgs{
	AccountId: pulumi.Float64(0),
	Fullname:  pulumi.String("string"),
	Role:      pulumi.String("string"),
	Username:  pulumi.String("string"),
	Active:    pulumi.Bool(false),
	UserId:    pulumi.String("string"),
})
Copy
var userResource = new User("userResource", UserArgs.builder()
    .accountId(0)
    .fullname("string")
    .role("string")
    .username("string")
    .active(false)
    .userId("string")
    .build());
Copy
user_resource = logzio.User("userResource",
    account_id=0,
    fullname="string",
    role="string",
    username="string",
    active=False,
    user_id="string")
Copy
const userResource = new logzio.User("userResource", {
    accountId: 0,
    fullname: "string",
    role: "string",
    username: "string",
    active: false,
    userId: "string",
});
Copy
type: logzio:User
properties:
    accountId: 0
    active: false
    fullname: string
    role: string
    userId: string
    username: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The User resource accepts the following input properties:

AccountId This property is required. double
Logz.io account ID.
Fullname This property is required. string
First and last name of the user.
Role This property is required. string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
Username This property is required. string
Username credential.
Active bool
If true, the user is active, if false, the user is suspended.
UserId string
AccountId This property is required. float64
Logz.io account ID.
Fullname This property is required. string
First and last name of the user.
Role This property is required. string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
Username This property is required. string
Username credential.
Active bool
If true, the user is active, if false, the user is suspended.
UserId string
accountId This property is required. Double
Logz.io account ID.
fullname This property is required. String
First and last name of the user.
role This property is required. String
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
username This property is required. String
Username credential.
active Boolean
If true, the user is active, if false, the user is suspended.
userId String
accountId This property is required. number
Logz.io account ID.
fullname This property is required. string
First and last name of the user.
role This property is required. string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
username This property is required. string
Username credential.
active boolean
If true, the user is active, if false, the user is suspended.
userId string
account_id This property is required. float
Logz.io account ID.
fullname This property is required. str
First and last name of the user.
role This property is required. str
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
username This property is required. str
Username credential.
active bool
If true, the user is active, if false, the user is suspended.
user_id str
accountId This property is required. Number
Logz.io account ID.
fullname This property is required. String
First and last name of the user.
role This property is required. String
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
username This property is required. String
Username credential.
active Boolean
If true, the user is active, if false, the user is suspended.
userId String

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,
        account_id: Optional[float] = None,
        active: Optional[bool] = None,
        fullname: Optional[str] = None,
        role: Optional[str] = None,
        user_id: Optional[str] = None,
        username: 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)
resources:  _:    type: logzio:User    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
AccountId double
Logz.io account ID.
Active bool
If true, the user is active, if false, the user is suspended.
Fullname string
First and last name of the user.
Role string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
UserId string
Username string
Username credential.
AccountId float64
Logz.io account ID.
Active bool
If true, the user is active, if false, the user is suspended.
Fullname string
First and last name of the user.
Role string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
UserId string
Username string
Username credential.
accountId Double
Logz.io account ID.
active Boolean
If true, the user is active, if false, the user is suspended.
fullname String
First and last name of the user.
role String
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
userId String
username String
Username credential.
accountId number
Logz.io account ID.
active boolean
If true, the user is active, if false, the user is suspended.
fullname string
First and last name of the user.
role string
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
userId string
username string
Username credential.
account_id float
Logz.io account ID.
active bool
If true, the user is active, if false, the user is suspended.
fullname str
First and last name of the user.
role str
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
user_id str
username str
Username credential.
accountId Number
Logz.io account ID.
active Boolean
If true, the user is active, if false, the user is suspended.
fullname String
First and last name of the user.
role String
String. User role. Can be USER_ROLE_READONLY, USER_ROLE_REGULAR or USER_ROLE_ACCOUNT_ADMIN.
userId String
username String
Username credential.

Package Details

Repository
logzio logzio/terraform-provider-logzio
License
Notes
This Pulumi package is based on the logzio Terraform Provider.