alicloud.cen.TrafficMarkingPolicy
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 in v1.173.0+.
Example Usage
Basic Usage
using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var exampleInstance = new AliCloud.Cen.Instance("exampleInstance", new()
{
CenInstanceName = "example_value",
});
var exampleTransitRouter = new AliCloud.Cen.TransitRouter("exampleTransitRouter", new()
{
CenId = exampleInstance.Id,
TransitRouterName = "example_value",
});
var exampleTrafficMarkingPolicy = new AliCloud.Cen.TrafficMarkingPolicy("exampleTrafficMarkingPolicy", new()
{
MarkingDscp = 1,
Priority = 1,
TrafficMarkingPolicyName = "example_value",
TransitRouterId = exampleTransitRouter.TransitRouterId,
});
});
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 {
exampleInstance, err := cen.NewInstance(ctx, "exampleInstance", &cen.InstanceArgs{
CenInstanceName: pulumi.String("example_value"),
})
if err != nil {
return err
}
exampleTransitRouter, err := cen.NewTransitRouter(ctx, "exampleTransitRouter", &cen.TransitRouterArgs{
CenId: exampleInstance.ID(),
TransitRouterName: pulumi.String("example_value"),
})
if err != nil {
return err
}
_, err = cen.NewTrafficMarkingPolicy(ctx, "exampleTrafficMarkingPolicy", &cen.TrafficMarkingPolicyArgs{
MarkingDscp: pulumi.Int(1),
Priority: pulumi.Int(1),
TrafficMarkingPolicyName: pulumi.String("example_value"),
TransitRouterId: exampleTransitRouter.TransitRouterId,
})
if err != nil {
return err
}
return nil
})
}
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 exampleInstance = new Instance("exampleInstance", InstanceArgs.builder()
.cenInstanceName("example_value")
.build());
var exampleTransitRouter = new TransitRouter("exampleTransitRouter", TransitRouterArgs.builder()
.cenId(exampleInstance.id())
.transitRouterName("example_value")
.build());
var exampleTrafficMarkingPolicy = new TrafficMarkingPolicy("exampleTrafficMarkingPolicy", TrafficMarkingPolicyArgs.builder()
.markingDscp(1)
.priority(1)
.trafficMarkingPolicyName("example_value")
.transitRouterId(exampleTransitRouter.transitRouterId())
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
example_instance = alicloud.cen.Instance("exampleInstance", cen_instance_name="example_value")
example_transit_router = alicloud.cen.TransitRouter("exampleTransitRouter",
cen_id=example_instance.id,
transit_router_name="example_value")
example_traffic_marking_policy = alicloud.cen.TrafficMarkingPolicy("exampleTrafficMarkingPolicy",
marking_dscp=1,
priority=1,
traffic_marking_policy_name="example_value",
transit_router_id=example_transit_router.transit_router_id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const exampleInstance = new alicloud.cen.Instance("exampleInstance", {cenInstanceName: "example_value"});
const exampleTransitRouter = new alicloud.cen.TransitRouter("exampleTransitRouter", {
cenId: exampleInstance.id,
transitRouterName: "example_value",
});
const exampleTrafficMarkingPolicy = new alicloud.cen.TrafficMarkingPolicy("exampleTrafficMarkingPolicy", {
markingDscp: 1,
priority: 1,
trafficMarkingPolicyName: "example_value",
transitRouterId: exampleTransitRouter.transitRouterId,
});
resources:
exampleInstance:
type: alicloud:cen:Instance
properties:
cenInstanceName: example_value
exampleTransitRouter:
type: alicloud:cen:TransitRouter
properties:
cenId: ${exampleInstance.id}
transitRouterName: example_value
exampleTrafficMarkingPolicy:
type: alicloud:cen:TrafficMarkingPolicy
properties:
markingDscp: 1
priority: 1
trafficMarkingPolicyName: example_value
transitRouterId: ${exampleTransitRouter.transitRouterId}
Create TrafficMarkingPolicy Resource
new TrafficMarkingPolicy(name: string, args: TrafficMarkingPolicyArgs, opts?: CustomResourceOptions);
@overload
def TrafficMarkingPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
dry_run: Optional[bool] = None,
marking_dscp: Optional[int] = None,
priority: Optional[int] = None,
traffic_marking_policy_name: Optional[str] = None,
transit_router_id: Optional[str] = None)
@overload
def TrafficMarkingPolicy(resource_name: str,
args: TrafficMarkingPolicyArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Marking
Dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- Priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- Transit
Router stringId The ID of the transit router.
- Description string
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Dry
Run bool The dry run.
- Traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Marking
Dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- Priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- Transit
Router stringId The ID of the transit router.
- Description string
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Dry
Run bool The dry run.
- Traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- marking
Dscp Integer The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority Integer
The Priority of the Traffic Marking Policy. Value range: 1~100.
- transit
Router StringId The ID of the transit router.
- description String
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run Boolean The dry run.
- traffic
Marking StringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- marking
Dscp number The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority number
The Priority of the Traffic Marking Policy. Value range: 1~100.
- transit
Router stringId The ID of the transit router.
- description string
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run boolean The dry run.
- traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- marking_
dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- transit_
router_ strid The ID of the transit router.
- description str
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry_
run bool The dry run.
- traffic_
marking_ strpolicy_ name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- marking
Dscp Number The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority Number
The Priority of the Traffic Marking Policy. Value range: 1~100.
- transit
Router StringId The ID of the transit router.
- description String
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run Boolean The dry run.
- traffic
Marking StringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
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 ID of the Traffic Marking Policy.
- Id string
The provider-assigned unique ID for this managed resource.
- Status string
The status of the resource.
- Traffic
Marking stringPolicy Id The ID of the Traffic Marking Policy.
- id String
The provider-assigned unique ID for this managed resource.
- status String
The status of the resource.
- traffic
Marking StringPolicy Id The ID of the Traffic Marking Policy.
- id string
The provider-assigned unique ID for this managed resource.
- status string
The status of the resource.
- traffic
Marking stringPolicy Id The ID of the Traffic Marking Policy.
- id str
The provider-assigned unique ID for this managed resource.
- status str
The status of the resource.
- traffic_
marking_ strpolicy_ id The ID of the Traffic Marking Policy.
- id String
The provider-assigned unique ID for this managed resource.
- status String
The status of the resource.
- traffic
Marking StringPolicy Id The ID of the Traffic Marking Policy.
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,
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
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Dry
Run bool The dry run.
- Marking
Dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- Priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- Status string
The status of the resource.
- Traffic
Marking stringPolicy Id The ID of the Traffic Marking Policy.
- Traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Transit
Router stringId The ID of the transit router.
- Description string
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Dry
Run bool The dry run.
- Marking
Dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- Priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- Status string
The status of the resource.
- Traffic
Marking stringPolicy Id The ID of the Traffic Marking Policy.
- Traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- Transit
Router stringId The ID of the transit router.
- description String
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run Boolean The dry run.
- marking
Dscp Integer The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority Integer
The Priority of the Traffic Marking Policy. Value range: 1~100.
- status String
The status of the resource.
- traffic
Marking StringPolicy Id The ID of the Traffic Marking Policy.
- traffic
Marking StringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- transit
Router StringId The ID of the transit router.
- description string
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run boolean The dry run.
- marking
Dscp number The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority number
The Priority of the Traffic Marking Policy. Value range: 1~100.
- status string
The status of the resource.
- traffic
Marking stringPolicy Id The ID of the Traffic Marking Policy.
- traffic
Marking stringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- transit
Router stringId The ID of the transit router.
- description str
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry_
run bool The dry run.
- marking_
dscp int The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority int
The Priority of the Traffic Marking Policy. Value range: 1~100.
- status str
The status of the resource.
- traffic_
marking_ strpolicy_ id The ID of the Traffic Marking Policy.
- traffic_
marking_ strpolicy_ name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- transit_
router_ strid The ID of the transit router.
- description String
The description of the Traffic Marking Policy. The description must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- dry
Run Boolean The dry run.
- marking
Dscp Number The DSCP(Differentiated Services Code Point) of the Traffic Marking Policy. Value range: 0~63.
- priority Number
The Priority of the Traffic Marking Policy. Value range: 1~100.
- status String
The status of the resource.
- traffic
Marking StringPolicy Id The ID of the Traffic Marking Policy.
- traffic
Marking StringPolicy Name The name of the Traffic Marking Policy. The name must be 2 to 128 characters in length, and must start with a letter. It can contain digits, underscores (_), and hyphens (-).
- transit
Router StringId The ID of the transit router.
Import
Cloud Enterprise Network (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>
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.