1. Packages
  2. Packages
  3. Nutanix
  4. API Docs
  5. getStoragePoliciesV2
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg
nutanix logo
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg

    Provides a datasource to Lists the Storage Policies present in the system.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const storage_policies = nutanix.getStoragePoliciesV2({});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    storage_policies = nutanix.get_storage_policies_v2()
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.GetStoragePoliciesV2(ctx, &nutanix.GetStoragePoliciesV2Args{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var storage_policies = Nutanix.GetStoragePoliciesV2.Invoke();
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.NutanixFunctions;
    import com.pulumi.nutanix.inputs.GetStoragePoliciesV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 storage-policies = NutanixFunctions.getStoragePoliciesV2(GetStoragePoliciesV2Args.builder()
                .build());
    
        }
    }
    
    variables:
      storage-policies:
        fn::invoke:
          function: nutanix:getStoragePoliciesV2
          arguments: {}
    
    pulumi {
      required_providers {
        nutanix = {
          source = "pulumi/nutanix"
        }
      }
    }
    
    data "nutanix_getstoragepoliciesv2" "storage-policies" {
    }
    

    Storage Policies

    The storagePolicies contains list of Storage Policy objects. Each Storage Policy object contains the following attributes:

    • extId:- External identifier of the Storage Policy.
    • tenantId:- A globally unique identifier that represents the tenant that owns this entity.
    • links:- A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.
    • name:- Storage Policy name.
    • categoryExtIds:- List of external identifiers for Categories included in the Storage Policy.
    • compressionSpec:- Compression parameters for entities governed by the Storage Policy.
      • compressionState:- Compression state value.
    • encryptionSpec:- Encryption parameters for entities governed by the Storage Policy.
      • encryptionState:- Encryption state value.
    • qosSpec:- Storage Quality of Service (QOS) parameters for the entities.
      • throttledIops:- Throttled IOPS value.
    • faultToleranceSpec:- Fault Tolerance parameters for the entities.
      • replicationFactor:- Replication factor value.
    • policyType:- Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".

    See detailed information in Nutanix Get Storage Policies v4.

    Using getStoragePoliciesV2

    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 getStoragePoliciesV2(args: GetStoragePoliciesV2Args, opts?: InvokeOptions): Promise<GetStoragePoliciesV2Result>
    function getStoragePoliciesV2Output(args: GetStoragePoliciesV2OutputArgs, opts?: InvokeOptions): Output<GetStoragePoliciesV2Result>
    def get_storage_policies_v2(filter: Optional[str] = None,
                                limit: Optional[int] = None,
                                order_by: Optional[str] = None,
                                page: Optional[int] = None,
                                select: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetStoragePoliciesV2Result
    def get_storage_policies_v2_output(filter: pulumi.Input[Optional[str]] = None,
                                limit: pulumi.Input[Optional[int]] = None,
                                order_by: pulumi.Input[Optional[str]] = None,
                                page: pulumi.Input[Optional[int]] = None,
                                select: pulumi.Input[Optional[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetStoragePoliciesV2Result]
    func GetStoragePoliciesV2(ctx *Context, args *GetStoragePoliciesV2Args, opts ...InvokeOption) (*GetStoragePoliciesV2Result, error)
    func GetStoragePoliciesV2Output(ctx *Context, args *GetStoragePoliciesV2OutputArgs, opts ...InvokeOption) GetStoragePoliciesV2ResultOutput

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

    public static class GetStoragePoliciesV2 
    {
        public static Task<GetStoragePoliciesV2Result> InvokeAsync(GetStoragePoliciesV2Args args, InvokeOptions? opts = null)
        public static Output<GetStoragePoliciesV2Result> Invoke(GetStoragePoliciesV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStoragePoliciesV2Result> getStoragePoliciesV2(GetStoragePoliciesV2Args args, InvokeOptions options)
    public static Output<GetStoragePoliciesV2Result> getStoragePoliciesV2(GetStoragePoliciesV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getStoragePoliciesV2:getStoragePoliciesV2
      arguments:
        # arguments dictionary
    data "nutanix_getstoragepoliciesv2" "name" {
        # arguments
    }

    The following arguments are supported:

    Filter string
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    Limit int
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    OrderBy string
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    Page int
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    Select string
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    Filter string
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    Limit int
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    OrderBy string
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    Page int
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    Select string
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    filter string
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    limit number
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    order_by string
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    page number
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    select string
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    filter String
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    limit Integer
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    orderBy String
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    page Integer
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    select String
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    filter string
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    limit number
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    orderBy string
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    page number
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    select string
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    filter str
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    limit int
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    order_by str
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    page int
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    select str
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.
    filter String
    • (Optional) A URL query parameter that allows clients to filter a collection of resources.
    limit Number
    • (Optional) A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
    orderBy String
    • (Optional) A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default.
    page Number
    • (Optional) A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
    select String
    • A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions.

    getStoragePoliciesV2 Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    StoragePolicies List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePoliciesV2StoragePolicy>
    • Lists the Storage Policies present in the system.
    TotalAvailableResults int
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    Id string
    The provider-assigned unique ID for this managed resource.
    StoragePolicies []GetStoragePoliciesV2StoragePolicy
    • Lists the Storage Policies present in the system.
    TotalAvailableResults int
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    id string
    The provider-assigned unique ID for this managed resource.
    storage_policies list(object)
    • Lists the Storage Policies present in the system.
    total_available_results number
    filter string
    limit number
    order_by string
    page number
    select string
    id String
    The provider-assigned unique ID for this managed resource.
    storagePolicies List<GetStoragePoliciesV2StoragePolicy>
    • Lists the Storage Policies present in the system.
    totalAvailableResults Integer
    filter String
    limit Integer
    orderBy String
    page Integer
    select String
    id string
    The provider-assigned unique ID for this managed resource.
    storagePolicies GetStoragePoliciesV2StoragePolicy[]
    • Lists the Storage Policies present in the system.
    totalAvailableResults number
    filter string
    limit number
    orderBy string
    page number
    select string
    id str
    The provider-assigned unique ID for this managed resource.
    storage_policies Sequence[GetStoragePoliciesV2StoragePolicy]
    • Lists the Storage Policies present in the system.
    total_available_results int
    filter str
    limit int
    order_by str
    page int
    select str
    id String
    The provider-assigned unique ID for this managed resource.
    storagePolicies List<Property Map>
    • Lists the Storage Policies present in the system.
    totalAvailableResults Number
    filter String
    limit Number
    orderBy String
    page Number
    select String

    Supporting Types

    GetStoragePoliciesV2StoragePolicy

    GetStoragePoliciesV2StoragePolicyCompressionSpec

    GetStoragePoliciesV2StoragePolicyEncryptionSpec

    GetStoragePoliciesV2StoragePolicyFaultToleranceSpec

    Href string
    Rel string
    Href string
    Rel string
    href string
    rel string
    href String
    rel String
    href string
    rel string
    href str
    rel str
    href String
    rel String

    GetStoragePoliciesV2StoragePolicyQosSpec

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Viewing docs for Nutanix v0.16.0
    published on Tuesday, May 26, 2026 by Piers Karsenbarg

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial