published on Friday, Sep 18, 2026 by Pulumi
published on Friday, Sep 18, 2026 by Pulumi
Provides a Fastly AI Runtime Control virtual key, used to authenticate requests to an AI service and to attribute usage and session logs back to a named key.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";
const demo = new fastly.AiRuntimeControlVirtualKey("demo", {
name: "prod website chatbot",
model: "claude-sonnet-4-20250514",
providerName: "Anthropic",
userId: "6zhNCY1236787aJIwUgN",
expiresAt: "2026-08-05T17:13:36Z",
});
import pulumi
import pulumi_fastly as fastly
demo = fastly.AiRuntimeControlVirtualKey("demo",
name="prod website chatbot",
model="claude-sonnet-4-20250514",
provider_name="Anthropic",
user_id="6zhNCY1236787aJIwUgN",
expires_at="2026-08-05T17:13:36Z")
package main
import (
"github.com/pulumi/pulumi-fastly/sdk/v12/go/fastly"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := fastly.NewAiRuntimeControlVirtualKey(ctx, "demo", &fastly.AiRuntimeControlVirtualKeyArgs{
Name: pulumi.String("prod website chatbot"),
Model: pulumi.String("claude-sonnet-4-20250514"),
ProviderName: pulumi.String("Anthropic"),
UserId: pulumi.String("6zhNCY1236787aJIwUgN"),
ExpiresAt: pulumi.String("2026-08-05T17:13:36Z"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;
return await Deployment.RunAsync(() =>
{
var demo = new Fastly.AiRuntimeControlVirtualKey("demo", new()
{
Name = "prod website chatbot",
Model = "claude-sonnet-4-20250514",
ProviderName = "Anthropic",
UserId = "6zhNCY1236787aJIwUgN",
ExpiresAt = "2026-08-05T17:13:36Z",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.AiRuntimeControlVirtualKey;
import com.pulumi.fastly.AiRuntimeControlVirtualKeyArgs;
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 demo = new AiRuntimeControlVirtualKey("demo", AiRuntimeControlVirtualKeyArgs.builder()
.name("prod website chatbot")
.model("claude-sonnet-4-20250514")
.providerName("Anthropic")
.userId("6zhNCY1236787aJIwUgN")
.expiresAt("2026-08-05T17:13:36Z")
.build());
}
}
resources:
demo:
type: fastly:AiRuntimeControlVirtualKey
properties:
name: prod website chatbot
model: claude-sonnet-4-20250514
providerName: Anthropic
userId: 6zhNCY1236787aJIwUgN
expiresAt: 2026-08-05T17:13:36Z
pulumi {
required_providers {
fastly = {
source = "pulumi/fastly"
}
}
}
resource "fastly_airuntimecontrolvirtualkey" "demo" {
name = "prod website chatbot"
model = "claude-sonnet-4-20250514"
provider_name = "Anthropic"
user_id = "6zhNCY1236787aJIwUgN"
expires_at = "2026-08-05T17:13:36Z"
}
Create AiRuntimeControlVirtualKey Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AiRuntimeControlVirtualKey(name: string, args: AiRuntimeControlVirtualKeyArgs, opts?: CustomResourceOptions);@overload
def AiRuntimeControlVirtualKey(resource_name: str,
args: AiRuntimeControlVirtualKeyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AiRuntimeControlVirtualKey(resource_name: str,
opts: Optional[ResourceOptions] = None,
model: Optional[str] = None,
provider_name: Optional[str] = None,
user_id: Optional[str] = None,
expires_at: Optional[str] = None,
name: Optional[str] = None)func NewAiRuntimeControlVirtualKey(ctx *Context, name string, args AiRuntimeControlVirtualKeyArgs, opts ...ResourceOption) (*AiRuntimeControlVirtualKey, error)public AiRuntimeControlVirtualKey(string name, AiRuntimeControlVirtualKeyArgs args, CustomResourceOptions? opts = null)
public AiRuntimeControlVirtualKey(String name, AiRuntimeControlVirtualKeyArgs args)
public AiRuntimeControlVirtualKey(String name, AiRuntimeControlVirtualKeyArgs args, CustomResourceOptions options)
type: fastly:AiRuntimeControlVirtualKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "fastly_ai_runtime_control_virtual_key" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args AiRuntimeControlVirtualKeyArgs
- 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 AiRuntimeControlVirtualKeyArgs
- 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 AiRuntimeControlVirtualKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AiRuntimeControlVirtualKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AiRuntimeControlVirtualKeyArgs
- 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 aiRuntimeControlVirtualKeyResource = new Fastly.AiRuntimeControlVirtualKey("aiRuntimeControlVirtualKeyResource", new()
{
Model = "string",
ProviderName = "string",
UserId = "string",
ExpiresAt = "string",
Name = "string",
});
example, err := fastly.NewAiRuntimeControlVirtualKey(ctx, "aiRuntimeControlVirtualKeyResource", &fastly.AiRuntimeControlVirtualKeyArgs{
Model: pulumi.String("string"),
ProviderName: pulumi.String("string"),
UserId: pulumi.String("string"),
ExpiresAt: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "fastly_ai_runtime_control_virtual_key" "aiRuntimeControlVirtualKeyResource" {
lifecycle {
create_before_destroy = true
}
model = "string"
provider_name = "string"
user_id = "string"
expires_at = "string"
name = "string"
}
var aiRuntimeControlVirtualKeyResource = new AiRuntimeControlVirtualKey("aiRuntimeControlVirtualKeyResource", AiRuntimeControlVirtualKeyArgs.builder()
.model("string")
.providerName("string")
.userId("string")
.expiresAt("string")
.name("string")
.build());
ai_runtime_control_virtual_key_resource = fastly.AiRuntimeControlVirtualKey("aiRuntimeControlVirtualKeyResource",
model="string",
provider_name="string",
user_id="string",
expires_at="string",
name="string")
const aiRuntimeControlVirtualKeyResource = new fastly.AiRuntimeControlVirtualKey("aiRuntimeControlVirtualKeyResource", {
model: "string",
providerName: "string",
userId: "string",
expiresAt: "string",
name: "string",
});
type: fastly:AiRuntimeControlVirtualKey
properties:
expiresAt: string
model: string
name: string
providerName: string
userId: string
AiRuntimeControlVirtualKey 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 AiRuntimeControlVirtualKey resource accepts the following input properties:
- Model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - Provider
Name string - The AI model provider name, e.g.
Anthropic. - User
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- Expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- Name string
- A human-readable name for the virtual key.
- Model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - Provider
Name string - The AI model provider name, e.g.
Anthropic. - User
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- Expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- Name string
- A human-readable name for the virtual key.
- model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - provider_
name string - The AI model provider name, e.g.
Anthropic. - user_
id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- expires_
at string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- name string
- A human-readable name for the virtual key.
- model String
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - provider
Name String - The AI model provider name, e.g.
Anthropic. - user
Id String - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- expires
At String - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- name String
- A human-readable name for the virtual key.
- model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - provider
Name string - The AI model provider name, e.g.
Anthropic. - user
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- name string
- A human-readable name for the virtual key.
- model str
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - provider_
name str - The AI model provider name, e.g.
Anthropic. - user_
id str - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- expires_
at str - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- name str
- A human-readable name for the virtual key.
- model String
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - provider
Name String - The AI model provider name, e.g.
Anthropic. - user
Id String - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- expires
At String - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- name String
- A human-readable name for the virtual key.
Outputs
All input properties are implicitly available as output properties. Additionally, the AiRuntimeControlVirtualKey resource produces the following output properties:
- Access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- Created
At string - Timestamp (UTC) of when the virtual key was created.
- Created
By string - The display name of the user who created the virtual key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- Type string
- The type of the virtual key.
- Updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- Access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- Created
At string - Timestamp (UTC) of when the virtual key was created.
- Created
By string - The display name of the user who created the virtual key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- Type string
- The type of the virtual key.
- Updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- access_
token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created_
at string - Timestamp (UTC) of when the virtual key was created.
- created_
by string - The display name of the user who created the virtual key.
- id string
- The provider-assigned unique ID for this managed resource.
- last_
used_ stringat - Timestamp (UTC) of when the virtual key was last used.
- type string
- The type of the virtual key.
- updated_
at string - Timestamp (UTC) of when the virtual key was last updated.
- access
Token String - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At String - Timestamp (UTC) of when the virtual key was created.
- created
By String - The display name of the user who created the virtual key.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - Timestamp (UTC) of when the virtual key was last used.
- type String
- The type of the virtual key.
- updated
At String - Timestamp (UTC) of when the virtual key was last updated.
- access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At string - Timestamp (UTC) of when the virtual key was created.
- created
By string - The display name of the user who created the virtual key.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- type string
- The type of the virtual key.
- updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- access_
token str - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created_
at str - Timestamp (UTC) of when the virtual key was created.
- created_
by str - The display name of the user who created the virtual key.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
used_ strat - Timestamp (UTC) of when the virtual key was last used.
- type str
- The type of the virtual key.
- updated_
at str - Timestamp (UTC) of when the virtual key was last updated.
- access
Token String - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At String - Timestamp (UTC) of when the virtual key was created.
- created
By String - The display name of the user who created the virtual key.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Used StringAt - Timestamp (UTC) of when the virtual key was last used.
- type String
- The type of the virtual key.
- updated
At String - Timestamp (UTC) of when the virtual key was last updated.
Look up Existing AiRuntimeControlVirtualKey Resource
Get an existing AiRuntimeControlVirtualKey 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?: AiRuntimeControlVirtualKeyState, opts?: CustomResourceOptions): AiRuntimeControlVirtualKey@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_token: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
expires_at: Optional[str] = None,
last_used_at: Optional[str] = None,
model: Optional[str] = None,
name: Optional[str] = None,
provider_name: Optional[str] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None,
user_id: Optional[str] = None) -> AiRuntimeControlVirtualKeyfunc GetAiRuntimeControlVirtualKey(ctx *Context, name string, id IDInput, state *AiRuntimeControlVirtualKeyState, opts ...ResourceOption) (*AiRuntimeControlVirtualKey, error)public static AiRuntimeControlVirtualKey Get(string name, Input<string> id, AiRuntimeControlVirtualKeyState? state, CustomResourceOptions? opts = null)public static AiRuntimeControlVirtualKey get(String name, Output<String> id, AiRuntimeControlVirtualKeyState state, CustomResourceOptions options)resources: _: type: fastly:AiRuntimeControlVirtualKey get: id: ${id}import {
to = fastly_ai_runtime_control_virtual_key.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- Created
At string - Timestamp (UTC) of when the virtual key was created.
- Created
By string - The display name of the user who created the virtual key.
- Expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- Last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- Model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - Name string
- A human-readable name for the virtual key.
- Provider
Name string - The AI model provider name, e.g.
Anthropic. - Type string
- The type of the virtual key.
- Updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- User
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- Access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- Created
At string - Timestamp (UTC) of when the virtual key was created.
- Created
By string - The display name of the user who created the virtual key.
- Expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- Last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- Model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - Name string
- A human-readable name for the virtual key.
- Provider
Name string - The AI model provider name, e.g.
Anthropic. - Type string
- The type of the virtual key.
- Updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- User
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- access_
token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created_
at string - Timestamp (UTC) of when the virtual key was created.
- created_
by string - The display name of the user who created the virtual key.
- expires_
at string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- last_
used_ stringat - Timestamp (UTC) of when the virtual key was last used.
- model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - name string
- A human-readable name for the virtual key.
- provider_
name string - The AI model provider name, e.g.
Anthropic. - type string
- The type of the virtual key.
- updated_
at string - Timestamp (UTC) of when the virtual key was last updated.
- user_
id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- access
Token String - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At String - Timestamp (UTC) of when the virtual key was created.
- created
By String - The display name of the user who created the virtual key.
- expires
At String - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- last
Used StringAt - Timestamp (UTC) of when the virtual key was last used.
- model String
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - name String
- A human-readable name for the virtual key.
- provider
Name String - The AI model provider name, e.g.
Anthropic. - type String
- The type of the virtual key.
- updated
At String - Timestamp (UTC) of when the virtual key was last updated.
- user
Id String - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- access
Token string - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At string - Timestamp (UTC) of when the virtual key was created.
- created
By string - The display name of the user who created the virtual key.
- expires
At string - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- last
Used stringAt - Timestamp (UTC) of when the virtual key was last used.
- model string
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - name string
- A human-readable name for the virtual key.
- provider
Name string - The AI model provider name, e.g.
Anthropic. - type string
- The type of the virtual key.
- updated
At string - Timestamp (UTC) of when the virtual key was last updated.
- user
Id string - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- access_
token str - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created_
at str - Timestamp (UTC) of when the virtual key was created.
- created_
by str - The display name of the user who created the virtual key.
- expires_
at str - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- last_
used_ strat - Timestamp (UTC) of when the virtual key was last used.
- model str
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - name str
- A human-readable name for the virtual key.
- provider_
name str - The AI model provider name, e.g.
Anthropic. - type str
- The type of the virtual key.
- updated_
at str - Timestamp (UTC) of when the virtual key was last updated.
- user_
id str - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
- access
Token String - The generated access token used to authenticate as this virtual key. Only returned by the API when the key is created.
- created
At String - Timestamp (UTC) of when the virtual key was created.
- created
By String - The display name of the user who created the virtual key.
- expires
At String - The expiration timestamp of the virtual key, in RFC 3339 format. Once set, this value cannot be unset, only changed.
- last
Used StringAt - Timestamp (UTC) of when the virtual key was last used.
- model String
- The AI model identifier, e.g.
claude-sonnet-4-20250514. - name String
- A human-readable name for the virtual key.
- provider
Name String - The AI model provider name, e.g.
Anthropic. - type String
- The type of the virtual key.
- updated
At String - Timestamp (UTC) of when the virtual key was last updated.
- user
Id String - The ID of the user creating the virtual key. Changing this forces a new virtual key to be created.
Import
Fastly AI Runtime Control virtual keys can be imported using their key ID, e.g.
$ pulumi import fastly:index/aiRuntimeControlVirtualKey:AiRuntimeControlVirtualKey demo xxxxxxxxxxxxxxxxxxxx
Note: Since
accessTokenis only returned by the API at creation time, it will be empty after importing an existing virtual key.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Fastly pulumi/pulumi-fastly
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
fastlyTerraform Provider.
published on Friday, Sep 18, 2026 by Pulumi