1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. QosDscpMarkingRule
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.networking.QosDscpMarkingRule

Explore with Pulumi AI

openstack logo
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

    Manages a V2 Neutron QoS DSCP marking rule resource within OpenStack.

    Example Usage

    Create a QoS Policy with some DSCP marking rule

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const qosPolicy1 = new openstack.networking.QosPolicy("qos_policy_1", {
        name: "qos_policy_1",
        description: "dscp_mark",
    });
    const dscpMarkingRule1 = new openstack.networking.QosDscpMarkingRule("dscp_marking_rule_1", {
        qosPolicyId: qosPolicy1.id,
        dscpMark: 26,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    qos_policy1 = openstack.networking.QosPolicy("qos_policy_1",
        name="qos_policy_1",
        description="dscp_mark")
    dscp_marking_rule1 = openstack.networking.QosDscpMarkingRule("dscp_marking_rule_1",
        qos_policy_id=qos_policy1.id,
        dscp_mark=26)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		qosPolicy1, err := networking.NewQosPolicy(ctx, "qos_policy_1", &networking.QosPolicyArgs{
    			Name:        pulumi.String("qos_policy_1"),
    			Description: pulumi.String("dscp_mark"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = networking.NewQosDscpMarkingRule(ctx, "dscp_marking_rule_1", &networking.QosDscpMarkingRuleArgs{
    			QosPolicyId: qosPolicy1.ID(),
    			DscpMark:    pulumi.Int(26),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var qosPolicy1 = new OpenStack.Networking.QosPolicy("qos_policy_1", new()
        {
            Name = "qos_policy_1",
            Description = "dscp_mark",
        });
    
        var dscpMarkingRule1 = new OpenStack.Networking.QosDscpMarkingRule("dscp_marking_rule_1", new()
        {
            QosPolicyId = qosPolicy1.Id,
            DscpMark = 26,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.QosPolicy;
    import com.pulumi.openstack.networking.QosPolicyArgs;
    import com.pulumi.openstack.networking.QosDscpMarkingRule;
    import com.pulumi.openstack.networking.QosDscpMarkingRuleArgs;
    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 qosPolicy1 = new QosPolicy("qosPolicy1", QosPolicyArgs.builder()
                .name("qos_policy_1")
                .description("dscp_mark")
                .build());
    
            var dscpMarkingRule1 = new QosDscpMarkingRule("dscpMarkingRule1", QosDscpMarkingRuleArgs.builder()
                .qosPolicyId(qosPolicy1.id())
                .dscpMark(26)
                .build());
    
        }
    }
    
    resources:
      qosPolicy1:
        type: openstack:networking:QosPolicy
        name: qos_policy_1
        properties:
          name: qos_policy_1
          description: dscp_mark
      dscpMarkingRule1:
        type: openstack:networking:QosDscpMarkingRule
        name: dscp_marking_rule_1
        properties:
          qosPolicyId: ${qosPolicy1.id}
          dscpMark: 26
    

    Create QosDscpMarkingRule Resource

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

    Constructor syntax

    new QosDscpMarkingRule(name: string, args: QosDscpMarkingRuleArgs, opts?: CustomResourceOptions);
    @overload
    def QosDscpMarkingRule(resource_name: str,
                           args: QosDscpMarkingRuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def QosDscpMarkingRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           dscp_mark: Optional[int] = None,
                           qos_policy_id: Optional[str] = None,
                           region: Optional[str] = None)
    func NewQosDscpMarkingRule(ctx *Context, name string, args QosDscpMarkingRuleArgs, opts ...ResourceOption) (*QosDscpMarkingRule, error)
    public QosDscpMarkingRule(string name, QosDscpMarkingRuleArgs args, CustomResourceOptions? opts = null)
    public QosDscpMarkingRule(String name, QosDscpMarkingRuleArgs args)
    public QosDscpMarkingRule(String name, QosDscpMarkingRuleArgs args, CustomResourceOptions options)
    
    type: openstack:networking:QosDscpMarkingRule
    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 QosDscpMarkingRuleArgs
    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 QosDscpMarkingRuleArgs
    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 QosDscpMarkingRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args QosDscpMarkingRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args QosDscpMarkingRuleArgs
    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 qosDscpMarkingRuleResource = new OpenStack.Networking.QosDscpMarkingRule("qosDscpMarkingRuleResource", new()
    {
        DscpMark = 0,
        QosPolicyId = "string",
        Region = "string",
    });
    
    example, err := networking.NewQosDscpMarkingRule(ctx, "qosDscpMarkingRuleResource", &networking.QosDscpMarkingRuleArgs{
    	DscpMark:    pulumi.Int(0),
    	QosPolicyId: pulumi.String("string"),
    	Region:      pulumi.String("string"),
    })
    
    var qosDscpMarkingRuleResource = new QosDscpMarkingRule("qosDscpMarkingRuleResource", QosDscpMarkingRuleArgs.builder()
        .dscpMark(0)
        .qosPolicyId("string")
        .region("string")
        .build());
    
    qos_dscp_marking_rule_resource = openstack.networking.QosDscpMarkingRule("qosDscpMarkingRuleResource",
        dscp_mark=0,
        qos_policy_id="string",
        region="string")
    
    const qosDscpMarkingRuleResource = new openstack.networking.QosDscpMarkingRule("qosDscpMarkingRuleResource", {
        dscpMark: 0,
        qosPolicyId: "string",
        region: "string",
    });
    
    type: openstack:networking:QosDscpMarkingRule
    properties:
        dscpMark: 0
        qosPolicyId: string
        region: string
    

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

    DscpMark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    QosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    DscpMark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    QosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark Integer
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId String
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark number
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscp_mark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qos_policy_id str
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark Number
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId String
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing QosDscpMarkingRule Resource

    Get an existing QosDscpMarkingRule 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?: QosDscpMarkingRuleState, opts?: CustomResourceOptions): QosDscpMarkingRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dscp_mark: Optional[int] = None,
            qos_policy_id: Optional[str] = None,
            region: Optional[str] = None) -> QosDscpMarkingRule
    func GetQosDscpMarkingRule(ctx *Context, name string, id IDInput, state *QosDscpMarkingRuleState, opts ...ResourceOption) (*QosDscpMarkingRule, error)
    public static QosDscpMarkingRule Get(string name, Input<string> id, QosDscpMarkingRuleState? state, CustomResourceOptions? opts = null)
    public static QosDscpMarkingRule get(String name, Output<String> id, QosDscpMarkingRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DscpMark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    QosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    DscpMark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    QosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark Integer
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId String
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark number
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId string
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscp_mark int
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qos_policy_id str
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.
    dscpMark Number
    The value of DSCP mark. Changing this updates the DSCP mark value existing QoS DSCP marking rule.
    qosPolicyId String
    The QoS policy reference. Changing this creates a new QoS DSCP marking rule.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron QoS DSCP marking rule. If omitted, the region argument of the provider is used. Changing this creates a new QoS DSCP marking rule.

    Import

    QoS DSCP marking rules can be imported using the qos_policy_id/dscp_marking_rule_id format, e.g.

    $ pulumi import openstack:networking/qosDscpMarkingRule:QosDscpMarkingRule dscp_marking_rule_1 d6ae28ce-fcb5-4180-aa62-d260a27e09ae/46dfb556-b92f-48ce-94c5-9a9e2140de94
    

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

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi