1. Packages
  2. Incapsula Provider
  3. API Docs
  4. ApiClient
incapsula 3.37.1 published on Sunday, Jan 25, 2026 by imperva
incapsula logo
incapsula 3.37.1 published on Sunday, Jan 25, 2026 by imperva

    Provides an API client resource that manages API credentials (API ID and API key) for a user.

    You can also regenerate the API key secret by updating the expiration date, which causes a new secret to be issued.

    Note: Before creating API clients through this resource, an account administrator must explicitly enable API Client Creation Consent in the account settings in the Cloud Security Console.

    Example Usage

    API client creation for the current user.

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const apiClient1 = new incapsula.ApiClient("api_client_1", {
        name: "First",
        description: "Last",
        expirationDate: "2026-09-12T10:33:29Z",
        enabled: true,
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    api_client1 = incapsula.ApiClient("api_client_1",
        name="First",
        description="Last",
        expiration_date="2026-09-12T10:33:29Z",
        enabled=True)
    
    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.NewApiClient(ctx, "api_client_1", &incapsula.ApiClientArgs{
    			Name:           pulumi.String("First"),
    			Description:    pulumi.String("Last"),
    			ExpirationDate: pulumi.String("2026-09-12T10:33:29Z"),
    			Enabled:        pulumi.Bool(true),
    		})
    		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 apiClient1 = new Incapsula.ApiClient("api_client_1", new()
        {
            Name = "First",
            Description = "Last",
            ExpirationDate = "2026-09-12T10:33:29Z",
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.ApiClient;
    import com.pulumi.incapsula.ApiClientArgs;
    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 apiClient1 = new ApiClient("apiClient1", ApiClientArgs.builder()
                .name("First")
                .description("Last")
                .expirationDate("2026-09-12T10:33:29Z")
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      apiClient1:
        type: incapsula:ApiClient
        name: api_client_1
        properties:
          name: First
          description: Last
          expirationDate: 2026-09-12T10:33:29Z
          enabled: true
    

    API client creation for another user.

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const apiClient1 = new incapsula.ApiClient("api_client_1", {
        userEmail: "example@terraform.com",
        name: "First",
        description: "Last",
        expirationDate: "2026-09-12T10:33:29Z",
        enabled: true,
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    api_client1 = incapsula.ApiClient("api_client_1",
        user_email="example@terraform.com",
        name="First",
        description="Last",
        expiration_date="2026-09-12T10:33:29Z",
        enabled=True)
    
    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.NewApiClient(ctx, "api_client_1", &incapsula.ApiClientArgs{
    			UserEmail:      pulumi.String("example@terraform.com"),
    			Name:           pulumi.String("First"),
    			Description:    pulumi.String("Last"),
    			ExpirationDate: pulumi.String("2026-09-12T10:33:29Z"),
    			Enabled:        pulumi.Bool(true),
    		})
    		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 apiClient1 = new Incapsula.ApiClient("api_client_1", new()
        {
            UserEmail = "example@terraform.com",
            Name = "First",
            Description = "Last",
            ExpirationDate = "2026-09-12T10:33:29Z",
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.ApiClient;
    import com.pulumi.incapsula.ApiClientArgs;
    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 apiClient1 = new ApiClient("apiClient1", ApiClientArgs.builder()
                .userEmail("example@terraform.com")
                .name("First")
                .description("Last")
                .expirationDate("2026-09-12T10:33:29Z")
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      apiClient1:
        type: incapsula:ApiClient
        name: api_client_1
        properties:
          userEmail: example@terraform.com
          name: First
          description: Last
          expirationDate: 2026-09-12T10:33:29Z
          enabled: true
    

    API-client creation for a user on another account.

    import * as pulumi from "@pulumi/pulumi";
    import * as incapsula from "@pulumi/incapsula";
    
    const apiClient1 = new incapsula.ApiClient("api_client_1", {
        accountId: 1234,
        userEmail: "example@terraform.com",
        name: "First",
        description: "Last",
        expirationDate: "2026-09-12T10:33:29Z",
        enabled: true,
    });
    
    import pulumi
    import pulumi_incapsula as incapsula
    
    api_client1 = incapsula.ApiClient("api_client_1",
        account_id=1234,
        user_email="example@terraform.com",
        name="First",
        description="Last",
        expiration_date="2026-09-12T10:33:29Z",
        enabled=True)
    
    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.NewApiClient(ctx, "api_client_1", &incapsula.ApiClientArgs{
    			AccountId:      pulumi.Float64(1234),
    			UserEmail:      pulumi.String("example@terraform.com"),
    			Name:           pulumi.String("First"),
    			Description:    pulumi.String("Last"),
    			ExpirationDate: pulumi.String("2026-09-12T10:33:29Z"),
    			Enabled:        pulumi.Bool(true),
    		})
    		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 apiClient1 = new Incapsula.ApiClient("api_client_1", new()
        {
            AccountId = 1234,
            UserEmail = "example@terraform.com",
            Name = "First",
            Description = "Last",
            ExpirationDate = "2026-09-12T10:33:29Z",
            Enabled = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.incapsula.ApiClient;
    import com.pulumi.incapsula.ApiClientArgs;
    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 apiClient1 = new ApiClient("apiClient1", ApiClientArgs.builder()
                .accountId(1234.0)
                .userEmail("example@terraform.com")
                .name("First")
                .description("Last")
                .expirationDate("2026-09-12T10:33:29Z")
                .enabled(true)
                .build());
    
        }
    }
    
    resources:
      apiClient1:
        type: incapsula:ApiClient
        name: api_client_1
        properties:
          accountId: 1234
          userEmail: example@terraform.com
          name: First
          description: Last
          expirationDate: 2026-09-12T10:33:29Z
          enabled: true
    

    Create ApiClient Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ApiClient(name: string, args?: ApiClientArgs, opts?: CustomResourceOptions);
    @overload
    def ApiClient(resource_name: str,
                  args: Optional[ApiClientArgs] = None,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiClient(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[float] = None,
                  api_client_id: Optional[str] = None,
                  description: Optional[str] = None,
                  enabled: Optional[bool] = None,
                  expiration_date: Optional[str] = None,
                  name: Optional[str] = None,
                  user_email: Optional[str] = None)
    func NewApiClient(ctx *Context, name string, args *ApiClientArgs, opts ...ResourceOption) (*ApiClient, error)
    public ApiClient(string name, ApiClientArgs? args = null, CustomResourceOptions? opts = null)
    public ApiClient(String name, ApiClientArgs args)
    public ApiClient(String name, ApiClientArgs args, CustomResourceOptions options)
    
    type: incapsula:ApiClient
    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 ApiClientArgs
    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 ApiClientArgs
    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 ApiClientArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiClientArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiClientArgs
    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 apiClientResource = new Incapsula.ApiClient("apiClientResource", new()
    {
        AccountId = 0,
        ApiClientId = "string",
        Description = "string",
        Enabled = false,
        ExpirationDate = "string",
        Name = "string",
        UserEmail = "string",
    });
    
    example, err := incapsula.NewApiClient(ctx, "apiClientResource", &incapsula.ApiClientArgs{
    	AccountId:      pulumi.Float64(0),
    	ApiClientId:    pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Enabled:        pulumi.Bool(false),
    	ExpirationDate: pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	UserEmail:      pulumi.String("string"),
    })
    
    var apiClientResource = new ApiClient("apiClientResource", ApiClientArgs.builder()
        .accountId(0.0)
        .apiClientId("string")
        .description("string")
        .enabled(false)
        .expirationDate("string")
        .name("string")
        .userEmail("string")
        .build());
    
    api_client_resource = incapsula.ApiClient("apiClientResource",
        account_id=0,
        api_client_id="string",
        description="string",
        enabled=False,
        expiration_date="string",
        name="string",
        user_email="string")
    
    const apiClientResource = new incapsula.ApiClient("apiClientResource", {
        accountId: 0,
        apiClientId: "string",
        description: "string",
        enabled: false,
        expirationDate: "string",
        name: "string",
        userEmail: "string",
    });
    
    type: incapsula:ApiClient
    properties:
        accountId: 0
        apiClientId: string
        description: string
        enabled: false
        expirationDate: string
        name: string
        userEmail: string
    

    ApiClient 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 ApiClient resource accepts the following input properties:

    AccountId double
    Numeric identifier of the account to operate on.
    ApiClientId string
    Description string
    The description of the API client.
    Enabled bool
    Whether the API client is enabled. The default is false.
    ExpirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    Name string
    The name of the API client.
    UserEmail string
    Email address of the user for whom the API client will be created.
    AccountId float64
    Numeric identifier of the account to operate on.
    ApiClientId string
    Description string
    The description of the API client.
    Enabled bool
    Whether the API client is enabled. The default is false.
    ExpirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    Name string
    The name of the API client.
    UserEmail string
    Email address of the user for whom the API client will be created.
    accountId Double
    Numeric identifier of the account to operate on.
    apiClientId String
    description String
    The description of the API client.
    enabled Boolean
    Whether the API client is enabled. The default is false.
    expirationDate String
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name String
    The name of the API client.
    userEmail String
    Email address of the user for whom the API client will be created.
    accountId number
    Numeric identifier of the account to operate on.
    apiClientId string
    description string
    The description of the API client.
    enabled boolean
    Whether the API client is enabled. The default is false.
    expirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name string
    The name of the API client.
    userEmail string
    Email address of the user for whom the API client will be created.
    account_id float
    Numeric identifier of the account to operate on.
    api_client_id str
    description str
    The description of the API client.
    enabled bool
    Whether the API client is enabled. The default is false.
    expiration_date str
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name str
    The name of the API client.
    user_email str
    Email address of the user for whom the API client will be created.
    accountId Number
    Numeric identifier of the account to operate on.
    apiClientId String
    description String
    The description of the API client.
    enabled Boolean
    Whether the API client is enabled. The default is false.
    expirationDate String
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name String
    The name of the API client.
    userEmail String
    Email address of the user for whom the API client will be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiClient resource produces the following output properties:

    ApiKey string
    Generated API key for client authentication.
    Id string
    The provider-assigned unique ID for this managed resource.
    ApiKey string
    Generated API key for client authentication.
    Id string
    The provider-assigned unique ID for this managed resource.
    apiKey String
    Generated API key for client authentication.
    id String
    The provider-assigned unique ID for this managed resource.
    apiKey string
    Generated API key for client authentication.
    id string
    The provider-assigned unique ID for this managed resource.
    api_key str
    Generated API key for client authentication.
    id str
    The provider-assigned unique ID for this managed resource.
    apiKey String
    Generated API key for client authentication.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApiClient Resource

    Get an existing ApiClient 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?: ApiClientState, opts?: CustomResourceOptions): ApiClient
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[float] = None,
            api_client_id: Optional[str] = None,
            api_key: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            expiration_date: Optional[str] = None,
            name: Optional[str] = None,
            user_email: Optional[str] = None) -> ApiClient
    func GetApiClient(ctx *Context, name string, id IDInput, state *ApiClientState, opts ...ResourceOption) (*ApiClient, error)
    public static ApiClient Get(string name, Input<string> id, ApiClientState? state, CustomResourceOptions? opts = null)
    public static ApiClient get(String name, Output<String> id, ApiClientState state, CustomResourceOptions options)
    resources:  _:    type: incapsula:ApiClient    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.
    The following state arguments are supported:
    AccountId double
    Numeric identifier of the account to operate on.
    ApiClientId string
    ApiKey string
    Generated API key for client authentication.
    Description string
    The description of the API client.
    Enabled bool
    Whether the API client is enabled. The default is false.
    ExpirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    Name string
    The name of the API client.
    UserEmail string
    Email address of the user for whom the API client will be created.
    AccountId float64
    Numeric identifier of the account to operate on.
    ApiClientId string
    ApiKey string
    Generated API key for client authentication.
    Description string
    The description of the API client.
    Enabled bool
    Whether the API client is enabled. The default is false.
    ExpirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    Name string
    The name of the API client.
    UserEmail string
    Email address of the user for whom the API client will be created.
    accountId Double
    Numeric identifier of the account to operate on.
    apiClientId String
    apiKey String
    Generated API key for client authentication.
    description String
    The description of the API client.
    enabled Boolean
    Whether the API client is enabled. The default is false.
    expirationDate String
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name String
    The name of the API client.
    userEmail String
    Email address of the user for whom the API client will be created.
    accountId number
    Numeric identifier of the account to operate on.
    apiClientId string
    apiKey string
    Generated API key for client authentication.
    description string
    The description of the API client.
    enabled boolean
    Whether the API client is enabled. The default is false.
    expirationDate string
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name string
    The name of the API client.
    userEmail string
    Email address of the user for whom the API client will be created.
    account_id float
    Numeric identifier of the account to operate on.
    api_client_id str
    api_key str
    Generated API key for client authentication.
    description str
    The description of the API client.
    enabled bool
    Whether the API client is enabled. The default is false.
    expiration_date str
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name str
    The name of the API client.
    user_email str
    Email address of the user for whom the API client will be created.
    accountId Number
    Numeric identifier of the account to operate on.
    apiClientId String
    apiKey String
    Generated API key for client authentication.
    description String
    The description of the API client.
    enabled Boolean
    Whether the API client is enabled. The default is false.
    expirationDate String
    Expiration date of the API key, in YYYY-MM-DDTHH:mm:ssZ format. Must be a future date. Changing this value causes regeneration of the API key secret.
    name String
    The name of the API client.
    userEmail String
    Email address of the user for whom the API client will be created.

    Import

    An API client can be imported using its API ID, which is the value exported as the id attribute for this resource. For example:

    $ pulumi import incapsula:index/apiClient:ApiClient demo 2222
    

    Alternatively, import it using the account ID and the API ID (the value exported as the id attribute), separated by a slash (/):

    $ pulumi import incapsula:index/apiClient:ApiClient demo 1234/2222
    

    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.
    incapsula logo
    incapsula 3.37.1 published on Sunday, Jan 25, 2026 by imperva
      Meet Neo: Your AI Platform Teammate