1. Packages
  2. Packages
  3. Powerstore Provider
  4. API Docs
  5. getQosPolicy
Viewing docs for powerstore 1.3.0
published on Wednesday, Jun 24, 2026 by dell
Viewing docs for powerstore 1.3.0
published on Wednesday, Jun 24, 2026 by dell

    This datasource is used to query QoS policy(s) from PowerStore array.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as powerstore from "@pulumi/powerstore";
    
    //Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
    //
    //Licensed under the Mozilla Public License Version 2.0 (the "License");
    //you may not use this file except in compliance with the License
    //You may obtain a copy of the License at
    //
    //    http://mozilla.org/MPL/2.0/
    //
    //
    //Unless required by applicable law or agreed to in writing, software
    //distributed under the License is distributed on an "AS IS" BASIS,
    //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    //See the License for the specific language governing permissions and
    //limitations under the License.
    // commands to run this tf file : terraform init && pulumi up --auto-approve
    // This datasource reads QoS policies either by id or name where user can provide a value to any one of them
    // If it is a empty datasource block , then it will read all the QoS policies
    // If id or name is provided then it reads a particular QoS policy with that id or name
    // Only one of the attribute can be provided among id, name, and type
    const test1 = powerstore.getQosPolicy({
        name: "tf_acc_qos_policy",
    });
    export const qosPolicyAllDetails = test1.then(test1 => test1.qosPolicies);
    export const qosPolicyIDsOnly = test1.then(test1 => test1.qosPolicies.map(__item => __item.id));
    export const qosPolicyIdAndType = test1.then(test1 => .reduce((__obj, policy) => ({ ...__obj, [policy.name]: {
        id: policy.id,
        type: policy.type,
    } })));
    
    import pulumi
    import pulumi_powerstore as powerstore
    
    #Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
    #
    #Licensed under the Mozilla Public License Version 2.0 (the "License");
    #you may not use this file except in compliance with the License
    #You may obtain a copy of the License at
    #
    #    http://mozilla.org/MPL/2.0/
    #
    #
    #Unless required by applicable law or agreed to in writing, software
    #distributed under the License is distributed on an "AS IS" BASIS,
    #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    #See the License for the specific language governing permissions and
    #limitations under the License.
    # commands to run this tf file : terraform init && pulumi up --auto-approve
    # This datasource reads QoS policies either by id or name where user can provide a value to any one of them
    # If it is a empty datasource block , then it will read all the QoS policies
    # If id or name is provided then it reads a particular QoS policy with that id or name
    # Only one of the attribute can be provided among id, name, and type
    test1 = powerstore.get_qos_policy(name="tf_acc_qos_policy")
    pulumi.export("qosPolicyAllDetails", test1.qos_policies)
    pulumi.export("qosPolicyIDsOnly", [__item.id for __item in test1.qos_policies])
    pulumi.export("qosPolicyIdAndType", {policy.name: {
        "id": policy.id,
        "type": policy.type,
    } for policy in test1.qos_policies})
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Powerstore = Pulumi.Powerstore;
    
    return await Deployment.RunAsync(() => 
    {
        //Copyright (c) 2025 Dell Inc., or its subsidiaries. All Rights Reserved.
        //
        //Licensed under the Mozilla Public License Version 2.0 (the "License");
        //you may not use this file except in compliance with the License
        //You may obtain a copy of the License at
        //
        //    http://mozilla.org/MPL/2.0/
        //
        //
        //Unless required by applicable law or agreed to in writing, software
        //distributed under the License is distributed on an "AS IS" BASIS,
        //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        //See the License for the specific language governing permissions and
        //limitations under the License.
        // commands to run this tf file : terraform init && pulumi up --auto-approve
        // This datasource reads QoS policies either by id or name where user can provide a value to any one of them
        // If it is a empty datasource block , then it will read all the QoS policies
        // If id or name is provided then it reads a particular QoS policy with that id or name
        // Only one of the attribute can be provided among id, name, and type
        var test1 = Powerstore.GetQosPolicy.Invoke(new()
        {
            Name = "tf_acc_qos_policy",
        });
    
        return new Dictionary<string, object?>
        {
            ["qosPolicyAllDetails"] = test1.Apply(getQosPolicyResult => getQosPolicyResult.QosPolicies),
            ["qosPolicyIDsOnly"] = test1.Apply(getQosPolicyResult => getQosPolicyResult.QosPolicies).Select(__item => __item.Id).ToList(),
            ["qosPolicyIdAndType"] = .ToDictionary(item => {
                var policy = item.Value;
                return policy.Name;
            }, item => {
                var policy = item.Value;
                return 
                {
                    { "id", policy.Id },
                    { "type", policy.Type },
                };
            }),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    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(filter_expression: Optional[str] = None,
                       id: Optional[str] = None,
                       name: Optional[str] = None,
                       type: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetQosPolicyResult
    def get_qos_policy_output(filter_expression: pulumi.Input[Optional[str]] = None,
                       id: pulumi.Input[Optional[str]] = None,
                       name: pulumi.Input[Optional[str]] = None,
                       type: pulumi.Input[Optional[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)
    public static Output<GetQosPolicyResult> getQosPolicy(GetQosPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: powerstore:index/getQosPolicy:getQosPolicy
      arguments:
        # arguments dictionary
    data "powerstore_getqospolicy" "name" {
        # arguments
    }

    The following arguments are supported:

    FilterExpression string
    Filter expression to query QoS policies.
    Id string
    Unique identifier of the QoS policy.
    Name string
    Name of the QoS policy.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    FilterExpression string
    Filter expression to query QoS policies.
    Id string
    Unique identifier of the QoS policy.
    Name string
    Name of the QoS policy.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    filter_expression string
    Filter expression to query QoS policies.
    id string
    Unique identifier of the QoS policy.
    name string
    Name of the QoS policy.
    type string
    Type of the QoS policy (QoS or File_Performance).
    filterExpression String
    Filter expression to query QoS policies.
    id String
    Unique identifier of the QoS policy.
    name String
    Name of the QoS policy.
    type String
    Type of the QoS policy (QoS or File_Performance).
    filterExpression string
    Filter expression to query QoS policies.
    id string
    Unique identifier of the QoS policy.
    name string
    Name of the QoS policy.
    type string
    Type of the QoS policy (QoS or File_Performance).
    filter_expression str
    Filter expression to query QoS policies.
    id str
    Unique identifier of the QoS policy.
    name str
    Name of the QoS policy.
    type str
    Type of the QoS policy (QoS or File_Performance).
    filterExpression String
    Filter expression to query QoS policies.
    id String
    Unique identifier of the QoS policy.
    name String
    Name of the QoS policy.
    type String
    Type of the QoS policy (QoS or File_Performance).

    getQosPolicy Result

    The following output properties are available:

    Id string
    Unique identifier of the QoS policy.
    Name string
    Name of the QoS policy.
    QosPolicies List<GetQosPolicyQosPolicy>
    List of QoS policies.
    FilterExpression string
    Filter expression to query QoS policies.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    Id string
    Unique identifier of the QoS policy.
    Name string
    Name of the QoS policy.
    QosPolicies []GetQosPolicyQosPolicy
    List of QoS policies.
    FilterExpression string
    Filter expression to query QoS policies.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    id string
    Unique identifier of the QoS policy.
    name string
    Name of the QoS policy.
    qos_policies list(object)
    List of QoS policies.
    filter_expression string
    Filter expression to query QoS policies.
    type string
    Type of the QoS policy (QoS or File_Performance).
    id String
    Unique identifier of the QoS policy.
    name String
    Name of the QoS policy.
    qosPolicies List<GetQosPolicyQosPolicy>
    List of QoS policies.
    filterExpression String
    Filter expression to query QoS policies.
    type String
    Type of the QoS policy (QoS or File_Performance).
    id string
    Unique identifier of the QoS policy.
    name string
    Name of the QoS policy.
    qosPolicies GetQosPolicyQosPolicy[]
    List of QoS policies.
    filterExpression string
    Filter expression to query QoS policies.
    type string
    Type of the QoS policy (QoS or File_Performance).
    id str
    Unique identifier of the QoS policy.
    name str
    Name of the QoS policy.
    qos_policies Sequence[GetQosPolicyQosPolicy]
    List of QoS policies.
    filter_expression str
    Filter expression to query QoS policies.
    type str
    Type of the QoS policy (QoS or File_Performance).
    id String
    Unique identifier of the QoS policy.
    name String
    Name of the QoS policy.
    qosPolicies List<Property Map>
    List of QoS policies.
    filterExpression String
    Filter expression to query QoS policies.
    type String
    Type of the QoS policy (QoS or File_Performance).

    Supporting Types

    GetQosPolicyQosPolicy

    Description string
    Description of the QoS policy.
    FileIoLimitRuleId string
    File I/O limit rule identifier (for File_Performance type).
    Id string
    Unique identifier of the QoS policy.
    IoLimitRuleId string
    I/O limit rule identifier (for QoS type).
    IsReadOnly bool
    Indicates whether this policy can be modified.
    IsReplica bool
    Indicates if this is a replica of a policy on a remote system.
    ManagedBy string
    Entity that manages the policy.
    ManagedById string
    Unique identifier of the managing entity.
    ManagedByL10n string
    Localized message string corresponding to managed_by.
    Name string
    Name of the QoS policy.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    TypeL10n string
    Localized message string corresponding to type.
    Description string
    Description of the QoS policy.
    FileIoLimitRuleId string
    File I/O limit rule identifier (for File_Performance type).
    Id string
    Unique identifier of the QoS policy.
    IoLimitRuleId string
    I/O limit rule identifier (for QoS type).
    IsReadOnly bool
    Indicates whether this policy can be modified.
    IsReplica bool
    Indicates if this is a replica of a policy on a remote system.
    ManagedBy string
    Entity that manages the policy.
    ManagedById string
    Unique identifier of the managing entity.
    ManagedByL10n string
    Localized message string corresponding to managed_by.
    Name string
    Name of the QoS policy.
    Type string
    Type of the QoS policy (QoS or File_Performance).
    TypeL10n string
    Localized message string corresponding to type.
    description string
    Description of the QoS policy.
    file_io_limit_rule_id string
    File I/O limit rule identifier (for File_Performance type).
    id string
    Unique identifier of the QoS policy.
    io_limit_rule_id string
    I/O limit rule identifier (for QoS type).
    is_read_only bool
    Indicates whether this policy can be modified.
    is_replica bool
    Indicates if this is a replica of a policy on a remote system.
    managed_by string
    Entity that manages the policy.
    managed_by_id string
    Unique identifier of the managing entity.
    managed_by_l10n string
    Localized message string corresponding to managed_by.
    name string
    Name of the QoS policy.
    type string
    Type of the QoS policy (QoS or File_Performance).
    type_l10n string
    Localized message string corresponding to type.
    description String
    Description of the QoS policy.
    fileIoLimitRuleId String
    File I/O limit rule identifier (for File_Performance type).
    id String
    Unique identifier of the QoS policy.
    ioLimitRuleId String
    I/O limit rule identifier (for QoS type).
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    isReplica Boolean
    Indicates if this is a replica of a policy on a remote system.
    managedBy String
    Entity that manages the policy.
    managedById String
    Unique identifier of the managing entity.
    managedByL10n String
    Localized message string corresponding to managed_by.
    name String
    Name of the QoS policy.
    type String
    Type of the QoS policy (QoS or File_Performance).
    typeL10n String
    Localized message string corresponding to type.
    description string
    Description of the QoS policy.
    fileIoLimitRuleId string
    File I/O limit rule identifier (for File_Performance type).
    id string
    Unique identifier of the QoS policy.
    ioLimitRuleId string
    I/O limit rule identifier (for QoS type).
    isReadOnly boolean
    Indicates whether this policy can be modified.
    isReplica boolean
    Indicates if this is a replica of a policy on a remote system.
    managedBy string
    Entity that manages the policy.
    managedById string
    Unique identifier of the managing entity.
    managedByL10n string
    Localized message string corresponding to managed_by.
    name string
    Name of the QoS policy.
    type string
    Type of the QoS policy (QoS or File_Performance).
    typeL10n string
    Localized message string corresponding to type.
    description str
    Description of the QoS policy.
    file_io_limit_rule_id str
    File I/O limit rule identifier (for File_Performance type).
    id str
    Unique identifier of the QoS policy.
    io_limit_rule_id str
    I/O limit rule identifier (for QoS type).
    is_read_only bool
    Indicates whether this policy can be modified.
    is_replica bool
    Indicates if this is a replica of a policy on a remote system.
    managed_by str
    Entity that manages the policy.
    managed_by_id str
    Unique identifier of the managing entity.
    managed_by_l10n str
    Localized message string corresponding to managed_by.
    name str
    Name of the QoS policy.
    type str
    Type of the QoS policy (QoS or File_Performance).
    type_l10n str
    Localized message string corresponding to type.
    description String
    Description of the QoS policy.
    fileIoLimitRuleId String
    File I/O limit rule identifier (for File_Performance type).
    id String
    Unique identifier of the QoS policy.
    ioLimitRuleId String
    I/O limit rule identifier (for QoS type).
    isReadOnly Boolean
    Indicates whether this policy can be modified.
    isReplica Boolean
    Indicates if this is a replica of a policy on a remote system.
    managedBy String
    Entity that manages the policy.
    managedById String
    Unique identifier of the managing entity.
    managedByL10n String
    Localized message string corresponding to managed_by.
    name String
    Name of the QoS policy.
    type String
    Type of the QoS policy (QoS or File_Performance).
    typeL10n String
    Localized message string corresponding to type.

    Package Details

    Repository
    powerstore dell/terraform-provider-powerstore
    License
    Notes
    This Pulumi package is based on the powerstore Terraform Provider.
    Viewing docs for powerstore 1.3.0
    published on Wednesday, Jun 24, 2026 by dell

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial