published on Tuesday, Sep 15, 2026 by imperva
published on Tuesday, Sep 15, 2026 by imperva
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as incapsula from "@pulumi/incapsula";
const app = new incapsula.AiApplicationSecurityApplication("app", {
accountId: 1234567,
name: "my-api-app",
applicationType: "API",
region: "US",
});
const key = new incapsula.AiApplicationSecurityApiKey("key", {
accountId: 1234567,
applicationId: app.aiApplicationSecurityApplicationId,
name: "ci-pipeline-key",
});
export const aiApplicationSecurityApiKey = key.apiKey;
import pulumi
import pulumi_incapsula as incapsula
app = incapsula.AiApplicationSecurityApplication("app",
account_id=1234567,
name="my-api-app",
application_type="API",
region="US")
key = incapsula.AiApplicationSecurityApiKey("key",
account_id=1234567,
application_id=app.ai_application_security_application_id,
name="ci-pipeline-key")
pulumi.export("aiApplicationSecurityApiKey", key.api_key)
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 {
app, err := incapsula.NewAiApplicationSecurityApplication(ctx, "app", &incapsula.AiApplicationSecurityApplicationArgs{
AccountId: pulumi.Float64(1234567),
Name: pulumi.String("my-api-app"),
ApplicationType: pulumi.String("API"),
Region: pulumi.String("US"),
})
if err != nil {
return err
}
key, err := incapsula.NewAiApplicationSecurityApiKey(ctx, "key", &incapsula.AiApplicationSecurityApiKeyArgs{
AccountId: pulumi.Float64(1234567),
ApplicationId: app.AiApplicationSecurityApplicationId,
Name: pulumi.String("ci-pipeline-key"),
})
if err != nil {
return err
}
ctx.Export("aiApplicationSecurityApiKey", key.ApiKey)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Incapsula = Pulumi.Incapsula;
return await Deployment.RunAsync(() =>
{
var app = new Incapsula.AiApplicationSecurityApplication("app", new()
{
AccountId = 1234567,
Name = "my-api-app",
ApplicationType = "API",
Region = "US",
});
var key = new Incapsula.AiApplicationSecurityApiKey("key", new()
{
AccountId = 1234567,
ApplicationId = app.AiApplicationSecurityApplicationId,
Name = "ci-pipeline-key",
});
return new Dictionary<string, object?>
{
["aiApplicationSecurityApiKey"] = key.ApiKey,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.incapsula.AiApplicationSecurityApplication;
import com.pulumi.incapsula.AiApplicationSecurityApplicationArgs;
import com.pulumi.incapsula.AiApplicationSecurityApiKey;
import com.pulumi.incapsula.AiApplicationSecurityApiKeyArgs;
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 app = new AiApplicationSecurityApplication("app", AiApplicationSecurityApplicationArgs.builder()
.accountId(1234567.0)
.name("my-api-app")
.applicationType("API")
.region("US")
.build());
var key = new AiApplicationSecurityApiKey("key", AiApplicationSecurityApiKeyArgs.builder()
.accountId(1234567.0)
.applicationId(app.aiApplicationSecurityApplicationId())
.name("ci-pipeline-key")
.build());
ctx.export("aiApplicationSecurityApiKey", key.apiKey());
}
}
resources:
app:
type: incapsula:AiApplicationSecurityApplication
properties:
accountId: 1.234567e+06
name: my-api-app
applicationType: API
region: US
key:
type: incapsula:AiApplicationSecurityApiKey
properties:
accountId: 1.234567e+06
applicationId: ${app.aiApplicationSecurityApplicationId}
name: ci-pipeline-key
outputs:
aiApplicationSecurityApiKey: ${key.apiKey}
Example coming soon!
Create AiApplicationSecurityApiKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiApplicationSecurityApiKey(name: string, args: AiApplicationSecurityApiKeyArgs, opts?: CustomResourceOptions);@overload
def AiApplicationSecurityApiKey(resource_name: str,
args: AiApplicationSecurityApiKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiApplicationSecurityApiKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
account_id: Optional[float] = None,
ai_application_security_api_key_id: Optional[str] = None,
name: Optional[str] = None)func NewAiApplicationSecurityApiKey(ctx *Context, name string, args AiApplicationSecurityApiKeyArgs, opts ...ResourceOption) (*AiApplicationSecurityApiKey, error)public AiApplicationSecurityApiKey(string name, AiApplicationSecurityApiKeyArgs args, CustomResourceOptions? opts = null)
public AiApplicationSecurityApiKey(String name, AiApplicationSecurityApiKeyArgs args)
public AiApplicationSecurityApiKey(String name, AiApplicationSecurityApiKeyArgs args, CustomResourceOptions options)
type: incapsula:AiApplicationSecurityApiKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "incapsula_ai_application_security_api_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiApplicationSecurityApiKeyArgs
- 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 AiApplicationSecurityApiKeyArgs
- 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 AiApplicationSecurityApiKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiApplicationSecurityApiKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiApplicationSecurityApiKeyArgs
- 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 aiApplicationSecurityApiKeyResource = new Incapsula.AiApplicationSecurityApiKey("aiApplicationSecurityApiKeyResource", new()
{
ApplicationId = "string",
AccountId = 0.0,
AiApplicationSecurityApiKeyId = "string",
Name = "string",
});
example, err := incapsula.NewAiApplicationSecurityApiKey(ctx, "aiApplicationSecurityApiKeyResource", &incapsula.AiApplicationSecurityApiKeyArgs{
ApplicationId: pulumi.String("string"),
AccountId: pulumi.Float64(0),
AiApplicationSecurityApiKeyId: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "incapsula_ai_application_security_api_key" "aiApplicationSecurityApiKeyResource" {
lifecycle {
create_before_destroy = true
}
application_id = "string"
account_id = 0
ai_application_security_api_key_id = "string"
name = "string"
}
var aiApplicationSecurityApiKeyResource = new AiApplicationSecurityApiKey("aiApplicationSecurityApiKeyResource", AiApplicationSecurityApiKeyArgs.builder()
.applicationId("string")
.accountId(0.0)
.aiApplicationSecurityApiKeyId("string")
.name("string")
.build());
ai_application_security_api_key_resource = incapsula.AiApplicationSecurityApiKey("aiApplicationSecurityApiKeyResource",
application_id="string",
account_id=float(0),
ai_application_security_api_key_id="string",
name="string")
const aiApplicationSecurityApiKeyResource = new incapsula.AiApplicationSecurityApiKey("aiApplicationSecurityApiKeyResource", {
applicationId: "string",
accountId: 0,
aiApplicationSecurityApiKeyId: "string",
name: "string",
});
type: incapsula:AiApplicationSecurityApiKey
properties:
accountId: 0
aiApplicationSecurityApiKeyId: string
applicationId: string
name: string
AiApplicationSecurityApiKey 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 AiApplicationSecurityApiKey resource accepts the following input properties:
- Application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- Account
Id double - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- Ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- Name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- Application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- Account
Id float64 - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- Ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- Name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- application_
id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- account_
id number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- ai_
application_ stringsecurity_ api_ key_ id - Numeric ID of the API key.
- name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- application
Id String - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- account
Id Double - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- ai
Application StringSecurity Api Key Id - Numeric ID of the API key.
- name String
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- account
Id number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- application_
id str - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- account_
id float - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- ai_
application_ strsecurity_ api_ key_ id - Numeric ID of the API key.
- name str
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- application
Id String - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- account
Id Number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- ai
Application StringSecurity Api Key Id - Numeric ID of the API key.
- name String
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiApplicationSecurityApiKey resource produces the following output properties:
Look up Existing AiApplicationSecurityApiKey Resource
Get an existing AiApplicationSecurityApiKey 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?: AiApplicationSecurityApiKeyState, opts?: CustomResourceOptions): AiApplicationSecurityApiKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[float] = None,
active: Optional[bool] = None,
ai_application_security_api_key_id: Optional[str] = None,
api_key: Optional[str] = None,
application_id: Optional[str] = None,
name: Optional[str] = None) -> AiApplicationSecurityApiKeyfunc GetAiApplicationSecurityApiKey(ctx *Context, name string, id IDInput, state *AiApplicationSecurityApiKeyState, opts ...ResourceOption) (*AiApplicationSecurityApiKey, error)public static AiApplicationSecurityApiKey Get(string name, Input<string> id, AiApplicationSecurityApiKeyState? state, CustomResourceOptions? opts = null)public static AiApplicationSecurityApiKey get(String name, Output<String> id, AiApplicationSecurityApiKeyState state, CustomResourceOptions options)resources: _: type: incapsula:AiApplicationSecurityApiKey get: id: ${id}import {
to = incapsula_ai_application_security_api_key.example
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 that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- Active bool
- Whether the API key is active.
- Ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- Api
Key string - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- Application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- Name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- Account
Id float64 - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- Active bool
- Whether the API key is active.
- Ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- Api
Key string - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- Application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- Name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- account_
id number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- active bool
- Whether the API key is active.
- ai_
application_ stringsecurity_ api_ key_ id - Numeric ID of the API key.
- api_
key string - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- application_
id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- account
Id Double - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- active Boolean
- Whether the API key is active.
- ai
Application StringSecurity Api Key Id - Numeric ID of the API key.
- api
Key String - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- application
Id String - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- name String
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- account
Id number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- active boolean
- Whether the API key is active.
- ai
Application stringSecurity Api Key Id - Numeric ID of the API key.
- api
Key string - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- application
Id string - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- name string
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- account_
id float - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- active bool
- Whether the API key is active.
- ai_
application_ strsecurity_ api_ key_ id - Numeric ID of the API key.
- api_
key str - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- application_
id str - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- name str
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
- account
Id Number - Numeric identifier of the account that owns the application. Defaults to the account of the API credentials when omitted. Cannot be changed after the resource is created.
- active Boolean
- Whether the API key is active.
- ai
Application StringSecurity Api Key Id - Numeric ID of the API key.
- api
Key String - (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
- application
Id String - UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
- name String
- Name of the API key. 1-50 characters; alphanumeric, underscore (
_) or hyphen (-). Cannot be changed after the resource is created.
Import
AI Application Security API key can be imported using its api_key_id, optionally prefixed with the account_id:
$ pulumi import incapsula:index/aiApplicationSecurityApiKey:AiApplicationSecurityApiKey example 42
$ pulumi import incapsula:index/aiApplicationSecurityApiKey:AiApplicationSecurityApiKey example 1234567/42
When the account_id is omitted from the import ID it is taken from the account of the
API credentials. On import the application_id is taken from configuration on the
following apply, and the sensitive api_key attribute is empty (the plaintext key
is only ever returned at creation time).
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
incapsulaTerraform Provider.
published on Tuesday, Sep 15, 2026 by imperva