published on Monday, May 11, 2026 by tencentcloudstack
published on Monday, May 11, 2026 by tencentcloudstack
Provides a resource to create a TEO API security resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const example = new tencentcloud.TeoSecurityApiService("example", {
zoneId: "zone-3fkff38fyw8s",
apiServices: {
name: "tf-example",
basePath: "/api/v1",
},
});
const exampleTeoSecurityApiResource = new tencentcloud.TeoSecurityApiResource("example", {
zoneId: "zone-3fkff38fyw8s",
apiResources: {
name: "tf-example",
path: "/api/v1/orders",
apiServiceIds: [example.apiServices.apply(apiServices => apiServices.id)],
methods: [
"GET",
"POST",
],
requestConstraint: "${http.request.body.form['operationType']} in ['query', 'create']",
},
});
import pulumi
import pulumi_tencentcloud as tencentcloud
example = tencentcloud.TeoSecurityApiService("example",
zone_id="zone-3fkff38fyw8s",
api_services={
"name": "tf-example",
"base_path": "/api/v1",
})
example_teo_security_api_resource = tencentcloud.TeoSecurityApiResource("example",
zone_id="zone-3fkff38fyw8s",
api_resources={
"name": "tf-example",
"path": "/api/v1/orders",
"api_service_ids": [example.api_services.id],
"methods": [
"GET",
"POST",
],
"request_constraint": "${http.request.body.form['operationType']} in ['query', 'create']",
})
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 {
example, err := tencentcloud.NewTeoSecurityApiService(ctx, "example", &tencentcloud.TeoSecurityApiServiceArgs{
ZoneId: pulumi.String("zone-3fkff38fyw8s"),
ApiServices: &tencentcloud.TeoSecurityApiServiceApiServicesArgs{
Name: pulumi.String("tf-example"),
BasePath: pulumi.String("/api/v1"),
},
})
if err != nil {
return err
}
_, err = tencentcloud.NewTeoSecurityApiResource(ctx, "example", &tencentcloud.TeoSecurityApiResourceArgs{
ZoneId: pulumi.String("zone-3fkff38fyw8s"),
ApiResources: &tencentcloud.TeoSecurityApiResourceApiResourcesArgs{
Name: pulumi.String("tf-example"),
Path: pulumi.String("/api/v1/orders"),
ApiServiceIds: pulumi.StringArray{
example.ApiServices.ApplyT(func(apiServices tencentcloud.TeoSecurityApiServiceApiServices) (*string, error) {
return &apiServices.Id, nil
}).(pulumi.StringPtrOutput),
},
Methods: pulumi.StringArray{
pulumi.String("GET"),
pulumi.String("POST"),
},
RequestConstraint: pulumi.String("${http.request.body.form['operationType']} in ['query', 'create']"),
},
})
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.TeoSecurityApiService("example", new()
{
ZoneId = "zone-3fkff38fyw8s",
ApiServices = new Tencentcloud.Inputs.TeoSecurityApiServiceApiServicesArgs
{
Name = "tf-example",
BasePath = "/api/v1",
},
});
var exampleTeoSecurityApiResource = new Tencentcloud.TeoSecurityApiResource("example", new()
{
ZoneId = "zone-3fkff38fyw8s",
ApiResources = new Tencentcloud.Inputs.TeoSecurityApiResourceApiResourcesArgs
{
Name = "tf-example",
Path = "/api/v1/orders",
ApiServiceIds = new[]
{
example.ApiServices.Apply(apiServices => apiServices.Id),
},
Methods = new[]
{
"GET",
"POST",
},
RequestConstraint = "${http.request.body.form['operationType']} in ['query', 'create']",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TeoSecurityApiService;
import com.pulumi.tencentcloud.TeoSecurityApiServiceArgs;
import com.pulumi.tencentcloud.inputs.TeoSecurityApiServiceApiServicesArgs;
import com.pulumi.tencentcloud.TeoSecurityApiResource;
import com.pulumi.tencentcloud.TeoSecurityApiResourceArgs;
import com.pulumi.tencentcloud.inputs.TeoSecurityApiResourceApiResourcesArgs;
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 TeoSecurityApiService("example", TeoSecurityApiServiceArgs.builder()
.zoneId("zone-3fkff38fyw8s")
.apiServices(TeoSecurityApiServiceApiServicesArgs.builder()
.name("tf-example")
.basePath("/api/v1")
.build())
.build());
var exampleTeoSecurityApiResource = new TeoSecurityApiResource("exampleTeoSecurityApiResource", TeoSecurityApiResourceArgs.builder()
.zoneId("zone-3fkff38fyw8s")
.apiResources(TeoSecurityApiResourceApiResourcesArgs.builder()
.name("tf-example")
.path("/api/v1/orders")
.apiServiceIds(example.apiServices().applyValue(_apiServices -> _apiServices.id()))
.methods(
"GET",
"POST")
.requestConstraint("${http.request.body.form['operationType']} in ['query', 'create']")
.build())
.build());
}
}
resources:
example:
type: tencentcloud:TeoSecurityApiService
properties:
zoneId: zone-3fkff38fyw8s
apiServices:
name: tf-example
basePath: /api/v1
exampleTeoSecurityApiResource:
type: tencentcloud:TeoSecurityApiResource
name: example
properties:
zoneId: zone-3fkff38fyw8s
apiResources:
name: tf-example
path: /api/v1/orders
apiServiceIds:
- ${example.apiServices.id}
methods:
- GET
- POST
requestConstraint: $${http.request.body.form['operationType']} in ['query', 'create']
Example coming soon!
Create TeoSecurityApiResource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TeoSecurityApiResource(name: string, args: TeoSecurityApiResourceArgs, opts?: CustomResourceOptions);@overload
def TeoSecurityApiResource(resource_name: str,
args: TeoSecurityApiResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TeoSecurityApiResource(resource_name: str,
opts: Optional[ResourceOptions] = None,
api_resources: Optional[TeoSecurityApiResourceApiResourcesArgs] = None,
zone_id: Optional[str] = None,
teo_security_api_resource_id: Optional[str] = None)func NewTeoSecurityApiResource(ctx *Context, name string, args TeoSecurityApiResourceArgs, opts ...ResourceOption) (*TeoSecurityApiResource, error)public TeoSecurityApiResource(string name, TeoSecurityApiResourceArgs args, CustomResourceOptions? opts = null)
public TeoSecurityApiResource(String name, TeoSecurityApiResourceArgs args)
public TeoSecurityApiResource(String name, TeoSecurityApiResourceArgs args, CustomResourceOptions options)
type: tencentcloud:TeoSecurityApiResource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "tencentcloud_teosecurityapiresource" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args TeoSecurityApiResourceArgs
- 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 TeoSecurityApiResourceArgs
- 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 TeoSecurityApiResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TeoSecurityApiResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TeoSecurityApiResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TeoSecurityApiResource 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 TeoSecurityApiResource resource accepts the following input properties:
- Api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- Zone
Id string - Site ID.
- Teo
Security stringApi Resource Id - ID of the resource.
- Api
Resources TeoSecurity Api Resource Api Resources Args - API resource configuration. Only one resource is allowed per request.
- Zone
Id string - Site ID.
- Teo
Security stringApi Resource Id - ID of the resource.
- api_
resources object - API resource configuration. Only one resource is allowed per request.
- zone_
id string - Site ID.
- teo_
security_ stringapi_ resource_ id - ID of the resource.
- api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- zone
Id String - Site ID.
- teo
Security StringApi Resource Id - ID of the resource.
- api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- zone
Id string - Site ID.
- teo
Security stringApi Resource Id - ID of the resource.
- api_
resources TeoSecurity Api Resource Api Resources Args - API resource configuration. Only one resource is allowed per request.
- zone_
id str - Site ID.
- teo_
security_ strapi_ resource_ id - ID of the resource.
- api
Resources Property Map - API resource configuration. Only one resource is allowed per request.
- zone
Id String - Site ID.
- teo
Security StringApi Resource Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TeoSecurityApiResource 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 TeoSecurityApiResource Resource
Get an existing TeoSecurityApiResource 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?: TeoSecurityApiResourceState, opts?: CustomResourceOptions): TeoSecurityApiResource@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
api_resources: Optional[TeoSecurityApiResourceApiResourcesArgs] = None,
teo_security_api_resource_id: Optional[str] = None,
zone_id: Optional[str] = None) -> TeoSecurityApiResourcefunc GetTeoSecurityApiResource(ctx *Context, name string, id IDInput, state *TeoSecurityApiResourceState, opts ...ResourceOption) (*TeoSecurityApiResource, error)public static TeoSecurityApiResource Get(string name, Input<string> id, TeoSecurityApiResourceState? state, CustomResourceOptions? opts = null)public static TeoSecurityApiResource get(String name, Output<String> id, TeoSecurityApiResourceState state, CustomResourceOptions options)resources: _: type: tencentcloud:TeoSecurityApiResource get: id: ${id}import {
to = tencentcloud_teosecurityapiresource.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.
- Api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- Teo
Security stringApi Resource Id - ID of the resource.
- Zone
Id string - Site ID.
- Api
Resources TeoSecurity Api Resource Api Resources Args - API resource configuration. Only one resource is allowed per request.
- Teo
Security stringApi Resource Id - ID of the resource.
- Zone
Id string - Site ID.
- api_
resources object - API resource configuration. Only one resource is allowed per request.
- teo_
security_ stringapi_ resource_ id - ID of the resource.
- zone_
id string - Site ID.
- api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- teo
Security StringApi Resource Id - ID of the resource.
- zone
Id String - Site ID.
- api
Resources TeoSecurity Api Resource Api Resources - API resource configuration. Only one resource is allowed per request.
- teo
Security stringApi Resource Id - ID of the resource.
- zone
Id string - Site ID.
- api_
resources TeoSecurity Api Resource Api Resources Args - API resource configuration. Only one resource is allowed per request.
- teo_
security_ strapi_ resource_ id - ID of the resource.
- zone_
id str - Site ID.
- api
Resources Property Map - API resource configuration. Only one resource is allowed per request.
- teo
Security StringApi Resource Id - ID of the resource.
- zone
Id String - Site ID.
Supporting Types
TeoSecurityApiResourceApiResources, TeoSecurityApiResourceApiResourcesArgs
- Name string
- API resource name.
- Path string
- API resource path, e.g.
/ava. - Api
Service List<string>Ids - Associated API service ID list.
- Id string
- ID of the resource.
- Methods List<string>
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - Request
Constraint string - Request content matching rule expression.
- Name string
- API resource name.
- Path string
- API resource path, e.g.
/ava. - Api
Service []stringIds - Associated API service ID list.
- Id string
- ID of the resource.
- Methods []string
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - Request
Constraint string - Request content matching rule expression.
- name string
- API resource name.
- path string
- API resource path, e.g.
/ava. - api_
service_ list(string)ids - Associated API service ID list.
- id string
- ID of the resource.
- methods list(string)
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - request_
constraint string - Request content matching rule expression.
- name String
- API resource name.
- path String
- API resource path, e.g.
/ava. - api
Service List<String>Ids - Associated API service ID list.
- id String
- ID of the resource.
- methods List<String>
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - request
Constraint String - Request content matching rule expression.
- name string
- API resource name.
- path string
- API resource path, e.g.
/ava. - api
Service string[]Ids - Associated API service ID list.
- id string
- ID of the resource.
- methods string[]
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - request
Constraint string - Request content matching rule expression.
- name str
- API resource name.
- path str
- API resource path, e.g.
/ava. - api_
service_ Sequence[str]ids - Associated API service ID list.
- id str
- ID of the resource.
- methods Sequence[str]
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - request_
constraint str - Request content matching rule expression.
- name String
- API resource name.
- path String
- API resource path, e.g.
/ava. - api
Service List<String>Ids - Associated API service ID list.
- id String
- ID of the resource.
- methods List<String>
- Allowed HTTP methods. Valid values:
GET,POST,PUT,HEAD,PATCH,OPTIONS,DELETE. - request
Constraint String - Request content matching rule expression.
Import
TEO security API resource can be imported using the zoneId#apiResourceId, e.g.
$ pulumi import tencentcloud:index/teoSecurityApiResource:TeoSecurityApiResource example zone-3fkff38fyw8s#apires-0000039154
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 Monday, May 11, 2026 by tencentcloudstack
