1. Packages
  2. OpenStack
  3. API Docs
  4. networking
  5. getQosPolicy
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

openstack.networking.getQosPolicy

Explore with Pulumi AI

openstack logo
OpenStack v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi

    Use this data source to get the ID of an available OpenStack QoS policy.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var qosPolicy1 = OpenStack.Networking.GetQosPolicy.Invoke(new()
        {
            Name = "qos_policy_1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v3/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.LookupQosPolicy(ctx, &networking.LookupQosPolicyArgs{
    			Name: pulumi.StringRef("qos_policy_1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.NetworkingFunctions;
    import com.pulumi.openstack.networking.inputs.GetQosPolicyArgs;
    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 qosPolicy1 = NetworkingFunctions.getQosPolicy(GetQosPolicyArgs.builder()
                .name("qos_policy_1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_openstack as openstack
    
    qos_policy1 = openstack.networking.get_qos_policy(name="qos_policy_1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const qosPolicy1 = openstack.networking.getQosPolicy({
        name: "qos_policy_1",
    });
    
    variables:
      qosPolicy1:
        fn::invoke:
          Function: openstack:networking:getQosPolicy
          Arguments:
            name: qos_policy_1
    

    Using getQosPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getQosPolicy(args: GetQosPolicyArgs, opts?: InvokeOptions): Promise<GetQosPolicyResult>
    function getQosPolicyOutput(args: GetQosPolicyOutputArgs, opts?: InvokeOptions): Output<GetQosPolicyResult>
    def get_qos_policy(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,
                       opts: Optional[InvokeOptions] = None) -> GetQosPolicyResult
    def get_qos_policy_output(description: Optional[pulumi.Input[str]] = None,
                       is_default: Optional[pulumi.Input[bool]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       project_id: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       shared: Optional[pulumi.Input[bool]] = None,
                       tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetQosPolicyResult]
    func LookupQosPolicy(ctx *Context, args *LookupQosPolicyArgs, opts ...InvokeOption) (*LookupQosPolicyResult, error)
    func LookupQosPolicyOutput(ctx *Context, args *LookupQosPolicyOutputArgs, opts ...InvokeOption) LookupQosPolicyResultOutput

    > Note: This function is named LookupQosPolicy in the Go SDK.

    public static class GetQosPolicy 
    {
        public static Task<GetQosPolicyResult> InvokeAsync(GetQosPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetQosPolicyResult> Invoke(GetQosPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQosPolicyResult> getQosPolicy(GetQosPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: openstack:networking/getQosPolicy:getQosPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The human-readable description for the QoS policy.
    IsDefault bool
    Whether the QoS policy is default policy or not.
    Name string
    The name of the QoS policy.
    ProjectId string
    The owner of the QoS policy.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    Shared bool
    Whether this QoS policy is shared across all projects.
    Tags List<string>
    The list of QoS policy tags to filter.
    Description string
    The human-readable description for the QoS policy.
    IsDefault bool
    Whether the QoS policy is default policy or not.
    Name string
    The name of the QoS policy.
    ProjectId string
    The owner of the QoS policy.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    Shared bool
    Whether this QoS policy is shared across all projects.
    Tags []string
    The list of QoS policy tags to filter.
    description String
    The human-readable description for the QoS policy.
    isDefault Boolean
    Whether the QoS policy is default policy or not.
    name String
    The name of the QoS policy.
    projectId String
    The owner of the QoS policy.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    shared Boolean
    Whether this QoS policy is shared across all projects.
    tags List<String>
    The list of QoS policy tags to filter.
    description string
    The human-readable description for the QoS policy.
    isDefault boolean
    Whether the QoS policy is default policy or not.
    name string
    The name of the QoS policy.
    projectId string
    The owner of the QoS policy.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    shared boolean
    Whether this QoS policy is shared across all projects.
    tags string[]
    The list of QoS policy tags to filter.
    description str
    The human-readable description for the QoS policy.
    is_default bool
    Whether the QoS policy is default policy or not.
    name str
    The name of the QoS policy.
    project_id str
    The owner of the QoS policy.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    shared bool
    Whether this QoS policy is shared across all projects.
    tags Sequence[str]
    The list of QoS policy tags to filter.
    description String
    The human-readable description for the QoS policy.
    isDefault Boolean
    Whether the QoS policy is default policy or not.
    name String
    The name of the QoS policy.
    projectId String
    The owner of the QoS policy.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to retrieve a QoS policy ID. If omitted, the region argument of the provider is used.
    shared Boolean
    Whether this QoS policy is shared across all projects.
    tags List<String>
    The list of QoS policy tags to filter.

    getQosPolicy Result

    The following output properties are available:

    AllTags List<string>
    The set of string tags applied on the QoS policy.
    CreatedAt string
    The time at which QoS policy was created.
    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    See Argument Reference above.
    Name string
    See Argument Reference above.
    ProjectId string
    Region string
    See Argument Reference above.
    RevisionNumber int
    The revision number of the QoS policy.
    Shared bool
    See Argument Reference above.
    UpdatedAt string
    The time at which QoS policy was created.
    Tags List<string>
    AllTags []string
    The set of string tags applied on the QoS policy.
    CreatedAt string
    The time at which QoS policy was created.
    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDefault bool
    See Argument Reference above.
    Name string
    See Argument Reference above.
    ProjectId string
    Region string
    See Argument Reference above.
    RevisionNumber int
    The revision number of the QoS policy.
    Shared bool
    See Argument Reference above.
    UpdatedAt string
    The time at which QoS policy was created.
    Tags []string
    allTags List<String>
    The set of string tags applied on the QoS policy.
    createdAt String
    The time at which QoS policy was created.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    See Argument Reference above.
    name String
    See Argument Reference above.
    projectId String
    region String
    See Argument Reference above.
    revisionNumber Integer
    The revision number of the QoS policy.
    shared Boolean
    See Argument Reference above.
    updatedAt String
    The time at which QoS policy was created.
    tags List<String>
    allTags string[]
    The set of string tags applied on the QoS policy.
    createdAt string
    The time at which QoS policy was created.
    description string
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    isDefault boolean
    See Argument Reference above.
    name string
    See Argument Reference above.
    projectId string
    region string
    See Argument Reference above.
    revisionNumber number
    The revision number of the QoS policy.
    shared boolean
    See Argument Reference above.
    updatedAt string
    The time at which QoS policy was created.
    tags string[]
    all_tags Sequence[str]
    The set of string tags applied on the QoS policy.
    created_at str
    The time at which QoS policy was created.
    description str
    See Argument Reference above.
    id str
    The provider-assigned unique ID for this managed resource.
    is_default bool
    See Argument Reference above.
    name str
    See Argument Reference above.
    project_id str
    region str
    See Argument Reference above.
    revision_number int
    The revision number of the QoS policy.
    shared bool
    See Argument Reference above.
    updated_at str
    The time at which QoS policy was created.
    tags Sequence[str]
    allTags List<String>
    The set of string tags applied on the QoS policy.
    createdAt String
    The time at which QoS policy was created.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    isDefault Boolean
    See Argument Reference above.
    name String
    See Argument Reference above.
    projectId String
    region String
    See Argument Reference above.
    revisionNumber Number
    The revision number of the QoS policy.
    shared Boolean
    See Argument Reference above.
    updatedAt String
    The time at which QoS policy was created.
    tags List<String>

    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 v3.15.1 published on Thursday, Feb 1, 2024 by Pulumi