1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. expressconnect
  5. TrafficQos
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.expressconnect.TrafficQos

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Express Connect Traffic Qos resource. Express Connect Traffic QoS Policy.

    For information about Express Connect Traffic Qos and how to use it, see What is Traffic Qos.

    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",
    });
    
    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")
    
    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
    		}
    		_, err := expressconnect.GetPhysicalConnections(ctx, &expressconnect.GetPhysicalConnectionsArgs{
    			NameRegex: pulumi.StringRef("preserved-NODELETING"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = expressconnect.NewTrafficQos(ctx, "createQos", &expressconnect.TrafficQosArgs{
    			QosName:        pulumi.String(name),
    			QosDescription: pulumi.String("terraform-example"),
    		})
    		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",
        });
    
    });
    
    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 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());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      createQos:
        type: alicloud:expressconnect:TrafficQos
        properties:
          qosName: ${name}
          qosDescription: terraform-example
    variables:
      default:
        fn::invoke:
          Function: alicloud:expressconnect:getPhysicalConnections
          Arguments:
            nameRegex: preserved-NODELETING
    

    Create TrafficQos Resource

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

    Constructor syntax

    new TrafficQos(name: string, args?: TrafficQosArgs, opts?: CustomResourceOptions);
    @overload
    def TrafficQos(resource_name: str,
                   args: Optional[TrafficQosArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def TrafficQos(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   qos_description: Optional[str] = None,
                   qos_name: Optional[str] = None)
    func NewTrafficQos(ctx *Context, name string, args *TrafficQosArgs, opts ...ResourceOption) (*TrafficQos, error)
    public TrafficQos(string name, TrafficQosArgs? args = null, CustomResourceOptions? opts = null)
    public TrafficQos(String name, TrafficQosArgs args)
    public TrafficQos(String name, TrafficQosArgs args, CustomResourceOptions options)
    
    type: alicloud:expressconnect:TrafficQos
    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 TrafficQosArgs
    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 TrafficQosArgs
    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 TrafficQosArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TrafficQosArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TrafficQosArgs
    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 trafficQosResource = new AliCloud.ExpressConnect.TrafficQos("trafficQosResource", new()
    {
        QosDescription = "string",
        QosName = "string",
    });
    
    example, err := expressconnect.NewTrafficQos(ctx, "trafficQosResource", &expressconnect.TrafficQosArgs{
    	QosDescription: pulumi.String("string"),
    	QosName:        pulumi.String("string"),
    })
    
    var trafficQosResource = new TrafficQos("trafficQosResource", TrafficQosArgs.builder()
        .qosDescription("string")
        .qosName("string")
        .build());
    
    traffic_qos_resource = alicloud.expressconnect.TrafficQos("trafficQosResource",
        qos_description="string",
        qos_name="string")
    
    const trafficQosResource = new alicloud.expressconnect.TrafficQos("trafficQosResource", {
        qosDescription: "string",
        qosName: "string",
    });
    
    type: alicloud:expressconnect:TrafficQos
    properties:
        qosDescription: string
        qosName: string
    

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

    QosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    QosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    QosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    QosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    qosDescription String
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName String
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    qosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    qos_description str
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qos_name str
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    qosDescription String
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName String
    The name of the QoS policy. 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 TrafficQos resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    id String
    The provider-assigned unique ID for this managed resource.
    status String

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    id string
    The provider-assigned unique ID for this managed resource.
    status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    id str
    The provider-assigned unique ID for this managed resource.
    status str

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    id String
    The provider-assigned unique ID for this managed resource.
    status String

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    Look up Existing TrafficQos Resource

    Get an existing TrafficQos 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?: TrafficQosState, opts?: CustomResourceOptions): TrafficQos
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            qos_description: Optional[str] = None,
            qos_name: Optional[str] = None,
            status: Optional[str] = None) -> TrafficQos
    func GetTrafficQos(ctx *Context, name string, id IDInput, state *TrafficQosState, opts ...ResourceOption) (*TrafficQos, error)
    public static TrafficQos Get(string name, Input<string> id, TrafficQosState? state, CustomResourceOptions? opts = null)
    public static TrafficQos get(String name, Output<String> id, TrafficQosState 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:
    QosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    QosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    Status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    QosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    QosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    Status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    qosDescription String
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName String
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    status String

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    qosDescription string
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName string
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    status string

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    qos_description str
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qos_name str
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    status str

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    qosDescription String
    The description of the QoS policy. The length is 0 to 256 characters and cannot start with 'http:// 'or 'https.
    qosName String
    The name of the QoS policy. The length is 0 to 128 characters and cannot start with 'http:// 'or 'https.
    status String

    The status of the QoS policy. Value:

    NOTE: QoS in the configuration state will restrict the creation, update, and deletion of most QoS policies, QoS queues, and QoS rules.

    Import

    Express Connect Traffic Qos can be imported using the id, e.g.

    $ pulumi import alicloud:expressconnect/trafficQos:TrafficQos example <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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi