tencentcloud.ClbRedirection
Explore with Pulumi AI
Provides a resource to create a CLB redirection.
Example Usage
Manual Rewrite
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ClbRedirection("foo", {
clbId: "lb-p7olt9e5",
sourceListenerId: "lbl-jc1dx6ju",
sourceRuleId: "loc-ft8fmngv",
targetListenerId: "lbl-asj1hzuo",
targetRuleId: "loc-4xxr2cy7",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ClbRedirection("foo",
clb_id="lb-p7olt9e5",
source_listener_id="lbl-jc1dx6ju",
source_rule_id="loc-ft8fmngv",
target_listener_id="lbl-asj1hzuo",
target_rule_id="loc-4xxr2cy7")
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.NewClbRedirection(ctx, "foo", &tencentcloud.ClbRedirectionArgs{
ClbId: pulumi.String("lb-p7olt9e5"),
SourceListenerId: pulumi.String("lbl-jc1dx6ju"),
SourceRuleId: pulumi.String("loc-ft8fmngv"),
TargetListenerId: pulumi.String("lbl-asj1hzuo"),
TargetRuleId: pulumi.String("loc-4xxr2cy7"),
})
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 foo = new Tencentcloud.ClbRedirection("foo", new()
{
ClbId = "lb-p7olt9e5",
SourceListenerId = "lbl-jc1dx6ju",
SourceRuleId = "loc-ft8fmngv",
TargetListenerId = "lbl-asj1hzuo",
TargetRuleId = "loc-4xxr2cy7",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbRedirection;
import com.pulumi.tencentcloud.ClbRedirectionArgs;
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 foo = new ClbRedirection("foo", ClbRedirectionArgs.builder()
.clbId("lb-p7olt9e5")
.sourceListenerId("lbl-jc1dx6ju")
.sourceRuleId("loc-ft8fmngv")
.targetListenerId("lbl-asj1hzuo")
.targetRuleId("loc-4xxr2cy7")
.build());
}
}
resources:
foo:
type: tencentcloud:ClbRedirection
properties:
clbId: lb-p7olt9e5
sourceListenerId: lbl-jc1dx6ju
sourceRuleId: loc-ft8fmngv
targetListenerId: lbl-asj1hzuo
targetRuleId: loc-4xxr2cy7
Auto Rewrite
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const foo = new tencentcloud.ClbRedirection("foo", {
clbId: "lb-p7olt9e5",
isAutoRewrite: true,
targetListenerId: "lbl-asj1hzuo",
targetRuleId: "loc-4xxr2cy7",
});
import pulumi
import pulumi_tencentcloud as tencentcloud
foo = tencentcloud.ClbRedirection("foo",
clb_id="lb-p7olt9e5",
is_auto_rewrite=True,
target_listener_id="lbl-asj1hzuo",
target_rule_id="loc-4xxr2cy7")
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.NewClbRedirection(ctx, "foo", &tencentcloud.ClbRedirectionArgs{
ClbId: pulumi.String("lb-p7olt9e5"),
IsAutoRewrite: pulumi.Bool(true),
TargetListenerId: pulumi.String("lbl-asj1hzuo"),
TargetRuleId: pulumi.String("loc-4xxr2cy7"),
})
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 foo = new Tencentcloud.ClbRedirection("foo", new()
{
ClbId = "lb-p7olt9e5",
IsAutoRewrite = true,
TargetListenerId = "lbl-asj1hzuo",
TargetRuleId = "loc-4xxr2cy7",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ClbRedirection;
import com.pulumi.tencentcloud.ClbRedirectionArgs;
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 foo = new ClbRedirection("foo", ClbRedirectionArgs.builder()
.clbId("lb-p7olt9e5")
.isAutoRewrite(true)
.targetListenerId("lbl-asj1hzuo")
.targetRuleId("loc-4xxr2cy7")
.build());
}
}
resources:
foo:
type: tencentcloud:ClbRedirection
properties:
clbId: lb-p7olt9e5
isAutoRewrite: true
targetListenerId: lbl-asj1hzuo
targetRuleId: loc-4xxr2cy7
Create ClbRedirection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClbRedirection(name: string, args: ClbRedirectionArgs, opts?: CustomResourceOptions);
@overload
def ClbRedirection(resource_name: str,
args: ClbRedirectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClbRedirection(resource_name: str,
opts: Optional[ResourceOptions] = None,
clb_id: Optional[str] = None,
target_listener_id: Optional[str] = None,
target_rule_id: Optional[str] = None,
clb_redirection_id: Optional[str] = None,
delete_all_auto_rewrite: Optional[bool] = None,
is_auto_rewrite: Optional[bool] = None,
source_listener_id: Optional[str] = None,
source_rule_id: Optional[str] = None)
func NewClbRedirection(ctx *Context, name string, args ClbRedirectionArgs, opts ...ResourceOption) (*ClbRedirection, error)
public ClbRedirection(string name, ClbRedirectionArgs args, CustomResourceOptions? opts = null)
public ClbRedirection(String name, ClbRedirectionArgs args)
public ClbRedirection(String name, ClbRedirectionArgs args, CustomResourceOptions options)
type: tencentcloud:ClbRedirection
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 ClbRedirectionArgs
- 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 ClbRedirectionArgs
- 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 ClbRedirectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClbRedirectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClbRedirectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ClbRedirection 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 ClbRedirection resource accepts the following input properties:
- Clb
Id string - ID of CLB instance.
- Target
Listener stringId - ID of source listener.
- Target
Rule stringId - Rule ID of target listener.
- Clb
Redirection stringId - ID of the resource.
- Delete
All boolAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - Is
Auto boolRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - Source
Listener stringId - ID of source listener.
- Source
Rule stringId - Rule ID of source listener.
- Clb
Id string - ID of CLB instance.
- Target
Listener stringId - ID of source listener.
- Target
Rule stringId - Rule ID of target listener.
- Clb
Redirection stringId - ID of the resource.
- Delete
All boolAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - Is
Auto boolRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - Source
Listener stringId - ID of source listener.
- Source
Rule stringId - Rule ID of source listener.
- clb
Id String - ID of CLB instance.
- target
Listener StringId - ID of source listener.
- target
Rule StringId - Rule ID of target listener.
- clb
Redirection StringId - ID of the resource.
- delete
All BooleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto BooleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener StringId - ID of source listener.
- source
Rule StringId - Rule ID of source listener.
- clb
Id string - ID of CLB instance.
- target
Listener stringId - ID of source listener.
- target
Rule stringId - Rule ID of target listener.
- clb
Redirection stringId - ID of the resource.
- delete
All booleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto booleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener stringId - ID of source listener.
- source
Rule stringId - Rule ID of source listener.
- clb_
id str - ID of CLB instance.
- target_
listener_ strid - ID of source listener.
- target_
rule_ strid - Rule ID of target listener.
- clb_
redirection_ strid - ID of the resource.
- delete_
all_ boolauto_ rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is_
auto_ boolrewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source_
listener_ strid - ID of source listener.
- source_
rule_ strid - Rule ID of source listener.
- clb
Id String - ID of CLB instance.
- target
Listener StringId - ID of source listener.
- target
Rule StringId - Rule ID of target listener.
- clb
Redirection StringId - ID of the resource.
- delete
All BooleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto BooleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener StringId - ID of source listener.
- source
Rule StringId - Rule ID of source listener.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClbRedirection 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 str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ClbRedirection Resource
Get an existing ClbRedirection 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?: ClbRedirectionState, opts?: CustomResourceOptions): ClbRedirection
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
clb_id: Optional[str] = None,
clb_redirection_id: Optional[str] = None,
delete_all_auto_rewrite: Optional[bool] = None,
is_auto_rewrite: Optional[bool] = None,
source_listener_id: Optional[str] = None,
source_rule_id: Optional[str] = None,
target_listener_id: Optional[str] = None,
target_rule_id: Optional[str] = None) -> ClbRedirection
func GetClbRedirection(ctx *Context, name string, id IDInput, state *ClbRedirectionState, opts ...ResourceOption) (*ClbRedirection, error)
public static ClbRedirection Get(string name, Input<string> id, ClbRedirectionState? state, CustomResourceOptions? opts = null)
public static ClbRedirection get(String name, Output<String> id, ClbRedirectionState state, CustomResourceOptions options)
resources: _: type: tencentcloud:ClbRedirection 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.
- Clb
Id string - ID of CLB instance.
- Clb
Redirection stringId - ID of the resource.
- Delete
All boolAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - Is
Auto boolRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - Source
Listener stringId - ID of source listener.
- Source
Rule stringId - Rule ID of source listener.
- Target
Listener stringId - ID of source listener.
- Target
Rule stringId - Rule ID of target listener.
- Clb
Id string - ID of CLB instance.
- Clb
Redirection stringId - ID of the resource.
- Delete
All boolAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - Is
Auto boolRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - Source
Listener stringId - ID of source listener.
- Source
Rule stringId - Rule ID of source listener.
- Target
Listener stringId - ID of source listener.
- Target
Rule stringId - Rule ID of target listener.
- clb
Id String - ID of CLB instance.
- clb
Redirection StringId - ID of the resource.
- delete
All BooleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto BooleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener StringId - ID of source listener.
- source
Rule StringId - Rule ID of source listener.
- target
Listener StringId - ID of source listener.
- target
Rule StringId - Rule ID of target listener.
- clb
Id string - ID of CLB instance.
- clb
Redirection stringId - ID of the resource.
- delete
All booleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto booleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener stringId - ID of source listener.
- source
Rule stringId - Rule ID of source listener.
- target
Listener stringId - ID of source listener.
- target
Rule stringId - Rule ID of target listener.
- clb_
id str - ID of CLB instance.
- clb_
redirection_ strid - ID of the resource.
- delete_
all_ boolauto_ rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is_
auto_ boolrewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source_
listener_ strid - ID of source listener.
- source_
rule_ strid - Rule ID of source listener.
- target_
listener_ strid - ID of source listener.
- target_
rule_ strid - Rule ID of target listener.
- clb
Id String - ID of CLB instance.
- clb
Redirection StringId - ID of the resource.
- delete
All BooleanAuto Rewrite - Indicates whether delete all auto redirection. Default is
false
. It will take effect only when this redirection is auto-rewrite and this auto-rewrite auto redirected more than one rules. All the auto-rewrite relations will be deleted when this parameter set true. - is
Auto BooleanRewrite - Indicates whether automatic forwarding is enable, default is
false
. If enabled, the source listener and location should be empty, the target listener must be https protocol and port is 443. - source
Listener StringId - ID of source listener.
- source
Rule StringId - Rule ID of source listener.
- target
Listener StringId - ID of source listener.
- target
Rule StringId - Rule ID of target listener.
Import
CLB redirection can be imported using the id, e.g.
$ pulumi import tencentcloud:index/clbRedirection:ClbRedirection foo loc-ft8fmngv#loc-4xxr2cy7#lbl-jc1dx6ju#lbl-asj1hzuo#lb-p7olt9e5
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.