alicloud.expressconnect.TrafficQosQueue
Explore with Pulumi AI
Provides a Express Connect Traffic Qos Queue resource. Express Connect Traffic QoS Queue.
For information about Express Connect Traffic Qos Queue and how to use it, see What is Traffic Qos Queue.
NOTE: Available since v1.224.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const default = alicloud.expressconnect.getPhysicalConnections({
nameRegex: "preserved-NODELETING",
});
const createQos = new alicloud.expressconnect.TrafficQos("createQos", {
qosName: name,
qosDescription: "terraform-example",
});
const associateQos = new alicloud.expressconnect.TrafficQosAssociation("associateQos", {
instanceId: _default.then(_default => _default.ids?.[1]),
qosId: createQos.id,
instanceType: "PHYSICALCONNECTION",
});
const createQosQueue = new alicloud.expressconnect.TrafficQosQueue("createQosQueue", {
qosId: createQos.id,
bandwidthPercent: "60",
queueDescription: "terraform-example",
queueName: name,
queueType: "Medium",
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.expressconnect.get_physical_connections(name_regex="preserved-NODELETING")
create_qos = alicloud.expressconnect.TrafficQos("createQos",
qos_name=name,
qos_description="terraform-example")
associate_qos = alicloud.expressconnect.TrafficQosAssociation("associateQos",
instance_id=default.ids[1],
qos_id=create_qos.id,
instance_type="PHYSICALCONNECTION")
create_qos_queue = alicloud.expressconnect.TrafficQosQueue("createQosQueue",
qos_id=create_qos.id,
bandwidth_percent="60",
queue_description="terraform-example",
queue_name=name,
queue_type="Medium")
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
NameRegex: pulumi.StringRef("preserved-NODELETING"),
}, nil)
if err != nil {
return err
}
createQos, err := expressconnect.NewTrafficQos(ctx, "createQos", &expressconnect.TrafficQosArgs{
QosName: pulumi.String(name),
QosDescription: pulumi.String("terraform-example"),
})
if err != nil {
return err
}
_, err = expressconnect.NewTrafficQosAssociation(ctx, "associateQos", &expressconnect.TrafficQosAssociationArgs{
InstanceId: pulumi.String(_default.Ids[1]),
QosId: createQos.ID(),
InstanceType: pulumi.String("PHYSICALCONNECTION"),
})
if err != nil {
return err
}
_, err = expressconnect.NewTrafficQosQueue(ctx, "createQosQueue", &expressconnect.TrafficQosQueueArgs{
QosId: createQos.ID(),
BandwidthPercent: pulumi.String("60"),
QueueDescription: pulumi.String("terraform-example"),
QueueName: pulumi.String(name),
QueueType: pulumi.String("Medium"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke(new()
{
NameRegex = "preserved-NODELETING",
});
var createQos = new AliCloud.ExpressConnect.TrafficQos("createQos", new()
{
QosName = name,
QosDescription = "terraform-example",
});
var associateQos = new AliCloud.ExpressConnect.TrafficQosAssociation("associateQos", new()
{
InstanceId = @default.Apply(@default => @default.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Ids[1])),
QosId = createQos.Id,
InstanceType = "PHYSICALCONNECTION",
});
var createQosQueue = new AliCloud.ExpressConnect.TrafficQosQueue("createQosQueue", new()
{
QosId = createQos.Id,
BandwidthPercent = "60",
QueueDescription = "terraform-example",
QueueName = name,
QueueType = "Medium",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
import com.pulumi.alicloud.expressconnect.TrafficQos;
import com.pulumi.alicloud.expressconnect.TrafficQosArgs;
import com.pulumi.alicloud.expressconnect.TrafficQosAssociation;
import com.pulumi.alicloud.expressconnect.TrafficQosAssociationArgs;
import com.pulumi.alicloud.expressconnect.TrafficQosQueue;
import com.pulumi.alicloud.expressconnect.TrafficQosQueueArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
final var default = ExpressconnectFunctions.getPhysicalConnections(GetPhysicalConnectionsArgs.builder()
.nameRegex("preserved-NODELETING")
.build());
var createQos = new TrafficQos("createQos", TrafficQosArgs.builder()
.qosName(name)
.qosDescription("terraform-example")
.build());
var associateQos = new TrafficQosAssociation("associateQos", TrafficQosAssociationArgs.builder()
.instanceId(default_.ids()[1])
.qosId(createQos.id())
.instanceType("PHYSICALCONNECTION")
.build());
var createQosQueue = new TrafficQosQueue("createQosQueue", TrafficQosQueueArgs.builder()
.qosId(createQos.id())
.bandwidthPercent("60")
.queueDescription("terraform-example")
.queueName(name)
.queueType("Medium")
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
createQos:
type: alicloud:expressconnect:TrafficQos
properties:
qosName: ${name}
qosDescription: terraform-example
associateQos:
type: alicloud:expressconnect:TrafficQosAssociation
properties:
instanceId: ${default.ids[1]}
qosId: ${createQos.id}
instanceType: PHYSICALCONNECTION
createQosQueue:
type: alicloud:expressconnect:TrafficQosQueue
properties:
qosId: ${createQos.id}
bandwidthPercent: '60'
queueDescription: terraform-example
queueName: ${name}
queueType: Medium
variables:
default:
fn::invoke:
Function: alicloud:expressconnect:getPhysicalConnections
Arguments:
nameRegex: preserved-NODELETING
Create TrafficQosQueue Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TrafficQosQueue(name: string, args: TrafficQosQueueArgs, opts?: CustomResourceOptions);
@overload
def TrafficQosQueue(resource_name: str,
args: TrafficQosQueueArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TrafficQosQueue(resource_name: str,
opts: Optional[ResourceOptions] = None,
qos_id: Optional[str] = None,
queue_type: Optional[str] = None,
bandwidth_percent: Optional[str] = None,
queue_description: Optional[str] = None,
queue_name: Optional[str] = None)
func NewTrafficQosQueue(ctx *Context, name string, args TrafficQosQueueArgs, opts ...ResourceOption) (*TrafficQosQueue, error)
public TrafficQosQueue(string name, TrafficQosQueueArgs args, CustomResourceOptions? opts = null)
public TrafficQosQueue(String name, TrafficQosQueueArgs args)
public TrafficQosQueue(String name, TrafficQosQueueArgs args, CustomResourceOptions options)
type: alicloud:expressconnect:TrafficQosQueue
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 TrafficQosQueueArgs
- 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 TrafficQosQueueArgs
- 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 TrafficQosQueueArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TrafficQosQueueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TrafficQosQueueArgs
- 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 trafficQosQueueResource = new AliCloud.ExpressConnect.TrafficQosQueue("trafficQosQueueResource", new()
{
QosId = "string",
QueueType = "string",
BandwidthPercent = "string",
QueueDescription = "string",
QueueName = "string",
});
example, err := expressconnect.NewTrafficQosQueue(ctx, "trafficQosQueueResource", &expressconnect.TrafficQosQueueArgs{
QosId: pulumi.String("string"),
QueueType: pulumi.String("string"),
BandwidthPercent: pulumi.String("string"),
QueueDescription: pulumi.String("string"),
QueueName: pulumi.String("string"),
})
var trafficQosQueueResource = new TrafficQosQueue("trafficQosQueueResource", TrafficQosQueueArgs.builder()
.qosId("string")
.queueType("string")
.bandwidthPercent("string")
.queueDescription("string")
.queueName("string")
.build());
traffic_qos_queue_resource = alicloud.expressconnect.TrafficQosQueue("trafficQosQueueResource",
qos_id="string",
queue_type="string",
bandwidth_percent="string",
queue_description="string",
queue_name="string")
const trafficQosQueueResource = new alicloud.expressconnect.TrafficQosQueue("trafficQosQueueResource", {
qosId: "string",
queueType: "string",
bandwidthPercent: "string",
queueDescription: "string",
queueName: "string",
});
type: alicloud:expressconnect:TrafficQosQueue
properties:
bandwidthPercent: string
qosId: string
queueDescription: string
queueName: string
queueType: string
TrafficQosQueue 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 TrafficQosQueue resource accepts the following input properties:
- Qos
Id string - The QoS policy ID.
- Queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- Bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- Queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- Queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- Qos
Id string - The QoS policy ID.
- Queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- Bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- Queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- Queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- qos
Id String - The QoS policy ID.
- queue
Type String QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- bandwidth
Percent String - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- queue
Description String - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Name String - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- qos
Id string - The QoS policy ID.
- queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- qos_
id str - The QoS policy ID.
- queue_
type str QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- bandwidth_
percent str - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- queue_
description str - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue_
name str - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- qos
Id String - The QoS policy ID.
- queue
Type String QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- bandwidth
Percent String - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- queue
Description String - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Name String - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
Outputs
All input properties are implicitly available as output properties. Additionally, the TrafficQosQueue resource produces the following output properties:
Look up Existing TrafficQosQueue Resource
Get an existing TrafficQosQueue 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?: TrafficQosQueueState, opts?: CustomResourceOptions): TrafficQosQueue
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
bandwidth_percent: Optional[str] = None,
qos_id: Optional[str] = None,
queue_description: Optional[str] = None,
queue_id: Optional[str] = None,
queue_name: Optional[str] = None,
queue_type: Optional[str] = None,
status: Optional[str] = None) -> TrafficQosQueue
func GetTrafficQosQueue(ctx *Context, name string, id IDInput, state *TrafficQosQueueState, opts ...ResourceOption) (*TrafficQosQueue, error)
public static TrafficQosQueue Get(string name, Input<string> id, TrafficQosQueueState? state, CustomResourceOptions? opts = null)
public static TrafficQosQueue get(String name, Output<String> id, TrafficQosQueueState 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.
- Bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- Qos
Id string - The QoS policy ID.
- Queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- Queue
Id string - The QoS queue ID.
- Queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- Queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- Status string
- The status of the resource.
- Bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- Qos
Id string - The QoS policy ID.
- Queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- Queue
Id string - The QoS queue ID.
- Queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- Queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- Status string
- The status of the resource.
- bandwidth
Percent String - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- qos
Id String - The QoS policy ID.
- queue
Description String - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Id String - The QoS queue ID.
- queue
Name String - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- queue
Type String QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- status String
- The status of the resource.
- bandwidth
Percent string - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- qos
Id string - The QoS policy ID.
- queue
Description string - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Id string - The QoS queue ID.
- queue
Name string - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- queue
Type string QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- status string
- The status of the resource.
- bandwidth_
percent str - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- qos_
id str - The QoS policy ID.
- queue_
description str - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue_
id str - The QoS queue ID.
- queue_
name str - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- queue_
type str QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- status str
- The status of the resource.
- bandwidth
Percent String - QoS queue bandwidth percentage.
- When the QoS queue type is Medium, this field must be entered. Valid values: 1 to 100.
- When the QoS queue type is Default, this field is "-".
- qos
Id String - The QoS policy ID.
- queue
Description String - The description of the QoS queue. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
- queue
Id String - The QoS queue ID.
- queue
Name String - The name of the QoS queue. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
- queue
Type String QoS queue type, value:
- High: High priority queue.
- Medium: Normal priority queue.
- Default: the Default priority queue.
NOTE: Default priority queue cannot be created.
- status String
- The status of the resource.
Import
Express Connect Traffic Qos Queue can be imported using the id, e.g.
$ pulumi import alicloud:expressconnect/trafficQosQueue:TrafficQosQueue example <qos_id>:<queue_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.