1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getAiGateway
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.15.0
published on Saturday, May 2, 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 = cloudflare.getAiGateway({
        accountId: "3ebbcb006d4d46d7bb6a8c7f14676cb0",
        id: "my-gateway",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_ai_gateway = cloudflare.get_ai_gateway(account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
        id="my-gateway")
    
    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.GetAiGateway(ctx, &cloudflare.LookupAiGatewayArgs{
    			AccountId: pulumi.StringRef("3ebbcb006d4d46d7bb6a8c7f14676cb0"),
    			Id:        pulumi.StringRef("my-gateway"),
    		}, nil)
    		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 = Cloudflare.Index.GetAiGateway.Invoke(new()
        {
            AccountId = "3ebbcb006d4d46d7bb6a8c7f14676cb0",
            Id = "my-gateway",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetAiGatewayArgs;
    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) {
            final var exampleAiGateway = CloudflareFunctions.getAiGateway(GetAiGatewayArgs.builder()
                .accountId("3ebbcb006d4d46d7bb6a8c7f14676cb0")
                .id("my-gateway")
                .build());
    
        }
    }
    
    variables:
      exampleAiGateway:
        fn::invoke:
          function: cloudflare:getAiGateway
          arguments:
            accountId: 3ebbcb006d4d46d7bb6a8c7f14676cb0
            id: my-gateway
    

    Using getAiGateway

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAiGateway(args: GetAiGatewayArgs, opts?: InvokeOptions): Promise<GetAiGatewayResult>
    function getAiGatewayOutput(args: GetAiGatewayOutputArgs, opts?: InvokeOptions): Output<GetAiGatewayResult>
    def get_ai_gateway(account_id: Optional[str] = None,
                       filter: Optional[GetAiGatewayFilter] = None,
                       id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAiGatewayResult
    def get_ai_gateway_output(account_id: Optional[pulumi.Input[str]] = None,
                       filter: Optional[pulumi.Input[GetAiGatewayFilterArgs]] = None,
                       id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAiGatewayResult]
    func LookupAiGateway(ctx *Context, args *LookupAiGatewayArgs, opts ...InvokeOption) (*LookupAiGatewayResult, error)
    func LookupAiGatewayOutput(ctx *Context, args *LookupAiGatewayOutputArgs, opts ...InvokeOption) LookupAiGatewayResultOutput

    > Note: This function is named LookupAiGateway in the Go SDK.

    public static class GetAiGateway 
    {
        public static Task<GetAiGatewayResult> InvokeAsync(GetAiGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetAiGatewayResult> Invoke(GetAiGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAiGatewayResult> getAiGateway(GetAiGatewayArgs args, InvokeOptions options)
    public static Output<GetAiGatewayResult> getAiGateway(GetAiGatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getAiGateway:getAiGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    Filter GetAiGatewayFilter
    Id string
    gateway id
    AccountId string
    Filter GetAiGatewayFilter
    Id string
    gateway id
    accountId String
    filter GetAiGatewayFilter
    id String
    gateway id
    accountId string
    filter GetAiGatewayFilter
    id string
    gateway id
    accountId String
    filter Property Map
    id String
    gateway id

    getAiGateway Result

    The following output properties are available:

    Authentication bool
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    CreatedAt string
    Dlp GetAiGatewayDlp
    Id string
    gateway id
    IsDefault bool
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    ModifiedAt string
    Otels List<GetAiGatewayOtel>
    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)
    StoreId string
    Stripe GetAiGatewayStripe
    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
    Filter GetAiGatewayFilter
    Authentication bool
    CacheInvalidateOnUpdate bool
    CacheTtl int
    CollectLogs bool
    CreatedAt string
    Dlp GetAiGatewayDlp
    Id string
    gateway id
    IsDefault bool
    LogManagement int
    LogManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    Logpush bool
    LogpushPublicKey string
    ModifiedAt string
    Otels []GetAiGatewayOtel
    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)
    StoreId string
    Stripe GetAiGatewayStripe
    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
    Filter GetAiGatewayFilter
    authentication Boolean
    cacheInvalidateOnUpdate Boolean
    cacheTtl Integer
    collectLogs Boolean
    createdAt String
    dlp GetAiGatewayDlp
    id String
    gateway id
    isDefault Boolean
    logManagement Integer
    logManagementStrategy String
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush Boolean
    logpushPublicKey String
    modifiedAt String
    otels List<GetAiGatewayOtel>
    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)
    storeId String
    stripe GetAiGatewayStripe
    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
    filter GetAiGatewayFilter
    authentication boolean
    cacheInvalidateOnUpdate boolean
    cacheTtl number
    collectLogs boolean
    createdAt string
    dlp GetAiGatewayDlp
    id string
    gateway id
    isDefault boolean
    logManagement number
    logManagementStrategy string
    Available values: "STOPINSERTING", "DELETEOLDEST".
    logpush boolean
    logpushPublicKey string
    modifiedAt string
    otels GetAiGatewayOtel[]
    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)
    storeId string
    stripe GetAiGatewayStripe
    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
    filter GetAiGatewayFilter
    authentication bool
    cache_invalidate_on_update bool
    cache_ttl int
    collect_logs bool
    created_at str
    dlp GetAiGatewayDlp
    id str
    gateway id
    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[GetAiGatewayOtel]
    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)
    store_id str
    stripe GetAiGatewayStripe
    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
    account_id str
    filter GetAiGatewayFilter
    authentication Boolean
    cacheInvalidateOnUpdate Boolean
    cacheTtl Number
    collectLogs Boolean
    createdAt String
    dlp Property Map
    id String
    gateway id
    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)
    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
    accountId String
    filter Property Map

    Supporting Types

    GetAiGatewayDlp

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

    GetAiGatewayDlpPolicy

    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 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>

    GetAiGatewayFilter

    Search string
    Search by id
    Search string
    Search by id
    search String
    Search by id
    search string
    Search by id
    search str
    Search by id
    search String
    Search by id

    GetAiGatewayOtel

    Authorization string
    ContentType string
    Available values: "json", "protobuf".
    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,String>
    url String
    authorization string
    contentType string
    Available values: "json", "protobuf".
    headers {[key: string]: string}
    url string
    authorization str
    content_type str
    Available values: "json", "protobuf".
    headers Mapping[str, str]
    url str
    authorization String
    contentType String
    Available values: "json", "protobuf".
    headers Map<String>
    url String

    GetAiGatewayStripe

    GetAiGatewayStripeUsageEvent

    Payload string
    Payload string
    payload String
    payload string
    payload String

    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.15.0
    published on Saturday, May 2, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.