alicloud.cen.TrafficMarkingPolicy
Explore with Pulumi AI
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=[{
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The TrafficMarkingPolicy resource accepts the following input properties:
- Marking
Dscp int - MarkingDscp
- Priority int
- Priority
- Transit
Router stringId - TransitRouterId
- Description string
- TrafficMarkingPolicyDescription
- Dry
Run bool - Whether to PreCheck only this request. Value:
- Traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- Traffic
Match List<Pulumi.Rules Ali Cloud. Cen. Inputs. Traffic Marking Policy Traffic Match Rule> 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 stringId - TransitRouterId
- Description string
- TrafficMarkingPolicyDescription
- Dry
Run bool - Whether to PreCheck only this request. Value:
- Traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- Traffic
Match []TrafficRules Marking Policy Traffic Match Rule Args List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.
- marking
Dscp Integer - MarkingDscp
- priority Integer
- Priority
- transit
Router StringId - TransitRouterId
- description String
- TrafficMarkingPolicyDescription
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- traffic
Marking StringPolicy Name - TrafficMarkingPolicyName
- traffic
Match List<TrafficRules Marking Policy Traffic Match Rule> List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.
- marking
Dscp number - MarkingDscp
- priority number
- Priority
- transit
Router stringId - TransitRouterId
- description string
- TrafficMarkingPolicyDescription
- dry
Run boolean - Whether to PreCheck only this request. Value:
- traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- traffic
Match TrafficRules Marking Policy Traffic Match Rule[] 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_ strid - TransitRouterId
- description str
- TrafficMarkingPolicyDescription
- dry_
run bool - Whether to PreCheck only this request. Value:
- traffic_
marking_ strpolicy_ name - TrafficMarkingPolicyName
- traffic_
match_ Sequence[Trafficrules Marking Policy Traffic Match Rule Args] List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.
- marking
Dscp Number - MarkingDscp
- priority Number
- Priority
- transit
Router StringId - TransitRouterId
- description String
- TrafficMarkingPolicyDescription
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- traffic
Marking StringPolicy Name - TrafficMarkingPolicyName
- traffic
Match List<Property Map>Rules 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
- Traffic
Marking stringPolicy Id - The first ID of the resource
- Id string
- The provider-assigned unique ID for this managed resource.
- Status string
- The status of the resource
- Traffic
Marking stringPolicy Id - The first ID of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the resource
- traffic
Marking StringPolicy Id - The first ID of the resource
- id string
- The provider-assigned unique ID for this managed resource.
- status string
- The status of the resource
- traffic
Marking stringPolicy Id - 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_ strpolicy_ id - The first ID of the resource
- id String
- The provider-assigned unique ID for this managed resource.
- status String
- The status of the resource
- traffic
Marking StringPolicy Id - 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.
- Description string
- TrafficMarkingPolicyDescription
- Dry
Run bool - Whether to PreCheck only this request. Value:
- Marking
Dscp int - MarkingDscp
- Priority int
- Priority
- Status string
- The status of the resource
- Traffic
Marking stringPolicy Id - The first ID of the resource
- Traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- Traffic
Match List<Pulumi.Rules Ali Cloud. Cen. Inputs. Traffic Marking Policy Traffic Match Rule> List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- Transit
Router stringId - TransitRouterId
- Description string
- TrafficMarkingPolicyDescription
- Dry
Run bool - Whether to PreCheck only this request. Value:
- Marking
Dscp int - MarkingDscp
- Priority int
- Priority
- Status string
- The status of the resource
- Traffic
Marking stringPolicy Id - The first ID of the resource
- Traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- Traffic
Match []TrafficRules Marking Policy Traffic Match Rule Args List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- Transit
Router stringId - TransitRouterId
- description String
- TrafficMarkingPolicyDescription
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- marking
Dscp Integer - MarkingDscp
- priority Integer
- Priority
- status String
- The status of the resource
- traffic
Marking StringPolicy Id - The first ID of the resource
- traffic
Marking StringPolicy Name - TrafficMarkingPolicyName
- traffic
Match List<TrafficRules Marking Policy Traffic Match Rule> List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- transit
Router StringId - TransitRouterId
- description string
- TrafficMarkingPolicyDescription
- dry
Run boolean - Whether to PreCheck only this request. Value:
- marking
Dscp number - MarkingDscp
- priority number
- Priority
- status string
- The status of the resource
- traffic
Marking stringPolicy Id - The first ID of the resource
- traffic
Marking stringPolicy Name - TrafficMarkingPolicyName
- traffic
Match TrafficRules Marking Policy Traffic Match Rule[] List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- transit
Router stringId - 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_ strpolicy_ id - The first ID of the resource
- traffic_
marking_ strpolicy_ name - TrafficMarkingPolicyName
- traffic_
match_ Sequence[Trafficrules Marking Policy Traffic Match Rule Args] List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- transit_
router_ strid - TransitRouterId
- description String
- TrafficMarkingPolicyDescription
- dry
Run Boolean - Whether to PreCheck only this request. Value:
- marking
Dscp Number - MarkingDscp
- priority Number
- Priority
- status String
- The status of the resource
- traffic
Marking StringPolicy Id - The first ID of the resource
- traffic
Marking StringPolicy Name - TrafficMarkingPolicyName
- traffic
Match List<Property Map>Rules List of stream classification rules.
You can add up to 50 stream classification rules at a time. See
traffic_match_rules
below.- transit
Router StringId - TransitRouterId
Supporting Types
TrafficMarkingPolicyTrafficMatchRule, TrafficMarkingPolicyTrafficMatchRuleArgs
- Address
Family string - IP Address Family.
- Dst
Cidr 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.
- Dst
Port List<int>Ranges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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 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. - Src
Cidr 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.
- Src
Port List<int>Ranges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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 stringRule Description - 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 stringRule Name - 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 string - IP Address Family.
- Dst
Cidr 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.
- Dst
Port []intRanges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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 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. - Src
Cidr 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.
- Src
Port []intRanges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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 stringRule Description - 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 stringRule Name - 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 String - IP Address Family.
- dst
Cidr 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.
- dst
Port List<Integer>Ranges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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 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. - src
Cidr 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.
- src
Port List<Integer>Ranges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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 StringRule Description - 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 StringRule Name - 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 string - IP Address Family.
- dst
Cidr 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.
- dst
Port number[]Ranges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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 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. - src
Cidr 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.
- src
Port number[]Ranges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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 stringRule Description - 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 stringRule Name - 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_ Sequence[int]ranges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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_ Sequence[int]ranges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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_ strrule_ description - 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_ strrule_ name - 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 String - IP Address Family.
- dst
Cidr 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.
- dst
Port List<Number>Ranges - The destination port of the traffic message. Valid values: -1,
1
to65535
. 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 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. - src
Cidr 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.
- src
Port List<Number>Ranges - The source port of the traffic message. Valid values: -1,
1
to65535
. 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 StringRule Description - 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 StringRule Name - 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.