incapsula.AccountUser
Explore with Pulumi AI
Provides an account user resource. This resource enables you to create users in an account and assign roles to them.
The user roles should be added as ids which can be taken from incapsula.AccountRole
resources as reference.
In addition, the default account roles may be taken from the incapsula.getAccountRoles
data source.
This resource also provides the option to assign users to subaccounts. The usage is the same but the behavior differs slightly. See the ‘SubAccount User Assignment Usage’ example below for more details.
Example Usage
Basic Usage
Sample user creation with no roles.
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const user1 = new incapsula.AccountUser("user1", {
accountId: data.incapsula_account_data.account_data.current_account,
email: "example@terraform.com",
firstName: "First",
lastName: "Last",
});
import pulumi
import pulumi_incapsula as incapsula
user1 = incapsula.AccountUser("user1",
account_id=data["incapsula_account_data"]["account_data"]["current_account"],
email="example@terraform.com",
first_name="First",
last_name="Last")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := incapsula.NewAccountUser(ctx, "user1", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
Email: pulumi.String("example@terraform.com"),
FirstName: pulumi.String("First"),
LastName: pulumi.String("Last"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var user1 = new Incapsula.AccountUser("user1", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
Email = "example@terraform.com",
FirstName = "First",
LastName = "Last",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.AccountUser;
import com.pulumi.incapsula.AccountUserArgs;
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 user1 = new AccountUser("user1", AccountUserArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.email("example@terraform.com")
.firstName("First")
.lastName("Last")
.build());
}
}
resources:
user1:
type: incapsula:AccountUser
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
email: example@terraform.com
firstName: First
lastName: Last
Role References Usage
Usage with role reference.
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const role1 = new incapsula.AccountRole("role1", {accountId: data.incapsula_account_data.account_data.current_account});
const role2 = new incapsula.AccountRole("role2", {accountId: data.incapsula_account_data.account_data.current_account});
const user2 = new incapsula.AccountUser("user2", {
accountId: data.incapsula_account_data.account_data.current_account,
email: "example@terraform.com",
firstName: "First",
lastName: "Last",
roleIds: [
role1.accountRoleId,
role2.accountRoleId,
],
});
import pulumi
import pulumi_incapsula as incapsula
role1 = incapsula.AccountRole("role1", account_id=data["incapsula_account_data"]["account_data"]["current_account"])
role2 = incapsula.AccountRole("role2", account_id=data["incapsula_account_data"]["account_data"]["current_account"])
user2 = incapsula.AccountUser("user2",
account_id=data["incapsula_account_data"]["account_data"]["current_account"],
email="example@terraform.com",
first_name="First",
last_name="Last",
role_ids=[
role1.account_role_id,
role2.account_role_id,
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
role1, err := incapsula.NewAccountRole(ctx, "role1", &incapsula.AccountRoleArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
})
if err != nil {
return err
}
role2, err := incapsula.NewAccountRole(ctx, "role2", &incapsula.AccountRoleArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
})
if err != nil {
return err
}
_, err = incapsula.NewAccountUser(ctx, "user2", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
Email: pulumi.String("example@terraform.com"),
FirstName: pulumi.String("First"),
LastName: pulumi.String("Last"),
RoleIds: pulumi.Float64Array{
role1.AccountRoleId,
role2.AccountRoleId,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var role1 = new Incapsula.AccountRole("role1", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var role2 = new Incapsula.AccountRole("role2", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var user2 = new Incapsula.AccountUser("user2", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
Email = "example@terraform.com",
FirstName = "First",
LastName = "Last",
RoleIds = new[]
{
role1.AccountRoleId,
role2.AccountRoleId,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.AccountRole;
import com.pulumi.incapsula.AccountRoleArgs;
import com.pulumi.incapsula.AccountUser;
import com.pulumi.incapsula.AccountUserArgs;
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 role1 = new AccountRole("role1", AccountRoleArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var role2 = new AccountRole("role2", AccountRoleArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var user2 = new AccountUser("user2", AccountUserArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.email("example@terraform.com")
.firstName("First")
.lastName("Last")
.roleIds(
role1.accountRoleId(),
role2.accountRoleId())
.build());
}
}
resources:
role1:
type: incapsula:AccountRole
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
role2:
type: incapsula:AccountRole
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
user2:
type: incapsula:AccountUser
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
email: example@terraform.com
firstName: First
lastName: Last
roleIds:
- ${role1.accountRoleId}
- ${role2.accountRoleId}
Role References & Data Sources Usage
Using incapsula.getAccountRoles
data sources we can use admin_role_id/reader_role_id exported attributes.
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const roles = incapsula.getAccountRoles({
accountId: data.incapsula_account_data.account_data.current_account,
});
const role1 = new incapsula.AccountRole("role1", {accountId: data.incapsula_account_data.account_data.current_account});
const role2 = new incapsula.AccountRole("role2", {accountId: data.incapsula_account_data.account_data.current_account});
const user3 = new incapsula.AccountUser("user3", {
accountId: data.incapsula_account_data.account_data.current_account,
email: "example@terraform.com",
firstName: "First",
lastName: "Last",
roleIds: [
role1.accountRoleId,
role2.accountRoleId,
roles.then(roles => roles.readerRoleId),
],
});
import pulumi
import pulumi_incapsula as incapsula
roles = incapsula.get_account_roles(account_id=data["incapsula_account_data"]["account_data"]["current_account"])
role1 = incapsula.AccountRole("role1", account_id=data["incapsula_account_data"]["account_data"]["current_account"])
role2 = incapsula.AccountRole("role2", account_id=data["incapsula_account_data"]["account_data"]["current_account"])
user3 = incapsula.AccountUser("user3",
account_id=data["incapsula_account_data"]["account_data"]["current_account"],
email="example@terraform.com",
first_name="First",
last_name="Last",
role_ids=[
role1.account_role_id,
role2.account_role_id,
roles.reader_role_id,
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
roles, err := incapsula.GetAccountRoles(ctx, &incapsula.GetAccountRolesArgs{
AccountId: data.Incapsula_account_data.Account_data.Current_account,
}, nil)
if err != nil {
return err
}
role1, err := incapsula.NewAccountRole(ctx, "role1", &incapsula.AccountRoleArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
})
if err != nil {
return err
}
role2, err := incapsula.NewAccountRole(ctx, "role2", &incapsula.AccountRoleArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
})
if err != nil {
return err
}
_, err = incapsula.NewAccountUser(ctx, "user3", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
Email: pulumi.String("example@terraform.com"),
FirstName: pulumi.String("First"),
LastName: pulumi.String("Last"),
RoleIds: pulumi.Float64Array{
role1.AccountRoleId,
role2.AccountRoleId,
pulumi.Float64(roles.ReaderRoleId),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var roles = Incapsula.GetAccountRoles.Invoke(new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var role1 = new Incapsula.AccountRole("role1", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var role2 = new Incapsula.AccountRole("role2", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var user3 = new Incapsula.AccountUser("user3", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
Email = "example@terraform.com",
FirstName = "First",
LastName = "Last",
RoleIds = new[]
{
role1.AccountRoleId,
role2.AccountRoleId,
roles.Apply(getAccountRolesResult => getAccountRolesResult.ReaderRoleId),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.IncapsulaFunctions;
import com.pulumi.incapsula.inputs.GetAccountRolesArgs;
import com.pulumi.incapsula.AccountRole;
import com.pulumi.incapsula.AccountRoleArgs;
import com.pulumi.incapsula.AccountUser;
import com.pulumi.incapsula.AccountUserArgs;
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 roles = IncapsulaFunctions.getAccountRoles(GetAccountRolesArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var role1 = new AccountRole("role1", AccountRoleArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var role2 = new AccountRole("role2", AccountRoleArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var user3 = new AccountUser("user3", AccountUserArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.email("example@terraform.com")
.firstName("First")
.lastName("Last")
.roleIds(
role1.accountRoleId(),
role2.accountRoleId(),
roles.applyValue(getAccountRolesResult -> getAccountRolesResult.readerRoleId()))
.build());
}
}
resources:
role1:
type: incapsula:AccountRole
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
role2:
type: incapsula:AccountRole
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
user3:
type: incapsula:AccountUser
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
email: example@terraform.com
firstName: First
lastName: Last
roleIds:
- ${role1.accountRoleId}
- ${role2.accountRoleId}
- ${roles.readerRoleId}
variables:
roles:
fn::invoke:
function: incapsula:getAccountRoles
arguments:
accountId: ${data.incapsula_account_data.account_data.current_account}
SubAccount User Assignment Usage - Manage by Account
For subaccounts we are not creating a new user but assigning an existing user from the parent account. In terms of the TF resource, it means the email attribute must be taken from an existing user, by reference (preferred option) or hardcoded. The first and last name are redundant and will be taken from the existing selected account. The roles are not taken from the existing user and must be assigned independently.
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const role1 = new incapsula.AccountRole("role1", {accountId: data.incapsula_account_data.account_data.current_account});
const user1 = new incapsula.AccountUser("user1", {
accountId: data.incapsula_account_data.account_data.current_account,
email: "example@terraform.com",
firstName: "First",
lastName: "Last",
});
const user2 = new incapsula.AccountUser("user2", {
accountId: incapsula_subaccount["example-subaccount"].id,
email: user1.email,
roleIds: [role1.accountRoleId],
});
import pulumi
import pulumi_incapsula as incapsula
role1 = incapsula.AccountRole("role1", account_id=data["incapsula_account_data"]["account_data"]["current_account"])
user1 = incapsula.AccountUser("user1",
account_id=data["incapsula_account_data"]["account_data"]["current_account"],
email="example@terraform.com",
first_name="First",
last_name="Last")
user2 = incapsula.AccountUser("user2",
account_id=incapsula_subaccount["example-subaccount"]["id"],
email=user1.email,
role_ids=[role1.account_role_id])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
role1, err := incapsula.NewAccountRole(ctx, "role1", &incapsula.AccountRoleArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
})
if err != nil {
return err
}
user1, err := incapsula.NewAccountUser(ctx, "user1", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
Email: pulumi.String("example@terraform.com"),
FirstName: pulumi.String("First"),
LastName: pulumi.String("Last"),
})
if err != nil {
return err
}
_, err = incapsula.NewAccountUser(ctx, "user2", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(incapsula_subaccount.ExampleSubaccount.Id),
Email: user1.Email,
RoleIds: pulumi.Float64Array{
role1.AccountRoleId,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var role1 = new Incapsula.AccountRole("role1", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var user1 = new Incapsula.AccountUser("user1", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
Email = "example@terraform.com",
FirstName = "First",
LastName = "Last",
});
var user2 = new Incapsula.AccountUser("user2", new()
{
AccountId = incapsula_subaccount.Example_subaccount.Id,
Email = user1.Email,
RoleIds = new[]
{
role1.AccountRoleId,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.AccountRole;
import com.pulumi.incapsula.AccountRoleArgs;
import com.pulumi.incapsula.AccountUser;
import com.pulumi.incapsula.AccountUserArgs;
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 role1 = new AccountRole("role1", AccountRoleArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var user1 = new AccountUser("user1", AccountUserArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.email("example@terraform.com")
.firstName("First")
.lastName("Last")
.build());
var user2 = new AccountUser("user2", AccountUserArgs.builder()
.accountId(incapsula_subaccount.example-subaccount().id())
.email(user1.email())
.roleIds(role1.accountRoleId())
.build());
}
}
resources:
role1:
type: incapsula:AccountRole
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
user1:
type: incapsula:AccountUser
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
email: example@terraform.com
firstName: First
lastName: Last
user2:
type: incapsula:AccountUser
properties:
accountId: ${incapsula_subaccount"example-subaccount"[%!s(MISSING)].id}
email: ${user1.email}
roleIds:
- ${role1.accountRoleId}
SubAccount User Assignment Usage - Manage by SubAccount
If the API_KEY and API_ID are associated with a subaccount, we don’t have the option to manage roles and need to use the incapsula.getAccountRoles
data source.
Using the map
attribute, this data source generates a mapping for all the account roles (Role Name to Id map).
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const roles = incapsula.getAccountRoles({
accountId: data.incapsula_account_data.account_data.current_account,
});
const user2 = new incapsula.AccountUser("user2", {
accountId: data.incapsula_account_data.account_data.current_account,
email: "example@terraform.com",
roleIds: [roles.then(roles => roles.map?.["Sample Role 1"])],
});
import pulumi
import pulumi_incapsula as incapsula
roles = incapsula.get_account_roles(account_id=data["incapsula_account_data"]["account_data"]["current_account"])
user2 = incapsula.AccountUser("user2",
account_id=data["incapsula_account_data"]["account_data"]["current_account"],
email="example@terraform.com",
role_ids=[roles.map["Sample Role 1"]])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/incapsula/v3/incapsula"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
roles, err := incapsula.GetAccountRoles(ctx, &incapsula.GetAccountRolesArgs{
AccountId: data.Incapsula_account_data.Account_data.Current_account,
}, nil);
if err != nil {
return err
}
_, err = incapsula.NewAccountUser(ctx, "user2", &incapsula.AccountUserArgs{
AccountId: pulumi.Any(data.Incapsula_account_data.Account_data.Current_account),
Email: pulumi.String("example@terraform.com"),
RoleIds: pulumi.Float64Array{
pulumi.Float64(roles.Map.Sample Role 1),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var roles = Incapsula.GetAccountRoles.Invoke(new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
});
var user2 = new Incapsula.AccountUser("user2", new()
{
AccountId = data.Incapsula_account_data.Account_data.Current_account,
Email = "example@terraform.com",
RoleIds = new[]
{
roles.Apply(getAccountRolesResult => getAccountRolesResult.Map?.Sample_Role_1),
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.IncapsulaFunctions;
import com.pulumi.incapsula.inputs.GetAccountRolesArgs;
import com.pulumi.incapsula.AccountUser;
import com.pulumi.incapsula.AccountUserArgs;
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 roles = IncapsulaFunctions.getAccountRoles(GetAccountRolesArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.build());
var user2 = new AccountUser("user2", AccountUserArgs.builder()
.accountId(data.incapsula_account_data().account_data().current_account())
.email("example@terraform.com")
.roleIds(roles.applyValue(getAccountRolesResult -> getAccountRolesResult.map().Sample Role 1()))
.build());
}
}
resources:
user2:
type: incapsula:AccountUser
properties:
accountId: ${data.incapsula_account_data.account_data.current_account}
email: example@terraform.com
roleIds:
- ${roles.map"Sample Role 1"[%!s(MISSING)]}
variables:
roles:
fn::invoke:
function: incapsula:getAccountRoles
arguments:
accountId: ${data.incapsula_account_data.account_data.current_account}
Create AccountUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccountUser(name: string, args: AccountUserArgs, opts?: CustomResourceOptions);
@overload
def AccountUser(resource_name: str,
args: AccountUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccountUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[float] = None,
email: Optional[str] = None,
account_user_id: Optional[str] = None,
first_name: Optional[str] = None,
last_name: Optional[str] = None,
role_ids: Optional[Sequence[float]] = None)
func NewAccountUser(ctx *Context, name string, args AccountUserArgs, opts ...ResourceOption) (*AccountUser, error)
public AccountUser(string name, AccountUserArgs args, CustomResourceOptions? opts = null)
public AccountUser(String name, AccountUserArgs args)
public AccountUser(String name, AccountUserArgs args, CustomResourceOptions options)
type: incapsula:AccountUser
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 AccountUserArgs
- 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 AccountUserArgs
- 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 AccountUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccountUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccountUserArgs
- 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 accountUserResource = new Incapsula.AccountUser("accountUserResource", new()
{
AccountId = 0,
Email = "string",
AccountUserId = "string",
FirstName = "string",
LastName = "string",
RoleIds = new[]
{
0,
},
});
example, err := incapsula.NewAccountUser(ctx, "accountUserResource", &incapsula.AccountUserArgs{
AccountId: pulumi.Float64(0),
Email: pulumi.String("string"),
AccountUserId: pulumi.String("string"),
FirstName: pulumi.String("string"),
LastName: pulumi.String("string"),
RoleIds: pulumi.Float64Array{
pulumi.Float64(0),
},
})
var accountUserResource = new AccountUser("accountUserResource", AccountUserArgs.builder()
.accountId(0)
.email("string")
.accountUserId("string")
.firstName("string")
.lastName("string")
.roleIds(0)
.build());
account_user_resource = incapsula.AccountUser("accountUserResource",
account_id=0,
email="string",
account_user_id="string",
first_name="string",
last_name="string",
role_ids=[0])
const accountUserResource = new incapsula.AccountUser("accountUserResource", {
accountId: 0,
email: "string",
accountUserId: "string",
firstName: "string",
lastName: "string",
roleIds: [0],
});
type: incapsula:AccountUser
properties:
accountId: 0
accountUserId: string
email: string
firstName: string
lastName: string
roleIds:
- 0
AccountUser 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 AccountUser resource accepts the following input properties:
- Account
Id double - Numeric identifier of the account to operate on. Using reference to account datasource
- Email string
- The user email. This attribute cannot be updated.
- Account
User stringId - Unique identifier in the API for the account user.
- First
Name string - The user's first name. This attribute cannot be updated.
- Last
Name string - The user's last name. This attribute cannot be updated.
- Role
Ids List<double> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- Account
Id float64 - Numeric identifier of the account to operate on. Using reference to account datasource
- Email string
- The user email. This attribute cannot be updated.
- Account
User stringId - Unique identifier in the API for the account user.
- First
Name string - The user's first name. This attribute cannot be updated.
- Last
Name string - The user's last name. This attribute cannot be updated.
- Role
Ids []float64 - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- account
Id Double - Numeric identifier of the account to operate on. Using reference to account datasource
- email String
- The user email. This attribute cannot be updated.
- account
User StringId - Unique identifier in the API for the account user.
- first
Name String - The user's first name. This attribute cannot be updated.
- last
Name String - The user's last name. This attribute cannot be updated.
- role
Ids List<Double> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- account
Id number - Numeric identifier of the account to operate on. Using reference to account datasource
- email string
- The user email. This attribute cannot be updated.
- account
User stringId - Unique identifier in the API for the account user.
- first
Name string - The user's first name. This attribute cannot be updated.
- last
Name string - The user's last name. This attribute cannot be updated.
- role
Ids number[] - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- account_
id float - Numeric identifier of the account to operate on. Using reference to account datasource
- email str
- The user email. This attribute cannot be updated.
- account_
user_ strid - Unique identifier in the API for the account user.
- first_
name str - The user's first name. This attribute cannot be updated.
- last_
name str - The user's last name. This attribute cannot be updated.
- role_
ids Sequence[float] - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- account
Id Number - Numeric identifier of the account to operate on. Using reference to account datasource
- email String
- The user email. This attribute cannot be updated.
- account
User StringId - Unique identifier in the API for the account user.
- first
Name String - The user's first name. This attribute cannot be updated.
- last
Name String - The user's last name. This attribute cannot be updated.
- role
Ids List<Number> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
Outputs
All input properties are implicitly available as output properties. Additionally, the AccountUser resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- role_
names Sequence[str] - List of role names.
Look up Existing AccountUser Resource
Get an existing AccountUser 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?: AccountUserState, opts?: CustomResourceOptions): AccountUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[float] = None,
account_user_id: Optional[str] = None,
email: Optional[str] = None,
first_name: Optional[str] = None,
last_name: Optional[str] = None,
role_ids: Optional[Sequence[float]] = None,
role_names: Optional[Sequence[str]] = None) -> AccountUser
func GetAccountUser(ctx *Context, name string, id IDInput, state *AccountUserState, opts ...ResourceOption) (*AccountUser, error)
public static AccountUser Get(string name, Input<string> id, AccountUserState? state, CustomResourceOptions? opts = null)
public static AccountUser get(String name, Output<String> id, AccountUserState state, CustomResourceOptions options)
resources: _: type: incapsula:AccountUser 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 - Numeric identifier of the account to operate on. Using reference to account datasource
- Account
User stringId - Unique identifier in the API for the account user.
- Email string
- The user email. This attribute cannot be updated.
- First
Name string - The user's first name. This attribute cannot be updated.
- Last
Name string - The user's last name. This attribute cannot be updated.
- Role
Ids List<double> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- Role
Names List<string> - List of role names.
- Account
Id float64 - Numeric identifier of the account to operate on. Using reference to account datasource
- Account
User stringId - Unique identifier in the API for the account user.
- Email string
- The user email. This attribute cannot be updated.
- First
Name string - The user's first name. This attribute cannot be updated.
- Last
Name string - The user's last name. This attribute cannot be updated.
- Role
Ids []float64 - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- Role
Names []string - List of role names.
- account
Id Double - Numeric identifier of the account to operate on. Using reference to account datasource
- account
User StringId - Unique identifier in the API for the account user.
- email String
- The user email. This attribute cannot be updated.
- first
Name String - The user's first name. This attribute cannot be updated.
- last
Name String - The user's last name. This attribute cannot be updated.
- role
Ids List<Double> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- role
Names List<String> - List of role names.
- account
Id number - Numeric identifier of the account to operate on. Using reference to account datasource
- account
User stringId - Unique identifier in the API for the account user.
- email string
- The user email. This attribute cannot be updated.
- first
Name string - The user's first name. This attribute cannot be updated.
- last
Name string - The user's last name. This attribute cannot be updated.
- role
Ids number[] - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- role
Names string[] - List of role names.
- account_
id float - Numeric identifier of the account to operate on. Using reference to account datasource
- account_
user_ strid - Unique identifier in the API for the account user.
- email str
- The user email. This attribute cannot be updated.
- first_
name str - The user's first name. This attribute cannot be updated.
- last_
name str - The user's last name. This attribute cannot be updated.
- role_
ids Sequence[float] - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- role_
names Sequence[str] - List of role names.
- account
Id Number - Numeric identifier of the account to operate on. Using reference to account datasource
- account
User StringId - Unique identifier in the API for the account user.
- email String
- The user email. This attribute cannot be updated.
- first
Name String - The user's first name. This attribute cannot be updated.
- last
Name String - The user's last name. This attribute cannot be updated.
- role
Ids List<Number> - List of role ids to be associated with the user. Default value is an empty list (user with no roles).
- role
Names List<String> - List of role names.
Import
Account User can be imported using the account_id
and email
separated by /
, e.g.:
$ pulumi import incapsula:index/accountUser:AccountUser demo 1234/example@terraform.com
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- incapsula imperva/terraform-provider-incapsula
- License
- Notes
- This Pulumi package is based on the
incapsula
Terraform Provider.