published on Tuesday, Jun 30, 2026 by tencentcloudstack
published on Tuesday, Jun 30, 2026 by tencentcloudstack
Provides a resource to create a TEO edge function replica
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.TeoFunctionReplica("example", {
zoneId: "zone-2qtuhspy7cr6",
functionId: "ef-2qlxy8s7o96e",
replicaName: "replica-example",
content: "addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })",
remark: "example replica",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.TeoFunctionReplica("example",
zone_id="zone-2qtuhspy7cr6",
function_id="ef-2qlxy8s7o96e",
replica_name="replica-example",
content="addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })",
remark="example replica")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := tencentcloud.NewTeoFunctionReplica(ctx, "example", &tencentcloud.TeoFunctionReplicaArgs{
ZoneId: pulumi.String("zone-2qtuhspy7cr6"),
FunctionId: pulumi.String("ef-2qlxy8s7o96e"),
ReplicaName: pulumi.String("replica-example"),
Content: pulumi.String("addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })"),
Remark: pulumi.String("example replica"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var example = new Tencentcloud.TeoFunctionReplica("example", new()
{
ZoneId = "zone-2qtuhspy7cr6",
FunctionId = "ef-2qlxy8s7o96e",
ReplicaName = "replica-example",
Content = "addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })",
Remark = "example replica",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TeoFunctionReplica;
import com.pulumi.tencentcloud.TeoFunctionReplicaArgs;
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 example = new TeoFunctionReplica("example", TeoFunctionReplicaArgs.builder()
.zoneId("zone-2qtuhspy7cr6")
.functionId("ef-2qlxy8s7o96e")
.replicaName("replica-example")
.content("addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })")
.remark("example replica")
.build());
}
}
resources:
example:
type: tencentcloud:TeoFunctionReplica
properties:
zoneId: zone-2qtuhspy7cr6
functionId: ef-2qlxy8s7o96e
replicaName: replica-example
content: addEventListener('fetch', event => { event.respondWith(new Response('hello world')) })
remark: example replica
Example coming soon!
Create TeoFunctionReplica Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeoFunctionReplica(name: string, args: TeoFunctionReplicaArgs, opts?: CustomResourceOptions);@overload
def TeoFunctionReplica(resource_name: str,
args: TeoFunctionReplicaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeoFunctionReplica(resource_name: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
function_id: Optional[str] = None,
replica_name: Optional[str] = None,
zone_id: Optional[str] = None,
remark: Optional[str] = None,
teo_function_replica_id: Optional[str] = None)func NewTeoFunctionReplica(ctx *Context, name string, args TeoFunctionReplicaArgs, opts ...ResourceOption) (*TeoFunctionReplica, error)public TeoFunctionReplica(string name, TeoFunctionReplicaArgs args, CustomResourceOptions? opts = null)
public TeoFunctionReplica(String name, TeoFunctionReplicaArgs args)
public TeoFunctionReplica(String name, TeoFunctionReplicaArgs args, CustomResourceOptions options)
type: tencentcloud:TeoFunctionReplica
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_teofunctionreplica" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TeoFunctionReplicaArgs
- 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 TeoFunctionReplicaArgs
- 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 TeoFunctionReplicaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeoFunctionReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeoFunctionReplicaArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TeoFunctionReplica 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 TeoFunctionReplica resource accepts the following input properties:
- Content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- Function
Id string - Function ID.
- Replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- Zone
Id string - Zone ID.
- Remark string
- Edge function replica description. Maximum 50 characters.
- Teo
Function stringReplica Id - ID of the resource.
- Content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- Function
Id string - Function ID.
- Replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- Zone
Id string - Zone ID.
- Remark string
- Edge function replica description. Maximum 50 characters.
- Teo
Function stringReplica Id - ID of the resource.
- content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function_
id string - Function ID.
- replica_
name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- zone_
id string - Zone ID.
- remark string
- Edge function replica description. Maximum 50 characters.
- teo_
function_ stringreplica_ id - ID of the resource.
- content String
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id String - Function ID.
- replica
Name String - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- zone
Id String - Zone ID.
- remark String
- Edge function replica description. Maximum 50 characters.
- teo
Function StringReplica Id - ID of the resource.
- content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id string - Function ID.
- replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- zone
Id string - Zone ID.
- remark string
- Edge function replica description. Maximum 50 characters.
- teo
Function stringReplica Id - ID of the resource.
- content str
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function_
id str - Function ID.
- replica_
name str - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- zone_
id str - Zone ID.
- remark str
- Edge function replica description. Maximum 50 characters.
- teo_
function_ strreplica_ id - ID of the resource.
- content String
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id String - Function ID.
- replica
Name String - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- zone
Id String - Zone ID.
- remark String
- Edge function replica description. Maximum 50 characters.
- teo
Function StringReplica Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TeoFunctionReplica resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TeoFunctionReplica Resource
Get an existing TeoFunctionReplica 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?: TeoFunctionReplicaState, opts?: CustomResourceOptions): TeoFunctionReplica@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
content: Optional[str] = None,
function_id: Optional[str] = None,
remark: Optional[str] = None,
replica_name: Optional[str] = None,
teo_function_replica_id: Optional[str] = None,
zone_id: Optional[str] = None) -> TeoFunctionReplicafunc GetTeoFunctionReplica(ctx *Context, name string, id IDInput, state *TeoFunctionReplicaState, opts ...ResourceOption) (*TeoFunctionReplica, error)public static TeoFunctionReplica Get(string name, Input<string> id, TeoFunctionReplicaState? state, CustomResourceOptions? opts = null)public static TeoFunctionReplica get(String name, Output<String> id, TeoFunctionReplicaState state, CustomResourceOptions options)resources: _: type: tencentcloud:TeoFunctionReplica get: id: ${id}import {
to = tencentcloud_teofunctionreplica.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.
- Content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- Function
Id string - Function ID.
- Remark string
- Edge function replica description. Maximum 50 characters.
- Replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- Teo
Function stringReplica Id - ID of the resource.
- Zone
Id string - Zone ID.
- Content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- Function
Id string - Function ID.
- Remark string
- Edge function replica description. Maximum 50 characters.
- Replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- Teo
Function stringReplica Id - ID of the resource.
- Zone
Id string - Zone ID.
- content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function_
id string - Function ID.
- remark string
- Edge function replica description. Maximum 50 characters.
- replica_
name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- teo_
function_ stringreplica_ id - ID of the resource.
- zone_
id string - Zone ID.
- content String
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id String - Function ID.
- remark String
- Edge function replica description. Maximum 50 characters.
- replica
Name String - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- teo
Function StringReplica Id - ID of the resource.
- zone
Id String - Zone ID.
- content string
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id string - Function ID.
- remark string
- Edge function replica description. Maximum 50 characters.
- replica
Name string - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- teo
Function stringReplica Id - ID of the resource.
- zone
Id string - Zone ID.
- content str
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function_
id str - Function ID.
- remark str
- Edge function replica description. Maximum 50 characters.
- replica_
name str - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- teo_
function_ strreplica_ id - ID of the resource.
- zone_
id str - Zone ID.
- content String
- Edge function replica content. Currently only supports JavaScript code, maximum 5MB.
- function
Id String - Function ID.
- remark String
- Edge function replica description. Maximum 50 characters.
- replica
Name String - Edge function replica name. Limited to 1-50 characters, allowed characters are a-z, 0-9, -, and - cannot be used alone or consecutively, nor at the beginning or end. Replica names must be unique under the same FunctionId.
- teo
Function StringReplica Id - ID of the resource.
- zone
Id String - Zone ID.
Import
TEO function replica can be imported using the zone_id#function_id#replica_name, e.g.
$ pulumi import tencentcloud:index/teoFunctionReplica:TeoFunctionReplica example zone-2qtuhspy7cr6#ef-2qlxy8s7o96e#replica-example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
published on Tuesday, Jun 30, 2026 by tencentcloudstack