Defines a web agent resource for Azure CDN.
Uses Azure REST API version 2025-09-01-preview.
Example Usage
Create or Update Web Agent
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var webAgent = new AzureNative.Cdn.WebAgent("webAgent", new()
{
Description = "Primary web agent for content processing",
Location = "WestUs",
Paths = new[]
{
new AzureNative.Cdn.Inputs.AgentPathArgs
{
Path = "/chat",
Type = AzureNative.Cdn.AgentPathType.Chat,
},
new AzureNative.Cdn.Inputs.AgentPathArgs
{
Path = "/mcp",
Type = AzureNative.Cdn.AgentPathType.McpServer,
},
},
ResourceGroupName = "RG",
SystemPrompt = "You are a helpful AI assistant for customer support. Please provide accurate and friendly responses.",
Tags =
{
{ "key1", "value1" },
},
WebAgentName = "myWebAgent1",
});
});
package main
import (
cdn "github.com/pulumi/pulumi-azure-native-sdk/cdn/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cdn.NewWebAgent(ctx, "webAgent", &cdn.WebAgentArgs{
Description: pulumi.String("Primary web agent for content processing"),
Location: pulumi.String("WestUs"),
Paths: cdn.AgentPathArray{
&cdn.AgentPathArgs{
Path: pulumi.String("/chat"),
Type: pulumi.String(cdn.AgentPathTypeChat),
},
&cdn.AgentPathArgs{
Path: pulumi.String("/mcp"),
Type: pulumi.String(cdn.AgentPathTypeMcpServer),
},
},
ResourceGroupName: pulumi.String("RG"),
SystemPrompt: pulumi.String("You are a helpful AI assistant for customer support. Please provide accurate and friendly responses."),
Tags: pulumi.StringMap{
"key1": pulumi.String("value1"),
},
WebAgentName: pulumi.String("myWebAgent1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.cdn.WebAgent;
import com.pulumi.azurenative.cdn.WebAgentArgs;
import com.pulumi.azurenative.cdn.inputs.AgentPathArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var webAgent = new WebAgent("webAgent", WebAgentArgs.builder()
.description("Primary web agent for content processing")
.location("WestUs")
.paths(
AgentPathArgs.builder()
.path("/chat")
.type("Chat")
.build(),
AgentPathArgs.builder()
.path("/mcp")
.type("McpServer")
.build())
.resourceGroupName("RG")
.systemPrompt("You are a helpful AI assistant for customer support. Please provide accurate and friendly responses.")
.tags(Map.of("key1", "value1"))
.webAgentName("myWebAgent1")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const webAgent = new azure_native.cdn.WebAgent("webAgent", {
description: "Primary web agent for content processing",
location: "WestUs",
paths: [
{
path: "/chat",
type: azure_native.cdn.AgentPathType.Chat,
},
{
path: "/mcp",
type: azure_native.cdn.AgentPathType.McpServer,
},
],
resourceGroupName: "RG",
systemPrompt: "You are a helpful AI assistant for customer support. Please provide accurate and friendly responses.",
tags: {
key1: "value1",
},
webAgentName: "myWebAgent1",
});
import pulumi
import pulumi_azure_native as azure_native
web_agent = azure_native.cdn.WebAgent("webAgent",
description="Primary web agent for content processing",
location="WestUs",
paths=[
{
"path": "/chat",
"type": azure_native.cdn.AgentPathType.CHAT,
},
{
"path": "/mcp",
"type": azure_native.cdn.AgentPathType.MCP_SERVER,
},
],
resource_group_name="RG",
system_prompt="You are a helpful AI assistant for customer support. Please provide accurate and friendly responses.",
tags={
"key1": "value1",
},
web_agent_name="myWebAgent1")
resources:
webAgent:
type: azure-native:cdn:WebAgent
properties:
description: Primary web agent for content processing
location: WestUs
paths:
- path: /chat
type: Chat
- path: /mcp
type: McpServer
resourceGroupName: RG
systemPrompt: You are a helpful AI assistant for customer support. Please provide accurate and friendly responses.
tags:
key1: value1
webAgentName: myWebAgent1
Create WebAgent Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WebAgent(name: string, args: WebAgentArgs, opts?: CustomResourceOptions);@overload
def WebAgent(resource_name: str,
args: WebAgentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WebAgent(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
description: Optional[str] = None,
location: Optional[str] = None,
paths: Optional[Sequence[AgentPathArgs]] = None,
system_prompt: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
web_agent_name: Optional[str] = None)func NewWebAgent(ctx *Context, name string, args WebAgentArgs, opts ...ResourceOption) (*WebAgent, error)public WebAgent(string name, WebAgentArgs args, CustomResourceOptions? opts = null)
public WebAgent(String name, WebAgentArgs args)
public WebAgent(String name, WebAgentArgs args, CustomResourceOptions options)
type: azure-native:cdn:WebAgent
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WebAgentArgs
- 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 WebAgentArgs
- 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 WebAgentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WebAgentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WebAgentArgs
- 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 webAgentResource = new AzureNative.Cdn.WebAgent("webAgentResource", new()
{
ResourceGroupName = "string",
Description = "string",
Location = "string",
Paths = new[]
{
new AzureNative.Cdn.Inputs.AgentPathArgs
{
Path = "string",
Type = "string",
},
},
SystemPrompt = "string",
Tags =
{
{ "string", "string" },
},
WebAgentName = "string",
});
example, err := cdn.NewWebAgent(ctx, "webAgentResource", &cdn.WebAgentArgs{
ResourceGroupName: pulumi.String("string"),
Description: pulumi.String("string"),
Location: pulumi.String("string"),
Paths: cdn.AgentPathArray{
&cdn.AgentPathArgs{
Path: pulumi.String("string"),
Type: pulumi.String("string"),
},
},
SystemPrompt: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
WebAgentName: pulumi.String("string"),
})
var webAgentResource = new WebAgent("webAgentResource", WebAgentArgs.builder()
.resourceGroupName("string")
.description("string")
.location("string")
.paths(AgentPathArgs.builder()
.path("string")
.type("string")
.build())
.systemPrompt("string")
.tags(Map.of("string", "string"))
.webAgentName("string")
.build());
web_agent_resource = azure_native.cdn.WebAgent("webAgentResource",
resource_group_name="string",
description="string",
location="string",
paths=[{
"path": "string",
"type": "string",
}],
system_prompt="string",
tags={
"string": "string",
},
web_agent_name="string")
const webAgentResource = new azure_native.cdn.WebAgent("webAgentResource", {
resourceGroupName: "string",
description: "string",
location: "string",
paths: [{
path: "string",
type: "string",
}],
systemPrompt: "string",
tags: {
string: "string",
},
webAgentName: "string",
});
type: azure-native:cdn:WebAgent
properties:
description: string
location: string
paths:
- path: string
type: string
resourceGroupName: string
systemPrompt: string
tags:
string: string
webAgentName: string
WebAgent 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 WebAgent resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Description string
- Optional textual description of the agent.
- Location string
- The geo-location where the resource lives
- Paths
List<Pulumi.
Azure Native. Cdn. Inputs. Agent Path> - List of paths associated with the web agent.
- System
Prompt string - System prompt for the web agent.
- Dictionary<string, string>
- Resource tags.
- Web
Agent stringName - The name of the web agent.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Description string
- Optional textual description of the agent.
- Location string
- The geo-location where the resource lives
- Paths
[]Agent
Path Args - List of paths associated with the web agent.
- System
Prompt string - System prompt for the web agent.
- map[string]string
- Resource tags.
- Web
Agent stringName - The name of the web agent.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- description String
- Optional textual description of the agent.
- location String
- The geo-location where the resource lives
- paths
List<Agent
Path> - List of paths associated with the web agent.
- system
Prompt String - System prompt for the web agent.
- Map<String,String>
- Resource tags.
- web
Agent StringName - The name of the web agent.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- description string
- Optional textual description of the agent.
- location string
- The geo-location where the resource lives
- paths
Agent
Path[] - List of paths associated with the web agent.
- system
Prompt string - System prompt for the web agent.
- {[key: string]: string}
- Resource tags.
- web
Agent stringName - The name of the web agent.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- description str
- Optional textual description of the agent.
- location str
- The geo-location where the resource lives
- paths
Sequence[Agent
Path Args] - List of paths associated with the web agent.
- system_
prompt str - System prompt for the web agent.
- Mapping[str, str]
- Resource tags.
- web_
agent_ strname - The name of the web agent.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- description String
- Optional textual description of the agent.
- location String
- The geo-location where the resource lives
- paths List<Property Map>
- List of paths associated with the web agent.
- system
Prompt String - System prompt for the web agent.
- Map<String>
- Resource tags.
- web
Agent StringName - The name of the web agent.
Outputs
All input properties are implicitly available as output properties. Additionally, the WebAgent resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Profile
Agent List<Pulumi.Links Azure Native. Cdn. Outputs. Resource Reference Response> - References to agent links in CDN profiles.
- Provisioning
State string - Provisioning status of the web agent.
- System
Data Pulumi.Azure Native. Cdn. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Azure
Api stringVersion - The Azure API version of the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- Profile
Agent []ResourceLinks Reference Response - References to agent links in CDN profiles.
- Provisioning
State string - Provisioning status of the web agent.
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- profile
Agent List<ResourceLinks Reference Response> - References to agent links in CDN profiles.
- provisioning
State String - Provisioning status of the web agent.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api stringVersion - The Azure API version of the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- profile
Agent ResourceLinks Reference Response[] - References to agent links in CDN profiles.
- provisioning
State string - Provisioning status of the web agent.
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ strversion - The Azure API version of the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- profile_
agent_ Sequence[Resourcelinks Reference Response] - References to agent links in CDN profiles.
- provisioning_
state str - Provisioning status of the web agent.
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- profile
Agent List<Property Map>Links - References to agent links in CDN profiles.
- provisioning
State String - Provisioning status of the web agent.
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
AgentPath, AgentPathArgs
Defines a path configuration for a web agent.- Path string
- The actual path value.
- Type
string | Pulumi.
Azure Native. Cdn. Agent Path Type - The type of the path.
- Path string
- The actual path value.
- Type
string | Agent
Path Type - The type of the path.
- path String
- The actual path value.
- type
String | Agent
Path Type - The type of the path.
- path string
- The actual path value.
- type
string | Agent
Path Type - The type of the path.
- path str
- The actual path value.
- type
str | Agent
Path Type - The type of the path.
- path String
- The actual path value.
- type
String | "Chat" | "Mcp
Server" - The type of the path.
AgentPathResponse, AgentPathResponseArgs
Defines a path configuration for a web agent.AgentPathType, AgentPathTypeArgs
- Chat
- Chat
- Mcp
Server - McpServer
- Agent
Path Type Chat - Chat
- Agent
Path Type Mcp Server - McpServer
- Chat
- Chat
- Mcp
Server - McpServer
- Chat
- Chat
- Mcp
Server - McpServer
- CHAT
- Chat
- MCP_SERVER
- McpServer
- "Chat"
- Chat
- "Mcp
Server" - McpServer
ResourceReferenceResponse, ResourceReferenceResponseArgs
Reference to another resource.- Id string
- Resource ID.
- Id string
- Resource ID.
- id String
- Resource ID.
- id string
- Resource ID.
- id str
- Resource ID.
- id String
- Resource ID.
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:cdn:WebAgent myWebAgent1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/webAgents/{webAgentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
