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.
- Learn more about available APIs for managing 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,
});
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)
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
})
}
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,
});
});
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());
}
}
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
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)
type: logzio: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 Logzio.User("userResource", new()
{
AccountId = 0,
Fullname = "string",
Role = "string",
Username = "string",
Active = false,
UserId = "string",
});
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"),
})
var userResource = new User("userResource", UserArgs.builder()
.accountId(0)
.fullname("string")
.role("string")
.username("string")
.active(false)
.userId("string")
.build());
user_resource = logzio.User("userResource",
account_id=0,
fullname="string",
role="string",
username="string",
active=False,
user_id="string")
const userResource = new logzio.User("userResource", {
accountId: 0,
fullname: "string",
role: "string",
username: "string",
active: false,
userId: "string",
});
type: logzio:User
properties:
accountId: 0
active: false
fullname: string
role: string
userId: string
username: 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
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:
- Account
Id double - Logz.io account ID.
- Fullname string
- First and last name of the user.
- Role string
- String. User role. Can be
USER_ROLE_READONLY
,USER_ROLE_REGULAR
orUSER_ROLE_ACCOUNT_ADMIN
. - Username string
- Username credential.
- Active bool
- If
true
, the user is active, iffalse
, the user is suspended. - User
Id string
- Account
Id float64 - Logz.io account ID.
- Fullname string
- First and last name of the user.
- Role string
- String. User role. Can be
USER_ROLE_READONLY
,USER_ROLE_REGULAR
orUSER_ROLE_ACCOUNT_ADMIN
. - Username string
- Username credential.
- Active bool
- If
true
, the user is active, iffalse
, the user is suspended. - User
Id string
- account
Id Double - Logz.io account ID.
- fullname String
- First and last name of the user.
- role String
- String. User role. Can be
USER_ROLE_READONLY
,USER_ROLE_REGULAR
orUSER_ROLE_ACCOUNT_ADMIN
. - username String
- Username credential.
- active Boolean
- If
true
, the user is active, iffalse
, the user is suspended. - user
Id String
- account
Id number - Logz.io account ID.
- fullname string
- First and last name of the user.
- role string
- String. User role. Can be
USER_ROLE_READONLY
,USER_ROLE_REGULAR
orUSER_ROLE_ACCOUNT_ADMIN
. - username string
- Username credential.
- active boolean
- If
true
, the user is active, iffalse
, the user is suspended. - user
Id string
- account
Id Number - Logz.io account ID.
- fullname String
- First and last name of the user.
- role String
- String. User role. Can be
USER_ROLE_READONLY
,USER_ROLE_REGULAR
orUSER_ROLE_ACCOUNT_ADMIN
. - username String
- Username credential.
- active Boolean
- If
true
, the user is active, iffalse
, the user is suspended. - user
Id 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
- 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.
- Account
Id double - Logz.io account ID.
- Active bool
- If
true
, the user is active, iffalse
, 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
orUSER_ROLE_ACCOUNT_ADMIN
. - User
Id string - Username string
- Username credential.
- Account
Id float64 - Logz.io account ID.
- Active bool
- If
true
, the user is active, iffalse
, 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
orUSER_ROLE_ACCOUNT_ADMIN
. - User
Id string - Username string
- Username credential.
- account
Id Double - Logz.io account ID.
- active Boolean
- If
true
, the user is active, iffalse
, 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
orUSER_ROLE_ACCOUNT_ADMIN
. - user
Id String - username String
- Username credential.
- account
Id number - Logz.io account ID.
- active boolean
- If
true
, the user is active, iffalse
, 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
orUSER_ROLE_ACCOUNT_ADMIN
. - user
Id string - username string
- Username credential.
- account
Id Number - Logz.io account ID.
- active Boolean
- If
true
, the user is active, iffalse
, 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
orUSER_ROLE_ACCOUNT_ADMIN
. - user
Id 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.