openstack.networking.QosBandwidthLimitRule
Explore with Pulumi AI
Manages a V2 Neutron QoS bandwidth limit rule resource within OpenStack.
Example Usage
Create a QoS Policy with some bandwidth limit 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: "bw_limit",
});
const bwLimitRule1 = new openstack.networking.QosBandwidthLimitRule("bw_limit_rule_1", {
qosPolicyId: qosPolicy1.id,
maxKbps: 3000,
maxBurstKbps: 300,
direction: "egress",
});
import pulumi
import pulumi_openstack as openstack
qos_policy1 = openstack.networking.QosPolicy("qos_policy_1",
name="qos_policy_1",
description="bw_limit")
bw_limit_rule1 = openstack.networking.QosBandwidthLimitRule("bw_limit_rule_1",
qos_policy_id=qos_policy1.id,
max_kbps=3000,
max_burst_kbps=300,
direction="egress")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/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("bw_limit"),
})
if err != nil {
return err
}
_, err = networking.NewQosBandwidthLimitRule(ctx, "bw_limit_rule_1", &networking.QosBandwidthLimitRuleArgs{
QosPolicyId: qosPolicy1.ID(),
MaxKbps: pulumi.Int(3000),
MaxBurstKbps: pulumi.Int(300),
Direction: pulumi.String("egress"),
})
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 = "bw_limit",
});
var bwLimitRule1 = new OpenStack.Networking.QosBandwidthLimitRule("bw_limit_rule_1", new()
{
QosPolicyId = qosPolicy1.Id,
MaxKbps = 3000,
MaxBurstKbps = 300,
Direction = "egress",
});
});
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.QosBandwidthLimitRule;
import com.pulumi.openstack.networking.QosBandwidthLimitRuleArgs;
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("bw_limit")
.build());
var bwLimitRule1 = new QosBandwidthLimitRule("bwLimitRule1", QosBandwidthLimitRuleArgs.builder()
.qosPolicyId(qosPolicy1.id())
.maxKbps(3000)
.maxBurstKbps(300)
.direction("egress")
.build());
}
}
resources:
qosPolicy1:
type: openstack:networking:QosPolicy
name: qos_policy_1
properties:
name: qos_policy_1
description: bw_limit
bwLimitRule1:
type: openstack:networking:QosBandwidthLimitRule
name: bw_limit_rule_1
properties:
qosPolicyId: ${qosPolicy1.id}
maxKbps: 3000
maxBurstKbps: 300
direction: egress
Create QosBandwidthLimitRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QosBandwidthLimitRule(name: string, args: QosBandwidthLimitRuleArgs, opts?: CustomResourceOptions);
@overload
def QosBandwidthLimitRule(resource_name: str,
args: QosBandwidthLimitRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def QosBandwidthLimitRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
max_kbps: Optional[int] = None,
qos_policy_id: Optional[str] = None,
direction: Optional[str] = None,
max_burst_kbps: Optional[int] = None,
region: Optional[str] = None)
func NewQosBandwidthLimitRule(ctx *Context, name string, args QosBandwidthLimitRuleArgs, opts ...ResourceOption) (*QosBandwidthLimitRule, error)
public QosBandwidthLimitRule(string name, QosBandwidthLimitRuleArgs args, CustomResourceOptions? opts = null)
public QosBandwidthLimitRule(String name, QosBandwidthLimitRuleArgs args)
public QosBandwidthLimitRule(String name, QosBandwidthLimitRuleArgs args, CustomResourceOptions options)
type: openstack:networking:QosBandwidthLimitRule
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 QosBandwidthLimitRuleArgs
- 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 QosBandwidthLimitRuleArgs
- 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 QosBandwidthLimitRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QosBandwidthLimitRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QosBandwidthLimitRuleArgs
- 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 qosBandwidthLimitRuleResource = new OpenStack.Networking.QosBandwidthLimitRule("qosBandwidthLimitRuleResource", new()
{
MaxKbps = 0,
QosPolicyId = "string",
Direction = "string",
MaxBurstKbps = 0,
Region = "string",
});
example, err := networking.NewQosBandwidthLimitRule(ctx, "qosBandwidthLimitRuleResource", &networking.QosBandwidthLimitRuleArgs{
MaxKbps: pulumi.Int(0),
QosPolicyId: pulumi.String("string"),
Direction: pulumi.String("string"),
MaxBurstKbps: pulumi.Int(0),
Region: pulumi.String("string"),
})
var qosBandwidthLimitRuleResource = new QosBandwidthLimitRule("qosBandwidthLimitRuleResource", QosBandwidthLimitRuleArgs.builder()
.maxKbps(0)
.qosPolicyId("string")
.direction("string")
.maxBurstKbps(0)
.region("string")
.build());
qos_bandwidth_limit_rule_resource = openstack.networking.QosBandwidthLimitRule("qosBandwidthLimitRuleResource",
max_kbps=0,
qos_policy_id="string",
direction="string",
max_burst_kbps=0,
region="string")
const qosBandwidthLimitRuleResource = new openstack.networking.QosBandwidthLimitRule("qosBandwidthLimitRuleResource", {
maxKbps: 0,
qosPolicyId: "string",
direction: "string",
maxBurstKbps: 0,
region: "string",
});
type: openstack:networking:QosBandwidthLimitRule
properties:
direction: string
maxBurstKbps: 0
maxKbps: 0
qosPolicyId: string
region: string
QosBandwidthLimitRule 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 QosBandwidthLimitRule resource accepts the following input properties:
- Max
Kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- Qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- Direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- Max
Burst intKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- Max
Kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- Qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- Direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- Max
Burst intKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- max
Kbps Integer - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy StringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- direction String
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst IntegerKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- max
Kbps number - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst numberKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- max_
kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos_
policy_ strid - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- direction str
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max_
burst_ intkbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- max
Kbps Number - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy StringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- direction String
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst NumberKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the QosBandwidthLimitRule 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 QosBandwidthLimitRule Resource
Get an existing QosBandwidthLimitRule 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?: QosBandwidthLimitRuleState, opts?: CustomResourceOptions): QosBandwidthLimitRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
direction: Optional[str] = None,
max_burst_kbps: Optional[int] = None,
max_kbps: Optional[int] = None,
qos_policy_id: Optional[str] = None,
region: Optional[str] = None) -> QosBandwidthLimitRule
func GetQosBandwidthLimitRule(ctx *Context, name string, id IDInput, state *QosBandwidthLimitRuleState, opts ...ResourceOption) (*QosBandwidthLimitRule, error)
public static QosBandwidthLimitRule Get(string name, Input<string> id, QosBandwidthLimitRuleState? state, CustomResourceOptions? opts = null)
public static QosBandwidthLimitRule get(String name, Output<String> id, QosBandwidthLimitRuleState 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.
- Direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- Max
Burst intKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- Max
Kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- Qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- Direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- Max
Burst intKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- Max
Kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- Qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- direction String
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst IntegerKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- max
Kbps Integer - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy StringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- direction string
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst numberKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- max
Kbps number - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy stringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- direction str
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max_
burst_ intkbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- max_
kbps int - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos_
policy_ strid - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
- direction String
- The direction of traffic. Defaults to "egress". Changing this updates the direction of the existing QoS bandwidth limit rule.
- max
Burst NumberKbps - The maximum burst size in kilobits of a QoS bandwidth limit rule. Changing this updates the maximum burst size in kilobits of the existing QoS bandwidth limit rule.
- max
Kbps Number - The maximum kilobits per second of a QoS bandwidth limit rule. Changing this updates the maximum kilobits per second of the existing QoS bandwidth limit rule.
- qos
Policy StringId - The QoS policy reference. Changing this creates a new QoS bandwidth limit rule.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron QoS bandwidth limit rule. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS bandwidth limit rule.
Import
QoS bandwidth limit rules can be imported using the qos_policy_id/bandwidth_limit_rule
format, e.g.
$ pulumi import openstack:networking/qosBandwidthLimitRule:QosBandwidthLimitRule bw_limit_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.