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
This property is required. string - The unique name of the resource.
- args
This property is required. TsfUnitRuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. TsfUnitRuleArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. TsfUnitRuleArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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 Id This property is required. string - 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 Id This property is required. string - 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 Id This property is required. String - 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 Id This property is required. string - 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_ id This property is required. str - 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 Id This property is required. String - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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 Id This property is required. string - destination namespace ID.
- Dest
Namespace Name This property is required. string - destination namespace name.
- Name
This property is required. string - rule item name.
- Relationship
This property is required. 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 Id This property is required. string - destination namespace ID.
- Dest
Namespace Name This property is required. string - destination namespace name.
- Name
This property is required. string - rule item name.
- Relationship
This property is required. 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 Id This property is required. String - destination namespace ID.
- dest
Namespace Name This property is required. String - destination namespace name.
- name
This property is required. String - rule item name.
- relationship
This property is required. 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 Id This property is required. string - destination namespace ID.
- dest
Namespace Name This property is required. string - destination namespace name.
- name
This property is required. string - rule item name.
- relationship
This property is required. 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_ id This property is required. str - destination namespace ID.
- dest_
namespace_ name This property is required. str - destination namespace name.
- name
This property is required. str - rule item name.
- relationship
This property is required. 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 Id This property is required. String - destination namespace ID.
- dest
Namespace Name This property is required. String - destination namespace name.
- name
This property is required. String - rule item name.
- relationship
This property is required. 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 This property is required. string - label name.
- Tag
Operator This property is required. string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- Tag
Type This property is required. string - Tag Type: U(User Tag).
- Tag
Value This property is required. string - tag value.
- Rule
Id string - rule ID.
- Unit
Rule stringItem Id - Unitization rule item ID.
- Tag
Field This property is required. string - label name.
- Tag
Operator This property is required. string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- Tag
Type This property is required. string - Tag Type: U(User Tag).
- Tag
Value This property is required. string - tag value.
- Rule
Id string - rule ID.
- Unit
Rule stringItem Id - Unitization rule item ID.
- tag
Field This property is required. String - label name.
- tag
Operator This property is required. String - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type This property is required. String - Tag Type: U(User Tag).
- tag
Value This property is required. String - tag value.
- rule
Id String - rule ID.
- unit
Rule StringItem Id - Unitization rule item ID.
- tag
Field This property is required. string - label name.
- tag
Operator This property is required. string - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type This property is required. string - Tag Type: U(User Tag).
- tag
Value This property is required. string - tag value.
- rule
Id string - rule ID.
- unit
Rule stringItem Id - Unitization rule item ID.
- tag_
field This property is required. str - label name.
- tag_
operator This property is required. str - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag_
type This property is required. str - Tag Type: U(User Tag).
- tag_
value This property is required. str - tag value.
- rule_
id str - rule ID.
- unit_
rule_ stritem_ id - Unitization rule item ID.
- tag
Field This property is required. String - label name.
- tag
Operator This property is required. String - Operator: IN/NOT_IN/EQUAL/NOT_EQUAL/REGEX.
- tag
Type This property is required. String - Tag Type: U(User Tag).
- tag
Value This property is required. 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.