1. Packages
  2. Nutanix
  3. API Docs
  4. getStorageContainersV2
Nutanix v0.8.0 published on Sunday, May 11, 2025 by Piers Karsenbarg

nutanix.getStorageContainersV2

Explore with Pulumi AI

nutanix logo
Nutanix v0.8.0 published on Sunday, May 11, 2025 by Piers Karsenbarg

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pulumi/nutanix";
    
    const storage_containers = nutanix.getStorageContainersV2({});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    storage_containers = nutanix.get_storage_containers_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.LookupStorageContainersV2(ctx, &nutanix.LookupStorageContainersV2Args{}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = Pulumi.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var storage_containers = Nutanix.GetStorageContainersV2.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.GetStorageContainersV2Args;
    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 storage-containers = NutanixFunctions.getStorageContainersV2(GetStorageContainersV2Args.builder()
                .build());
    
        }
    }
    
    variables:
      storage-containers:
        fn::invoke:
          function: nutanix:getStorageContainersV2
          arguments: {}
    

    Storage Container

    The storage_containers contains list of Storage Container objects. Each Storage Container object contains the following attributes:

    • ext_id: - the storage container uuid

    • tenant_id: - 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.

    • container_ext_id: - the storage container ext id

    • owner_ext_id: - owner ext id

    • name: Name of the storage container. Note that the name of Storage Container should be unique per cluster.

    • cluster_ext_id: - ext id for the cluster owning the storage container.

    • storage_pool_ext_id: - extId of the Storage Pool owning the Storage Container instance.

    • is_marked_for_removal: - Indicates if the Storage Container is marked for removal. This field is set when the Storage Container is about to be destroyed.

    • max_capacity_bytes: - Maximum physical capacity of the Storage Container in bytes.

    • logical_explicit_reserved_capacity_bytes: - Total reserved size (in bytes) of the container (set by Admin). This also accounts for the container’s replication factor. The actual reserved capacity of the container will be the maximum of explicitReservedCapacity and implicitReservedCapacity.

    • logical_implicit_reserved_capacity_bytes: - This is the summation of reservations provisioned on all VDisks in the container. The actual reserved capacity of the container will be the maximum of explicitReservedCapacity and implicitReservedCapacity

    • logical_advertised_capacity_bytes: - Max capacity of the Container as defined by the user.

    • replication_factor: - Replication factor of the Storage Container.

    • nfs_whitelist_addresses: - List of NFS addresses which need to be whitelisted.

    • is_nfs_whitelist_inherited: - Indicates whether the NFS whitelist is inherited from global config.

    • erasure_code: - Indicates the current status value for Erasure Coding for the Container. available values: NONE, OFF, ON

    • is_inline_ec_enabled: - Indicates whether data written to this container should be inline erasure coded or not. This field is only considered when ErasureCoding is enabled.

    • has_higher_ec_fault_domain_preference: - Indicates whether to prefer a higher Erasure Code fault domain.

    • erasure_code_delay_secs: - Delay in performing ErasureCode for the current Container instance.

    • cache_deduplication: - Indicates the current status of Cache Deduplication for the Container. available values: NONE, OFF, ON

    • on_disk_dedup: - Indicates the current status of Disk Deduplication for the Container. available values: NONE, OFF, POST_PROCESS

    • is_compression_enabled: - Indicates whether the compression is enabled for the Container.

    • compression_delay_secs: - The compression delay in seconds.

    • is_internal: - Indicates whether the Container is internal and is managed by Nutanix.

    • is_software_encryption_enabled: - Indicates whether the Container instance has software encryption enabled.

    • is_encrypted: - Indicates whether the Container is encrypted or not.

    • affinity_host_ext_id: - Affinity host extId for RF 1 Storage Container.

    • cluster_name: - Corresponding name of the Cluster owning the Storage Container instance.

    nfs_whitelist_addresses

    • ipv4: Reference to address configuration
    • ipv6: Reference to address configuration
    • fqdn: Reference to address configuration

    ipv4, ipv6 (Reference to address configuration)

    • value: value of address
    • prefix_length: The prefix length of the network to which this host IPv4/IPv6 address belongs.

    fqdn (Reference to address configuration)

    • value: value of fqdn address

    See detailed information in Nutanix List Storage Containers v4.

    Using getStorageContainersV2

    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 getStorageContainersV2(args: GetStorageContainersV2Args, opts?: InvokeOptions): Promise<GetStorageContainersV2Result>
    function getStorageContainersV2Output(args: GetStorageContainersV2OutputArgs, opts?: InvokeOptions): Output<GetStorageContainersV2Result>
    def get_storage_containers_v2(apply: Optional[str] = None,
                                  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) -> GetStorageContainersV2Result
    def get_storage_containers_v2_output(apply: Optional[pulumi.Input[str]] = None,
                                  filter: Optional[pulumi.Input[str]] = None,
                                  limit: Optional[pulumi.Input[int]] = None,
                                  order_by: Optional[pulumi.Input[str]] = None,
                                  page: Optional[pulumi.Input[int]] = None,
                                  select: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetStorageContainersV2Result]
    func LookupStorageContainersV2(ctx *Context, args *LookupStorageContainersV2Args, opts ...InvokeOption) (*LookupStorageContainersV2Result, error)
    func LookupStorageContainersV2Output(ctx *Context, args *LookupStorageContainersV2OutputArgs, opts ...InvokeOption) LookupStorageContainersV2ResultOutput

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

    public static class GetStorageContainersV2 
    {
        public static Task<GetStorageContainersV2Result> InvokeAsync(GetStorageContainersV2Args args, InvokeOptions? opts = null)
        public static Output<GetStorageContainersV2Result> Invoke(GetStorageContainersV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetStorageContainersV2Result> getStorageContainersV2(GetStorageContainersV2Args args, InvokeOptions options)
    public static Output<GetStorageContainersV2Result> getStorageContainersV2(GetStorageContainersV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: nutanix:index/getStorageContainersV2:getStorageContainersV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Apply string
    Filter string
    A URL query parameter that allows clients to filter a collection of resources.
    Limit int
    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
    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
    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.
    Apply string
    Filter string
    A URL query parameter that allows clients to filter a collection of resources.
    Limit int
    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
    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
    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.
    apply String
    filter String
    A URL query parameter that allows clients to filter a collection of resources.
    limit Integer
    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
    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
    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.
    apply string
    filter string
    A URL query parameter that allows clients to filter a collection of resources.
    limit number
    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
    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
    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.
    apply str
    filter str
    A URL query parameter that allows clients to filter a collection of resources.
    limit int
    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
    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
    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.
    apply String
    filter String
    A URL query parameter that allows clients to filter a collection of resources.
    limit Number
    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
    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
    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.

    getStorageContainersV2 Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    StorageContainers List<PiersKarsenbarg.Nutanix.Outputs.GetStorageContainersV2StorageContainer>
    Lists the Storage Containers present in the system.
    Apply string
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    Id string
    The provider-assigned unique ID for this managed resource.
    StorageContainers []GetStorageContainersV2StorageContainer
    Lists the Storage Containers present in the system.
    Apply string
    Filter string
    Limit int
    OrderBy string
    Page int
    Select string
    id String
    The provider-assigned unique ID for this managed resource.
    storageContainers List<GetStorageContainersV2StorageContainer>
    Lists the Storage Containers present in the system.
    apply String
    filter String
    limit Integer
    orderBy String
    page Integer
    select String
    id string
    The provider-assigned unique ID for this managed resource.
    storageContainers GetStorageContainersV2StorageContainer[]
    Lists the Storage Containers present in the system.
    apply string
    filter string
    limit number
    orderBy string
    page number
    select string
    id str
    The provider-assigned unique ID for this managed resource.
    storage_containers Sequence[GetStorageContainersV2StorageContainer]
    Lists the Storage Containers present in the system.
    apply str
    filter str
    limit int
    order_by str
    page int
    select str
    id String
    The provider-assigned unique ID for this managed resource.
    storageContainers List<Property Map>
    Lists the Storage Containers present in the system.
    apply String
    filter String
    limit Number
    orderBy String
    page Number
    select String

    Supporting Types

    GetStorageContainersV2StorageContainer

    AffinityHostExtId string
    CacheDeduplication string
    ClusterExtId string
    ClusterName string
    CompressionDelaySecs int
    ContainerExtId string
    ErasureCode string
    ErasureCodeDelaySecs int
    ExtId string
    HasHigherEcFaultDomainPreference bool
    IsCompressionEnabled bool
    IsEncrypted bool
    IsInlineEcEnabled bool
    IsInternal bool
    IsMarkedForRemoval bool
    IsNfsWhitelistInherited bool
    IsSoftwareEncryptionEnabled bool
    Links List<PiersKarsenbarg.Nutanix.Inputs.GetStorageContainersV2StorageContainerLink>
    LogicalAdvertisedCapacityBytes int
    LogicalExplicitReservedCapacityBytes int
    LogicalImplicitReservedCapacityBytes int
    MaxCapacityBytes int
    Name string
    NfsWhitelistAddresses List<PiersKarsenbarg.Nutanix.Inputs.GetStorageContainersV2StorageContainerNfsWhitelistAddress>
    OnDiskDedup string
    OwnerExtId string
    ReplicationFactor int
    StoragePoolExtId string
    TenantId string
    affinityHostExtId String
    cacheDeduplication String
    clusterExtId String
    clusterName String
    compressionDelaySecs Integer
    containerExtId String
    erasureCode String
    erasureCodeDelaySecs Integer
    extId String
    hasHigherEcFaultDomainPreference Boolean
    isCompressionEnabled Boolean
    isEncrypted Boolean
    isInlineEcEnabled Boolean
    isInternal Boolean
    isMarkedForRemoval Boolean
    isNfsWhitelistInherited Boolean
    isSoftwareEncryptionEnabled Boolean
    links List<GetStorageContainersV2StorageContainerLink>
    logicalAdvertisedCapacityBytes Integer
    logicalExplicitReservedCapacityBytes Integer
    logicalImplicitReservedCapacityBytes Integer
    maxCapacityBytes Integer
    name String
    nfsWhitelistAddresses List<GetStorageContainersV2StorageContainerNfsWhitelistAddress>
    onDiskDedup String
    ownerExtId String
    replicationFactor Integer
    storagePoolExtId String
    tenantId 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

    GetStorageContainersV2StorageContainerNfsWhitelistAddress

    GetStorageContainersV2StorageContainerNfsWhitelistAddressFqdn

    Value string
    Value string
    value String
    value string
    value str
    value String

    GetStorageContainersV2StorageContainerNfsWhitelistAddressIpv4

    prefixLength Integer
    value String
    prefixLength number
    value string
    prefixLength Number
    value String

    GetStorageContainersV2StorageContainerNfsWhitelistAddressIpv6

    prefixLength Integer
    value String
    prefixLength number
    value string
    prefixLength Number
    value String

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.8.0 published on Sunday, May 11, 2025 by Piers Karsenbarg