1. Packages
  2. Cisco Catalyst SD-WAN Provider
  3. API Docs
  4. RewriteRulePolicyDefinition
Cisco Catalyst SD-WAN v0.3.0 published on Friday, Mar 28, 2025 by Pulumi

sdwan.RewriteRulePolicyDefinition

Explore with Pulumi AI

This resource can manage a Rewrite Rule Policy Definition .

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sdwan.RewriteRulePolicyDefinition;
import com.pulumi.sdwan.RewriteRulePolicyDefinitionArgs;
import com.pulumi.sdwan.inputs.RewriteRulePolicyDefinitionRuleArgs;
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 RewriteRulePolicyDefinition("example", RewriteRulePolicyDefinitionArgs.builder()
            .name("Example")
            .description("My description")
            .rules(RewriteRulePolicyDefinitionRuleArgs.builder()
                .class_map_id("2081c2f4-3f9f-4fee-8078-dcc8904e368d")
                .priority("low")
                .dscp(16)
                .layer2_cos(1)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: sdwan:RewriteRulePolicyDefinition
    properties:
      name: Example
      description: My description
      rules:
        - class_map_id: 2081c2f4-3f9f-4fee-8078-dcc8904e368d
          priority: low
          dscp: 16
          layer2_cos: 1
Copy

Create RewriteRulePolicyDefinition Resource

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

Constructor syntax

new RewriteRulePolicyDefinition(name: string, args: RewriteRulePolicyDefinitionArgs, opts?: CustomResourceOptions);
@overload
def RewriteRulePolicyDefinition(resource_name: str,
                                args: RewriteRulePolicyDefinitionArgs,
                                opts: Optional[ResourceOptions] = None)

@overload
def RewriteRulePolicyDefinition(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                description: Optional[str] = None,
                                rules: Optional[Sequence[RewriteRulePolicyDefinitionRuleArgs]] = None,
                                name: Optional[str] = None)
func NewRewriteRulePolicyDefinition(ctx *Context, name string, args RewriteRulePolicyDefinitionArgs, opts ...ResourceOption) (*RewriteRulePolicyDefinition, error)
public RewriteRulePolicyDefinition(string name, RewriteRulePolicyDefinitionArgs args, CustomResourceOptions? opts = null)
public RewriteRulePolicyDefinition(String name, RewriteRulePolicyDefinitionArgs args)
public RewriteRulePolicyDefinition(String name, RewriteRulePolicyDefinitionArgs args, CustomResourceOptions options)
type: sdwan:RewriteRulePolicyDefinition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RewriteRulePolicyDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RewriteRulePolicyDefinitionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RewriteRulePolicyDefinitionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RewriteRulePolicyDefinitionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RewriteRulePolicyDefinitionArgs
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 rewriteRulePolicyDefinitionResource = new Sdwan.RewriteRulePolicyDefinition("rewriteRulePolicyDefinitionResource", new()
{
    Description = "string",
    Rules = new[]
    {
        new Sdwan.Inputs.RewriteRulePolicyDefinitionRuleArgs
        {
            ClassMapId = "string",
            Dscp = 0,
            Priority = "string",
            ClassMapVersion = 0,
            Layer2Cos = 0,
        },
    },
    Name = "string",
});
Copy
example, err := sdwan.NewRewriteRulePolicyDefinition(ctx, "rewriteRulePolicyDefinitionResource", &sdwan.RewriteRulePolicyDefinitionArgs{
	Description: pulumi.String("string"),
	Rules: sdwan.RewriteRulePolicyDefinitionRuleArray{
		&sdwan.RewriteRulePolicyDefinitionRuleArgs{
			ClassMapId:      pulumi.String("string"),
			Dscp:            pulumi.Int(0),
			Priority:        pulumi.String("string"),
			ClassMapVersion: pulumi.Int(0),
			Layer2Cos:       pulumi.Int(0),
		},
	},
	Name: pulumi.String("string"),
})
Copy
var rewriteRulePolicyDefinitionResource = new RewriteRulePolicyDefinition("rewriteRulePolicyDefinitionResource", RewriteRulePolicyDefinitionArgs.builder()
    .description("string")
    .rules(RewriteRulePolicyDefinitionRuleArgs.builder()
        .classMapId("string")
        .dscp(0)
        .priority("string")
        .classMapVersion(0)
        .layer2Cos(0)
        .build())
    .name("string")
    .build());
Copy
rewrite_rule_policy_definition_resource = sdwan.RewriteRulePolicyDefinition("rewriteRulePolicyDefinitionResource",
    description="string",
    rules=[{
        "class_map_id": "string",
        "dscp": 0,
        "priority": "string",
        "class_map_version": 0,
        "layer2_cos": 0,
    }],
    name="string")
Copy
const rewriteRulePolicyDefinitionResource = new sdwan.RewriteRulePolicyDefinition("rewriteRulePolicyDefinitionResource", {
    description: "string",
    rules: [{
        classMapId: "string",
        dscp: 0,
        priority: "string",
        classMapVersion: 0,
        layer2Cos: 0,
    }],
    name: "string",
});
Copy
type: sdwan:RewriteRulePolicyDefinition
properties:
    description: string
    name: string
    rules:
        - classMapId: string
          classMapVersion: 0
          dscp: 0
          layer2Cos: 0
          priority: string
Copy

RewriteRulePolicyDefinition 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 RewriteRulePolicyDefinition resource accepts the following input properties:

Description This property is required. string
The description of the policy definition
Rules This property is required. List<RewriteRulePolicyDefinitionRule>
List of rules
Name string
The name of the policy definition
Description This property is required. string
The description of the policy definition
Rules This property is required. []RewriteRulePolicyDefinitionRuleArgs
List of rules
Name string
The name of the policy definition
description This property is required. String
The description of the policy definition
rules This property is required. List<RewriteRulePolicyDefinitionRule>
List of rules
name String
The name of the policy definition
description This property is required. string
The description of the policy definition
rules This property is required. RewriteRulePolicyDefinitionRule[]
List of rules
name string
The name of the policy definition
description This property is required. str
The description of the policy definition
rules This property is required. Sequence[RewriteRulePolicyDefinitionRuleArgs]
List of rules
name str
The name of the policy definition
description This property is required. String
The description of the policy definition
rules This property is required. List<Property Map>
List of rules
name String
The name of the policy definition

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Type string
Type
Version int
The version of the object
Id string
The provider-assigned unique ID for this managed resource.
Type string
Type
Version int
The version of the object
id String
The provider-assigned unique ID for this managed resource.
type String
Type
version Integer
The version of the object
id string
The provider-assigned unique ID for this managed resource.
type string
Type
version number
The version of the object
id str
The provider-assigned unique ID for this managed resource.
type str
Type
version int
The version of the object
id String
The provider-assigned unique ID for this managed resource.
type String
Type
version Number
The version of the object

Look up Existing RewriteRulePolicyDefinition Resource

Get an existing RewriteRulePolicyDefinition 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?: RewriteRulePolicyDefinitionState, opts?: CustomResourceOptions): RewriteRulePolicyDefinition
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        rules: Optional[Sequence[RewriteRulePolicyDefinitionRuleArgs]] = None,
        type: Optional[str] = None,
        version: Optional[int] = None) -> RewriteRulePolicyDefinition
func GetRewriteRulePolicyDefinition(ctx *Context, name string, id IDInput, state *RewriteRulePolicyDefinitionState, opts ...ResourceOption) (*RewriteRulePolicyDefinition, error)
public static RewriteRulePolicyDefinition Get(string name, Input<string> id, RewriteRulePolicyDefinitionState? state, CustomResourceOptions? opts = null)
public static RewriteRulePolicyDefinition get(String name, Output<String> id, RewriteRulePolicyDefinitionState state, CustomResourceOptions options)
resources:  _:    type: sdwan:RewriteRulePolicyDefinition    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Description string
The description of the policy definition
Name string
The name of the policy definition
Rules List<RewriteRulePolicyDefinitionRule>
List of rules
Type string
Type
Version int
The version of the object
Description string
The description of the policy definition
Name string
The name of the policy definition
Rules []RewriteRulePolicyDefinitionRuleArgs
List of rules
Type string
Type
Version int
The version of the object
description String
The description of the policy definition
name String
The name of the policy definition
rules List<RewriteRulePolicyDefinitionRule>
List of rules
type String
Type
version Integer
The version of the object
description string
The description of the policy definition
name string
The name of the policy definition
rules RewriteRulePolicyDefinitionRule[]
List of rules
type string
Type
version number
The version of the object
description str
The description of the policy definition
name str
The name of the policy definition
rules Sequence[RewriteRulePolicyDefinitionRuleArgs]
List of rules
type str
Type
version int
The version of the object
description String
The description of the policy definition
name String
The name of the policy definition
rules List<Property Map>
List of rules
type String
Type
version Number
The version of the object

Supporting Types

RewriteRulePolicyDefinitionRule
, RewriteRulePolicyDefinitionRuleArgs

ClassMapId This property is required. string
Class map ID
Dscp This property is required. int
DSCP

  • Range: 0-63
Priority This property is required. string
Priority

  • Choices: high, low
ClassMapVersion int
Class map version
Layer2Cos int
Layer2 CoS

  • Range: 0-7
ClassMapId This property is required. string
Class map ID
Dscp This property is required. int
DSCP

  • Range: 0-63
Priority This property is required. string
Priority

  • Choices: high, low
ClassMapVersion int
Class map version
Layer2Cos int
Layer2 CoS

  • Range: 0-7
classMapId This property is required. String
Class map ID
dscp This property is required. Integer
DSCP

  • Range: 0-63
priority This property is required. String
Priority

  • Choices: high, low
classMapVersion Integer
Class map version
layer2Cos Integer
Layer2 CoS

  • Range: 0-7
classMapId This property is required. string
Class map ID
dscp This property is required. number
DSCP

  • Range: 0-63
priority This property is required. string
Priority

  • Choices: high, low
classMapVersion number
Class map version
layer2Cos number
Layer2 CoS

  • Range: 0-7
class_map_id This property is required. str
Class map ID
dscp This property is required. int
DSCP

  • Range: 0-63
priority This property is required. str
Priority

  • Choices: high, low
class_map_version int
Class map version
layer2_cos int
Layer2 CoS

  • Range: 0-7
classMapId This property is required. String
Class map ID
dscp This property is required. Number
DSCP

  • Range: 0-63
priority This property is required. String
Priority

  • Choices: high, low
classMapVersion Number
Class map version
layer2Cos Number
Layer2 CoS

  • Range: 0-7

Import

$ pulumi import sdwan:index/rewriteRulePolicyDefinition:RewriteRulePolicyDefinition example "f6b2c44c-693c-4763-b010-895aa3d236bd"
Copy

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

Package Details

Repository
sdwan pulumi/pulumi-sdwan
License
Apache-2.0
Notes
This Pulumi package is based on the sdwan Terraform Provider.