1. Packages
  2. Alicloud Provider
  3. API Docs
  4. cen
  5. TrafficMarkingPolicy
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.cen.TrafficMarkingPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a Cloud Enterprise Network (CEN) Traffic Marking Policy resource.

    For information about Cloud Enterprise Network (CEN) Traffic Marking Policy and how to use it, see What is Traffic Marking Policy.

    NOTE: Available since v1.173.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const example = new alicloud.cen.Instance("example", {
        cenInstanceName: "tf_example",
        description: "an example for cen",
    });
    const exampleTransitRouter = new alicloud.cen.TransitRouter("example", {
        transitRouterName: "tf_example",
        cenId: example.id,
    });
    const exampleTrafficMarkingPolicy = new alicloud.cen.TrafficMarkingPolicy("example", {
        markingDscp: 1,
        priority: 1,
        trafficMarkingPolicyName: "tf_example",
        transitRouterId: exampleTransitRouter.transitRouterId,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    example = alicloud.cen.Instance("example",
        cen_instance_name="tf_example",
        description="an example for cen")
    example_transit_router = alicloud.cen.TransitRouter("example",
        transit_router_name="tf_example",
        cen_id=example.id)
    example_traffic_marking_policy = alicloud.cen.TrafficMarkingPolicy("example",
        marking_dscp=1,
        priority=1,
        traffic_marking_policy_name="tf_example",
        transit_router_id=example_transit_router.transit_router_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := cen.NewInstance(ctx, "example", &cen.InstanceArgs{
    			CenInstanceName: pulumi.String("tf_example"),
    			Description:     pulumi.String("an example for cen"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleTransitRouter, err := cen.NewTransitRouter(ctx, "example", &cen.TransitRouterArgs{
    			TransitRouterName: pulumi.String("tf_example"),
    			CenId:             example.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cen.NewTrafficMarkingPolicy(ctx, "example", &cen.TrafficMarkingPolicyArgs{
    			MarkingDscp:              pulumi.Int(1),
    			Priority:                 pulumi.Int(1),
    			TrafficMarkingPolicyName: pulumi.String("tf_example"),
    			TransitRouterId:          exampleTransitRouter.TransitRouterId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AliCloud.Cen.Instance("example", new()
        {
            CenInstanceName = "tf_example",
            Description = "an example for cen",
        });
    
        var exampleTransitRouter = new AliCloud.Cen.TransitRouter("example", new()
        {
            TransitRouterName = "tf_example",
            CenId = example.Id,
        });
    
        var exampleTrafficMarkingPolicy = new AliCloud.Cen.TrafficMarkingPolicy("example", new()
        {
            MarkingDscp = 1,
            Priority = 1,
            TrafficMarkingPolicyName = "tf_example",
            TransitRouterId = exampleTransitRouter.TransitRouterId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.Instance;
    import com.pulumi.alicloud.cen.InstanceArgs;
    import com.pulumi.alicloud.cen.TransitRouter;
    import com.pulumi.alicloud.cen.TransitRouterArgs;
    import com.pulumi.alicloud.cen.TrafficMarkingPolicy;
    import com.pulumi.alicloud.cen.TrafficMarkingPolicyArgs;
    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 Instance("example", InstanceArgs.builder()
                .cenInstanceName("tf_example")
                .description("an example for cen")
                .build());
    
            var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()
                .transitRouterName("tf_example")
                .cenId(example.id())
                .build());
    
            var exampleTrafficMarkingPolicy = new TrafficMarkingPolicy("exampleTrafficMarkingPolicy", TrafficMarkingPolicyArgs.builder()
                .markingDscp(1)
                .priority(1)
                .trafficMarkingPolicyName("tf_example")
                .transitRouterId(exampleTransitRouter.transitRouterId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: alicloud:cen:Instance
        properties:
          cenInstanceName: tf_example
          description: an example for cen
      exampleTransitRouter:
        type: alicloud:cen:TransitRouter
        name: example
        properties:
          transitRouterName: tf_example
          cenId: ${example.id}
      exampleTrafficMarkingPolicy:
        type: alicloud:cen:TrafficMarkingPolicy
        name: example
        properties:
          markingDscp: 1
          priority: 1
          trafficMarkingPolicyName: tf_example
          transitRouterId: ${exampleTransitRouter.transitRouterId}
    

    Create TrafficMarkingPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TrafficMarkingPolicy(name: string, args: TrafficMarkingPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficMarkingPolicy(resource_name: str,
                             args: TrafficMarkingPolicyArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficMarkingPolicy(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             marking_dscp: Optional[int] = None,
                             priority: Optional[int] = None,
                             transit_router_id: Optional[str] = None,
                             description: Optional[str] = None,
                             dry_run: Optional[bool] = None,
                             traffic_marking_policy_name: Optional[str] = None,
                             traffic_match_rules: Optional[Sequence[TrafficMarkingPolicyTrafficMatchRuleArgs]] = None)
    func NewTrafficMarkingPolicy(ctx *Context, name string, args TrafficMarkingPolicyArgs, opts ...ResourceOption) (*TrafficMarkingPolicy, error)
    public TrafficMarkingPolicy(string name, TrafficMarkingPolicyArgs args, CustomResourceOptions? opts = null)
    public TrafficMarkingPolicy(String name, TrafficMarkingPolicyArgs args)
    public TrafficMarkingPolicy(String name, TrafficMarkingPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:cen:TrafficMarkingPolicy
    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 TrafficMarkingPolicyArgs
    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 TrafficMarkingPolicyArgs
    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 TrafficMarkingPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficMarkingPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficMarkingPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var trafficMarkingPolicyResource = new AliCloud.Cen.TrafficMarkingPolicy("trafficMarkingPolicyResource", new()
    {
        MarkingDscp = 0,
        Priority = 0,
        TransitRouterId = "string",
        Description = "string",
        DryRun = false,
        TrafficMarkingPolicyName = "string",
        TrafficMatchRules = new[]
        {
            new AliCloud.Cen.Inputs.TrafficMarkingPolicyTrafficMatchRuleArgs
            {
                AddressFamily = "string",
                DstCidr = "string",
                DstPortRanges = new[]
                {
                    0,
                },
                MatchDscp = 0,
                Protocol = "string",
                SrcCidr = "string",
                SrcPortRanges = new[]
                {
                    0,
                },
                TrafficMatchRuleDescription = "string",
                TrafficMatchRuleName = "string",
            },
        },
    });
    
    example, err := cen.NewTrafficMarkingPolicy(ctx, "trafficMarkingPolicyResource", &cen.TrafficMarkingPolicyArgs{
    	MarkingDscp:              pulumi.Int(0),
    	Priority:                 pulumi.Int(0),
    	TransitRouterId:          pulumi.String("string"),
    	Description:              pulumi.String("string"),
    	DryRun:                   pulumi.Bool(false),
    	TrafficMarkingPolicyName: pulumi.String("string"),
    	TrafficMatchRules: cen.TrafficMarkingPolicyTrafficMatchRuleArray{
    		&cen.TrafficMarkingPolicyTrafficMatchRuleArgs{
    			AddressFamily: pulumi.String("string"),
    			DstCidr:       pulumi.String("string"),
    			DstPortRanges: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    			MatchDscp: pulumi.Int(0),
    			Protocol:  pulumi.String("string"),
    			SrcCidr:   pulumi.String("string"),
    			SrcPortRanges: pulumi.IntArray{
    				pulumi.Int(0),
    			},
    			TrafficMatchRuleDescription: pulumi.String("string"),
    			TrafficMatchRuleName:        pulumi.String("string"),
    		},
    	},
    })
    
    var trafficMarkingPolicyResource = new TrafficMarkingPolicy("trafficMarkingPolicyResource", TrafficMarkingPolicyArgs.builder()
        .markingDscp(0)
        .priority(0)
        .transitRouterId("string")
        .description("string")
        .dryRun(false)
        .trafficMarkingPolicyName("string")
        .trafficMatchRules(TrafficMarkingPolicyTrafficMatchRuleArgs.builder()
            .addressFamily("string")
            .dstCidr("string")
            .dstPortRanges(0)
            .matchDscp(0)
            .protocol("string")
            .srcCidr("string")
            .srcPortRanges(0)
            .trafficMatchRuleDescription("string")
            .trafficMatchRuleName("string")
            .build())
        .build());
    
    traffic_marking_policy_resource = alicloud.cen.TrafficMarkingPolicy("trafficMarkingPolicyResource",
        marking_dscp=0,
        priority=0,
        transit_router_id="string",
        description="string",
        dry_run=False,
        traffic_marking_policy_name="string",
        traffic_match_rules=[alicloud.cen.TrafficMarkingPolicyTrafficMatchRuleArgs(
            address_family="string",
            dst_cidr="string",
            dst_port_ranges=[0],
            match_dscp=0,
            protocol="string",
            src_cidr="string",
            src_port_ranges=[0],
            traffic_match_rule_description="string",
            traffic_match_rule_name="string",
        )])
    
    const trafficMarkingPolicyResource = new alicloud.cen.TrafficMarkingPolicy("trafficMarkingPolicyResource", {
        markingDscp: 0,
        priority: 0,
        transitRouterId: "string",
        description: "string",
        dryRun: false,
        trafficMarkingPolicyName: "string",
        trafficMatchRules: [{
            addressFamily: "string",
            dstCidr: "string",
            dstPortRanges: [0],
            matchDscp: 0,
            protocol: "string",
            srcCidr: "string",
            srcPortRanges: [0],
            trafficMatchRuleDescription: "string",
            trafficMatchRuleName: "string",
        }],
    });
    
    type: alicloud:cen:TrafficMarkingPolicy
    properties:
        description: string
        dryRun: false
        markingDscp: 0
        priority: 0
        trafficMarkingPolicyName: string
        trafficMatchRules:
            - addressFamily: string
              dstCidr: string
              dstPortRanges:
                - 0
              matchDscp: 0
              protocol: string
              srcCidr: string
              srcPortRanges:
                - 0
              trafficMatchRuleDescription: string
              trafficMatchRuleName: string
        transitRouterId: string
    

    TrafficMarkingPolicy Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The TrafficMarkingPolicy resource accepts the following input properties:

    MarkingDscp int
    MarkingDscp
    Priority int
    Priority
    TransitRouterId string
    TransitRouterId
    Description string
    TrafficMarkingPolicyDescription
    DryRun bool
    Whether to PreCheck only this request. Value:
    TrafficMarkingPolicyName string
    TrafficMarkingPolicyName
    TrafficMatchRules List<Pulumi.AliCloud.Cen.Inputs.TrafficMarkingPolicyTrafficMatchRule>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    MarkingDscp int
    MarkingDscp
    Priority int
    Priority
    TransitRouterId string
    TransitRouterId
    Description string
    TrafficMarkingPolicyDescription
    DryRun bool
    Whether to PreCheck only this request. Value:
    TrafficMarkingPolicyName string
    TrafficMarkingPolicyName
    TrafficMatchRules []TrafficMarkingPolicyTrafficMatchRuleArgs

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    markingDscp Integer
    MarkingDscp
    priority Integer
    Priority
    transitRouterId String
    TransitRouterId
    description String
    TrafficMarkingPolicyDescription
    dryRun Boolean
    Whether to PreCheck only this request. Value:
    trafficMarkingPolicyName String
    TrafficMarkingPolicyName
    trafficMatchRules List<TrafficMarkingPolicyTrafficMatchRule>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    markingDscp number
    MarkingDscp
    priority number
    Priority
    transitRouterId string
    TransitRouterId
    description string
    TrafficMarkingPolicyDescription
    dryRun boolean
    Whether to PreCheck only this request. Value:
    trafficMarkingPolicyName string
    TrafficMarkingPolicyName
    trafficMatchRules TrafficMarkingPolicyTrafficMatchRule[]

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    marking_dscp int
    MarkingDscp
    priority int
    Priority
    transit_router_id str
    TransitRouterId
    description str
    TrafficMarkingPolicyDescription
    dry_run bool
    Whether to PreCheck only this request. Value:
    traffic_marking_policy_name str
    TrafficMarkingPolicyName
    traffic_match_rules Sequence[TrafficMarkingPolicyTrafficMatchRuleArgs]

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    markingDscp Number
    MarkingDscp
    priority Number
    Priority
    transitRouterId String
    TransitRouterId
    description String
    TrafficMarkingPolicyDescription
    dryRun Boolean
    Whether to PreCheck only this request. Value:
    trafficMarkingPolicyName String
    TrafficMarkingPolicyName
    trafficMatchRules List<Property Map>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TrafficMarkingPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource
    TrafficMarkingPolicyId string
    The first ID of the resource
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the resource
    TrafficMarkingPolicyId string
    The first ID of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource
    trafficMarkingPolicyId String
    The first ID of the resource
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the resource
    trafficMarkingPolicyId string
    The first ID of the resource
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the resource
    traffic_marking_policy_id str
    The first ID of the resource
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the resource
    trafficMarkingPolicyId String
    The first ID of the resource

    Look up Existing TrafficMarkingPolicy Resource

    Get an existing TrafficMarkingPolicy 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?: TrafficMarkingPolicyState, opts?: CustomResourceOptions): TrafficMarkingPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            dry_run: Optional[bool] = None,
            marking_dscp: Optional[int] = None,
            priority: Optional[int] = None,
            status: Optional[str] = None,
            traffic_marking_policy_id: Optional[str] = None,
            traffic_marking_policy_name: Optional[str] = None,
            traffic_match_rules: Optional[Sequence[TrafficMarkingPolicyTrafficMatchRuleArgs]] = None,
            transit_router_id: Optional[str] = None) -> TrafficMarkingPolicy
    func GetTrafficMarkingPolicy(ctx *Context, name string, id IDInput, state *TrafficMarkingPolicyState, opts ...ResourceOption) (*TrafficMarkingPolicy, error)
    public static TrafficMarkingPolicy Get(string name, Input<string> id, TrafficMarkingPolicyState? state, CustomResourceOptions? opts = null)
    public static TrafficMarkingPolicy get(String name, Output<String> id, TrafficMarkingPolicyState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    Description string
    TrafficMarkingPolicyDescription
    DryRun bool
    Whether to PreCheck only this request. Value:
    MarkingDscp int
    MarkingDscp
    Priority int
    Priority
    Status string
    The status of the resource
    TrafficMarkingPolicyId string
    The first ID of the resource
    TrafficMarkingPolicyName string
    TrafficMarkingPolicyName
    TrafficMatchRules List<Pulumi.AliCloud.Cen.Inputs.TrafficMarkingPolicyTrafficMatchRule>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    TransitRouterId string
    TransitRouterId
    Description string
    TrafficMarkingPolicyDescription
    DryRun bool
    Whether to PreCheck only this request. Value:
    MarkingDscp int
    MarkingDscp
    Priority int
    Priority
    Status string
    The status of the resource
    TrafficMarkingPolicyId string
    The first ID of the resource
    TrafficMarkingPolicyName string
    TrafficMarkingPolicyName
    TrafficMatchRules []TrafficMarkingPolicyTrafficMatchRuleArgs

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    TransitRouterId string
    TransitRouterId
    description String
    TrafficMarkingPolicyDescription
    dryRun Boolean
    Whether to PreCheck only this request. Value:
    markingDscp Integer
    MarkingDscp
    priority Integer
    Priority
    status String
    The status of the resource
    trafficMarkingPolicyId String
    The first ID of the resource
    trafficMarkingPolicyName String
    TrafficMarkingPolicyName
    trafficMatchRules List<TrafficMarkingPolicyTrafficMatchRule>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    transitRouterId String
    TransitRouterId
    description string
    TrafficMarkingPolicyDescription
    dryRun boolean
    Whether to PreCheck only this request. Value:
    markingDscp number
    MarkingDscp
    priority number
    Priority
    status string
    The status of the resource
    trafficMarkingPolicyId string
    The first ID of the resource
    trafficMarkingPolicyName string
    TrafficMarkingPolicyName
    trafficMatchRules TrafficMarkingPolicyTrafficMatchRule[]

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    transitRouterId string
    TransitRouterId
    description str
    TrafficMarkingPolicyDescription
    dry_run bool
    Whether to PreCheck only this request. Value:
    marking_dscp int
    MarkingDscp
    priority int
    Priority
    status str
    The status of the resource
    traffic_marking_policy_id str
    The first ID of the resource
    traffic_marking_policy_name str
    TrafficMarkingPolicyName
    traffic_match_rules Sequence[TrafficMarkingPolicyTrafficMatchRuleArgs]

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    transit_router_id str
    TransitRouterId
    description String
    TrafficMarkingPolicyDescription
    dryRun Boolean
    Whether to PreCheck only this request. Value:
    markingDscp Number
    MarkingDscp
    priority Number
    Priority
    status String
    The status of the resource
    trafficMarkingPolicyId String
    The first ID of the resource
    trafficMarkingPolicyName String
    TrafficMarkingPolicyName
    trafficMatchRules List<Property Map>

    List of stream classification rules.

    You can add up to 50 stream classification rules at a time. See traffic_match_rules below.

    transitRouterId String
    TransitRouterId

    Supporting Types

    TrafficMarkingPolicyTrafficMatchRule, TrafficMarkingPolicyTrafficMatchRuleArgs

    AddressFamily string
    IP Address Family.
    DstCidr string
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    DstPortRanges List<int>
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    MatchDscp int
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    Protocol string
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    SrcCidr string
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    SrcPortRanges List<int>
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    TrafficMatchRuleDescription string
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    TrafficMatchRuleName string
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    AddressFamily string
    IP Address Family.
    DstCidr string
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    DstPortRanges []int
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    MatchDscp int
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    Protocol string
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    SrcCidr string
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    SrcPortRanges []int
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    TrafficMatchRuleDescription string
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    TrafficMatchRuleName string
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    addressFamily String
    IP Address Family.
    dstCidr String
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    dstPortRanges List<Integer>
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    matchDscp Integer
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    protocol String
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    srcCidr String
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    srcPortRanges List<Integer>
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    trafficMatchRuleDescription String
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    trafficMatchRuleName String
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    addressFamily string
    IP Address Family.
    dstCidr string
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    dstPortRanges number[]
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    matchDscp number
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    protocol string
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    srcCidr string
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    srcPortRanges number[]
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    trafficMatchRuleDescription string
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    trafficMatchRuleName string
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    address_family str
    IP Address Family.
    dst_cidr str
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    dst_port_ranges Sequence[int]
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    match_dscp int
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    protocol str
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    src_cidr str
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    src_port_ranges Sequence[int]
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    traffic_match_rule_description str
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    traffic_match_rule_name str
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    addressFamily String
    IP Address Family.
    dstCidr String
    The destination network segment of the traffic message. The flow classification matches the traffic of the destination IP address in the destination network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination IP address.
    dstPortRanges List<Number>
    The destination port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the destination port number in the destination port range. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any destination port number. The current parameter supports a maximum of 2 port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with the destination port of 1.
    • If you enter 2 port numbers, such as 1 and 200, the system defaults to match the traffic of the destination port in the range of 1 to 200.
    • If you enter 2 port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any destination port.
    matchDscp Number
    The DSCP value of the traffic message. Valid values: 0 to **63 * *. The flow classification rule matches the flow with the specified DSCP value. If the flow classification rule is not set, it means that the flow classification rule matches the flow with any DSCP value.> NOTE: The current DSCP value refers to the DSCP value that the traffic message has carried before entering the cross-region connection.
    protocol String
    The protocol type of the traffic message. Stream classification rules can match traffic of multiple protocol types, such as HTTP, HTTPS, TCP, UDP, SSH, and **Telnet. For more protocol types, please log on to the Cloud Enterprise Network Management Console to view.
    srcCidr String
    The source network segment of the traffic message. The flow classification rule matches the traffic of the source IP address in the source network segment. If the flow classification rule is not set, it means that the flow classification rule matches the traffic of any source IP address.
    srcPortRanges List<Number>
    The source port of the traffic message. Valid values: -1, 1 to 65535. The flow classification rule matches the traffic of the source port number in the source port range. If it is not set, it means that the flow classification rule matches the traffic of any source port number. The current parameter supports entering up to two port numbers. The input format is described as follows:

    • If you only enter a port number, such as 1, the system defaults to match the traffic with source port 1.
    • If you enter two port numbers, such as 1 and 200, the system defaults to match the traffic with the source port in the range of 1 to 200.
    • If you enter two port numbers and one of them is - 1, the other port must also be - 1, indicating that it matches any source port.
    trafficMatchRuleDescription String
    The description information of the stream classification rule. The description must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).
    trafficMatchRuleName String
    The name of the stream classification rule. The name must be 2 to 128 characters in length and can contain numbers, dashes (-), and underscores (_).

    Import

    CEN Traffic Marking Policy can be imported using the id, e.g.

    $ pulumi import alicloud:cen/trafficMarkingPolicy:TrafficMarkingPolicy example <transit_router_id>:<traffic_marking_policy_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi