## Update a Gateway `client.AIGateway.Update(ctx, id, params) (*AIGatewayUpdateResponse, error)` **put** `/accounts/{account_id}/ai-gateway/gateways/{id}` Updates an existing AI Gateway dataset. ### Parameters - `id string` gateway id - `params AIGatewayUpdateParams` - `AccountID param.Field[string]` Path param - `CacheInvalidateOnUpdate param.Field[bool]` Body param - `CacheTTL param.Field[int64]` Body param - `CollectLogs param.Field[bool]` Body param - `RateLimitingInterval param.Field[int64]` Body param - `RateLimitingLimit param.Field[int64]` Body param - `Authentication param.Field[bool]` Body param - `DLP param.Field[AIGatewayUpdateParamsDLP]` Body param - `type AIGatewayUpdateParamsDLPObject struct{…}` - `Action AIGatewayUpdateParamsDLPObjectAction` - `const AIGatewayUpdateParamsDLPObjectActionBlock AIGatewayUpdateParamsDLPObjectAction = "BLOCK"` - `const AIGatewayUpdateParamsDLPObjectActionFlag AIGatewayUpdateParamsDLPObjectAction = "FLAG"` - `Enabled bool` - `Profiles []string` - `type AIGatewayUpdateParamsDLPObject struct{…}` - `Enabled bool` - `Policies []AIGatewayUpdateParamsDLPObjectPolicy` - `ID string` - `Action AIGatewayUpdateParamsDLPObjectPoliciesAction` - `const AIGatewayUpdateParamsDLPObjectPoliciesActionFlag AIGatewayUpdateParamsDLPObjectPoliciesAction = "FLAG"` - `const AIGatewayUpdateParamsDLPObjectPoliciesActionBlock AIGatewayUpdateParamsDLPObjectPoliciesAction = "BLOCK"` - `Check []AIGatewayUpdateParamsDLPObjectPoliciesCheck` - `const AIGatewayUpdateParamsDLPObjectPoliciesCheckRequest AIGatewayUpdateParamsDLPObjectPoliciesCheck = "REQUEST"` - `const AIGatewayUpdateParamsDLPObjectPoliciesCheckResponse AIGatewayUpdateParamsDLPObjectPoliciesCheck = "RESPONSE"` - `Enabled bool` - `Profiles []string` - `Guardrails param.Field[AIGatewayUpdateParamsGuardrails]` Body param - `Prompt AIGatewayUpdateParamsGuardrailsPrompt` - `P1 AIGatewayUpdateParamsGuardrailsPromptP1` - `const AIGatewayUpdateParamsGuardrailsPromptP1Flag AIGatewayUpdateParamsGuardrailsPromptP1 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptP1Block AIGatewayUpdateParamsGuardrailsPromptP1 = "BLOCK"` - `S1 AIGatewayUpdateParamsGuardrailsPromptS1` - `const AIGatewayUpdateParamsGuardrailsPromptS1Flag AIGatewayUpdateParamsGuardrailsPromptS1 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS1Block AIGatewayUpdateParamsGuardrailsPromptS1 = "BLOCK"` - `S10 AIGatewayUpdateParamsGuardrailsPromptS10` - `const AIGatewayUpdateParamsGuardrailsPromptS10Flag AIGatewayUpdateParamsGuardrailsPromptS10 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS10Block AIGatewayUpdateParamsGuardrailsPromptS10 = "BLOCK"` - `S11 AIGatewayUpdateParamsGuardrailsPromptS11` - `const AIGatewayUpdateParamsGuardrailsPromptS11Flag AIGatewayUpdateParamsGuardrailsPromptS11 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS11Block AIGatewayUpdateParamsGuardrailsPromptS11 = "BLOCK"` - `S12 AIGatewayUpdateParamsGuardrailsPromptS12` - `const AIGatewayUpdateParamsGuardrailsPromptS12Flag AIGatewayUpdateParamsGuardrailsPromptS12 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS12Block AIGatewayUpdateParamsGuardrailsPromptS12 = "BLOCK"` - `S13 AIGatewayUpdateParamsGuardrailsPromptS13` - `const AIGatewayUpdateParamsGuardrailsPromptS13Flag AIGatewayUpdateParamsGuardrailsPromptS13 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS13Block AIGatewayUpdateParamsGuardrailsPromptS13 = "BLOCK"` - `S2 AIGatewayUpdateParamsGuardrailsPromptS2` - `const AIGatewayUpdateParamsGuardrailsPromptS2Flag AIGatewayUpdateParamsGuardrailsPromptS2 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS2Block AIGatewayUpdateParamsGuardrailsPromptS2 = "BLOCK"` - `S3 AIGatewayUpdateParamsGuardrailsPromptS3` - `const AIGatewayUpdateParamsGuardrailsPromptS3Flag AIGatewayUpdateParamsGuardrailsPromptS3 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS3Block AIGatewayUpdateParamsGuardrailsPromptS3 = "BLOCK"` - `S4 AIGatewayUpdateParamsGuardrailsPromptS4` - `const AIGatewayUpdateParamsGuardrailsPromptS4Flag AIGatewayUpdateParamsGuardrailsPromptS4 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS4Block AIGatewayUpdateParamsGuardrailsPromptS4 = "BLOCK"` - `S5 AIGatewayUpdateParamsGuardrailsPromptS5` - `const AIGatewayUpdateParamsGuardrailsPromptS5Flag AIGatewayUpdateParamsGuardrailsPromptS5 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS5Block AIGatewayUpdateParamsGuardrailsPromptS5 = "BLOCK"` - `S6 AIGatewayUpdateParamsGuardrailsPromptS6` - `const AIGatewayUpdateParamsGuardrailsPromptS6Flag AIGatewayUpdateParamsGuardrailsPromptS6 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS6Block AIGatewayUpdateParamsGuardrailsPromptS6 = "BLOCK"` - `S7 AIGatewayUpdateParamsGuardrailsPromptS7` - `const AIGatewayUpdateParamsGuardrailsPromptS7Flag AIGatewayUpdateParamsGuardrailsPromptS7 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS7Block AIGatewayUpdateParamsGuardrailsPromptS7 = "BLOCK"` - `S8 AIGatewayUpdateParamsGuardrailsPromptS8` - `const AIGatewayUpdateParamsGuardrailsPromptS8Flag AIGatewayUpdateParamsGuardrailsPromptS8 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS8Block AIGatewayUpdateParamsGuardrailsPromptS8 = "BLOCK"` - `S9 AIGatewayUpdateParamsGuardrailsPromptS9` - `const AIGatewayUpdateParamsGuardrailsPromptS9Flag AIGatewayUpdateParamsGuardrailsPromptS9 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsPromptS9Block AIGatewayUpdateParamsGuardrailsPromptS9 = "BLOCK"` - `Response AIGatewayUpdateParamsGuardrailsResponse` - `P1 AIGatewayUpdateParamsGuardrailsResponseP1` - `const AIGatewayUpdateParamsGuardrailsResponseP1Flag AIGatewayUpdateParamsGuardrailsResponseP1 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseP1Block AIGatewayUpdateParamsGuardrailsResponseP1 = "BLOCK"` - `S1 AIGatewayUpdateParamsGuardrailsResponseS1` - `const AIGatewayUpdateParamsGuardrailsResponseS1Flag AIGatewayUpdateParamsGuardrailsResponseS1 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS1Block AIGatewayUpdateParamsGuardrailsResponseS1 = "BLOCK"` - `S10 AIGatewayUpdateParamsGuardrailsResponseS10` - `const AIGatewayUpdateParamsGuardrailsResponseS10Flag AIGatewayUpdateParamsGuardrailsResponseS10 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS10Block AIGatewayUpdateParamsGuardrailsResponseS10 = "BLOCK"` - `S11 AIGatewayUpdateParamsGuardrailsResponseS11` - `const AIGatewayUpdateParamsGuardrailsResponseS11Flag AIGatewayUpdateParamsGuardrailsResponseS11 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS11Block AIGatewayUpdateParamsGuardrailsResponseS11 = "BLOCK"` - `S12 AIGatewayUpdateParamsGuardrailsResponseS12` - `const AIGatewayUpdateParamsGuardrailsResponseS12Flag AIGatewayUpdateParamsGuardrailsResponseS12 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS12Block AIGatewayUpdateParamsGuardrailsResponseS12 = "BLOCK"` - `S13 AIGatewayUpdateParamsGuardrailsResponseS13` - `const AIGatewayUpdateParamsGuardrailsResponseS13Flag AIGatewayUpdateParamsGuardrailsResponseS13 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS13Block AIGatewayUpdateParamsGuardrailsResponseS13 = "BLOCK"` - `S2 AIGatewayUpdateParamsGuardrailsResponseS2` - `const AIGatewayUpdateParamsGuardrailsResponseS2Flag AIGatewayUpdateParamsGuardrailsResponseS2 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS2Block AIGatewayUpdateParamsGuardrailsResponseS2 = "BLOCK"` - `S3 AIGatewayUpdateParamsGuardrailsResponseS3` - `const AIGatewayUpdateParamsGuardrailsResponseS3Flag AIGatewayUpdateParamsGuardrailsResponseS3 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS3Block AIGatewayUpdateParamsGuardrailsResponseS3 = "BLOCK"` - `S4 AIGatewayUpdateParamsGuardrailsResponseS4` - `const AIGatewayUpdateParamsGuardrailsResponseS4Flag AIGatewayUpdateParamsGuardrailsResponseS4 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS4Block AIGatewayUpdateParamsGuardrailsResponseS4 = "BLOCK"` - `S5 AIGatewayUpdateParamsGuardrailsResponseS5` - `const AIGatewayUpdateParamsGuardrailsResponseS5Flag AIGatewayUpdateParamsGuardrailsResponseS5 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS5Block AIGatewayUpdateParamsGuardrailsResponseS5 = "BLOCK"` - `S6 AIGatewayUpdateParamsGuardrailsResponseS6` - `const AIGatewayUpdateParamsGuardrailsResponseS6Flag AIGatewayUpdateParamsGuardrailsResponseS6 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS6Block AIGatewayUpdateParamsGuardrailsResponseS6 = "BLOCK"` - `S7 AIGatewayUpdateParamsGuardrailsResponseS7` - `const AIGatewayUpdateParamsGuardrailsResponseS7Flag AIGatewayUpdateParamsGuardrailsResponseS7 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS7Block AIGatewayUpdateParamsGuardrailsResponseS7 = "BLOCK"` - `S8 AIGatewayUpdateParamsGuardrailsResponseS8` - `const AIGatewayUpdateParamsGuardrailsResponseS8Flag AIGatewayUpdateParamsGuardrailsResponseS8 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS8Block AIGatewayUpdateParamsGuardrailsResponseS8 = "BLOCK"` - `S9 AIGatewayUpdateParamsGuardrailsResponseS9` - `const AIGatewayUpdateParamsGuardrailsResponseS9Flag AIGatewayUpdateParamsGuardrailsResponseS9 = "FLAG"` - `const AIGatewayUpdateParamsGuardrailsResponseS9Block AIGatewayUpdateParamsGuardrailsResponseS9 = "BLOCK"` - `LogManagement param.Field[int64]` Body param - `LogManagementStrategy param.Field[AIGatewayUpdateParamsLogManagementStrategy]` Body param - `const AIGatewayUpdateParamsLogManagementStrategyStopInserting AIGatewayUpdateParamsLogManagementStrategy = "STOP_INSERTING"` - `const AIGatewayUpdateParamsLogManagementStrategyDeleteOldest AIGatewayUpdateParamsLogManagementStrategy = "DELETE_OLDEST"` - `Logpush param.Field[bool]` Body param - `LogpushPublicKey param.Field[string]` Body param - `Otel param.Field[[]AIGatewayUpdateParamsOtel]` Body param - `Authorization string` - `Headers map[string, string]` - `URL string` - `ContentType AIGatewayUpdateParamsOtelContentType` - `const AIGatewayUpdateParamsOtelContentTypeJson AIGatewayUpdateParamsOtelContentType = "json"` - `const AIGatewayUpdateParamsOtelContentTypeProtobuf AIGatewayUpdateParamsOtelContentType = "protobuf"` - `RateLimitingTechnique param.Field[AIGatewayUpdateParamsRateLimitingTechnique]` Body param - `const AIGatewayUpdateParamsRateLimitingTechniqueFixed AIGatewayUpdateParamsRateLimitingTechnique = "fixed"` - `const AIGatewayUpdateParamsRateLimitingTechniqueSliding AIGatewayUpdateParamsRateLimitingTechnique = "sliding"` - `RetryBackoff param.Field[AIGatewayUpdateParamsRetryBackoff]` Body param: Backoff strategy for retry delays - `const AIGatewayUpdateParamsRetryBackoffConstant AIGatewayUpdateParamsRetryBackoff = "constant"` - `const AIGatewayUpdateParamsRetryBackoffLinear AIGatewayUpdateParamsRetryBackoff = "linear"` - `const AIGatewayUpdateParamsRetryBackoffExponential AIGatewayUpdateParamsRetryBackoff = "exponential"` - `RetryDelay param.Field[int64]` Body param: Delay between retry attempts in milliseconds (0-5000) - `RetryMaxAttempts param.Field[int64]` Body param: Maximum number of retry attempts for failed requests (1-5) - `StoreID param.Field[string]` Body param - `Stripe param.Field[AIGatewayUpdateParamsStripe]` Body param - `Authorization string` - `UsageEvents []AIGatewayUpdateParamsStripeUsageEvent` - `Payload string` - `WorkersAIBillingMode param.Field[AIGatewayUpdateParamsWorkersAIBillingMode]` Body param: Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. - `const AIGatewayUpdateParamsWorkersAIBillingModePostpaid AIGatewayUpdateParamsWorkersAIBillingMode = "postpaid"` - `Zdr param.Field[bool]` Body param ### Returns - `type AIGatewayUpdateResponse struct{…}` - `ID string` gateway id - `CacheInvalidateOnUpdate bool` - `CacheTTL int64` - `CollectLogs bool` - `CreatedAt Time` - `ModifiedAt Time` - `RateLimitingInterval int64` - `RateLimitingLimit int64` - `Authentication bool` - `DLP AIGatewayUpdateResponseDLP` - `type AIGatewayUpdateResponseDLPObject struct{…}` - `Action AIGatewayUpdateResponseDLPObjectAction` - `const AIGatewayUpdateResponseDLPObjectActionBlock AIGatewayUpdateResponseDLPObjectAction = "BLOCK"` - `const AIGatewayUpdateResponseDLPObjectActionFlag AIGatewayUpdateResponseDLPObjectAction = "FLAG"` - `Enabled bool` - `Profiles []string` - `type AIGatewayUpdateResponseDLPObject struct{…}` - `Enabled bool` - `Policies []AIGatewayUpdateResponseDLPObjectPolicy` - `ID string` - `Action AIGatewayUpdateResponseDLPObjectPoliciesAction` - `const AIGatewayUpdateResponseDLPObjectPoliciesActionFlag AIGatewayUpdateResponseDLPObjectPoliciesAction = "FLAG"` - `const AIGatewayUpdateResponseDLPObjectPoliciesActionBlock AIGatewayUpdateResponseDLPObjectPoliciesAction = "BLOCK"` - `Check []AIGatewayUpdateResponseDLPObjectPoliciesCheck` - `const AIGatewayUpdateResponseDLPObjectPoliciesCheckRequest AIGatewayUpdateResponseDLPObjectPoliciesCheck = "REQUEST"` - `const AIGatewayUpdateResponseDLPObjectPoliciesCheckResponse AIGatewayUpdateResponseDLPObjectPoliciesCheck = "RESPONSE"` - `Enabled bool` - `Profiles []string` - `Guardrails AIGatewayUpdateResponseGuardrails` - `Prompt AIGatewayUpdateResponseGuardrailsPrompt` - `P1 AIGatewayUpdateResponseGuardrailsPromptP1` - `const AIGatewayUpdateResponseGuardrailsPromptP1Flag AIGatewayUpdateResponseGuardrailsPromptP1 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptP1Block AIGatewayUpdateResponseGuardrailsPromptP1 = "BLOCK"` - `S1 AIGatewayUpdateResponseGuardrailsPromptS1` - `const AIGatewayUpdateResponseGuardrailsPromptS1Flag AIGatewayUpdateResponseGuardrailsPromptS1 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS1Block AIGatewayUpdateResponseGuardrailsPromptS1 = "BLOCK"` - `S10 AIGatewayUpdateResponseGuardrailsPromptS10` - `const AIGatewayUpdateResponseGuardrailsPromptS10Flag AIGatewayUpdateResponseGuardrailsPromptS10 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS10Block AIGatewayUpdateResponseGuardrailsPromptS10 = "BLOCK"` - `S11 AIGatewayUpdateResponseGuardrailsPromptS11` - `const AIGatewayUpdateResponseGuardrailsPromptS11Flag AIGatewayUpdateResponseGuardrailsPromptS11 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS11Block AIGatewayUpdateResponseGuardrailsPromptS11 = "BLOCK"` - `S12 AIGatewayUpdateResponseGuardrailsPromptS12` - `const AIGatewayUpdateResponseGuardrailsPromptS12Flag AIGatewayUpdateResponseGuardrailsPromptS12 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS12Block AIGatewayUpdateResponseGuardrailsPromptS12 = "BLOCK"` - `S13 AIGatewayUpdateResponseGuardrailsPromptS13` - `const AIGatewayUpdateResponseGuardrailsPromptS13Flag AIGatewayUpdateResponseGuardrailsPromptS13 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS13Block AIGatewayUpdateResponseGuardrailsPromptS13 = "BLOCK"` - `S2 AIGatewayUpdateResponseGuardrailsPromptS2` - `const AIGatewayUpdateResponseGuardrailsPromptS2Flag AIGatewayUpdateResponseGuardrailsPromptS2 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS2Block AIGatewayUpdateResponseGuardrailsPromptS2 = "BLOCK"` - `S3 AIGatewayUpdateResponseGuardrailsPromptS3` - `const AIGatewayUpdateResponseGuardrailsPromptS3Flag AIGatewayUpdateResponseGuardrailsPromptS3 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS3Block AIGatewayUpdateResponseGuardrailsPromptS3 = "BLOCK"` - `S4 AIGatewayUpdateResponseGuardrailsPromptS4` - `const AIGatewayUpdateResponseGuardrailsPromptS4Flag AIGatewayUpdateResponseGuardrailsPromptS4 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS4Block AIGatewayUpdateResponseGuardrailsPromptS4 = "BLOCK"` - `S5 AIGatewayUpdateResponseGuardrailsPromptS5` - `const AIGatewayUpdateResponseGuardrailsPromptS5Flag AIGatewayUpdateResponseGuardrailsPromptS5 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS5Block AIGatewayUpdateResponseGuardrailsPromptS5 = "BLOCK"` - `S6 AIGatewayUpdateResponseGuardrailsPromptS6` - `const AIGatewayUpdateResponseGuardrailsPromptS6Flag AIGatewayUpdateResponseGuardrailsPromptS6 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS6Block AIGatewayUpdateResponseGuardrailsPromptS6 = "BLOCK"` - `S7 AIGatewayUpdateResponseGuardrailsPromptS7` - `const AIGatewayUpdateResponseGuardrailsPromptS7Flag AIGatewayUpdateResponseGuardrailsPromptS7 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS7Block AIGatewayUpdateResponseGuardrailsPromptS7 = "BLOCK"` - `S8 AIGatewayUpdateResponseGuardrailsPromptS8` - `const AIGatewayUpdateResponseGuardrailsPromptS8Flag AIGatewayUpdateResponseGuardrailsPromptS8 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS8Block AIGatewayUpdateResponseGuardrailsPromptS8 = "BLOCK"` - `S9 AIGatewayUpdateResponseGuardrailsPromptS9` - `const AIGatewayUpdateResponseGuardrailsPromptS9Flag AIGatewayUpdateResponseGuardrailsPromptS9 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsPromptS9Block AIGatewayUpdateResponseGuardrailsPromptS9 = "BLOCK"` - `Response AIGatewayUpdateResponseGuardrailsResponse` - `P1 AIGatewayUpdateResponseGuardrailsResponseP1` - `const AIGatewayUpdateResponseGuardrailsResponseP1Flag AIGatewayUpdateResponseGuardrailsResponseP1 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseP1Block AIGatewayUpdateResponseGuardrailsResponseP1 = "BLOCK"` - `S1 AIGatewayUpdateResponseGuardrailsResponseS1` - `const AIGatewayUpdateResponseGuardrailsResponseS1Flag AIGatewayUpdateResponseGuardrailsResponseS1 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS1Block AIGatewayUpdateResponseGuardrailsResponseS1 = "BLOCK"` - `S10 AIGatewayUpdateResponseGuardrailsResponseS10` - `const AIGatewayUpdateResponseGuardrailsResponseS10Flag AIGatewayUpdateResponseGuardrailsResponseS10 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS10Block AIGatewayUpdateResponseGuardrailsResponseS10 = "BLOCK"` - `S11 AIGatewayUpdateResponseGuardrailsResponseS11` - `const AIGatewayUpdateResponseGuardrailsResponseS11Flag AIGatewayUpdateResponseGuardrailsResponseS11 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS11Block AIGatewayUpdateResponseGuardrailsResponseS11 = "BLOCK"` - `S12 AIGatewayUpdateResponseGuardrailsResponseS12` - `const AIGatewayUpdateResponseGuardrailsResponseS12Flag AIGatewayUpdateResponseGuardrailsResponseS12 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS12Block AIGatewayUpdateResponseGuardrailsResponseS12 = "BLOCK"` - `S13 AIGatewayUpdateResponseGuardrailsResponseS13` - `const AIGatewayUpdateResponseGuardrailsResponseS13Flag AIGatewayUpdateResponseGuardrailsResponseS13 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS13Block AIGatewayUpdateResponseGuardrailsResponseS13 = "BLOCK"` - `S2 AIGatewayUpdateResponseGuardrailsResponseS2` - `const AIGatewayUpdateResponseGuardrailsResponseS2Flag AIGatewayUpdateResponseGuardrailsResponseS2 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS2Block AIGatewayUpdateResponseGuardrailsResponseS2 = "BLOCK"` - `S3 AIGatewayUpdateResponseGuardrailsResponseS3` - `const AIGatewayUpdateResponseGuardrailsResponseS3Flag AIGatewayUpdateResponseGuardrailsResponseS3 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS3Block AIGatewayUpdateResponseGuardrailsResponseS3 = "BLOCK"` - `S4 AIGatewayUpdateResponseGuardrailsResponseS4` - `const AIGatewayUpdateResponseGuardrailsResponseS4Flag AIGatewayUpdateResponseGuardrailsResponseS4 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS4Block AIGatewayUpdateResponseGuardrailsResponseS4 = "BLOCK"` - `S5 AIGatewayUpdateResponseGuardrailsResponseS5` - `const AIGatewayUpdateResponseGuardrailsResponseS5Flag AIGatewayUpdateResponseGuardrailsResponseS5 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS5Block AIGatewayUpdateResponseGuardrailsResponseS5 = "BLOCK"` - `S6 AIGatewayUpdateResponseGuardrailsResponseS6` - `const AIGatewayUpdateResponseGuardrailsResponseS6Flag AIGatewayUpdateResponseGuardrailsResponseS6 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS6Block AIGatewayUpdateResponseGuardrailsResponseS6 = "BLOCK"` - `S7 AIGatewayUpdateResponseGuardrailsResponseS7` - `const AIGatewayUpdateResponseGuardrailsResponseS7Flag AIGatewayUpdateResponseGuardrailsResponseS7 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS7Block AIGatewayUpdateResponseGuardrailsResponseS7 = "BLOCK"` - `S8 AIGatewayUpdateResponseGuardrailsResponseS8` - `const AIGatewayUpdateResponseGuardrailsResponseS8Flag AIGatewayUpdateResponseGuardrailsResponseS8 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS8Block AIGatewayUpdateResponseGuardrailsResponseS8 = "BLOCK"` - `S9 AIGatewayUpdateResponseGuardrailsResponseS9` - `const AIGatewayUpdateResponseGuardrailsResponseS9Flag AIGatewayUpdateResponseGuardrailsResponseS9 = "FLAG"` - `const AIGatewayUpdateResponseGuardrailsResponseS9Block AIGatewayUpdateResponseGuardrailsResponseS9 = "BLOCK"` - `IsDefault bool` - `LogManagement int64` - `LogManagementStrategy AIGatewayUpdateResponseLogManagementStrategy` - `const AIGatewayUpdateResponseLogManagementStrategyStopInserting AIGatewayUpdateResponseLogManagementStrategy = "STOP_INSERTING"` - `const AIGatewayUpdateResponseLogManagementStrategyDeleteOldest AIGatewayUpdateResponseLogManagementStrategy = "DELETE_OLDEST"` - `Logpush bool` - `LogpushPublicKey string` - `Otel []AIGatewayUpdateResponseOtel` - `Authorization string` - `Headers map[string, string]` - `URL string` - `ContentType AIGatewayUpdateResponseOtelContentType` - `const AIGatewayUpdateResponseOtelContentTypeJson AIGatewayUpdateResponseOtelContentType = "json"` - `const AIGatewayUpdateResponseOtelContentTypeProtobuf AIGatewayUpdateResponseOtelContentType = "protobuf"` - `RateLimitingTechnique AIGatewayUpdateResponseRateLimitingTechnique` - `const AIGatewayUpdateResponseRateLimitingTechniqueFixed AIGatewayUpdateResponseRateLimitingTechnique = "fixed"` - `const AIGatewayUpdateResponseRateLimitingTechniqueSliding AIGatewayUpdateResponseRateLimitingTechnique = "sliding"` - `RetryBackoff AIGatewayUpdateResponseRetryBackoff` Backoff strategy for retry delays - `const AIGatewayUpdateResponseRetryBackoffConstant AIGatewayUpdateResponseRetryBackoff = "constant"` - `const AIGatewayUpdateResponseRetryBackoffLinear AIGatewayUpdateResponseRetryBackoff = "linear"` - `const AIGatewayUpdateResponseRetryBackoffExponential AIGatewayUpdateResponseRetryBackoff = "exponential"` - `RetryDelay int64` Delay between retry attempts in milliseconds (0-5000) - `RetryMaxAttempts int64` Maximum number of retry attempts for failed requests (1-5) - `StoreID string` - `Stripe AIGatewayUpdateResponseStripe` - `Authorization string` - `UsageEvents []AIGatewayUpdateResponseStripeUsageEvent` - `Payload string` - `WorkersAIBillingMode AIGatewayUpdateResponseWorkersAIBillingMode` Controls how Workers AI inference calls routed through this gateway are billed. Only 'postpaid' is currently supported. - `const AIGatewayUpdateResponseWorkersAIBillingModePostpaid AIGatewayUpdateResponseWorkersAIBillingMode = "postpaid"` - `Zdr bool` ### Example ```go package main import ( "context" "fmt" "github.com/cloudflare/cloudflare-go" "github.com/cloudflare/cloudflare-go/ai_gateway" "github.com/cloudflare/cloudflare-go/option" ) func main() { client := cloudflare.NewClient( option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"), ) aiGateway, err := client.AIGateway.Update( context.TODO(), "my-gateway", ai_gateway.AIGatewayUpdateParams{ AccountID: cloudflare.F("3ebbcb006d4d46d7bb6a8c7f14676cb0"), CacheInvalidateOnUpdate: cloudflare.F(true), CacheTTL: cloudflare.F(int64(0)), CollectLogs: cloudflare.F(true), RateLimitingInterval: cloudflare.F(int64(0)), RateLimitingLimit: cloudflare.F(int64(0)), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", aiGateway.ID) } ``` #### Response ```json { "result": { "id": "my-gateway", "cache_invalidate_on_update": true, "cache_ttl": 0, "collect_logs": true, "created_at": "2019-12-27T18:11:19.117Z", "modified_at": "2019-12-27T18:11:19.117Z", "rate_limiting_interval": 0, "rate_limiting_limit": 0, "authentication": true, "dlp": { "action": "BLOCK", "enabled": true, "profiles": [ "string" ] }, "guardrails": { "prompt": { "P1": "FLAG", "S1": "FLAG", "S10": "FLAG", "S11": "FLAG", "S12": "FLAG", "S13": "FLAG", "S2": "FLAG", "S3": "FLAG", "S4": "FLAG", "S5": "FLAG", "S6": "FLAG", "S7": "FLAG", "S8": "FLAG", "S9": "FLAG" }, "response": { "P1": "FLAG", "S1": "FLAG", "S10": "FLAG", "S11": "FLAG", "S12": "FLAG", "S13": "FLAG", "S2": "FLAG", "S3": "FLAG", "S4": "FLAG", "S5": "FLAG", "S6": "FLAG", "S7": "FLAG", "S8": "FLAG", "S9": "FLAG" } }, "is_default": true, "log_management": 10000, "log_management_strategy": "STOP_INSERTING", "logpush": true, "logpush_public_key": "xxxxxxxxxxxxxxxx", "otel": [ { "authorization": "authorization", "headers": { "foo": "string" }, "url": "https://example.com", "content_type": "json" } ], "rate_limiting_technique": "fixed", "retry_backoff": "constant", "retry_delay": 0, "retry_max_attempts": 1, "store_id": "store_id", "stripe": { "authorization": "authorization", "usage_events": [ { "payload": "payload" } ] }, "workers_ai_billing_mode": "postpaid", "zdr": true }, "success": true } ```