1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. AiGateway
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Accepted Permissions

    • AI Gateway Read
    • AI Gateway Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleAiGateway = new cloudflare.AiGateway("example_ai_gateway", {
        accountId: "3ebbcb006d4d46d7bb6a8c7f14676cb0",
        aiGatewayId: "my-gateway",
        cacheInvalidateOnUpdate: true,
        cacheTtl: 0,
        collectLogs: true,
        rateLimitingInterval: 0,
        rateLimitingLimit: 0,
        authentication: true,
        logManagement: 10000,
        logManagementStrategy: "STOP_INSERTING",
        logpush: true,
        logpushPublicKey: "xxxxxxxxxxxxxxxx",
        rateLimitingTechnique: "fixed",
        retryBackoff: "constant",
        retryDelay: 0,
        retryMaxAttempts: 1,
        workersAiBillingMode: "postpaid",
        zdr: true,
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_ai_gateway = cloudflare.AiGateway("example_ai_gateway",
        account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
        ai_gateway_id="my-gateway",
        cache_invalidate_on_update=True,
        cache_ttl=0,
        collect_logs=True,
        rate_limiting_interval=0,
        rate_limiting_limit=0,
        authentication=True,
        log_management=10000,
        log_management_strategy="STOP_INSERTING",
        logpush=True,
        logpush_public_key="xxxxxxxxxxxxxxxx",
        rate_limiting_technique="fixed",
        retry_backoff="constant",
        retry_delay=0,
        retry_max_attempts=1,
        workers_ai_billing_mode="postpaid",
        zdr=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewAiGateway(ctx, "example_ai_gateway", &cloudflare.AiGatewayArgs{
    			AccountId:               pulumi.String("3ebbcb006d4d46d7bb6a8c7f14676cb0"),
    			AiGatewayId:             pulumi.String("my-gateway"),
    			CacheInvalidateOnUpdate: pulumi.Bool(true),
    			CacheTtl:                pulumi.Int(0),
    			CollectLogs:             pulumi.Bool(true),
    			RateLimitingInterval:    pulumi.Int(0),
    			RateLimitingLimit:       pulumi.Int(0),
    			Authentication:          pulumi.Bool(true),
    			LogManagement:           pulumi.Int(10000),
    			LogManagementStrategy:   pulumi.String("STOP_INSERTING"),
    			Logpush:                 pulumi.Bool(true),
    			LogpushPublicKey:        pulumi.String("xxxxxxxxxxxxxxxx"),
    			RateLimitingTechnique:   pulumi.String("fixed"),
    			RetryBackoff:            pulumi.String("constant"),
    			RetryDelay:              pulumi.Int(0),
    			RetryMaxAttempts:        pulumi.Int(1),
    			WorkersAiBillingMode:    pulumi.String("postpaid"),
    			Zdr:                     pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleAiGateway = new Cloudflare.AiGateway("example_ai_gateway", new()
        {
            AccountId = "3ebbcb006d4d46d7bb6a8c7f14676cb0",
            AiGatewayId = "my-gateway",
            CacheInvalidateOnUpdate = true,
            CacheTtl = 0,
            CollectLogs = true,
            RateLimitingInterval = 0,
            RateLimitingLimit = 0,
            Authentication = true,
            LogManagement = 10000,
            LogManagementStrategy = "STOP_INSERTING",
            Logpush = true,
            LogpushPublicKey = "xxxxxxxxxxxxxxxx",
            RateLimitingTechnique = "fixed",
            RetryBackoff = "constant",
            RetryDelay = 0,
            RetryMaxAttempts = 1,
            WorkersAiBillingMode = "postpaid",
            Zdr = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.AiGateway;
    import com.pulumi.cloudflare.AiGatewayArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleAiGateway = new AiGateway("exampleAiGateway", AiGatewayArgs.builder()
                .accountId("3ebbcb006d4d46d7bb6a8c7f14676cb0")
                .aiGatewayId("my-gateway")
                .cacheInvalidateOnUpdate(true)
                .cacheTtl(0)
                .collectLogs(true)
                .rateLimitingInterval(0)
                .rateLimitingLimit(0)
                .authentication(true)
                .logManagement(10000)
                .logManagementStrategy("STOP_INSERTING")
                .logpush(true)
                .logpushPublicKey("xxxxxxxxxxxxxxxx")
                .rateLimitingTechnique("fixed")
                .retryBackoff("constant")
                .retryDelay(0)
                .retryMaxAttempts(1)
                .workersAiBillingMode("postpaid")
                .zdr(true)
                .build());
    
        }
    }
    
    resources:
      exampleAiGateway:
        type: cloudflare:AiGateway
        name: example_ai_gateway
        properties:
          accountId: 3ebbcb006d4d46d7bb6a8c7f14676cb0
          aiGatewayId: my-gateway
          cacheInvalidateOnUpdate: true
          cacheTtl: 0
          collectLogs: true
          rateLimitingInterval: 0
          rateLimitingLimit: 0
          authentication: true
          logManagement: 10000
          logManagementStrategy: STOP_INSERTING
          logpush: true
          logpushPublicKey: xxxxxxxxxxxxxxxx
          rateLimitingTechnique: fixed
          retryBackoff: constant
          retryDelay: 0
          retryMaxAttempts: 1
          workersAiBillingMode: postpaid
          zdr: true
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    resource "cloudflare_aigateway" "example_ai_gateway" {
      account_id                 = "3ebbcb006d4d46d7bb6a8c7f14676cb0"
      ai_gateway_id              = "my-gateway"
      cache_invalidate_on_update = true
      cache_ttl                  = 0
      collect_logs               = true
      rate_limiting_interval     = 0
      rate_limiting_limit        = 0
      authentication             = true
      log_management             = 10000
      log_management_strategy    = "STOP_INSERTING"
      logpush                    = true
      logpush_public_key         = "xxxxxxxxxxxxxxxx"
      rate_limiting_technique    = "fixed"
      retry_backoff              = "constant"
      retry_delay                = 0
      retry_max_attempts         = 1
      workers_ai_billing_mode    = "postpaid"
      zdr                        = true
    }
    

    Create AiGateway Resource

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

    Constructor syntax

    new AiGateway(name: string, args: AiGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def AiGateway(resource_name: str,
                  args: AiGatewayArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AiGateway(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  account_id: Optional[str] = None,
                  ai_gateway_id: Optional[str] = None,
                  rate_limiting_limit: Optional[int] = None,
                  cache_invalidate_on_update: Optional[bool] = None,
                  cache_ttl: Optional[int] = None,
                  collect_logs: Optional[bool] = None,
                  rate_limiting_interval: Optional[int] = None,
                  otels: Optional[Sequence[AiGatewayOtelArgs]] = None,
                  retry_backoff: Optional[str] = None,
                  log_management_strategy: Optional[str] = None,
                  logpush: Optional[bool] = None,
                  logpush_public_key: Optional[str] = None,
                  guardrails: Optional[AiGatewayGuardrailsArgs] = None,
                  dlp: Optional[AiGatewayDlpArgs] = None,
                  authentication: Optional[bool] = None,
                  rate_limiting_technique: Optional[str] = None,
                  log_management: Optional[int] = None,
                  retry_delay: Optional[int] = None,
                  retry_max_attempts: Optional[int] = None,
                  spend_limits: Optional[AiGatewaySpendLimitsArgs] = None,
                  store_id: Optional[str] = None,
                  stripe: Optional[AiGatewayStripeArgs] = None,
                  workers_ai_billing_mode: Optional[str] = None,
                  zdr: Optional[bool] = None)
    func NewAiGateway(ctx *Context, name string, args AiGatewayArgs, opts ...ResourceOption) (*AiGateway, error)
    public AiGateway(string name, AiGatewayArgs args, CustomResourceOptions? opts = null)
    public AiGateway(String name, AiGatewayArgs args)
    public AiGateway(String name, AiGatewayArgs args, CustomResourceOptions options)
    
    type: cloudflare:AiGateway
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "cloudflare_ai_gateway" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args AiGatewayArgs
    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 AiGatewayArgs
    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 AiGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AiGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AiGatewayArgs
    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 aiGatewayResource = new Cloudflare.AiGateway("aiGatewayResource", new()
    {
        AccountId = "string",
        AiGatewayId = "string",
        RateLimitingLimit = 0,
        CacheInvalidateOnUpdate = false,
        CacheTtl = 0,
        CollectLogs = false,
        RateLimitingInterval = 0,
        Otels = new[]
        {
            new Cloudflare.Inputs.AiGatewayOtelArgs
            {
                Headers = 
                {
                    { "string", "string" },
                },
                Url = "string",
                Authorization = "string",
                ContentType = "string",
            },
        },
        RetryBackoff = "string",
        LogManagementStrategy = "string",
        Logpush = false,
        LogpushPublicKey = "string",
        Guardrails = new Cloudflare.Inputs.AiGatewayGuardrailsArgs
        {
            Prompt = new Cloudflare.Inputs.AiGatewayGuardrailsPromptArgs
            {
                P1 = "string",
                S1 = "string",
                S10 = "string",
                S11 = "string",
                S12 = "string",
                S13 = "string",
                S2 = "string",
                S3 = "string",
                S4 = "string",
                S5 = "string",
                S6 = "string",
                S7 = "string",
                S8 = "string",
                S9 = "string",
            },
            Response = new Cloudflare.Inputs.AiGatewayGuardrailsResponseArgs
            {
                P1 = "string",
                S1 = "string",
                S10 = "string",
                S11 = "string",
                S12 = "string",
                S13 = "string",
                S2 = "string",
                S3 = "string",
                S4 = "string",
                S5 = "string",
                S6 = "string",
                S7 = "string",
                S8 = "string",
                S9 = "string",
            },
        },
        Dlp = new Cloudflare.Inputs.AiGatewayDlpArgs
        {
            Enabled = false,
            Action = "string",
            Policies = new[]
            {
                new Cloudflare.Inputs.AiGatewayDlpPolicyArgs
                {
                    Action = "string",
                    Checks = new[]
                    {
                        "string",
                    },
                    Enabled = false,
                    Id = "string",
                    Profiles = new[]
                    {
                        "string",
                    },
                },
            },
            Profiles = new[]
            {
                "string",
            },
        },
        Authentication = false,
        RateLimitingTechnique = "string",
        LogManagement = 0,
        RetryDelay = 0,
        RetryMaxAttempts = 0,
        SpendLimits = new Cloudflare.Inputs.AiGatewaySpendLimitsArgs
        {
            Enabled = false,
            Rules = new[]
            {
                new Cloudflare.Inputs.AiGatewaySpendLimitsRuleArgs
                {
                    Limit = 0,
                    LimitType = "string",
                    Window = 0,
                    AiGatewayProvider = new Cloudflare.Inputs.AiGatewaySpendLimitsRuleAiGatewayProviderArgs
                    {
                        Mode = "string",
                        Values = new[]
                        {
                            "string",
                        },
                    },
                    Enabled = false,
                    Id = "string",
                    Metadata = 
                    {
                        { "string", new Cloudflare.Inputs.AiGatewaySpendLimitsRuleMetadataArgs
                        {
                            Mode = "string",
                            Values = new[]
                            {
                                "string",
                            },
                        } },
                    },
                    Model = new Cloudflare.Inputs.AiGatewaySpendLimitsRuleModelArgs
                    {
                        Mode = "string",
                        Values = new[]
                        {
                            "string",
                        },
                    },
                    Technique = "string",
                },
            },
        },
        StoreId = "string",
        Stripe = new Cloudflare.Inputs.AiGatewayStripeArgs
        {
            Authorization = "string",
            UsageEvents = new[]
            {
                new Cloudflare.Inputs.AiGatewayStripeUsageEventArgs
                {
                    Payload = "string",
                },
            },
        },
        WorkersAiBillingMode = "string",
        Zdr = false,
    });
    
    example, err := cloudflare.NewAiGateway(ctx, "aiGatewayResource", &cloudflare.AiGatewayArgs{
    	AccountId:               pulumi.String("string"),
    	AiGatewayId:             pulumi.String("string"),
    	RateLimitingLimit:       pulumi.Int(0),
    	CacheInvalidateOnUpdate: pulumi.Bool(false),
    	CacheTtl:                pulumi.Int(0),
    	CollectLogs:             pulumi.Bool(false),
    	RateLimitingInterval:    pulumi.Int(0),
    	Otels: cloudflare.AiGatewayOtelArray{
    		&cloudflare.AiGatewayOtelArgs{
    			Headers: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Url:           pulumi.String("string"),
    			Authorization: pulumi.String("string"),
    			ContentType:   pulumi.String("string"),
    		},
    	},
    	RetryBackoff:          pulumi.String("string"),
    	LogManagementStrategy: pulumi.String("string"),
    	Logpush:               pulumi.Bool(false),
    	LogpushPublicKey:      pulumi.String("string"),
    	Guardrails: &cloudflare.AiGatewayGuardrailsArgs{
    		Prompt: &cloudflare.AiGatewayGuardrailsPromptArgs{
    			P1:  pulumi.String("string"),
    			S1:  pulumi.String("string"),
    			S10: pulumi.String("string"),
    			S11: pulumi.String("string"),
    			S12: pulumi.String("string"),
    			S13: pulumi.String("string"),
    			S2:  pulumi.String("string"),
    			S3:  pulumi.String("string"),
    			S4:  pulumi.String("string"),
    			S5:  pulumi.String("string"),
    			S6:  pulumi.String("string"),
    			S7:  pulumi.String("string"),
    			S8:  pulumi.String("string"),
    			S9:  pulumi.String("string"),
    		},
    		Response: &cloudflare.AiGatewayGuardrailsResponseArgs{
    			P1:  pulumi.String("string"),
    			S1:  pulumi.String("string"),
    			S10: pulumi.String("string"),
    			S11: pulumi.String("string"),
    			S12: pulumi.String("string"),
    			S13: pulumi.String("string"),
    			S2:  pulumi.String("string"),
    			S3:  pulumi.String("string"),
    			S4:  pulumi.String("string"),
    			S5:  pulumi.String("string"),
    			S6:  pulumi.String("string"),
    			S7:  pulumi.String("string"),
    			S8:  pulumi.String("string"),
    			S9:  pulumi.String("string"),
    		},
    	},
    	Dlp: &cloudflare.AiGatewayDlpArgs{
    		Enabled: pulumi.Bool(false),
    		Action:  pulumi.String("string"),
    		Policies: cloudflare.AiGatewayDlpPolicyArray{
    			&cloudflare.AiGatewayDlpPolicyArgs{
    				Action: pulumi.String("string"),
    				Checks: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Enabled: pulumi.Bool(false),
    				Id:      pulumi.String("string"),
    				Profiles: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		Profiles: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	Authentication:        pulumi.Bool(false),
    	RateLimitingTechnique: pulumi.String("string"),
    	LogManagement:         pulumi.Int(0),
    	RetryDelay:            pulumi.Int(0),
    	RetryMaxAttempts:      pulumi.Int(0),
    	SpendLimits: &cloudflare.AiGatewaySpendLimitsArgs{
    		Enabled: pulumi.Bool(false),
    		Rules: cloudflare.AiGatewaySpendLimitsRuleArray{
    			&cloudflare.AiGatewaySpendLimitsRuleArgs{
    				Limit:     pulumi.Float64(0),
    				LimitType: pulumi.String("string"),
    				Window:    pulumi.Int(0),
    				AiGatewayProvider: &cloudflare.AiGatewaySpendLimitsRuleAiGatewayProviderArgs{
    					Mode: pulumi.String("string"),
    					Values: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				Enabled: pulumi.Bool(false),
    				Id:      pulumi.String("string"),
    				Metadata: cloudflare.AiGatewaySpendLimitsRuleMetadataMap{
    					"string": &cloudflare.AiGatewaySpendLimitsRuleMetadataArgs{
    						Mode: pulumi.String("string"),
    						Values: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    				},
    				Model: &cloudflare.AiGatewaySpendLimitsRuleModelArgs{
    					Mode: pulumi.String("string"),
    					Values: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    				Technique: pulumi.String("string"),
    			},
    		},
    	},
    	StoreId: pulumi.String("string"),
    	Stripe: &cloudflare.AiGatewayStripeArgs{
    		Authorization: pulumi.String("string"),
    		UsageEvents: cloudflare.AiGatewayStripeUsageEventArray{
    			&cloudflare.AiGatewayStripeUsageEventArgs{
    				Payload: pulumi.String("string"),
    			},
    		},
    	},
    	WorkersAiBillingMode: pulumi.String("string"),
    	Zdr:                  pulumi.Bool(false),
    })
    
    resource "cloudflare_ai_gateway" "aiGatewayResource" {
      lifecycle {
        create_before_destroy = true
      }
      account_id                 = "string"
      ai_gateway_id              = "string"
      rate_limiting_limit        = 0
      cache_invalidate_on_update = false
      cache_ttl                  = 0
      collect_logs               = false
      rate_limiting_interval     = 0
      otels {
        headers = {
          "string" = "string"
        }
        url           = "string"
        authorization = "string"
        content_type  = "string"
      }
      retry_backoff           = "string"
      log_management_strategy = "string"
      logpush                 = false
      logpush_public_key      = "string"
      guardrails = {
        prompt = {
          p1  = "string"
          s1  = "string"
          s10 = "string"
          s11 = "string"
          s12 = "string"
          s13 = "string"
          s2  = "string"
          s3  = "string"
          s4  = "string"
          s5  = "string"
          s6  = "string"
          s7  = "string"
          s8  = "string"
          s9  = "string"
        }
        response = {
          p1  = "string"
          s1  = "string"
          s10 = "string"
          s11 = "string"
          s12 = "string"
          s13 = "string"
          s2  = "string"
          s3  = "string"
          s4  = "string"
          s5  = "string"
          s6  = "string"
          s7  = "string"
          s8  = "string"
          s9  = "string"
        }
      }
      dlp = {
        enabled = false
        action  = "string"
        policies = [{
          action   = "string"
          checks   = ["string"]
          enabled  = false
          id       = "string"
          profiles = ["string"]
        }]
        profiles = ["string"]
      }
      authentication          = false
      rate_limiting_technique = "string"
      log_management          = 0
      retry_delay             = 0
      retry_max_attempts      = 0
      spend_limits = {
        enabled = false
        rules = [{
          limit      = 0
          limit_type = "string"
          window     = 0
          ai_gateway_provider = {
            mode   = "string"
            values = ["string"]
          }
          enabled = false
          id      = "string"
          metadata = {
            "string" = {
              mode   = "string"
              values = ["string"]
            }
          }
          model = {
            mode   = "string"
            values = ["string"]
          }
          technique = "string"
        }]
      }
      store_id = "string"
      stripe = {
        authorization = "string"
        usage_events = [{
          payload = "string"
        }]
      }
      workers_ai_billing_mode = "string"
      zdr                     = false
    }
    
    var aiGatewayResource = new AiGateway("aiGatewayResource", AiGatewayArgs.builder()
        .accountId("string")
        .aiGatewayId("string")
        .rateLimitingLimit(0)
        .cacheInvalidateOnUpdate(false)
        .cacheTtl(0)
        .collectLogs(false)
        .rateLimitingInterval(0)
        .otels(AiGatewayOtelArgs.builder()
            .headers(Map.of("string", "string"))
            .url("string")
            .authorization("string")
            .contentType("string")
            .build())
        .retryBackoff("string")
        .logManagementStrategy("string")
        .logpush(false)
        .logpushPublicKey("string")
        .guardrails(AiGatewayGuardrailsArgs.builder()
            .prompt(AiGatewayGuardrailsPromptArgs.builder()
                .p1("string")
                .s1("string")
                .s10("string")
                .s11("string")
                .s12("string")
                .s13("string")
                .s2("string")
                .s3("string")
                .s4("string")
                .s5("string")
                .s6("string")
                .s7("string")
                .s8("string")
                .s9("string")
                .build())
            .response(AiGatewayGuardrailsResponseArgs.builder()
                .p1("string")
                .s1("string")
                .s10("string")
                .s11("string")
                .s12("string")
                .s13("string")
                .s2("string")
                .s3("string")
                .s4("string")
                .s5("string")
                .s6("string")
                .s7("string")
                .s8("string")
                .s9("string")
                .build())
            .build())
        .dlp(AiGatewayDlpArgs.builder()
            .enabled(false)
            .action("string")
            .policies(AiGatewayDlpPolicyArgs.builder()
                .action("string")
                .checks("string")
                .enabled(false)
                .id("string")
                .profiles("string")
                .build())
            .profiles("string")
            .build())
        .authentication(false)
        .rateLimitingTechnique("string")
        .logManagement(0)
        .retryDelay(0)
        .retryMaxAttempts(0)
        .spendLimits(AiGatewaySpendLimitsArgs.builder()
            .enabled(false)
            .rules(AiGatewaySpendLimitsRuleArgs.builder()
                .limit(0.0)
                .limitType("string")
                .window(0)
                .aiGatewayProvider(AiGatewaySpendLimitsRuleAiGatewayProviderArgs.builder()
                    .mode("string")
                    .values("string")
                    .build())
                .enabled(false)
                .id("string")
                .metadata(Map.of("string", AiGatewaySpendLimitsRuleMetadataArgs.builder()
                    .mode("string")
                    .values("string")
                    .build()))
                .model(AiGatewaySpendLimitsRuleModelArgs.builder()
                    .mode("string")
                    .values("string")
                    .build())
                .technique("string")
                .build())
            .build())
        .storeId("string")
        .stripe(AiGatewayStripeArgs.builder()
            .authorization("string")
            .usageEvents(AiGatewayStripeUsageEventArgs.builder()
                .payload("string")
                .build())
            .build())
        .workersAiBillingMode("string")
        .zdr(false)
        .build());
    
    ai_gateway_resource = cloudflare.AiGateway("aiGatewayResource",
        account_id="string",
        ai_gateway_id="string",
        rate_limiting_limit=0,
        cache_invalidate_on_update=False,
        cache_ttl=0,
        collect_logs=False,
        rate_limiting_interval=0,
        otels=[{
            "headers": {
                "string": "string",
            },
            "url": "string",
            "authorization": "string",
            "content_type": "string",
        }],
        retry_backoff="string",
        log_management_strategy="string",
        logpush=False,
        logpush_public_key="string",
        guardrails={
            "prompt": {
                "p1": "string",
                "s1": "string",
                "s10": "string",
                "s11": "string",
                "s12": "string",
                "s13": "string",
                "s2": "string",
                "s3": "string",
                "s4": "string",
                "s5": "string",
                "s6": "string",
                "s7": "string",
                "s8": "string",
                "s9": "string",
            },
            "response": {
                "p1": "string",
                "s1": "string",
                "s10": "string",
                "s11": "string",
                "s12": "string",
                "s13": "string",
                "s2": "string",
                "s3": "string",
                "s4": "string",
                "s5": "string",
                "s6": "string",
                "s7": "string",
                "s8": "string",
                "s9": "string",
            },
        },
        dlp={
            "enabled": False,
            "action": "string",
            "policies": [{
                "action": "string",
                "checks": ["string"],
                "enabled": False,
                "id": "string",
                "profiles": ["string"],
            }],
            "profiles": ["string"],
        },
        authentication=False,
        rate_limiting_technique="string",
        log_management=0,
        retry_delay=0,
        retry_max_attempts=0,
        spend_limits={
            "enabled": False,
            "rules": [{
                "limit": float(0),
                "limit_type": "string",
                "window": 0,
                "ai_gateway_provider": {
                    "mode": "string",
                    "values": ["string"],
                },
                "enabled": False,
                "id": "string",
                "metadata": {
                    "string": {
                        "mode": "string",
                        "values": ["string"],
                    },
                },
                "model": {
                    "mode": "string",
                    "values": ["string"],
                },
                "technique": "string",
            }],
        },
        store_id="string",
        stripe={
            "authorization": "string",
            "usage_events": [{
                "payload": "string",
            }],
        },
        workers_ai_billing_mode="string",
        zdr=False)
    
    const aiGatewayResource = new cloudflare.AiGateway("aiGatewayResource", {
        accountId: "string",
        aiGatewayId: "string",
        rateLimitingLimit: 0,
        cacheInvalidateOnUpdate: false,
        cacheTtl: 0,
        collectLogs: false,
        rateLimitingInterval: 0,
        otels: [{
            headers: {
                string: "string",
            },
            url: "string",
            authorization: "string",
            contentType: "string",
        }],
        retryBackoff: "string",
        logManagementStrategy: "string",
        logpush: false,
        logpushPublicKey: "string",
        guardrails: {
            prompt: {
                p1: "string",
                s1: "string",
                s10: "string",
                s11: "string",
                s12: "string",
                s13: "string",
                s2: "string",
                s3: "string",
                s4: "string",
                s5: "string",
                s6: "string",
                s7: "string",
                s8: "string",
                s9: "string",
            },
            response: {
                p1: "string",
                s1: "string",
                s10: "string",
                s11: "string",
                s12: "string",
                s13: "string",
                s2: "string",
                s3: "string",
                s4: "string",
                s5: "string",
                s6: "string",
                s7: "string",
                s8: "string",
                s9: "string",
            },
        },
        dlp: {
            enabled: false,
            action: "string",
            policies: [{
                action: "string",
                checks: ["string"],
                enabled: false,
                id: "string",
                profiles: ["string"],
            }],
            profiles: ["string"],
        },
        authentication: false,
        rateLimitingTechnique: "string",
        logManagement: 0,
        retryDelay: 0,
        retryMaxAttempts: 0,
        spendLimits: {
            enabled: false,
            rules: [{
                limit: 0,
                limitType: "string",
                window: 0,
                aiGatewayProvider: {
                    mode: "string",
                    values: ["string"],
                },
                enabled: false,
                id: "string",
                metadata: {
                    string: {
                        mode: "string",
                        values: ["string"],
                    },
                },
                model: {
                    mode: "string",
                    values: ["string"],
                },
                technique: "string",
            }],
        },
        storeId: "string",
        stripe: {
            authorization: "string",
            usageEvents: [{
                payload: "string",
            }],
        },
        workersAiBillingMode: "string",
        zdr: false,
    });
    
    type: cloudflare:AiGateway
    properties:
        accountId: string
        aiGatewayId: string
        authentication: false
        cacheInvalidateOnUpdate: false
        cacheTtl: 0
        collectLogs: false
        dlp:
            action: string
            enabled: false
            policies:
                - action: string
                  checks:
                    - string
                  enabled: false
                  id: string
                  profiles:
                    - string
            profiles:
                - string
        guardrails:
            prompt:
                p1: string
                s1: string
                s2: string
                s3: string
                s4: string
                s5: string
                s6: string
                s7: string
                s8: string
                s9: string
                s10: string
                s11: string
                s12: string
                s13: string
            response:
                p1: string
                s1: string
                s2: string
                s3: string
                s4: string
                s5: string
                s6: string
                s7: string
                s8: string
                s9: string
                s10: string
                s11: string
                s12: string
                s13: string
        logManagement: 0
        logManagementStrategy: string
        logpush: false
        logpushPublicKey: string
        otels:
            - authorization: string
              contentType: string
              headers:
                string: string
              url: string
        rateLimitingInterval: 0
        rateLimitingLimit: 0
        rateLimitingTechnique: string
        retryBackoff: string
        retryDelay: 0
        retryMaxAttempts: 0
        spendLimits:
            enabled: false
            rules:
                - aiGatewayProvider:
                    mode: string
                    values:
                        - string
                  enabled: false
                  id: string
                  limit: 0
                  limitType: string
                  metadata:
                    string:
                        mode: string
                        values:
                            - string
                  model:
                    mode: string
                    values:
                        - string
                  technique: string
                  window: 0
        storeId: string
        stripe:
            authorization: string
            usageEvents:
                - payload: string
        workersAiBillingMode: string
        zdr: false
    

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

    AccountId string
    AiGatewayId string
    gateway id
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    RateLimitingInterval int
    RateLimitingLimit int
    Authentication bool
    Dlp AiGatewayDlp
    Guardrails AiGatewayGuardrails
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    Otels List<AiGatewayOtel>
    RateLimitingTechnique string
    Available values: "fixed", "sliding".
    RetryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    RetryDelay int
    Delay between retry attempts in milliseconds (0-5000)
    RetryMaxAttempts int
    Maximum number of retry attempts for failed requests (1-5)
    SpendLimits AiGatewaySpendLimits
    StoreId string
    Stripe AiGatewayStripe
    WorkersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    Zdr bool
    AccountId string
    AiGatewayId string
    gateway id
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    RateLimitingInterval int
    RateLimitingLimit int
    Authentication bool
    Dlp AiGatewayDlpArgs
    Guardrails AiGatewayGuardrailsArgs
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    Otels []AiGatewayOtelArgs
    RateLimitingTechnique string
    Available values: "fixed", "sliding".
    RetryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    RetryDelay int
    Delay between retry attempts in milliseconds (0-5000)
    RetryMaxAttempts int
    Maximum number of retry attempts for failed requests (1-5)
    SpendLimits AiGatewaySpendLimitsArgs
    StoreId string
    Stripe AiGatewayStripeArgs
    WorkersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    Zdr bool
    account_id string
    ai_gateway_id string
    gateway id
    cache_invalidate_on_update bool
    cache_ttl number
    collect_logs bool
    rate_limiting_interval number
    rate_limiting_limit number
    authentication bool
    dlp object
    guardrails object
    log_management number
    log_management_strategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush bool
    logpush_public_key string
    otels list(object)
    rate_limiting_technique string
    Available values: "fixed", "sliding".
    retry_backoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retry_delay number
    Delay between retry attempts in milliseconds (0-5000)
    retry_max_attempts number
    Maximum number of retry attempts for failed requests (1-5)
    spend_limits object
    store_id string
    stripe object
    workers_ai_billing_mode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr bool
    accountId String
    aiGatewayId String
    gateway id
    cacheInvalidateOnUpdate Boolean
    cacheTtl Integer
    collectLogs Boolean
    rateLimitingInterval Integer
    rateLimitingLimit Integer
    authentication Boolean
    dlp AiGatewayDlp
    guardrails AiGatewayGuardrails
    logManagement Integer
    logManagementStrategy String
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush Boolean
    logpushPublicKey String
    otels List<AiGatewayOtel>
    rateLimitingTechnique String
    Available values: "fixed", "sliding".
    retryBackoff String
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay Integer
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts Integer
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits AiGatewaySpendLimits
    storeId String
    stripe AiGatewayStripe
    workersAiBillingMode String
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr Boolean
    accountId string
    aiGatewayId string
    gateway id
    cacheInvalidateOnUpdate boolean
    cacheTtl number
    collectLogs boolean
    rateLimitingInterval number
    rateLimitingLimit number
    authentication boolean
    dlp AiGatewayDlp
    guardrails AiGatewayGuardrails
    logManagement number
    logManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush boolean
    logpushPublicKey string
    otels AiGatewayOtel[]
    rateLimitingTechnique string
    Available values: "fixed", "sliding".
    retryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay number
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts number
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits AiGatewaySpendLimits
    storeId string
    stripe AiGatewayStripe
    workersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr boolean
    account_id str
    ai_gateway_id str
    gateway id
    cache_invalidate_on_update bool
    cache_ttl int
    collect_logs bool
    rate_limiting_interval int
    rate_limiting_limit int
    authentication bool
    dlp AiGatewayDlpArgs
    guardrails AiGatewayGuardrailsArgs
    log_management int
    log_management_strategy str
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush bool
    logpush_public_key str
    otels Sequence[AiGatewayOtelArgs]
    rate_limiting_technique str
    Available values: "fixed", "sliding".
    retry_backoff str
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retry_delay int
    Delay between retry attempts in milliseconds (0-5000)
    retry_max_attempts int
    Maximum number of retry attempts for failed requests (1-5)
    spend_limits AiGatewaySpendLimitsArgs
    store_id str
    stripe AiGatewayStripeArgs
    workers_ai_billing_mode str
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr bool
    accountId String
    aiGatewayId String
    gateway id
    cacheInvalidateOnUpdate Boolean
    cacheTtl Number
    collectLogs Boolean
    rateLimitingInterval Number
    rateLimitingLimit Number
    authentication Boolean
    dlp Property Map
    guardrails Property Map
    logManagement Number
    logManagementStrategy String
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush Boolean
    logpushPublicKey String
    otels List<Property Map>
    rateLimitingTechnique String
    Available values: "fixed", "sliding".
    retryBackoff String
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay Number
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts Number
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits Property Map
    storeId String
    stripe Property Map
    workersAiBillingMode String
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr Boolean

    Outputs

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

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    ModifiedAt string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    ModifiedAt string
    created_at string
    id string
    The provider-assigned unique ID for this managed resource.
    is_default bool
    modified_at string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    modifiedAt String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    modifiedAt string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    modified_at str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    modifiedAt String

    Look up Existing AiGateway Resource

    Get an existing AiGateway 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?: AiGatewayState, opts?: CustomResourceOptions): AiGateway
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            ai_gateway_id: Optional[str] = None,
            authentication: Optional[bool] = None,
            cache_invalidate_on_update: Optional[bool] = None,
            cache_ttl: Optional[int] = None,
            collect_logs: Optional[bool] = None,
            created_at: Optional[str] = None,
            dlp: Optional[AiGatewayDlpArgs] = None,
            guardrails: Optional[AiGatewayGuardrailsArgs] = None,
            is_default: Optional[bool] = None,
            log_management: Optional[int] = None,
            log_management_strategy: Optional[str] = None,
            logpush: Optional[bool] = None,
            logpush_public_key: Optional[str] = None,
            modified_at: Optional[str] = None,
            otels: Optional[Sequence[AiGatewayOtelArgs]] = None,
            rate_limiting_interval: Optional[int] = None,
            rate_limiting_limit: Optional[int] = None,
            rate_limiting_technique: Optional[str] = None,
            retry_backoff: Optional[str] = None,
            retry_delay: Optional[int] = None,
            retry_max_attempts: Optional[int] = None,
            spend_limits: Optional[AiGatewaySpendLimitsArgs] = None,
            store_id: Optional[str] = None,
            stripe: Optional[AiGatewayStripeArgs] = None,
            workers_ai_billing_mode: Optional[str] = None,
            zdr: Optional[bool] = None) -> AiGateway
    func GetAiGateway(ctx *Context, name string, id IDInput, state *AiGatewayState, opts ...ResourceOption) (*AiGateway, error)
    public static AiGateway Get(string name, Input<string> id, AiGatewayState? state, CustomResourceOptions? opts = null)
    public static AiGateway get(String name, Output<String> id, AiGatewayState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:AiGateway    get:      id: ${id}
    import {
      to = cloudflare_ai_gateway.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 string
    AiGatewayId string
    gateway id
    Authentication bool
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    CreatedAt string
    Dlp AiGatewayDlp
    Guardrails AiGatewayGuardrails
    IsDefault bool
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    ModifiedAt string
    Otels List<AiGatewayOtel>
    RateLimitingInterval int
    RateLimitingLimit int
    RateLimitingTechnique string
    Available values: "fixed", "sliding".
    RetryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    RetryDelay int
    Delay between retry attempts in milliseconds (0-5000)
    RetryMaxAttempts int
    Maximum number of retry attempts for failed requests (1-5)
    SpendLimits AiGatewaySpendLimits
    StoreId string
    Stripe AiGatewayStripe
    WorkersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    Zdr bool
    AccountId string
    AiGatewayId string
    gateway id
    Authentication bool
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    CreatedAt string
    Dlp AiGatewayDlpArgs
    Guardrails AiGatewayGuardrailsArgs
    IsDefault bool
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    ModifiedAt string
    Otels []AiGatewayOtelArgs
    RateLimitingInterval int
    RateLimitingLimit int
    RateLimitingTechnique string
    Available values: "fixed", "sliding".
    RetryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    RetryDelay int
    Delay between retry attempts in milliseconds (0-5000)
    RetryMaxAttempts int
    Maximum number of retry attempts for failed requests (1-5)
    SpendLimits AiGatewaySpendLimitsArgs
    StoreId string
    Stripe AiGatewayStripeArgs
    WorkersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    Zdr bool
    account_id string
    ai_gateway_id string
    gateway id
    authentication bool
    cache_invalidate_on_update bool
    cache_ttl number
    collect_logs bool
    created_at string
    dlp object
    guardrails object
    is_default bool
    log_management number
    log_management_strategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush bool
    logpush_public_key string
    modified_at string
    otels list(object)
    rate_limiting_interval number
    rate_limiting_limit number
    rate_limiting_technique string
    Available values: "fixed", "sliding".
    retry_backoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retry_delay number
    Delay between retry attempts in milliseconds (0-5000)
    retry_max_attempts number
    Maximum number of retry attempts for failed requests (1-5)
    spend_limits object
    store_id string
    stripe object
    workers_ai_billing_mode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr bool
    accountId String
    aiGatewayId String
    gateway id
    authentication Boolean
    cacheInvalidateOnUpdate Boolean
    cacheTtl Integer
    collectLogs Boolean
    createdAt String
    dlp AiGatewayDlp
    guardrails AiGatewayGuardrails
    isDefault Boolean
    logManagement Integer
    logManagementStrategy String
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush Boolean
    logpushPublicKey String
    modifiedAt String
    otels List<AiGatewayOtel>
    rateLimitingInterval Integer
    rateLimitingLimit Integer
    rateLimitingTechnique String
    Available values: "fixed", "sliding".
    retryBackoff String
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay Integer
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts Integer
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits AiGatewaySpendLimits
    storeId String
    stripe AiGatewayStripe
    workersAiBillingMode String
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr Boolean
    accountId string
    aiGatewayId string
    gateway id
    authentication boolean
    cacheInvalidateOnUpdate boolean
    cacheTtl number
    collectLogs boolean
    createdAt string
    dlp AiGatewayDlp
    guardrails AiGatewayGuardrails
    isDefault boolean
    logManagement number
    logManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush boolean
    logpushPublicKey string
    modifiedAt string
    otels AiGatewayOtel[]
    rateLimitingInterval number
    rateLimitingLimit number
    rateLimitingTechnique string
    Available values: "fixed", "sliding".
    retryBackoff string
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay number
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts number
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits AiGatewaySpendLimits
    storeId string
    stripe AiGatewayStripe
    workersAiBillingMode string
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr boolean
    account_id str
    ai_gateway_id str
    gateway id
    authentication bool
    cache_invalidate_on_update bool
    cache_ttl int
    collect_logs bool
    created_at str
    dlp AiGatewayDlpArgs
    guardrails AiGatewayGuardrailsArgs
    is_default bool
    log_management int
    log_management_strategy str
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush bool
    logpush_public_key str
    modified_at str
    otels Sequence[AiGatewayOtelArgs]
    rate_limiting_interval int
    rate_limiting_limit int
    rate_limiting_technique str
    Available values: "fixed", "sliding".
    retry_backoff str
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retry_delay int
    Delay between retry attempts in milliseconds (0-5000)
    retry_max_attempts int
    Maximum number of retry attempts for failed requests (1-5)
    spend_limits AiGatewaySpendLimitsArgs
    store_id str
    stripe AiGatewayStripeArgs
    workers_ai_billing_mode str
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr bool
    accountId String
    aiGatewayId String
    gateway id
    authentication Boolean
    cacheInvalidateOnUpdate Boolean
    cacheTtl Number
    collectLogs Boolean
    createdAt String
    dlp Property Map
    guardrails Property Map
    isDefault Boolean
    logManagement Number
    logManagementStrategy String
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush Boolean
    logpushPublicKey String
    modifiedAt String
    otels List<Property Map>
    rateLimitingInterval Number
    rateLimitingLimit Number
    rateLimitingTechnique String
    Available values: "fixed", "sliding".
    retryBackoff String
    Backoff strategy for retry delays Available values: "constant", "linear", "exponential".
    retryDelay Number
    Delay between retry attempts in milliseconds (0-5000)
    retryMaxAttempts Number
    Maximum number of retry attempts for failed requests (1-5)
    spendLimits Property Map
    storeId String
    stripe Property Map
    workersAiBillingMode String
    Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. Available values: "postpaid".
    zdr Boolean

    Supporting Types

    AiGatewayDlp, AiGatewayDlpArgs

    Enabled bool
    Action string
    Available values: "BLOCK", "FLAG".
    Policies List<AiGatewayDlpPolicy>
    Profiles List<string>
    Enabled bool
    Action string
    Available values: "BLOCK", "FLAG".
    Policies []AiGatewayDlpPolicy
    Profiles []string
    enabled bool
    action string
    Available values: "BLOCK", "FLAG".
    policies list(object)
    profiles list(string)
    enabled Boolean
    action String
    Available values: "BLOCK", "FLAG".
    policies List<AiGatewayDlpPolicy>
    profiles List<String>
    enabled boolean
    action string
    Available values: "BLOCK", "FLAG".
    policies AiGatewayDlpPolicy[]
    profiles string[]
    enabled bool
    action str
    Available values: "BLOCK", "FLAG".
    policies Sequence[AiGatewayDlpPolicy]
    profiles Sequence[str]
    enabled Boolean
    action String
    Available values: "BLOCK", "FLAG".
    policies List<Property Map>
    profiles List<String>

    AiGatewayDlpPolicy, AiGatewayDlpPolicyArgs

    Action string
    Available values: "FLAG", "BLOCK".
    Checks List<string>
    Enabled bool
    Id string
    Profiles List<string>
    Action string
    Available values: "FLAG", "BLOCK".
    Checks []string
    Enabled bool
    Id string
    Profiles []string
    action string
    Available values: "FLAG", "BLOCK".
    checks list(string)
    enabled bool
    id string
    profiles list(string)
    action String
    Available values: "FLAG", "BLOCK".
    checks List<String>
    enabled Boolean
    id String
    profiles List<String>
    action string
    Available values: "FLAG", "BLOCK".
    checks string[]
    enabled boolean
    id string
    profiles string[]
    action str
    Available values: "FLAG", "BLOCK".
    checks Sequence[str]
    enabled bool
    id str
    profiles Sequence[str]
    action String
    Available values: "FLAG", "BLOCK".
    checks List<String>
    enabled Boolean
    id String
    profiles List<String>

    AiGatewayGuardrails, AiGatewayGuardrailsArgs

    AiGatewayGuardrailsPrompt, AiGatewayGuardrailsPromptArgs

    P1 string
    Available values: "FLAG", "BLOCK".
    S1 string
    Available values: "FLAG", "BLOCK".
    S10 string
    Available values: "FLAG", "BLOCK".
    S11 string
    Available values: "FLAG", "BLOCK".
    S12 string
    Available values: "FLAG", "BLOCK".
    S13 string
    Available values: "FLAG", "BLOCK".
    S2 string
    Available values: "FLAG", "BLOCK".
    S3 string
    Available values: "FLAG", "BLOCK".
    S4 string
    Available values: "FLAG", "BLOCK".
    S5 string
    Available values: "FLAG", "BLOCK".
    S6 string
    Available values: "FLAG", "BLOCK".
    S7 string
    Available values: "FLAG", "BLOCK".
    S8 string
    Available values: "FLAG", "BLOCK".
    S9 string
    Available values: "FLAG", "BLOCK".
    P1 string
    Available values: "FLAG", "BLOCK".
    S1 string
    Available values: "FLAG", "BLOCK".
    S10 string
    Available values: "FLAG", "BLOCK".
    S11 string
    Available values: "FLAG", "BLOCK".
    S12 string
    Available values: "FLAG", "BLOCK".
    S13 string
    Available values: "FLAG", "BLOCK".
    S2 string
    Available values: "FLAG", "BLOCK".
    S3 string
    Available values: "FLAG", "BLOCK".
    S4 string
    Available values: "FLAG", "BLOCK".
    S5 string
    Available values: "FLAG", "BLOCK".
    S6 string
    Available values: "FLAG", "BLOCK".
    S7 string
    Available values: "FLAG", "BLOCK".
    S8 string
    Available values: "FLAG", "BLOCK".
    S9 string
    Available values: "FLAG", "BLOCK".
    p1 string
    Available values: "FLAG", "BLOCK".
    s1 string
    Available values: "FLAG", "BLOCK".
    s10 string
    Available values: "FLAG", "BLOCK".
    s11 string
    Available values: "FLAG", "BLOCK".
    s12 string
    Available values: "FLAG", "BLOCK".
    s13 string
    Available values: "FLAG", "BLOCK".
    s2 string
    Available values: "FLAG", "BLOCK".
    s3 string
    Available values: "FLAG", "BLOCK".
    s4 string
    Available values: "FLAG", "BLOCK".
    s5 string
    Available values: "FLAG", "BLOCK".
    s6 string
    Available values: "FLAG", "BLOCK".
    s7 string
    Available values: "FLAG", "BLOCK".
    s8 string
    Available values: "FLAG", "BLOCK".
    s9 string
    Available values: "FLAG", "BLOCK".
    p1 String
    Available values: "FLAG", "BLOCK".
    s1 String
    Available values: "FLAG", "BLOCK".
    s10 String
    Available values: "FLAG", "BLOCK".
    s11 String
    Available values: "FLAG", "BLOCK".
    s12 String
    Available values: "FLAG", "BLOCK".
    s13 String
    Available values: "FLAG", "BLOCK".
    s2 String
    Available values: "FLAG", "BLOCK".
    s3 String
    Available values: "FLAG", "BLOCK".
    s4 String
    Available values: "FLAG", "BLOCK".
    s5 String
    Available values: "FLAG", "BLOCK".
    s6 String
    Available values: "FLAG", "BLOCK".
    s7 String
    Available values: "FLAG", "BLOCK".
    s8 String
    Available values: "FLAG", "BLOCK".
    s9 String
    Available values: "FLAG", "BLOCK".
    p1 string
    Available values: "FLAG", "BLOCK".
    s1 string
    Available values: "FLAG", "BLOCK".
    s10 string
    Available values: "FLAG", "BLOCK".
    s11 string
    Available values: "FLAG", "BLOCK".
    s12 string
    Available values: "FLAG", "BLOCK".
    s13 string
    Available values: "FLAG", "BLOCK".
    s2 string
    Available values: "FLAG", "BLOCK".
    s3 string
    Available values: "FLAG", "BLOCK".
    s4 string
    Available values: "FLAG", "BLOCK".
    s5 string
    Available values: "FLAG", "BLOCK".
    s6 string
    Available values: "FLAG", "BLOCK".
    s7 string
    Available values: "FLAG", "BLOCK".
    s8 string
    Available values: "FLAG", "BLOCK".
    s9 string
    Available values: "FLAG", "BLOCK".
    p1 str
    Available values: "FLAG", "BLOCK".
    s1 str
    Available values: "FLAG", "BLOCK".
    s10 str
    Available values: "FLAG", "BLOCK".
    s11 str
    Available values: "FLAG", "BLOCK".
    s12 str
    Available values: "FLAG", "BLOCK".
    s13 str
    Available values: "FLAG", "BLOCK".
    s2 str
    Available values: "FLAG", "BLOCK".
    s3 str
    Available values: "FLAG", "BLOCK".
    s4 str
    Available values: "FLAG", "BLOCK".
    s5 str
    Available values: "FLAG", "BLOCK".
    s6 str
    Available values: "FLAG", "BLOCK".
    s7 str
    Available values: "FLAG", "BLOCK".
    s8 str
    Available values: "FLAG", "BLOCK".
    s9 str
    Available values: "FLAG", "BLOCK".
    p1 String
    Available values: "FLAG", "BLOCK".
    s1 String
    Available values: "FLAG", "BLOCK".
    s10 String
    Available values: "FLAG", "BLOCK".
    s11 String
    Available values: "FLAG", "BLOCK".
    s12 String
    Available values: "FLAG", "BLOCK".
    s13 String
    Available values: "FLAG", "BLOCK".
    s2 String
    Available values: "FLAG", "BLOCK".
    s3 String
    Available values: "FLAG", "BLOCK".
    s4 String
    Available values: "FLAG", "BLOCK".
    s5 String
    Available values: "FLAG", "BLOCK".
    s6 String
    Available values: "FLAG", "BLOCK".
    s7 String
    Available values: "FLAG", "BLOCK".
    s8 String
    Available values: "FLAG", "BLOCK".
    s9 String
    Available values: "FLAG", "BLOCK".

    AiGatewayGuardrailsResponse, AiGatewayGuardrailsResponseArgs

    P1 string
    Available values: "FLAG", "BLOCK".
    S1 string
    Available values: "FLAG", "BLOCK".
    S10 string
    Available values: "FLAG", "BLOCK".
    S11 string
    Available values: "FLAG", "BLOCK".
    S12 string
    Available values: "FLAG", "BLOCK".
    S13 string
    Available values: "FLAG", "BLOCK".
    S2 string
    Available values: "FLAG", "BLOCK".
    S3 string
    Available values: "FLAG", "BLOCK".
    S4 string
    Available values: "FLAG", "BLOCK".
    S5 string
    Available values: "FLAG", "BLOCK".
    S6 string
    Available values: "FLAG", "BLOCK".
    S7 string
    Available values: "FLAG", "BLOCK".
    S8 string
    Available values: "FLAG", "BLOCK".
    S9 string
    Available values: "FLAG", "BLOCK".
    P1 string
    Available values: "FLAG", "BLOCK".
    S1 string
    Available values: "FLAG", "BLOCK".
    S10 string
    Available values: "FLAG", "BLOCK".
    S11 string
    Available values: "FLAG", "BLOCK".
    S12 string
    Available values: "FLAG", "BLOCK".
    S13 string
    Available values: "FLAG", "BLOCK".
    S2 string
    Available values: "FLAG", "BLOCK".
    S3 string
    Available values: "FLAG", "BLOCK".
    S4 string
    Available values: "FLAG", "BLOCK".
    S5 string
    Available values: "FLAG", "BLOCK".
    S6 string
    Available values: "FLAG", "BLOCK".
    S7 string
    Available values: "FLAG", "BLOCK".
    S8 string
    Available values: "FLAG", "BLOCK".
    S9 string
    Available values: "FLAG", "BLOCK".
    p1 string
    Available values: "FLAG", "BLOCK".
    s1 string
    Available values: "FLAG", "BLOCK".
    s10 string
    Available values: "FLAG", "BLOCK".
    s11 string
    Available values: "FLAG", "BLOCK".
    s12 string
    Available values: "FLAG", "BLOCK".
    s13 string
    Available values: "FLAG", "BLOCK".
    s2 string
    Available values: "FLAG", "BLOCK".
    s3 string
    Available values: "FLAG", "BLOCK".
    s4 string
    Available values: "FLAG", "BLOCK".
    s5 string
    Available values: "FLAG", "BLOCK".
    s6 string
    Available values: "FLAG", "BLOCK".
    s7 string
    Available values: "FLAG", "BLOCK".
    s8 string
    Available values: "FLAG", "BLOCK".
    s9 string
    Available values: "FLAG", "BLOCK".
    p1 String
    Available values: "FLAG", "BLOCK".
    s1 String
    Available values: "FLAG", "BLOCK".
    s10 String
    Available values: "FLAG", "BLOCK".
    s11 String
    Available values: "FLAG", "BLOCK".
    s12 String
    Available values: "FLAG", "BLOCK".
    s13 String
    Available values: "FLAG", "BLOCK".
    s2 String
    Available values: "FLAG", "BLOCK".
    s3 String
    Available values: "FLAG", "BLOCK".
    s4 String
    Available values: "FLAG", "BLOCK".
    s5 String
    Available values: "FLAG", "BLOCK".
    s6 String
    Available values: "FLAG", "BLOCK".
    s7 String
    Available values: "FLAG", "BLOCK".
    s8 String
    Available values: "FLAG", "BLOCK".
    s9 String
    Available values: "FLAG", "BLOCK".
    p1 string
    Available values: "FLAG", "BLOCK".
    s1 string
    Available values: "FLAG", "BLOCK".
    s10 string
    Available values: "FLAG", "BLOCK".
    s11 string
    Available values: "FLAG", "BLOCK".
    s12 string
    Available values: "FLAG", "BLOCK".
    s13 string
    Available values: "FLAG", "BLOCK".
    s2 string
    Available values: "FLAG", "BLOCK".
    s3 string
    Available values: "FLAG", "BLOCK".
    s4 string
    Available values: "FLAG", "BLOCK".
    s5 string
    Available values: "FLAG", "BLOCK".
    s6 string
    Available values: "FLAG", "BLOCK".
    s7 string
    Available values: "FLAG", "BLOCK".
    s8 string
    Available values: "FLAG", "BLOCK".
    s9 string
    Available values: "FLAG", "BLOCK".
    p1 str
    Available values: "FLAG", "BLOCK".
    s1 str
    Available values: "FLAG", "BLOCK".
    s10 str
    Available values: "FLAG", "BLOCK".
    s11 str
    Available values: "FLAG", "BLOCK".
    s12 str
    Available values: "FLAG", "BLOCK".
    s13 str
    Available values: "FLAG", "BLOCK".
    s2 str
    Available values: "FLAG", "BLOCK".
    s3 str
    Available values: "FLAG", "BLOCK".
    s4 str
    Available values: "FLAG", "BLOCK".
    s5 str
    Available values: "FLAG", "BLOCK".
    s6 str
    Available values: "FLAG", "BLOCK".
    s7 str
    Available values: "FLAG", "BLOCK".
    s8 str
    Available values: "FLAG", "BLOCK".
    s9 str
    Available values: "FLAG", "BLOCK".
    p1 String
    Available values: "FLAG", "BLOCK".
    s1 String
    Available values: "FLAG", "BLOCK".
    s10 String
    Available values: "FLAG", "BLOCK".
    s11 String
    Available values: "FLAG", "BLOCK".
    s12 String
    Available values: "FLAG", "BLOCK".
    s13 String
    Available values: "FLAG", "BLOCK".
    s2 String
    Available values: "FLAG", "BLOCK".
    s3 String
    Available values: "FLAG", "BLOCK".
    s4 String
    Available values: "FLAG", "BLOCK".
    s5 String
    Available values: "FLAG", "BLOCK".
    s6 String
    Available values: "FLAG", "BLOCK".
    s7 String
    Available values: "FLAG", "BLOCK".
    s8 String
    Available values: "FLAG", "BLOCK".
    s9 String
    Available values: "FLAG", "BLOCK".

    AiGatewayOtel, AiGatewayOtelArgs

    Headers Dictionary<string, string>
    Url string
    Authorization string
    ContentType string
    Available values: "json", "protobuf".
    Headers map[string]string
    Url string
    Authorization string
    ContentType string
    Available values: "json", "protobuf".
    headers map(string)
    url string
    authorization string
    content_type string
    Available values: "json", "protobuf".
    headers Map<String,String>
    url String
    authorization String
    contentType String
    Available values: "json", "protobuf".
    headers {[key: string]: string}
    url string
    authorization string
    contentType string
    Available values: "json", "protobuf".
    headers Mapping[str, str]
    url str
    authorization str
    content_type str
    Available values: "json", "protobuf".
    headers Map<String>
    url String
    authorization String
    contentType String
    Available values: "json", "protobuf".

    AiGatewaySpendLimits, AiGatewaySpendLimitsArgs

    AiGatewaySpendLimitsRule, AiGatewaySpendLimitsRuleArgs

    Limit double
    LimitType string
    Available values: "cost".
    Window int
    AiGatewayProvider AiGatewaySpendLimitsRuleAiGatewayProvider
    Enabled bool
    Id string
    Metadata Dictionary<string, AiGatewaySpendLimitsRuleMetadata>
    Model AiGatewaySpendLimitsRuleModel
    Technique string
    Available values: "fixed", "sliding".
    Limit float64
    LimitType string
    Available values: "cost".
    Window int
    AiGatewayProvider AiGatewaySpendLimitsRuleAiGatewayProvider
    Enabled bool
    Id string
    Metadata map[string]AiGatewaySpendLimitsRuleMetadata
    Model AiGatewaySpendLimitsRuleModel
    Technique string
    Available values: "fixed", "sliding".
    limit number
    limit_type string
    Available values: "cost".
    window number
    ai_gateway_provider object
    enabled bool
    id string
    metadata map(object)
    model object
    technique string
    Available values: "fixed", "sliding".
    limit Double
    limitType String
    Available values: "cost".
    window Integer
    aiGatewayProvider AiGatewaySpendLimitsRuleAiGatewayProvider
    enabled Boolean
    id String
    metadata Map<String,AiGatewaySpendLimitsRuleMetadata>
    model AiGatewaySpendLimitsRuleModel
    technique String
    Available values: "fixed", "sliding".
    limit number
    limitType string
    Available values: "cost".
    window number
    aiGatewayProvider AiGatewaySpendLimitsRuleAiGatewayProvider
    enabled boolean
    id string
    metadata {[key: string]: AiGatewaySpendLimitsRuleMetadata}
    model AiGatewaySpendLimitsRuleModel
    technique string
    Available values: "fixed", "sliding".
    limit float
    limit_type str
    Available values: "cost".
    window int
    ai_gateway_provider AiGatewaySpendLimitsRuleAiGatewayProvider
    enabled bool
    id str
    metadata Mapping[str, AiGatewaySpendLimitsRuleMetadata]
    model AiGatewaySpendLimitsRuleModel
    technique str
    Available values: "fixed", "sliding".
    limit Number
    limitType String
    Available values: "cost".
    window Number
    aiGatewayProvider Property Map
    enabled Boolean
    id String
    metadata Map<Property Map>
    model Property Map
    technique String
    Available values: "fixed", "sliding".

    AiGatewaySpendLimitsRuleAiGatewayProvider, AiGatewaySpendLimitsRuleAiGatewayProviderArgs

    Mode string
    Available values: "filter".
    Values List<string>
    Mode string
    Available values: "filter".
    Values []string
    mode string
    Available values: "filter".
    values list(string)
    mode String
    Available values: "filter".
    values List<String>
    mode string
    Available values: "filter".
    values string[]
    mode str
    Available values: "filter".
    values Sequence[str]
    mode String
    Available values: "filter".
    values List<String>

    AiGatewaySpendLimitsRuleMetadata, AiGatewaySpendLimitsRuleMetadataArgs

    Mode string
    Available values: "partition", "filter".
    Values List<string>
    Mode string
    Available values: "partition", "filter".
    Values []string
    mode string
    Available values: "partition", "filter".
    values list(string)
    mode String
    Available values: "partition", "filter".
    values List<String>
    mode string
    Available values: "partition", "filter".
    values string[]
    mode str
    Available values: "partition", "filter".
    values Sequence[str]
    mode String
    Available values: "partition", "filter".
    values List<String>

    AiGatewaySpendLimitsRuleModel, AiGatewaySpendLimitsRuleModelArgs

    Mode string
    Available values: "filter".
    Values List<string>
    Mode string
    Available values: "filter".
    Values []string
    mode string
    Available values: "filter".
    values list(string)
    mode String
    Available values: "filter".
    values List<String>
    mode string
    Available values: "filter".
    values string[]
    mode str
    Available values: "filter".
    values Sequence[str]
    mode String
    Available values: "filter".
    values List<String>

    AiGatewayStripe, AiGatewayStripeArgs

    AiGatewayStripeUsageEvent, AiGatewayStripeUsageEventArgs

    Payload string
    Payload string
    payload string
    payload String
    payload string
    payload String

    Import

    $ pulumi import cloudflare:index/aiGateway:AiGateway example '<account_id>/<id>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial