1. Packages
  2. Packages
  3. Nutanix
  4. API Docs
  5. getStoragePolicyV2
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 Fetch the configuration details of the existing Storage Policy identified by the {policyExtId}.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const get_storage_policy = nutanix.getStoragePolicyV2({
        extId: "1891fd3a-1ef7-4947-af56-9ee4b973c6fd",
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    get_storage_policy = nutanix.get_storage_policy_v2(ext_id="1891fd3a-1ef7-4947-af56-9ee4b973c6fd")
    
    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.GetStoragePolicyV2(ctx, &nutanix.LookupStoragePolicyV2Args{
    			ExtId: "1891fd3a-1ef7-4947-af56-9ee4b973c6fd",
    		}, 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 get_storage_policy = Nutanix.GetStoragePolicyV2.Invoke(new()
        {
            ExtId = "1891fd3a-1ef7-4947-af56-9ee4b973c6fd",
        });
    
    });
    
    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.GetStoragePolicyV2Args;
    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 get-storage-policy = NutanixFunctions.getStoragePolicyV2(GetStoragePolicyV2Args.builder()
                .extId("1891fd3a-1ef7-4947-af56-9ee4b973c6fd")
                .build());
    
        }
    }
    
    variables:
      get-storage-policy:
        fn::invoke:
          function: nutanix:getStoragePolicyV2
          arguments:
            extId: 1891fd3a-1ef7-4947-af56-9ee4b973c6fd
    
    pulumi {
      required_providers {
        nutanix = {
          source = "pulumi/nutanix"
        }
      }
    }
    
    data "nutanix_getstoragepolicyv2" "get-storage-policy" {
      ext_id = "1891fd3a-1ef7-4947-af56-9ee4b973c6fd"
    }
    

    Using getStoragePolicyV2

    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 getStoragePolicyV2(args: GetStoragePolicyV2Args, opts?: InvokeOptions): Promise<GetStoragePolicyV2Result>
    function getStoragePolicyV2Output(args: GetStoragePolicyV2OutputArgs, opts?: InvokeOptions): Output<GetStoragePolicyV2Result>
    def get_storage_policy_v2(ext_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetStoragePolicyV2Result
    def get_storage_policy_v2_output(ext_id: pulumi.Input[Optional[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetStoragePolicyV2Result]
    func LookupStoragePolicyV2(ctx *Context, args *LookupStoragePolicyV2Args, opts ...InvokeOption) (*LookupStoragePolicyV2Result, error)
    func LookupStoragePolicyV2Output(ctx *Context, args *LookupStoragePolicyV2OutputArgs, opts ...InvokeOption) LookupStoragePolicyV2ResultOutput

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

    public static class GetStoragePolicyV2 
    {
        public static Task<GetStoragePolicyV2Result> InvokeAsync(GetStoragePolicyV2Args args, InvokeOptions? opts = null)
        public static Output<GetStoragePolicyV2Result> Invoke(GetStoragePolicyV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStoragePolicyV2Result> getStoragePolicyV2(GetStoragePolicyV2Args args, InvokeOptions options)
    public static Output<GetStoragePolicyV2Result> getStoragePolicyV2(GetStoragePolicyV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getStoragePolicyV2:getStoragePolicyV2
      arguments:
        # arguments dictionary
    data "nutanix_getstoragepolicyv2" "name" {
        # arguments
    }

    The following arguments are supported:

    ExtId string
    The external identifier of the Storage Policy.
    ExtId string
    The external identifier of the Storage Policy.
    ext_id string
    The external identifier of the Storage Policy.
    extId String
    The external identifier of the Storage Policy.
    extId string
    The external identifier of the Storage Policy.
    ext_id str
    The external identifier of the Storage Policy.
    extId String
    The external identifier of the Storage Policy.

    getStoragePolicyV2 Result

    The following output properties are available:

    CategoryExtIds List<string>
    • List of external identifiers for Categories included in the Storage Policy.
    CompressionSpecs List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePolicyV2CompressionSpec>
    • Compression parameters for entities governed by the Storage Policy.
    EncryptionSpecs List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePolicyV2EncryptionSpec>
    • Encryption parameters for entities governed by the Storage Policy.
    ExtId string
    • External identifier of the Storage Policy.
    FaultToleranceSpecs List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePolicyV2FaultToleranceSpec>
    • Fault Tolerance parameters for the entities.
    Id string
    The provider-assigned unique ID for this managed resource.
    Links List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePolicyV2Link>
    • 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 string
    • Storage Policy name.
    PolicyType string
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    QosSpecs List<PiersKarsenbarg.Nutanix.Outputs.GetStoragePolicyV2QosSpec>
    • Storage Quality of Service (QOS) parameters for the entities.
    TenantId string
    • A globally unique identifier that represents the tenant that owns this entity.
    CategoryExtIds []string
    • List of external identifiers for Categories included in the Storage Policy.
    CompressionSpecs []GetStoragePolicyV2CompressionSpec
    • Compression parameters for entities governed by the Storage Policy.
    EncryptionSpecs []GetStoragePolicyV2EncryptionSpec
    • Encryption parameters for entities governed by the Storage Policy.
    ExtId string
    • External identifier of the Storage Policy.
    FaultToleranceSpecs []GetStoragePolicyV2FaultToleranceSpec
    • Fault Tolerance parameters for the entities.
    Id string
    The provider-assigned unique ID for this managed resource.
    Links []GetStoragePolicyV2Link
    • 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 string
    • Storage Policy name.
    PolicyType string
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    QosSpecs []GetStoragePolicyV2QosSpec
    • Storage Quality of Service (QOS) parameters for the entities.
    TenantId string
    • A globally unique identifier that represents the tenant that owns this entity.
    category_ext_ids list(string)
    • List of external identifiers for Categories included in the Storage Policy.
    compression_specs list(object)
    • Compression parameters for entities governed by the Storage Policy.
    encryption_specs list(object)
    • Encryption parameters for entities governed by the Storage Policy.
    ext_id string
    • External identifier of the Storage Policy.
    fault_tolerance_specs list(object)
    • Fault Tolerance parameters for the entities.
    id string
    The provider-assigned unique ID for this managed resource.
    links list(object)
    • 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 string
    • Storage Policy name.
    policy_type string
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    qos_specs list(object)
    • Storage Quality of Service (QOS) parameters for the entities.
    tenant_id string
    • A globally unique identifier that represents the tenant that owns this entity.
    categoryExtIds List<String>
    • List of external identifiers for Categories included in the Storage Policy.
    compressionSpecs List<GetStoragePolicyV2CompressionSpec>
    • Compression parameters for entities governed by the Storage Policy.
    encryptionSpecs List<GetStoragePolicyV2EncryptionSpec>
    • Encryption parameters for entities governed by the Storage Policy.
    extId String
    • External identifier of the Storage Policy.
    faultToleranceSpecs List<GetStoragePolicyV2FaultToleranceSpec>
    • Fault Tolerance parameters for the entities.
    id String
    The provider-assigned unique ID for this managed resource.
    links List<GetStoragePolicyV2Link>
    • 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 String
    • Storage Policy name.
    policyType String
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    qosSpecs List<GetStoragePolicyV2QosSpec>
    • Storage Quality of Service (QOS) parameters for the entities.
    tenantId String
    • A globally unique identifier that represents the tenant that owns this entity.
    categoryExtIds string[]
    • List of external identifiers for Categories included in the Storage Policy.
    compressionSpecs GetStoragePolicyV2CompressionSpec[]
    • Compression parameters for entities governed by the Storage Policy.
    encryptionSpecs GetStoragePolicyV2EncryptionSpec[]
    • Encryption parameters for entities governed by the Storage Policy.
    extId string
    • External identifier of the Storage Policy.
    faultToleranceSpecs GetStoragePolicyV2FaultToleranceSpec[]
    • Fault Tolerance parameters for the entities.
    id string
    The provider-assigned unique ID for this managed resource.
    links GetStoragePolicyV2Link[]
    • 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 string
    • Storage Policy name.
    policyType string
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    qosSpecs GetStoragePolicyV2QosSpec[]
    • Storage Quality of Service (QOS) parameters for the entities.
    tenantId string
    • A globally unique identifier that represents the tenant that owns this entity.
    category_ext_ids Sequence[str]
    • List of external identifiers for Categories included in the Storage Policy.
    compression_specs Sequence[GetStoragePolicyV2CompressionSpec]
    • Compression parameters for entities governed by the Storage Policy.
    encryption_specs Sequence[GetStoragePolicyV2EncryptionSpec]
    • Encryption parameters for entities governed by the Storage Policy.
    ext_id str
    • External identifier of the Storage Policy.
    fault_tolerance_specs Sequence[GetStoragePolicyV2FaultToleranceSpec]
    • Fault Tolerance parameters for the entities.
    id str
    The provider-assigned unique ID for this managed resource.
    links Sequence[GetStoragePolicyV2Link]
    • 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 str
    • Storage Policy name.
    policy_type str
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    qos_specs Sequence[GetStoragePolicyV2QosSpec]
    • Storage Quality of Service (QOS) parameters for the entities.
    tenant_id str
    • A globally unique identifier that represents the tenant that owns this entity.
    categoryExtIds List<String>
    • List of external identifiers for Categories included in the Storage Policy.
    compressionSpecs List<Property Map>
    • Compression parameters for entities governed by the Storage Policy.
    encryptionSpecs List<Property Map>
    • Encryption parameters for entities governed by the Storage Policy.
    extId String
    • External identifier of the Storage Policy.
    faultToleranceSpecs List<Property Map>
    • Fault Tolerance parameters for the entities.
    id String
    The provider-assigned unique ID for this managed resource.
    links List<Property Map>
    • 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 String
    • Storage Policy name.
    policyType String
    • Indicates whether the policy is user-created or system-created. Valid values: "USER", "SYSTEM".
    qosSpecs List<Property Map>
    • Storage Quality of Service (QOS) parameters for the entities.
    tenantId String
    • A globally unique identifier that represents the tenant that owns this entity.

    Supporting Types

    GetStoragePolicyV2CompressionSpec

    CompressionState string
    • Compression state value.
    CompressionState string
    • Compression state value.
    compression_state string
    • Compression state value.
    compressionState String
    • Compression state value.
    compressionState string
    • Compression state value.
    compression_state str
    • Compression state value.
    compressionState String
    • Compression state value.

    GetStoragePolicyV2EncryptionSpec

    EncryptionState string
    • Encryption state value.
    EncryptionState string
    • Encryption state value.
    encryption_state string
    • Encryption state value.
    encryptionState String
    • Encryption state value.
    encryptionState string
    • Encryption state value.
    encryption_state str
    • Encryption state value.
    encryptionState String
    • Encryption state value.

    GetStoragePolicyV2FaultToleranceSpec

    ReplicationFactor string
    • Replication factor value.
    ReplicationFactor string
    • Replication factor value.
    replication_factor string
    • Replication factor value.
    replicationFactor String
    • Replication factor value.
    replicationFactor string
    • Replication factor value.
    replication_factor str
    • Replication factor value.
    replicationFactor String
    • Replication factor value.
    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

    GetStoragePolicyV2QosSpec

    ThrottledIops int
    • Throttled IOPS value.
    ThrottledIops int
    • Throttled IOPS value.
    throttled_iops number
    • Throttled IOPS value.
    throttledIops Integer
    • Throttled IOPS value.
    throttledIops number
    • Throttled IOPS value.
    throttled_iops int
    • Throttled IOPS value.
    throttledIops Number
    • Throttled IOPS value.

    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