published on Friday, Nov 6, 2026 by kong
published on Friday, Nov 6, 2026 by kong
AIGatewayPolicy Resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as konnect from "@pulumi/konnect";
const myAigatewaypolicy = new konnect.AiGatewayPolicy("my_aigatewaypolicy", {
condition: "...my_condition...",
config: "{ \"see\": \"documentation\" }",
datastores: [{
name: "shared-redis",
}],
displayName: "My Cool AI PII Sanitizer Policy",
enabled: true,
expressions: {
key: JSON.stringify("value"),
},
gatewayId: "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
global: false,
labels: {
key: "value",
},
managedBy: {
key: "value",
},
name: "ai-pii-sanitizer-1234",
type: "ai-sanitizer",
});
import pulumi
import json
import pulumi_konnect as konnect
my_aigatewaypolicy = konnect.AiGatewayPolicy("my_aigatewaypolicy",
condition="...my_condition...",
config="{ \"see\": \"documentation\" }",
datastores=[{
"name": "shared-redis",
}],
display_name="My Cool AI PII Sanitizer Policy",
enabled=True,
expressions={
"key": json.dumps("value"),
},
gateway_id="5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
global_=False,
labels={
"key": "value",
},
managed_by={
"key": "value",
},
name="ai-pii-sanitizer-1234",
type="ai-sanitizer")
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/konnect/v3/konnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal("value")
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = konnect.NewAiGatewayPolicy(ctx, "my_aigatewaypolicy", &konnect.AiGatewayPolicyArgs{
Condition: pulumi.String("...my_condition..."),
Config: pulumi.String("{ \"see\": \"documentation\" }"),
Datastores: konnect.AiGatewayPolicyDatastoreArray{
&konnect.AiGatewayPolicyDatastoreArgs{
Name: pulumi.String("shared-redis"),
},
},
DisplayName: pulumi.String("My Cool AI PII Sanitizer Policy"),
Enabled: pulumi.Bool(true),
Expressions: pulumi.StringMap{
"key": pulumi.String(json0),
},
GatewayId: pulumi.String("5f9fd312-a987-4628-b4c5-bb4f4fddd5f7"),
Global: pulumi.Bool(false),
Labels: pulumi.StringMap{
"key": pulumi.String("value"),
},
ManagedBy: pulumi.StringMap{
"key": pulumi.String("value"),
},
Name: pulumi.String("ai-pii-sanitizer-1234"),
Type: pulumi.String("ai-sanitizer"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Konnect = Pulumi.Konnect;
return await Deployment.RunAsync(() =>
{
var myAigatewaypolicy = new Konnect.AiGatewayPolicy("my_aigatewaypolicy", new()
{
Condition = "...my_condition...",
Config = "{ \"see\": \"documentation\" }",
Datastores = new[]
{
new Konnect.Inputs.AiGatewayPolicyDatastoreArgs
{
Name = "shared-redis",
},
},
DisplayName = "My Cool AI PII Sanitizer Policy",
Enabled = true,
Expressions =
{
{ "key", JsonSerializer.Serialize("value") },
},
GatewayId = "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7",
Global = false,
Labels =
{
{ "key", "value" },
},
ManagedBy =
{
{ "key", "value" },
},
Name = "ai-pii-sanitizer-1234",
Type = "ai-sanitizer",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.konnect.AiGatewayPolicy;
import com.pulumi.konnect.AiGatewayPolicyArgs;
import com.pulumi.konnect.inputs.AiGatewayPolicyDatastoreArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 myAigatewaypolicy = new AiGatewayPolicy("myAigatewaypolicy", AiGatewayPolicyArgs.builder()
.condition("...my_condition...")
.config("{ \"see\": \"documentation\" }")
.datastores(AiGatewayPolicyDatastoreArgs.builder()
.name("shared-redis")
.build())
.displayName("My Cool AI PII Sanitizer Policy")
.enabled(true)
.expressions(Map.of("key", serializeJson(
"value")))
.gatewayId("5f9fd312-a987-4628-b4c5-bb4f4fddd5f7")
.global(false)
.labels(Map.of("key", "value"))
.managedBy(Map.of("key", "value"))
.name("ai-pii-sanitizer-1234")
.type("ai-sanitizer")
.build());
}
}
resources:
myAigatewaypolicy:
type: konnect:AiGatewayPolicy
name: my_aigatewaypolicy
properties:
condition: '...my_condition...'
config: '{ "see": "documentation" }'
datastores:
- name: shared-redis
displayName: My Cool AI PII Sanitizer Policy
enabled: true
expressions:
key:
fn::toJSON: value
gatewayId: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
global: false
labels:
key: value
managedBy:
key: value
name: ai-pii-sanitizer-1234
type: ai-sanitizer
Example coming soon!
Create AiGatewayPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiGatewayPolicy(name: string, args: AiGatewayPolicyArgs, opts?: CustomResourceOptions);@overload
def AiGatewayPolicy(resource_name: str,
args: AiGatewayPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiGatewayPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
config: Optional[str] = None,
display_name: Optional[str] = None,
gateway_id: Optional[str] = None,
type: Optional[str] = None,
condition: Optional[str] = None,
datastores: Optional[Sequence[AiGatewayPolicyDatastoreArgs]] = None,
enabled: Optional[bool] = None,
expressions: Optional[Mapping[str, str]] = None,
global_: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
managed_by: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)func NewAiGatewayPolicy(ctx *Context, name string, args AiGatewayPolicyArgs, opts ...ResourceOption) (*AiGatewayPolicy, error)public AiGatewayPolicy(string name, AiGatewayPolicyArgs args, CustomResourceOptions? opts = null)
public AiGatewayPolicy(String name, AiGatewayPolicyArgs args)
public AiGatewayPolicy(String name, AiGatewayPolicyArgs args, CustomResourceOptions options)
type: konnect:AiGatewayPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "konnect_ai_gateway_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiGatewayPolicyArgs
- 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 AiGatewayPolicyArgs
- 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 AiGatewayPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiGatewayPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiGatewayPolicyArgs
- 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 aiGatewayPolicyResource = new Konnect.AiGatewayPolicy("aiGatewayPolicyResource", new()
{
Config = "string",
DisplayName = "string",
GatewayId = "string",
Type = "string",
Condition = "string",
Datastores = new[]
{
new Konnect.Inputs.AiGatewayPolicyDatastoreArgs
{
Name = "string",
},
},
Enabled = false,
Expressions =
{
{ "string", "string" },
},
Global = false,
Labels =
{
{ "string", "string" },
},
ManagedBy =
{
{ "string", "string" },
},
Name = "string",
});
example, err := konnect.NewAiGatewayPolicy(ctx, "aiGatewayPolicyResource", &konnect.AiGatewayPolicyArgs{
Config: pulumi.String("string"),
DisplayName: pulumi.String("string"),
GatewayId: pulumi.String("string"),
Type: pulumi.String("string"),
Condition: pulumi.String("string"),
Datastores: konnect.AiGatewayPolicyDatastoreArray{
&konnect.AiGatewayPolicyDatastoreArgs{
Name: pulumi.String("string"),
},
},
Enabled: pulumi.Bool(false),
Expressions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Global: pulumi.Bool(false),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
ManagedBy: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
resource "konnect_ai_gateway_policy" "aiGatewayPolicyResource" {
lifecycle {
create_before_destroy = true
}
config = "string"
display_name = "string"
gateway_id = "string"
type = "string"
condition = "string"
datastores {
name = "string"
}
enabled = false
expressions = {
"string" = "string"
}
global = false
labels = {
"string" = "string"
}
managed_by = {
"string" = "string"
}
name = "string"
}
var aiGatewayPolicyResource = new AiGatewayPolicy("aiGatewayPolicyResource", AiGatewayPolicyArgs.builder()
.config("string")
.displayName("string")
.gatewayId("string")
.type("string")
.condition("string")
.datastores(AiGatewayPolicyDatastoreArgs.builder()
.name("string")
.build())
.enabled(false)
.expressions(Map.of("string", "string"))
.global(false)
.labels(Map.of("string", "string"))
.managedBy(Map.of("string", "string"))
.name("string")
.build());
ai_gateway_policy_resource = konnect.AiGatewayPolicy("aiGatewayPolicyResource",
config="string",
display_name="string",
gateway_id="string",
type="string",
condition="string",
datastores=[{
"name": "string",
}],
enabled=False,
expressions={
"string": "string",
},
global_=False,
labels={
"string": "string",
},
managed_by={
"string": "string",
},
name="string")
const aiGatewayPolicyResource = new konnect.AiGatewayPolicy("aiGatewayPolicyResource", {
config: "string",
displayName: "string",
gatewayId: "string",
type: "string",
condition: "string",
datastores: [{
name: "string",
}],
enabled: false,
expressions: {
string: "string",
},
global: false,
labels: {
string: "string",
},
managedBy: {
string: "string",
},
name: "string",
});
type: konnect:AiGatewayPolicy
properties:
condition: string
config: string
datastores:
- name: string
displayName: string
enabled: false
expressions:
string: string
gatewayId: string
global: false
labels:
string: string
managedBy:
string: string
name: string
type: string
AiGatewayPolicy 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 AiGatewayPolicy resource accepts the following input properties:
- Config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- Display
Name string - The display name for this policy instance.
- Gateway
Id string - The unique ID of the AI Gateway.
- Type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- Condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - Datastores
List<Ai
Gateway Policy Datastore> - Names of the Datastores this policy references.
- Enabled bool
- Whether the policy is enabled. Default: true
- Expressions Dictionary<string, string>
Policy config expressions
Requires a minimum runtime version of
2.3.- Global bool
- Whether the policy is globally applied to all resources. Default: false
- Labels Dictionary<string, string>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- Managed
By Dictionary<string, string> - Name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- Config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- Display
Name string - The display name for this policy instance.
- Gateway
Id string - The unique ID of the AI Gateway.
- Type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- Condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - Datastores
[]Ai
Gateway Policy Datastore Args - Names of the Datastores this policy references.
- Enabled bool
- Whether the policy is enabled. Default: true
- Expressions map[string]string
Policy config expressions
Requires a minimum runtime version of
2.3.- Global bool
- Whether the policy is globally applied to all resources. Default: false
- Labels map[string]string
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- Managed
By map[string]string - Name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- display_
name string - The display name for this policy instance.
- gateway_
id string - The unique ID of the AI Gateway.
- type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - datastores list(object)
- Names of the Datastores this policy references.
- enabled bool
- Whether the policy is enabled. Default: true
- expressions map(string)
Policy config expressions
Requires a minimum runtime version of
2.3.- global bool
- Whether the policy is globally applied to all resources. Default: false
- labels map(string)
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed_
by map(string) - name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- config String
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- display
Name String - The display name for this policy instance.
- gateway
Id String - The unique ID of the AI Gateway.
- type String
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- condition String
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - datastores
List<Ai
Gateway Policy Datastore> - Names of the Datastores this policy references.
- enabled Boolean
- Whether the policy is enabled. Default: true
- expressions Map<String,String>
Policy config expressions
Requires a minimum runtime version of
2.3.- global Boolean
- Whether the policy is globally applied to all resources. Default: false
- labels Map<String,String>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By Map<String,String> - name String
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- display
Name string - The display name for this policy instance.
- gateway
Id string - The unique ID of the AI Gateway.
- type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - datastores
Ai
Gateway Policy Datastore[] - Names of the Datastores this policy references.
- enabled boolean
- Whether the policy is enabled. Default: true
- expressions {[key: string]: string}
Policy config expressions
Requires a minimum runtime version of
2.3.- global boolean
- Whether the policy is globally applied to all resources. Default: false
- labels {[key: string]: string}
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By {[key: string]: string} - name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- config str
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- display_
name str - The display name for this policy instance.
- gateway_
id str - The unique ID of the AI Gateway.
- type str
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- condition str
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - datastores
Sequence[Ai
Gateway Policy Datastore Args] - Names of the Datastores this policy references.
- enabled bool
- Whether the policy is enabled. Default: true
- expressions Mapping[str, str]
Policy config expressions
Requires a minimum runtime version of
2.3.- global_ bool
- Whether the policy is globally applied to all resources. Default: false
- labels Mapping[str, str]
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed_
by Mapping[str, str] - name str
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- config String
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- display
Name String - The display name for this policy instance.
- gateway
Id String - The unique ID of the AI Gateway.
- type String
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- condition String
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - datastores List<Property Map>
- Names of the Datastores this policy references.
- enabled Boolean
- Whether the policy is enabled. Default: true
- expressions Map<String>
Policy config expressions
Requires a minimum runtime version of
2.3.- global Boolean
- Whether the policy is globally applied to all resources. Default: false
- labels Map<String>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By Map<String> - name String
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiGatewayPolicy resource produces the following output properties:
- created_
at string - An ISO-8601 timestamp representation of entity creation date.
- id string
- The provider-assigned unique ID for this managed resource.
- updated_
at string - An ISO-8601 timestamp representation of entity update date.
- created_
at str - An ISO-8601 timestamp representation of entity creation date.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - An ISO-8601 timestamp representation of entity update date.
Look up Existing AiGatewayPolicy Resource
Get an existing AiGatewayPolicy 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?: AiGatewayPolicyState, opts?: CustomResourceOptions): AiGatewayPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
condition: Optional[str] = None,
config: Optional[str] = None,
created_at: Optional[str] = None,
datastores: Optional[Sequence[AiGatewayPolicyDatastoreArgs]] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
expressions: Optional[Mapping[str, str]] = None,
gateway_id: Optional[str] = None,
global_: Optional[bool] = None,
labels: Optional[Mapping[str, str]] = None,
managed_by: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None) -> AiGatewayPolicyfunc GetAiGatewayPolicy(ctx *Context, name string, id IDInput, state *AiGatewayPolicyState, opts ...ResourceOption) (*AiGatewayPolicy, error)public static AiGatewayPolicy Get(string name, Input<string> id, AiGatewayPolicyState? state, CustomResourceOptions? opts = null)public static AiGatewayPolicy get(String name, Output<String> id, AiGatewayPolicyState state, CustomResourceOptions options)resources: _: type: konnect:AiGatewayPolicy get: id: ${id}import {
to = konnect_ai_gateway_policy.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.
- Condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - Config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- Created
At string - An ISO-8601 timestamp representation of entity creation date.
- Datastores
List<Ai
Gateway Policy Datastore> - Names of the Datastores this policy references.
- Display
Name string - The display name for this policy instance.
- Enabled bool
- Whether the policy is enabled. Default: true
- Expressions Dictionary<string, string>
Policy config expressions
Requires a minimum runtime version of
2.3.- Gateway
Id string - The unique ID of the AI Gateway.
- Global bool
- Whether the policy is globally applied to all resources. Default: false
- Labels Dictionary<string, string>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- Managed
By Dictionary<string, string> - Name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- Type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- Updated
At string - An ISO-8601 timestamp representation of entity update date.
- Condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - Config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- Created
At string - An ISO-8601 timestamp representation of entity creation date.
- Datastores
[]Ai
Gateway Policy Datastore Args - Names of the Datastores this policy references.
- Display
Name string - The display name for this policy instance.
- Enabled bool
- Whether the policy is enabled. Default: true
- Expressions map[string]string
Policy config expressions
Requires a minimum runtime version of
2.3.- Gateway
Id string - The unique ID of the AI Gateway.
- Global bool
- Whether the policy is globally applied to all resources. Default: false
- Labels map[string]string
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- Managed
By map[string]string - Name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- Type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- Updated
At string - An ISO-8601 timestamp representation of entity update date.
- condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- created_
at string - An ISO-8601 timestamp representation of entity creation date.
- datastores list(object)
- Names of the Datastores this policy references.
- display_
name string - The display name for this policy instance.
- enabled bool
- Whether the policy is enabled. Default: true
- expressions map(string)
Policy config expressions
Requires a minimum runtime version of
2.3.- gateway_
id string - The unique ID of the AI Gateway.
- global bool
- Whether the policy is globally applied to all resources. Default: false
- labels map(string)
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed_
by map(string) - name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- updated_
at string - An ISO-8601 timestamp representation of entity update date.
- condition String
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - config String
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- created
At String - An ISO-8601 timestamp representation of entity creation date.
- datastores
List<Ai
Gateway Policy Datastore> - Names of the Datastores this policy references.
- display
Name String - The display name for this policy instance.
- enabled Boolean
- Whether the policy is enabled. Default: true
- expressions Map<String,String>
Policy config expressions
Requires a minimum runtime version of
2.3.- gateway
Id String - The unique ID of the AI Gateway.
- global Boolean
- Whether the policy is globally applied to all resources. Default: false
- labels Map<String,String>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By Map<String,String> - name String
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- type String
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- updated
At String - An ISO-8601 timestamp representation of entity update date.
- condition string
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - config string
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- created
At string - An ISO-8601 timestamp representation of entity creation date.
- datastores
Ai
Gateway Policy Datastore[] - Names of the Datastores this policy references.
- display
Name string - The display name for this policy instance.
- enabled boolean
- Whether the policy is enabled. Default: true
- expressions {[key: string]: string}
Policy config expressions
Requires a minimum runtime version of
2.3.- gateway
Id string - The unique ID of the AI Gateway.
- global boolean
- Whether the policy is globally applied to all resources. Default: false
- labels {[key: string]: string}
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By {[key: string]: string} - name string
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- type string
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- updated
At string - An ISO-8601 timestamp representation of entity update date.
- condition str
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - config str
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- created_
at str - An ISO-8601 timestamp representation of entity creation date.
- datastores
Sequence[Ai
Gateway Policy Datastore Args] - Names of the Datastores this policy references.
- display_
name str - The display name for this policy instance.
- enabled bool
- Whether the policy is enabled. Default: true
- expressions Mapping[str, str]
Policy config expressions
Requires a minimum runtime version of
2.3.- gateway_
id str - The unique ID of the AI Gateway.
- global_ bool
- Whether the policy is globally applied to all resources. Default: false
- labels Mapping[str, str]
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed_
by Mapping[str, str] - name str
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- type str
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- updated_
at str - An ISO-8601 timestamp representation of entity update date.
- condition String
- An expression used for conditional control over plugin execution. If the expression evaluates to
trueduring the request flow, the plugin is executed; otherwise, it is skipped. - config String
- Configuration for the policy. This is equivalent to the Kong 3 plugin configuration. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs. Parsed as JSON.
- created
At String - An ISO-8601 timestamp representation of entity creation date.
- datastores List<Property Map>
- Names of the Datastores this policy references.
- display
Name String - The display name for this policy instance.
- enabled Boolean
- Whether the policy is enabled. Default: true
- expressions Map<String>
Policy config expressions
Requires a minimum runtime version of
2.3.- gateway
Id String - The unique ID of the AI Gateway.
- global Boolean
- Whether the policy is globally applied to all resources. Default: false
- labels Map<String>
Public labels store information about an entity that can be used for filtering a list of objects.
Public labels are intended to store PUBLIC metadata.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
- managed
By Map<String> - name String
- A user-defined unique identifier for this policy instance, used as a stable human-readable reference. This value is immutable after creation.
- type String
- The type of the Policy. This is equivalent to the Kong 3 plugin name. Some examples are: 'ai-sanitizer', 'ai-prompt-guard', and 'rate-limiting'. Note: Plugins have been renamed to Policies in Kong AI Gateway. Policy types and configuration documentation can be found in the Developer Docs.
- updated
At String - An ISO-8601 timestamp representation of entity update date.
Supporting Types
AiGatewayPolicyDatastore, AiGatewayPolicyDatastoreArgs
- Name string
- An immutable user-defined identifier for this resource. Not Null
- Name string
- An immutable user-defined identifier for this resource. Not Null
- name string
- An immutable user-defined identifier for this resource. Not Null
- name String
- An immutable user-defined identifier for this resource. Not Null
- name string
- An immutable user-defined identifier for this resource. Not Null
- name str
- An immutable user-defined identifier for this resource. Not Null
- name String
- An immutable user-defined identifier for this resource. Not Null
Import
In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:
terraform
import {
to = konnect_ai_gateway_policy.my_konnect_ai_gateway_policy
id = jsonencode({
gateway_id = "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7"
id = "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7"
})
}
The pulumi import command can be used, for example:
$ pulumi import konnect:index/aiGatewayPolicy:AiGatewayPolicy my_konnect_ai_gateway_policy '{"gateway_id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7", "id": "5f9fd312-a987-4628-b4c5-bb4f4fddd5f7"}'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- konnect kong/terraform-provider-konnect
- License
- Notes
- This Pulumi package is based on the
konnectTerraform Provider.
published on Friday, Nov 6, 2026 by kong