1. Packages
  2. Strata Cloud Manager Provider
  3. API Docs
  4. getQosPolicyRule
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
scm logo
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi

    QosPolicyRule data source

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scm from "@pulumi/scm";
    
    const testQosPolicyRule = new scm.QosPolicyRule("test_qos_policy_rule", {
        name: "data-source-qos-test",
        description: "Rule created specifically for data source testing with DSCP/TOS.",
        folder: "All",
        position: "pre",
        schedule: "non-work-hours",
        action: {
            "class": "1",
        },
        dscpTos: {
            codepoints: [{
                name: "Expedited Forwarding",
                type: {
                    ef: {},
                },
            }],
        },
    });
    const singleRuleById = scm.getQosPolicyRuleOutput({
        id: testQosPolicyRule.id,
    });
    export const singleQosPolicyRuleDump = singleRuleById;
    
    import pulumi
    import pulumi_scm as scm
    
    test_qos_policy_rule = scm.QosPolicyRule("test_qos_policy_rule",
        name="data-source-qos-test",
        description="Rule created specifically for data source testing with DSCP/TOS.",
        folder="All",
        position="pre",
        schedule="non-work-hours",
        action={
            "class_": "1",
        },
        dscp_tos={
            "codepoints": [{
                "name": "Expedited Forwarding",
                "type": {
                    "ef": {},
                },
            }],
        })
    single_rule_by_id = scm.get_qos_policy_rule_output(id=test_qos_policy_rule.id)
    pulumi.export("singleQosPolicyRuleDump", single_rule_by_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-scm/sdk/go/scm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		testQosPolicyRule, err := scm.NewQosPolicyRule(ctx, "test_qos_policy_rule", &scm.QosPolicyRuleArgs{
    			Name:        pulumi.String("data-source-qos-test"),
    			Description: pulumi.String("Rule created specifically for data source testing with DSCP/TOS."),
    			Folder:      pulumi.String("All"),
    			Position:    pulumi.String("pre"),
    			Schedule:    pulumi.String("non-work-hours"),
    			Action: &scm.QosPolicyRuleActionArgs{
    				Class: pulumi.String("1"),
    			},
    			DscpTos: &scm.QosPolicyRuleDscpTosArgs{
    				Codepoints: scm.QosPolicyRuleDscpTosCodepointArray{
    					&scm.QosPolicyRuleDscpTosCodepointArgs{
    						Name: pulumi.String("Expedited Forwarding"),
    						Type: &scm.QosPolicyRuleDscpTosCodepointTypeArgs{
    							Ef: &scm.QosPolicyRuleDscpTosCodepointTypeEfArgs{},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		singleRuleById := scm.LookupQosPolicyRuleOutput(ctx, scm.GetQosPolicyRuleOutputArgs{
    			Id: testQosPolicyRule.ID(),
    		}, nil)
    		ctx.Export("singleQosPolicyRuleDump", singleRuleById)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scm = Pulumi.Scm;
    
    return await Deployment.RunAsync(() => 
    {
        var testQosPolicyRule = new Scm.QosPolicyRule("test_qos_policy_rule", new()
        {
            Name = "data-source-qos-test",
            Description = "Rule created specifically for data source testing with DSCP/TOS.",
            Folder = "All",
            Position = "pre",
            Schedule = "non-work-hours",
            Action = new Scm.Inputs.QosPolicyRuleActionArgs
            {
                Class = "1",
            },
            DscpTos = new Scm.Inputs.QosPolicyRuleDscpTosArgs
            {
                Codepoints = new[]
                {
                    new Scm.Inputs.QosPolicyRuleDscpTosCodepointArgs
                    {
                        Name = "Expedited Forwarding",
                        Type = new Scm.Inputs.QosPolicyRuleDscpTosCodepointTypeArgs
                        {
                            Ef = null,
                        },
                    },
                },
            },
        });
    
        var singleRuleById = Scm.GetQosPolicyRule.Invoke(new()
        {
            Id = testQosPolicyRule.Id,
        });
    
        return new Dictionary<string, object?>
        {
            ["singleQosPolicyRuleDump"] = singleRuleById,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scm.QosPolicyRule;
    import com.pulumi.scm.QosPolicyRuleArgs;
    import com.pulumi.scm.inputs.QosPolicyRuleActionArgs;
    import com.pulumi.scm.inputs.QosPolicyRuleDscpTosArgs;
    import com.pulumi.scm.ScmFunctions;
    import com.pulumi.scm.inputs.GetQosPolicyRuleArgs;
    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 testQosPolicyRule = new QosPolicyRule("testQosPolicyRule", QosPolicyRuleArgs.builder()
                .name("data-source-qos-test")
                .description("Rule created specifically for data source testing with DSCP/TOS.")
                .folder("All")
                .position("pre")
                .schedule("non-work-hours")
                .action(QosPolicyRuleActionArgs.builder()
                    .class_("1")
                    .build())
                .dscpTos(QosPolicyRuleDscpTosArgs.builder()
                    .codepoints(QosPolicyRuleDscpTosCodepointArgs.builder()
                        .name("Expedited Forwarding")
                        .type(QosPolicyRuleDscpTosCodepointTypeArgs.builder()
                            .ef(QosPolicyRuleDscpTosCodepointTypeEfArgs.builder()
                                .build())
                            .build())
                        .build())
                    .build())
                .build());
    
            final var singleRuleById = ScmFunctions.getQosPolicyRule(GetQosPolicyRuleArgs.builder()
                .id(testQosPolicyRule.id())
                .build());
    
            ctx.export("singleQosPolicyRuleDump", singleRuleById);
        }
    }
    
    resources:
      testQosPolicyRule:
        type: scm:QosPolicyRule
        name: test_qos_policy_rule
        properties:
          name: data-source-qos-test
          description: Rule created specifically for data source testing with DSCP/TOS.
          folder: All
          position: pre
          schedule: non-work-hours
          action:
            class: '1'
          dscpTos:
            codepoints:
              - name: Expedited Forwarding
                type:
                  ef: {}
    variables:
      singleRuleById:
        fn::invoke:
          function: scm:getQosPolicyRule
          arguments:
            id: ${testQosPolicyRule.id}
    outputs:
      singleQosPolicyRuleDump: ${singleRuleById}
    

    Using getQosPolicyRule

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getQosPolicyRule(args: GetQosPolicyRuleArgs, opts?: InvokeOptions): Promise<GetQosPolicyRuleResult>
    function getQosPolicyRuleOutput(args: GetQosPolicyRuleOutputArgs, opts?: InvokeOptions): Output<GetQosPolicyRuleResult>
    def get_qos_policy_rule(id: Optional[str] = None,
                            name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetQosPolicyRuleResult
    def get_qos_policy_rule_output(id: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetQosPolicyRuleResult]
    func LookupQosPolicyRule(ctx *Context, args *LookupQosPolicyRuleArgs, opts ...InvokeOption) (*LookupQosPolicyRuleResult, error)
    func LookupQosPolicyRuleOutput(ctx *Context, args *LookupQosPolicyRuleOutputArgs, opts ...InvokeOption) LookupQosPolicyRuleResultOutput

    > Note: This function is named LookupQosPolicyRule in the Go SDK.

    public static class GetQosPolicyRule 
    {
        public static Task<GetQosPolicyRuleResult> InvokeAsync(GetQosPolicyRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetQosPolicyRuleResult> Invoke(GetQosPolicyRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQosPolicyRuleResult> getQosPolicyRule(GetQosPolicyRuleArgs args, InvokeOptions options)
    public static Output<GetQosPolicyRuleResult> getQosPolicyRule(GetQosPolicyRuleArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scm:index/getQosPolicyRule:getQosPolicyRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    UUID of the resource
    Name string
    Name
    Id string
    UUID of the resource
    Name string
    Name
    id String
    UUID of the resource
    name String
    Name
    id string
    UUID of the resource
    name string
    Name
    id str
    UUID of the resource
    name str
    Name
    id String
    UUID of the resource
    name String
    Name

    getQosPolicyRule Result

    The following output properties are available:

    Action GetQosPolicyRuleAction
    Action
    Description string
    Description
    Device string
    The device in which the resource is defined
    DscpTos GetQosPolicyRuleDscpTos
    Dscp tos
    Folder string
    The folder in which the resource is defined
    Id string
    UUID of the resource
    Name string
    Name
    Position string
    The relative position of the rule
    RelativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    Schedule string
    Schedule
    Snippet string
    The snippet in which the resource is defined
    TargetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    Tfid string
    Action GetQosPolicyRuleAction
    Action
    Description string
    Description
    Device string
    The device in which the resource is defined
    DscpTos GetQosPolicyRuleDscpTos
    Dscp tos
    Folder string
    The folder in which the resource is defined
    Id string
    UUID of the resource
    Name string
    Name
    Position string
    The relative position of the rule
    RelativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    Schedule string
    Schedule
    Snippet string
    The snippet in which the resource is defined
    TargetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    Tfid string
    action GetQosPolicyRuleAction
    Action
    description String
    Description
    device String
    The device in which the resource is defined
    dscpTos GetQosPolicyRuleDscpTos
    Dscp tos
    folder String
    The folder in which the resource is defined
    id String
    UUID of the resource
    name String
    Name
    position String
    The relative position of the rule
    relativePosition String
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    schedule String
    Schedule
    snippet String
    The snippet in which the resource is defined
    targetRule String
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid String
    action GetQosPolicyRuleAction
    Action
    description string
    Description
    device string
    The device in which the resource is defined
    dscpTos GetQosPolicyRuleDscpTos
    Dscp tos
    folder string
    The folder in which the resource is defined
    id string
    UUID of the resource
    name string
    Name
    position string
    The relative position of the rule
    relativePosition string
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    schedule string
    Schedule
    snippet string
    The snippet in which the resource is defined
    targetRule string
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid string
    action GetQosPolicyRuleAction
    Action
    description str
    Description
    device str
    The device in which the resource is defined
    dscp_tos GetQosPolicyRuleDscpTos
    Dscp tos
    folder str
    The folder in which the resource is defined
    id str
    UUID of the resource
    name str
    Name
    position str
    The relative position of the rule
    relative_position str
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    schedule str
    Schedule
    snippet str
    The snippet in which the resource is defined
    target_rule str
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid str
    action Property Map
    Action
    description String
    Description
    device String
    The device in which the resource is defined
    dscpTos Property Map
    Dscp tos
    folder String
    The folder in which the resource is defined
    id String
    UUID of the resource
    name String
    Name
    position String
    The relative position of the rule
    relativePosition String
    Relative positioning rule. String must be one of these: "before", "after", "top", "bottom". If not specified, rule is created at the bottom of the ruleset.
    schedule String
    Schedule
    snippet String
    The snippet in which the resource is defined
    targetRule String
    The name or UUID of the rule to position this rule relative to. Required when relative_position is "before" or "after".
    tfid String

    Supporting Types

    GetQosPolicyRuleAction

    Class string
    Class
    Class string
    Class
    class_ String
    Class
    class string
    Class
    class_ str
    Class
    class String
    Class

    GetQosPolicyRuleDscpTos

    GetQosPolicyRuleDscpTosCodepoint

    name String
    Name
    type Property Map
    Type

    GetQosPolicyRuleDscpTosCodepointType

    GetQosPolicyRuleDscpTosCodepointTypeAf

    Codepoint string
    Codepoint
    Codepoint string
    Codepoint
    codepoint String
    Codepoint
    codepoint string
    Codepoint
    codepoint str
    Codepoint
    codepoint String
    Codepoint

    GetQosPolicyRuleDscpTosCodepointTypeCs

    Codepoint string
    Codepoint
    Codepoint string
    Codepoint
    codepoint String
    Codepoint
    codepoint string
    Codepoint
    codepoint str
    Codepoint
    codepoint String
    Codepoint

    GetQosPolicyRuleDscpTosCodepointTypeCustom

    GetQosPolicyRuleDscpTosCodepointTypeCustomCodepoint

    BinaryValue string
    Binary value
    CodepointName string
    Codepoint name
    BinaryValue string
    Binary value
    CodepointName string
    Codepoint name
    binaryValue String
    Binary value
    codepointName String
    Codepoint name
    binaryValue string
    Binary value
    codepointName string
    Codepoint name
    binary_value str
    Binary value
    codepoint_name str
    Codepoint name
    binaryValue String
    Binary value
    codepointName String
    Codepoint name

    GetQosPolicyRuleDscpTosCodepointTypeTos

    Codepoint string
    Codepoint
    Codepoint string
    Codepoint
    codepoint String
    Codepoint
    codepoint string
    Codepoint
    codepoint str
    Codepoint
    codepoint String
    Codepoint

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo
    Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate