tencentcloud.TsfUnitRule
Explore with Pulumi AI
Provides a resource to create a tsf unit_rule
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const unitRule = new tencentcloud.TsfUnitRule("unitRule", {
description: "terraform-desc",
gatewayInstanceId: "gw-ins-rug79a70",
unitRuleItemLists: [{
description: "rule1-desc",
destNamespaceId: "namespace-y8p88eka",
destNamespaceName: "garden-test_default",
name: "Rule1",
relationship: "AND",
unitRuleTagLists: [{
tagField: "aaa",
tagOperator: "IN",
tagType: "U",
tagValue: "1",
}],
}],
});
import pulumi
import pulumi_tencentcloud as tencentcloud
unit_rule = tencentcloud.TsfUnitRule("unitRule",
description="terraform-desc",
gateway_instance_id="gw-ins-rug79a70",
unit_rule_item_lists=[{
"description": "rule1-desc",
"dest_namespace_id": "namespace-y8p88eka",
"dest_namespace_name": "garden-test_default",
"name": "Rule1",
"relationship": "AND",
"unit_rule_tag_lists": [{
"tag_field": "aaa",
"tag_operator": "IN",
"tag_type": "U",
"tag_value": "1",
}],
}])
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.NewTsfUnitRule(ctx, "unitRule", &tencentcloud.TsfUnitRuleArgs{
Description: pulumi.String("terraform-desc"),
GatewayInstanceId: pulumi.String("gw-ins-rug79a70"),
UnitRuleItemLists: tencentcloud.TsfUnitRuleUnitRuleItemListArray{
&tencentcloud.TsfUnitRuleUnitRuleItemListArgs{
Description: pulumi.String("rule1-desc"),
DestNamespaceId: pulumi.String("namespace-y8p88eka"),
DestNamespaceName: pulumi.String("garden-test_default"),
Name: pulumi.String("Rule1"),
Relationship: pulumi.String("AND"),
UnitRuleTagLists: tencentcloud.TsfUnitRuleUnitRuleItemListUnitRuleTagListArray{
&tencentcloud.TsfUnitRuleUnitRuleItemListUnitRuleTagListArgs{
TagField: pulumi.String("aaa"),
TagOperator: pulumi.String("IN"),
TagType: pulumi.String("U"),
TagValue: pulumi.String("1"),
},
},
},
},
})
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 unitRule = new Tencentcloud.TsfUnitRule("unitRule", new()
{
Description = "terraform-desc",
GatewayInstanceId = "gw-ins-rug79a70",
UnitRuleItemLists = new[]
{
new Tencentcloud.Inputs.TsfUnitRuleUnitRuleItemListArgs
{
Description = "rule1-desc",
DestNamespaceId = "namespace-y8p88eka",
DestNamespaceName = "garden-test_default",
Name = "Rule1",
Relationship = "AND",
UnitRuleTagLists = new[]
{
new Tencentcloud.Inputs.TsfUnitRuleUnitRuleItemListUnitRuleTagListArgs
{
TagField = "aaa",
TagOperator = "IN",
TagType = "U",
TagValue = "1",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.TsfUnitRule;
import com.pulumi.tencentcloud.TsfUnitRuleArgs;
import com.pulumi.tencentcloud.inputs.TsfUnitRuleUnitRuleItemListArgs;
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 unitRule = new TsfUnitRule("unitRule", TsfUnitRuleArgs.builder()
.description("terraform-desc")
.gatewayInstanceId("gw-ins-rug79a70")
.unitRuleItemLists(TsfUnitRuleUnitRuleItemListArgs.builder()
.description("rule1-desc")
.destNamespaceId("namespace-y8p88eka")
.destNamespaceName("garden-test_default")
.name("Rule1")
.relationship("AND")
.unitRuleTagLists(TsfUnitRuleUnitRuleItemListUnitRuleTagListArgs.builder()
.tagField("aaa")
.tagOperator("IN")
.tagType("U")
.tagValue("1")
.build())
.build())
.build());
}
}
resources:
unitRule:
type: tencentcloud:TsfUnitRule
properties:
description: terraform-desc
gatewayInstanceId: gw-ins-rug79a70
unitRuleItemLists:
- description: rule1-desc
destNamespaceId: namespace-y8p88eka
destNamespaceName: garden-test_default
name: Rule1
relationship: AND
unitRuleTagLists:
- tagField: aaa
tagOperator: IN
tagType: U
tagValue: '1'
Create TsfUnitRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TsfUnitRule(name: string, args: TsfUnitRuleArgs, opts?: CustomResourceOptions);
@overload
def TsfUnitRule(resource_name: str,
args: TsfUnitRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TsfUnitRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_instance_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
tsf_unit_rule_id: Optional[str] = None,
unit_rule_item_lists: Optional[Sequence[TsfUnitRuleUnitRuleItemListArgs]] = None)
func NewTsfUnitRule(ctx *Context, name string, args TsfUnitRuleArgs, opts ...ResourceOption) (*TsfUnitRule, error)
public TsfUnitRule(string name, TsfUnitRuleArgs args, CustomResourceOptions? opts = null)
public TsfUnitRule(String name, TsfUnitRuleArgs args)
public TsfUnitRule(String name, TsfUnitRuleArgs args, CustomResourceOptions options)
type: tencentcloud:TsfUnitRule
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 TsfUnitRuleArgs
- 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 TsfUnitRuleArgs
- 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 TsfUnitRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TsfUnitRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TsfUnitRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
TsfUnitRule 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 TsfUnitRule resource accepts the following input properties:
- Gateway
Instance stringId - gateway entity ID.
- Description string
- rule description.
- Name string
- rule name.
- Tsf
Unit stringRule Id - ID of the resource.
- Unit
Rule List<TsfItem Lists Unit Rule Unit Rule Item List> - list of rule items.
- Gateway
Instance stringId - gateway entity ID.
- Description string
- rule description.
- Name string
- rule name.
- Tsf
Unit stringRule Id - ID of the resource.
- Unit
Rule []TsfItem Lists Unit Rule Unit Rule Item List Args - list of rule items.
- gateway
Instance StringId - gateway entity ID.
- description String
- rule description.
- name String
- rule name.
- tsf
Unit StringRule Id - ID of the resource.
- unit
Rule List<TsfItem Lists Unit Rule Unit Rule Item List> - list of rule items.
- gateway
Instance stringId - gateway entity ID.
- description string
- rule description.
- name string
- rule name.
- tsf
Unit stringRule Id - ID of the resource.
- unit
Rule TsfItem Lists Unit Rule Unit Rule Item List[] - list of rule items.
- gateway_
instance_ strid - gateway entity ID.
- description str
- rule description.
- name str
- rule name.
- tsf_
unit_ strrule_ id - ID of the resource.
- unit_
rule_ Sequence[Tsfitem_ lists Unit Rule Unit Rule Item List Args] - list of rule items.
- gateway
Instance StringId - gateway entity ID.
- description String
- rule description.
- name String
- rule name.
- tsf
Unit StringRule Id - ID of the resource.
- unit
Rule List<Property Map>Item Lists - list of rule items.
Outputs
All input properties are implicitly available as output properties. Additionally, the TsfUnitRule resource produces the following output properties:
Look up Existing TsfUnitRule Resource
Get an existing TsfUnitRule 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?: TsfUnitRuleState, opts?: CustomResourceOptions): TsfUnitRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
gateway_instance_id: Optional[str] = None,
name: Optional[str] = None,
rule_id: Optional[str] = None,
status: Optional[str] = None,
tsf_unit_rule_id: Optional[str] = None,
unit_rule_item_lists: Optional[Sequence[TsfUnitRuleUnitRuleItemListArgs]] = None) -> TsfUnitRule
func GetTsfUnitRule(ctx *Context, name string, id IDInput, state *TsfUnitRuleState, opts ...ResourceOption) (*TsfUnitRule, error)
public static TsfUnitRule Get(string name, Input<string> id, TsfUnitRuleState? state, CustomResourceOptions? opts = null)
public static TsfUnitRule get(String name, Output<String> id, TsfUnitRuleState state, CustomResourceOptions options)
resources: _: type: tencentcloud:TsfUnitRule 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.
- Description string
- rule description.
- Gateway
Instance stringId - gateway entity ID.
- Name string
- rule name.
- Rule
Id string - rule ID.
- Status string
- usage status: enabled/disabled.
- Tsf
Unit stringRule Id - ID of the resource.
- Unit
Rule List<TsfItem Lists Unit Rule Unit Rule Item List> - list of rule items.
- Description string
- rule description.
- Gateway
Instance stringId - gateway entity ID.
- Name string
- rule name.
- Rule
Id string - rule ID.
- Status string
- usage status: enabled/disabled.
- Tsf
Unit stringRule Id - ID of the resource.
- Unit
Rule []TsfItem Lists Unit Rule Unit Rule Item List Args - list of rule items.
- description String
- rule description.
- gateway
Instance StringId - gateway entity ID.
- name String
- rule name.
- rule
Id String - rule ID.
- status String
- usage status: enabled/disabled.
- tsf
Unit StringRule Id - ID of the resource.
- unit
Rule List<TsfItem Lists Unit Rule Unit Rule Item List> - list of rule items.
- description string
- rule description.
- gateway
Instance stringId - gateway entity ID.
- name string
- rule name.
- rule
Id string - rule ID.
- status string
- usage status: enabled/disabled.
- tsf
Unit stringRule Id - ID of the resource.
- unit
Rule TsfItem Lists Unit Rule Unit Rule Item List[] - list of rule items.
- description str
- rule description.
- gateway_
instance_ strid - gateway entity ID.
- name str
- rule name.
- rule_
id str - rule ID.
- status str
- usage status: enabled/disabled.
- tsf_
unit_ strrule_ id - ID of the resource.
- unit_
rule_ Sequence[Tsfitem_ lists Unit Rule Unit Rule Item List Args] - list of rule items.
- description String
- rule description.
- gateway
Instance StringId - gateway entity ID.
- name String
- rule name.
- rule
Id String - rule ID.
- status String
- usage status: enabled/disabled.
- tsf
Unit StringRule Id - ID of the resource.
- unit
Rule List<Property Map>Item Lists - list of rule items.
Supporting Types
TsfUnitRuleUnitRuleItemList, TsfUnitRuleUnitRuleItemListArgs
- Dest
Namespace stringId - destination namespace ID.
- Dest
Namespace stringName - destination namespace name.
- Name string
- rule item name.
- Relationship string
- logical relationship: AND/OR.
- Description string
- rule description.
- Priority double
- rule order, the smaller the higher the priority: the default is 0.
- Rule
Id string - rule ID.
- Unit
Rule stringId - Unitization rule ID.
- Unit
Rule List<TsfTag Lists Unit Rule Unit Rule Item List Unit Rule Tag List> - list of rule labels.
- Dest
Namespace stringId - destination namespace ID.
- Dest
Namespace stringName - destination namespace name.
- Name string
- rule item name.
- Relationship string
- logical relationship: AND/OR.
- Description string
- rule description.
- Priority float64
- rule order, the smaller the higher the priority: the default is 0.
- Rule
Id string - rule ID.
- Unit
Rule stringId - Unitization rule ID.
- Unit
Rule []TsfTag Lists Unit Rule Unit Rule Item List Unit Rule Tag List - list of rule labels.
- dest
Namespace StringId - destination namespace ID.
- dest
Namespace StringName - destination namespace name.
- name String
- rule item name.
- relationship String
- logical relationship: AND/OR.
- description String
- rule description.
- priority Double
- rule order, the smaller the higher the priority: the default is 0.
- rule
Id String - rule ID.
- unit
Rule StringId - Unitization rule ID.
- unit
Rule List<TsfTag Lists Unit Rule Unit Rule Item List Unit Rule Tag List> - list of rule labels.
- dest
Namespace stringId - destination namespace ID.
- dest
Namespace stringName - destination namespace name.
- name string
- rule item name.
- relationship string
- logical relationship: AND/OR.
- description string
- rule description.
- priority number
- rule order, the smaller the higher the priority: the default is 0.
- rule
Id string - rule ID.
- unit
Rule stringId - Unitization rule ID.
- unit
Rule TsfTag Lists Unit Rule Unit Rule Item List Unit Rule Tag List[] - list of rule labels.
- dest_
namespace_ strid - destination namespace ID.
- dest_
namespace_ strname - destination namespace name.
- name str
- rule item name.
- relationship str
- logical relationship: AND/OR.
- description str
- rule description.
- priority float
- rule order, the smaller the higher the priority: the default is 0.
- rule_
id str - rule ID.
- unit_
rule_ strid - Unitization rule ID.
- unit_
rule_ Sequence[Tsftag_ lists Unit Rule Unit Rule Item List Unit Rule Tag List] - list of rule labels.
- dest
Namespace StringId - destination namespace ID.
- dest
Namespace StringName - destination namespace name.
- name String
- rule item name.
- relationship String
- logical relationship: AND/OR.
- description String
- rule description.
- priority Number
- rule order, the smaller the higher the priority: the default is 0.
- rule
Id String - rule ID.
- unit
Rule StringId - Unitization rule ID.
- unit
Rule List<Property Map>Tag Lists - list of rule labels.
TsfUnitRuleUnitRuleItemListUnitRuleTagList, TsfUnitRuleUnitRuleItemListUnitRuleTagListArgs
- Tag
Field string - label name.
- Tag
Operator string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- Tag
Type string - Tag Type: U(User Tag).
- Tag
Value string - tag value.
- Rule
Id string - rule ID.
- Unit
Rule stringItem Id - Unitization rule item ID.
- Tag
Field string - label name.
- Tag
Operator string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- Tag
Type string - Tag Type: U(User Tag).
- Tag
Value string - tag value.
- Rule
Id string - rule ID.
- Unit
Rule stringItem Id - Unitization rule item ID.
- tag
Field String - label name.
- tag
Operator String - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type String - Tag Type: U(User Tag).
- tag
Value String - tag value.
- rule
Id String - rule ID.
- unit
Rule StringItem Id - Unitization rule item ID.
- tag
Field string - label name.
- tag
Operator string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type string - Tag Type: U(User Tag).
- tag
Value string - tag value.
- rule
Id string - rule ID.
- unit
Rule stringItem Id - Unitization rule item ID.
- tag_
field str - label name.
- tag_
operator str - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag_
type str - Tag Type: U(User Tag).
- tag_
value str - tag value.
- rule_
id str - rule ID.
- unit_
rule_ stritem_ id - Unitization rule item ID.
- tag
Field String - label name.
- tag
Operator String - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type String - Tag Type: U(User Tag).
- tag
Value String - tag value.
- rule
Id String - rule ID.
- unit
Rule StringItem Id - Unitization rule item ID.
Import
tsf unit_rule can be imported using the id, e.g.
$ pulumi import tencentcloud:index/tsfUnitRule:TsfUnitRule unit_rule unit-rl-zbywqeca
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.