tencentcloud.TsfPathRewrite
Explore with Pulumi AI
Provides a resource to create a tsf path_rewrite
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const pathRewrite = new tencentcloud.TsfPathRewrite("pathRewrite", {
blocked: "N",
gatewayGroupId: "group-a2j9zxpv",
order: 2,
regex: "/test",
replacement: "/tt",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
path_rewrite = tencentcloud.TsfPathRewrite("pathRewrite",
blocked="N",
gateway_group_id="group-a2j9zxpv",
order=2,
regex="/test",
replacement="/tt")
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.NewTsfPathRewrite(ctx, "pathRewrite", &tencentcloud.TsfPathRewriteArgs{
Blocked: pulumi.String("N"),
GatewayGroupId: pulumi.String("group-a2j9zxpv"),
Order: pulumi.Float64(2),
Regex: pulumi.String("/test"),
Replacement: pulumi.String("/tt"),
})
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 pathRewrite = new Tencentcloud.TsfPathRewrite("pathRewrite", new()
{
Blocked = "N",
GatewayGroupId = "group-a2j9zxpv",
Order = 2,
Regex = "/test",
Replacement = "/tt",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TsfPathRewrite;
import com.pulumi.tencentcloud.TsfPathRewriteArgs;
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 pathRewrite = new TsfPathRewrite("pathRewrite", TsfPathRewriteArgs.builder()
.blocked("N")
.gatewayGroupId("group-a2j9zxpv")
.order(2)
.regex("/test")
.replacement("/tt")
.build());
}
}
resources:
pathRewrite:
type: tencentcloud:TsfPathRewrite
properties:
blocked: N
gatewayGroupId: group-a2j9zxpv
order: 2
regex: /test
replacement: /tt
Create TsfPathRewrite Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TsfPathRewrite(name: string, args: TsfPathRewriteArgs, opts?: CustomResourceOptions);
@overload
def TsfPathRewrite(resource_name: str,
args: TsfPathRewriteArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TsfPathRewrite(resource_name: str,
opts: Optional[ResourceOptions] = None,
blocked: Optional[str] = None,
gateway_group_id: Optional[str] = None,
order: Optional[float] = None,
regex: Optional[str] = None,
replacement: Optional[str] = None,
tsf_path_rewrite_id: Optional[str] = None)
func NewTsfPathRewrite(ctx *Context, name string, args TsfPathRewriteArgs, opts ...ResourceOption) (*TsfPathRewrite, error)
public TsfPathRewrite(string name, TsfPathRewriteArgs args, CustomResourceOptions? opts = null)
public TsfPathRewrite(String name, TsfPathRewriteArgs args)
public TsfPathRewrite(String name, TsfPathRewriteArgs args, CustomResourceOptions options)
type: tencentcloud:TsfPathRewrite
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 TsfPathRewriteArgs
- 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 TsfPathRewriteArgs
- 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 TsfPathRewriteArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TsfPathRewriteArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TsfPathRewriteArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TsfPathRewrite 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 TsfPathRewrite resource accepts the following input properties:
- Blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- Gateway
Group stringId - gateway deployment group ID.
- Order double
- rule order, the smaller the higher the priority.
- Regex string
- regular expression.
- Replacement string
- content to replace.
- Tsf
Path stringRewrite Id - ID of the resource.
- Blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- Gateway
Group stringId - gateway deployment group ID.
- Order float64
- rule order, the smaller the higher the priority.
- Regex string
- regular expression.
- Replacement string
- content to replace.
- Tsf
Path stringRewrite Id - ID of the resource.
- blocked String
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group StringId - gateway deployment group ID.
- order Double
- rule order, the smaller the higher the priority.
- regex String
- regular expression.
- replacement String
- content to replace.
- tsf
Path StringRewrite Id - ID of the resource.
- blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group stringId - gateway deployment group ID.
- order number
- rule order, the smaller the higher the priority.
- regex string
- regular expression.
- replacement string
- content to replace.
- tsf
Path stringRewrite Id - ID of the resource.
- blocked str
- Whether to shield the mapped path, Y: Yes N: No.
- gateway_
group_ strid - gateway deployment group ID.
- order float
- rule order, the smaller the higher the priority.
- regex str
- regular expression.
- replacement str
- content to replace.
- tsf_
path_ strrewrite_ id - ID of the resource.
- blocked String
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group StringId - gateway deployment group ID.
- order Number
- rule order, the smaller the higher the priority.
- regex String
- regular expression.
- replacement String
- content to replace.
- tsf
Path StringRewrite Id - ID of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the TsfPathRewrite resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Path
Rewrite stringId - path rewrite rule ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Path
Rewrite stringId - path rewrite rule ID.
- id String
- The provider-assigned unique ID for this managed resource.
- path
Rewrite StringId - path rewrite rule ID.
- id string
- The provider-assigned unique ID for this managed resource.
- path
Rewrite stringId - path rewrite rule ID.
- id str
- The provider-assigned unique ID for this managed resource.
- path_
rewrite_ strid - path rewrite rule ID.
- id String
- The provider-assigned unique ID for this managed resource.
- path
Rewrite StringId - path rewrite rule ID.
Look up Existing TsfPathRewrite Resource
Get an existing TsfPathRewrite 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?: TsfPathRewriteState, opts?: CustomResourceOptions): TsfPathRewrite
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
blocked: Optional[str] = None,
gateway_group_id: Optional[str] = None,
order: Optional[float] = None,
path_rewrite_id: Optional[str] = None,
regex: Optional[str] = None,
replacement: Optional[str] = None,
tsf_path_rewrite_id: Optional[str] = None) -> TsfPathRewrite
func GetTsfPathRewrite(ctx *Context, name string, id IDInput, state *TsfPathRewriteState, opts ...ResourceOption) (*TsfPathRewrite, error)
public static TsfPathRewrite Get(string name, Input<string> id, TsfPathRewriteState? state, CustomResourceOptions? opts = null)
public static TsfPathRewrite get(String name, Output<String> id, TsfPathRewriteState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TsfPathRewrite get: 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.
- Blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- Gateway
Group stringId - gateway deployment group ID.
- Order double
- rule order, the smaller the higher the priority.
- Path
Rewrite stringId - path rewrite rule ID.
- Regex string
- regular expression.
- Replacement string
- content to replace.
- Tsf
Path stringRewrite Id - ID of the resource.
- Blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- Gateway
Group stringId - gateway deployment group ID.
- Order float64
- rule order, the smaller the higher the priority.
- Path
Rewrite stringId - path rewrite rule ID.
- Regex string
- regular expression.
- Replacement string
- content to replace.
- Tsf
Path stringRewrite Id - ID of the resource.
- blocked String
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group StringId - gateway deployment group ID.
- order Double
- rule order, the smaller the higher the priority.
- path
Rewrite StringId - path rewrite rule ID.
- regex String
- regular expression.
- replacement String
- content to replace.
- tsf
Path StringRewrite Id - ID of the resource.
- blocked string
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group stringId - gateway deployment group ID.
- order number
- rule order, the smaller the higher the priority.
- path
Rewrite stringId - path rewrite rule ID.
- regex string
- regular expression.
- replacement string
- content to replace.
- tsf
Path stringRewrite Id - ID of the resource.
- blocked str
- Whether to shield the mapped path, Y: Yes N: No.
- gateway_
group_ strid - gateway deployment group ID.
- order float
- rule order, the smaller the higher the priority.
- path_
rewrite_ strid - path rewrite rule ID.
- regex str
- regular expression.
- replacement str
- content to replace.
- tsf_
path_ strrewrite_ id - ID of the resource.
- blocked String
- Whether to shield the mapped path, Y: Yes N: No.
- gateway
Group StringId - gateway deployment group ID.
- order Number
- rule order, the smaller the higher the priority.
- path
Rewrite StringId - path rewrite rule ID.
- regex String
- regular expression.
- replacement String
- content to replace.
- tsf
Path StringRewrite Id - ID of the resource.
Import
tsf path_rewrite can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tsfPathRewrite:TsfPathRewrite path_rewrite rewrite-nygq33v2
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
tencentcloud
Terraform Provider.