1. Registry
  2. Packages
  3. Incapsula Provider
  4. API Docs
  5. AiApplicationSecurityApiKey
Viewing docs for incapsula 3.40.0
published on Tuesday, Sep 15, 2026 by imperva
Viewing docs for incapsula 3.40.0
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:

    ApplicationId string
    UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
    AccountId 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.
    AiApplicationSecurityApiKeyId string
    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.
    ApplicationId string
    UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
    AccountId 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.
    AiApplicationSecurityApiKeyId string
    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_security_api_key_id string
    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.
    applicationId String
    UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
    accountId 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.
    aiApplicationSecurityApiKeyId String
    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.
    applicationId string
    UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
    accountId 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.
    aiApplicationSecurityApiKeyId string
    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_security_api_key_id str
    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.
    applicationId String
    UUID of the AI Application Security application this API key belongs to. Cannot be changed after the resource is created.
    accountId 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.
    aiApplicationSecurityApiKeyId String
    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:

    Active bool
    Whether the API key is active.
    ApiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    Id string
    The provider-assigned unique ID for this managed resource.
    Active bool
    Whether the API key is active.
    ApiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    Id string
    The provider-assigned unique ID for this managed resource.
    active bool
    Whether the API key is active.
    api_key string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    id string
    The provider-assigned unique ID for this managed resource.
    active Boolean
    Whether the API key is active.
    apiKey String
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    id String
    The provider-assigned unique ID for this managed resource.
    active boolean
    Whether the API key is active.
    apiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    id string
    The provider-assigned unique ID for this managed resource.
    active bool
    Whether the API key is active.
    api_key str
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    id str
    The provider-assigned unique ID for this managed resource.
    active Boolean
    Whether the API key is active.
    apiKey String
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    id String
    The provider-assigned unique ID for this managed resource.

    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) -> AiApplicationSecurityApiKey
    func 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.
    The following state arguments are supported:
    AccountId 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.
    AiApplicationSecurityApiKeyId string
    Numeric ID of the API key.
    ApiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    ApplicationId 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.
    AccountId 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.
    AiApplicationSecurityApiKeyId string
    Numeric ID of the API key.
    ApiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    ApplicationId 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_security_api_key_id string
    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.
    accountId 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.
    aiApplicationSecurityApiKeyId String
    Numeric ID of the API key.
    apiKey String
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    applicationId 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.
    accountId 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.
    aiApplicationSecurityApiKeyId string
    Numeric ID of the API key.
    apiKey string
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    applicationId 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_security_api_key_id str
    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.
    accountId 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.
    aiApplicationSecurityApiKeyId String
    Numeric ID of the API key.
    apiKey String
    (Sensitive) The plaintext API key. Populated only on creation and unrecoverable afterward; empty after import.
    applicationId 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 incapsula Terraform Provider.
    Viewing docs for incapsula 3.40.0
    published on Tuesday, Sep 15, 2026 by imperva

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial