openstack.networking.QosPolicy
Explore with Pulumi AI
Manages a V2 Neutron QoS policy resource within OpenStack.
Example Usage
Create a QoS Policy
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",
});
import pulumi
import pulumi_openstack as openstack
qos_policy1 = openstack.networking.QosPolicy("qos_policy_1",
name="qos_policy_1",
description="bw_limit")
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 {
_, 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
}
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",
});
});
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 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());
}
}
resources:
qosPolicy1:
type: openstack:networking:QosPolicy
name: qos_policy_1
properties:
name: qos_policy_1
description: bw_limit
Create QosPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new QosPolicy(name: string, args?: QosPolicyArgs, opts?: CustomResourceOptions);
@overload
def QosPolicy(resource_name: str,
args: Optional[QosPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def QosPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
shared: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
value_specs: Optional[Mapping[str, str]] = None)
func NewQosPolicy(ctx *Context, name string, args *QosPolicyArgs, opts ...ResourceOption) (*QosPolicy, error)
public QosPolicy(string name, QosPolicyArgs? args = null, CustomResourceOptions? opts = null)
public QosPolicy(String name, QosPolicyArgs args)
public QosPolicy(String name, QosPolicyArgs args, CustomResourceOptions options)
type: openstack:networking:QosPolicy
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 QosPolicyArgs
- 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 QosPolicyArgs
- 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 QosPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QosPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QosPolicyArgs
- 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 qosPolicyResource = new OpenStack.Networking.QosPolicy("qosPolicyResource", new()
{
Description = "string",
IsDefault = false,
Name = "string",
ProjectId = "string",
Region = "string",
Shared = false,
Tags = new[]
{
"string",
},
ValueSpecs =
{
{ "string", "string" },
},
});
example, err := networking.NewQosPolicy(ctx, "qosPolicyResource", &networking.QosPolicyArgs{
Description: pulumi.String("string"),
IsDefault: pulumi.Bool(false),
Name: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
Shared: pulumi.Bool(false),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
ValueSpecs: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var qosPolicyResource = new QosPolicy("qosPolicyResource", QosPolicyArgs.builder()
.description("string")
.isDefault(false)
.name("string")
.projectId("string")
.region("string")
.shared(false)
.tags("string")
.valueSpecs(Map.of("string", "string"))
.build());
qos_policy_resource = openstack.networking.QosPolicy("qosPolicyResource",
description="string",
is_default=False,
name="string",
project_id="string",
region="string",
shared=False,
tags=["string"],
value_specs={
"string": "string",
})
const qosPolicyResource = new openstack.networking.QosPolicy("qosPolicyResource", {
description: "string",
isDefault: false,
name: "string",
projectId: "string",
region: "string",
shared: false,
tags: ["string"],
valueSpecs: {
string: "string",
},
});
type: openstack:networking:QosPolicy
properties:
description: string
isDefault: false
name: string
projectId: string
region: string
shared: false
tags:
- string
valueSpecs:
string: string
QosPolicy 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 QosPolicy resource accepts the following input properties:
- Description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- Is
Default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- Name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- Project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<string>
- A set of string tags for the QoS policy.
- Value
Specs Dictionary<string, string> - Map of additional options.
- Description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- Is
Default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- Name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- Project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- []string
- A set of string tags for the QoS policy.
- Value
Specs map[string]string - Map of additional options.
- description String
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default Boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name String
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id String - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - Boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<String>
- A set of string tags for the QoS policy.
- value
Specs Map<String,String> - Map of additional options.
- description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- string[]
- A set of string tags for the QoS policy.
- value
Specs {[key: string]: string} - Map of additional options.
- description str
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is_
default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name str
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project_
id str - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- Sequence[str]
- A set of string tags for the QoS policy.
- value_
specs Mapping[str, str] - Map of additional options.
- description String
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default Boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name String
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id String - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - Boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<String>
- A set of string tags for the QoS policy.
- value
Specs Map<String> - Map of additional options.
Outputs
All input properties are implicitly available as output properties. Additionally, the QosPolicy resource produces the following output properties:
- List<string>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- Created
At string - The time at which QoS policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Number int - The revision number of the QoS policy.
- Updated
At string - The time at which QoS policy was created.
- []string
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- Created
At string - The time at which QoS policy was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Revision
Number int - The revision number of the QoS policy.
- Updated
At string - The time at which QoS policy was created.
- List<String>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At String - The time at which QoS policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Number Integer - The revision number of the QoS policy.
- updated
At String - The time at which QoS policy was created.
- string[]
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At string - The time at which QoS policy was created.
- id string
- The provider-assigned unique ID for this managed resource.
- revision
Number number - The revision number of the QoS policy.
- updated
At string - The time at which QoS policy was created.
- Sequence[str]
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created_
at str - The time at which QoS policy was created.
- id str
- The provider-assigned unique ID for this managed resource.
- revision_
number int - The revision number of the QoS policy.
- updated_
at str - The time at which QoS policy was created.
- List<String>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At String - The time at which QoS policy was created.
- id String
- The provider-assigned unique ID for this managed resource.
- revision
Number Number - The revision number of the QoS policy.
- updated
At String - The time at which QoS policy was created.
Look up Existing QosPolicy Resource
Get an existing QosPolicy 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?: QosPolicyState, opts?: CustomResourceOptions): QosPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
all_tags: Optional[Sequence[str]] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
is_default: Optional[bool] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
revision_number: Optional[int] = None,
shared: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
updated_at: Optional[str] = None,
value_specs: Optional[Mapping[str, str]] = None) -> QosPolicy
func GetQosPolicy(ctx *Context, name string, id IDInput, state *QosPolicyState, opts ...ResourceOption) (*QosPolicy, error)
public static QosPolicy Get(string name, Input<string> id, QosPolicyState? state, CustomResourceOptions? opts = null)
public static QosPolicy get(String name, Output<String> id, QosPolicyState 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.
- List<string>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- Created
At string - The time at which QoS policy was created.
- Description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- Is
Default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- Name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- Project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - Revision
Number int - The revision number of the QoS policy.
- bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<string>
- A set of string tags for the QoS policy.
- Updated
At string - The time at which QoS policy was created.
- Value
Specs Dictionary<string, string> - Map of additional options.
- []string
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- Created
At string - The time at which QoS policy was created.
- Description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- Is
Default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- Name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- Project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - Revision
Number int - The revision number of the QoS policy.
- bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- []string
- A set of string tags for the QoS policy.
- Updated
At string - The time at which QoS policy was created.
- Value
Specs map[string]string - Map of additional options.
- List<String>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At String - The time at which QoS policy was created.
- description String
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default Boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name String
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id String - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - revision
Number Integer - The revision number of the QoS policy.
- Boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<String>
- A set of string tags for the QoS policy.
- updated
At String - The time at which QoS policy was created.
- value
Specs Map<String,String> - Map of additional options.
- string[]
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At string - The time at which QoS policy was created.
- description string
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name string
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id string - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - revision
Number number - The revision number of the QoS policy.
- boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- string[]
- A set of string tags for the QoS policy.
- updated
At string - The time at which QoS policy was created.
- value
Specs {[key: string]: string} - Map of additional options.
- Sequence[str]
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created_
at str - The time at which QoS policy was created.
- description str
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is_
default bool - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name str
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project_
id str - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - revision_
number int - The revision number of the QoS policy.
- bool
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- Sequence[str]
- A set of string tags for the QoS policy.
- updated_
at str - The time at which QoS policy was created.
- value_
specs Mapping[str, str] - Map of additional options.
- List<String>
- The collection of tags assigned on the QoS policy, which have been explicitly and implicitly added.
- created
At String - The time at which QoS policy was created.
- description String
- The human-readable description for the QoS policy. Changing this updates the description of the existing QoS policy.
- is
Default Boolean - Indicates whether the QoS policy is default QoS policy or not. Changing this updates the default status of the existing QoS policy.
- name String
- The name of the QoS policy. Changing this updates the name of the existing QoS policy.
- project
Id String - The owner of the QoS policy. Required if admin wants to create a QoS policy for another project. Changing this creates a new QoS policy.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to create a Neutron Qos policy. If omitted, the
region
argument of the provider is used. Changing this creates a new QoS policy. - revision
Number Number - The revision number of the QoS policy.
- Boolean
- Indicates whether this QoS policy is shared across all projects. Changing this updates the shared status of the existing QoS policy.
- List<String>
- A set of string tags for the QoS policy.
- updated
At String - The time at which QoS policy was created.
- value
Specs Map<String> - Map of additional options.
Import
QoS Policies can be imported using the id
, e.g.
$ pulumi import openstack:networking/qosPolicy:QosPolicy qos_policy_1 d6ae28ce-fcb5-4180-aa62-d260a27e09ae
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.