1. Packages
  2. Packages
  3. OVH
  4. API Docs
  5. getCloudStorageFileShares
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud
ovh logo
Viewing docs for OVHCloud v2.17.0
published on Friday, Jul 17, 2026 by OVHcloud

    List the file storage shares (NFS) in a public cloud project.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const shares = ovh.getCloudStorageFileShares({
        serviceName: "<public cloud project ID>",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    shares = ovh.get_cloud_storage_file_shares(service_name="<public cloud project ID>")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.GetCloudStorageFileShares(ctx, &ovh.GetCloudStorageFileSharesArgs{
    			ServiceName: "<public cloud project ID>",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var shares = Ovh.GetCloudStorageFileShares.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudStorageFileSharesArgs;
    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 shares = OvhFunctions.getCloudStorageFileShares(GetCloudStorageFileSharesArgs.builder()
                .serviceName("<public cloud project ID>")
                .build());
    
        }
    }
    
    variables:
      shares:
        fn::invoke:
          function: ovh:getCloudStorageFileShares
          arguments:
            serviceName: <public cloud project ID>
    
    Example coming soon!
    

    Filter the shares by region:

    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@ovhcloud/pulumi-ovh";
    
    const shares = ovh.getCloudStorageFileShares({
        serviceName: "<public cloud project ID>",
        region: "GRA9",
    });
    
    import pulumi
    import pulumi_ovh as ovh
    
    shares = ovh.get_cloud_storage_file_shares(service_name="<public cloud project ID>",
        region="GRA9")
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ovh.GetCloudStorageFileShares(ctx, &ovh.GetCloudStorageFileSharesArgs{
    			ServiceName: "<public cloud project ID>",
    			Region:      pulumi.StringRef("GRA9"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var shares = Ovh.GetCloudStorageFileShares.Invoke(new()
        {
            ServiceName = "<public cloud project ID>",
            Region = "GRA9",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.OvhFunctions;
    import com.pulumi.ovh.inputs.GetCloudStorageFileSharesArgs;
    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 shares = OvhFunctions.getCloudStorageFileShares(GetCloudStorageFileSharesArgs.builder()
                .serviceName("<public cloud project ID>")
                .region("GRA9")
                .build());
    
        }
    }
    
    variables:
      shares:
        fn::invoke:
          function: ovh:getCloudStorageFileShares
          arguments:
            serviceName: <public cloud project ID>
            region: GRA9
    
    Example coming soon!
    

    Using getCloudStorageFileShares

    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 getCloudStorageFileShares(args: GetCloudStorageFileSharesArgs, opts?: InvokeOptions): Promise<GetCloudStorageFileSharesResult>
    function getCloudStorageFileSharesOutput(args: GetCloudStorageFileSharesOutputArgs, opts?: InvokeOptions): Output<GetCloudStorageFileSharesResult>
    def get_cloud_storage_file_shares(region: Optional[str] = None,
                                      service_name: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetCloudStorageFileSharesResult
    def get_cloud_storage_file_shares_output(region: pulumi.Input[Optional[str]] = None,
                                      service_name: pulumi.Input[Optional[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetCloudStorageFileSharesResult]
    func GetCloudStorageFileShares(ctx *Context, args *GetCloudStorageFileSharesArgs, opts ...InvokeOption) (*GetCloudStorageFileSharesResult, error)
    func GetCloudStorageFileSharesOutput(ctx *Context, args *GetCloudStorageFileSharesOutputArgs, opts ...InvokeOption) GetCloudStorageFileSharesResultOutput

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

    public static class GetCloudStorageFileShares 
    {
        public static Task<GetCloudStorageFileSharesResult> InvokeAsync(GetCloudStorageFileSharesArgs args, InvokeOptions? opts = null)
        public static Output<GetCloudStorageFileSharesResult> Invoke(GetCloudStorageFileSharesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCloudStorageFileSharesResult> getCloudStorageFileShares(GetCloudStorageFileSharesArgs args, InvokeOptions options)
    public static Output<GetCloudStorageFileSharesResult> getCloudStorageFileShares(GetCloudStorageFileSharesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ovh:index/getCloudStorageFileShares:getCloudStorageFileShares
      arguments:
        # arguments dictionary
    data "ovh_get_cloud_storage_file_shares" "name" {
        # arguments
    }

    The following arguments are supported:

    ServiceName string
    The id of the public cloud project.
    Region string
    If set, only file shares located in this region are returned.
    ServiceName string
    The id of the public cloud project.
    Region string
    If set, only file shares located in this region are returned.
    service_name string
    The id of the public cloud project.
    region string
    If set, only file shares located in this region are returned.
    serviceName String
    The id of the public cloud project.
    region String
    If set, only file shares located in this region are returned.
    serviceName string
    The id of the public cloud project.
    region string
    If set, only file shares located in this region are returned.
    service_name str
    The id of the public cloud project.
    region str
    If set, only file shares located in this region are returned.
    serviceName String
    The id of the public cloud project.
    region String
    If set, only file shares located in this region are returned.

    getCloudStorageFileShares Result

    The following output properties are available:

    FileShares List<GetCloudStorageFileSharesFileShare>
    List of file shares:
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    Region string
    Region.
    FileShares []GetCloudStorageFileSharesFileShare
    List of file shares:
    Id string
    The provider-assigned unique ID for this managed resource.
    ServiceName string
    Region string
    Region.
    file_shares list(object)
    List of file shares:
    id string
    The provider-assigned unique ID for this managed resource.
    service_name string
    region string
    Region.
    fileShares List<GetCloudStorageFileSharesFileShare>
    List of file shares:
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    region String
    Region.
    fileShares GetCloudStorageFileSharesFileShare[]
    List of file shares:
    id string
    The provider-assigned unique ID for this managed resource.
    serviceName string
    region string
    Region.
    file_shares Sequence[GetCloudStorageFileSharesFileShare]
    List of file shares:
    id str
    The provider-assigned unique ID for this managed resource.
    service_name str
    region str
    Region.
    fileShares List<Property Map>
    List of file shares:
    id String
    The provider-assigned unique ID for this managed resource.
    serviceName String
    region String
    Region.

    Supporting Types

    GetCloudStorageFileSharesFileShare

    AccessRules List<GetCloudStorageFileSharesFileShareAccessRule>
    Current access rules for the file share:
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Access rule creation date.
    CurrentState GetCloudStorageFileSharesFileShareCurrentState
    Current state of the file storage share:
    Description string
    File share description.
    Id string
    Access rule ID.
    Location GetCloudStorageFileSharesFileShareLocation
    Current location:
    Name string
    Capability name.
    Protocol string
    File share protocol.
    ResourceStatus string
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ShareNetworkId string
    ID of the share network the file share is attached to.
    ShareType string
    File share type.
    Size int
    Size of the file share in GB.
    UpdatedAt string
    Last update date of the file share.
    AccessRules []GetCloudStorageFileSharesFileShareAccessRule
    Current access rules for the file share:
    Checksum string
    Computed hash representing the current target specification value.
    CreatedAt string
    Access rule creation date.
    CurrentState GetCloudStorageFileSharesFileShareCurrentState
    Current state of the file storage share:
    Description string
    File share description.
    Id string
    Access rule ID.
    Location GetCloudStorageFileSharesFileShareLocation
    Current location:
    Name string
    Capability name.
    Protocol string
    File share protocol.
    ResourceStatus string
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    ShareNetworkId string
    ID of the share network the file share is attached to.
    ShareType string
    File share type.
    Size int
    Size of the file share in GB.
    UpdatedAt string
    Last update date of the file share.
    access_rules list(object)
    Current access rules for the file share:
    checksum string
    Computed hash representing the current target specification value.
    created_at string
    Access rule creation date.
    current_state object
    Current state of the file storage share:
    description string
    File share description.
    id string
    Access rule ID.
    location object
    Current location:
    name string
    Capability name.
    protocol string
    File share protocol.
    resource_status string
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    share_network_id string
    ID of the share network the file share is attached to.
    share_type string
    File share type.
    size number
    Size of the file share in GB.
    updated_at string
    Last update date of the file share.
    accessRules List<GetCloudStorageFileSharesFileShareAccessRule>
    Current access rules for the file share:
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Access rule creation date.
    currentState GetCloudStorageFileSharesFileShareCurrentState
    Current state of the file storage share:
    description String
    File share description.
    id String
    Access rule ID.
    location GetCloudStorageFileSharesFileShareLocation
    Current location:
    name String
    Capability name.
    protocol String
    File share protocol.
    resourceStatus String
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    shareNetworkId String
    ID of the share network the file share is attached to.
    shareType String
    File share type.
    size Integer
    Size of the file share in GB.
    updatedAt String
    Last update date of the file share.
    accessRules GetCloudStorageFileSharesFileShareAccessRule[]
    Current access rules for the file share:
    checksum string
    Computed hash representing the current target specification value.
    createdAt string
    Access rule creation date.
    currentState GetCloudStorageFileSharesFileShareCurrentState
    Current state of the file storage share:
    description string
    File share description.
    id string
    Access rule ID.
    location GetCloudStorageFileSharesFileShareLocation
    Current location:
    name string
    Capability name.
    protocol string
    File share protocol.
    resourceStatus string
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    shareNetworkId string
    ID of the share network the file share is attached to.
    shareType string
    File share type.
    size number
    Size of the file share in GB.
    updatedAt string
    Last update date of the file share.
    access_rules Sequence[GetCloudStorageFileSharesFileShareAccessRule]
    Current access rules for the file share:
    checksum str
    Computed hash representing the current target specification value.
    created_at str
    Access rule creation date.
    current_state GetCloudStorageFileSharesFileShareCurrentState
    Current state of the file storage share:
    description str
    File share description.
    id str
    Access rule ID.
    location GetCloudStorageFileSharesFileShareLocation
    Current location:
    name str
    Capability name.
    protocol str
    File share protocol.
    resource_status str
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    share_network_id str
    ID of the share network the file share is attached to.
    share_type str
    File share type.
    size int
    Size of the file share in GB.
    updated_at str
    Last update date of the file share.
    accessRules List<Property Map>
    Current access rules for the file share:
    checksum String
    Computed hash representing the current target specification value.
    createdAt String
    Access rule creation date.
    currentState Property Map
    Current state of the file storage share:
    description String
    File share description.
    id String
    Access rule ID.
    location Property Map
    Current location:
    name String
    Capability name.
    protocol String
    File share protocol.
    resourceStatus String
    File share readiness in the system (CREATING, DELETING, ERROR, OUT_OF_SYNC, READY, UPDATING).
    shareNetworkId String
    ID of the share network the file share is attached to.
    shareType String
    File share type.
    size Number
    Size of the file share in GB.
    updatedAt String
    Last update date of the file share.

    GetCloudStorageFileSharesFileShareAccessRule

    AccessLevel string
    Access level.
    AccessTo string
    IP address or CIDR.
    AccessLevel string
    Access level.
    AccessTo string
    IP address or CIDR.
    access_level string
    Access level.
    access_to string
    IP address or CIDR.
    accessLevel String
    Access level.
    accessTo String
    IP address or CIDR.
    accessLevel string
    Access level.
    accessTo string
    IP address or CIDR.
    access_level str
    Access level.
    access_to str
    IP address or CIDR.
    accessLevel String
    Access level.
    accessTo String
    IP address or CIDR.

    GetCloudStorageFileSharesFileShareCurrentState

    AccessRules List<GetCloudStorageFileSharesFileShareCurrentStateAccessRule>
    Current access rules for the file share:
    Capabilities List<GetCloudStorageFileSharesFileShareCurrentStateCapability>
    Action-availability flags derived from the file share status:
    Description string
    File share description.
    ExportLocations List<GetCloudStorageFileSharesFileShareCurrentStateExportLocation>
    Export locations for the file share:
    Location GetCloudStorageFileSharesFileShareCurrentStateLocation
    Current location:
    Name string
    Capability name.
    Protocol string
    File share protocol.
    ShareNetworkId string
    ID of the share network the file share is attached to.
    ShareType string
    File share type.
    Size int
    Size of the file share in GB.
    AccessRules []GetCloudStorageFileSharesFileShareCurrentStateAccessRule
    Current access rules for the file share:
    Capabilities []GetCloudStorageFileSharesFileShareCurrentStateCapability
    Action-availability flags derived from the file share status:
    Description string
    File share description.
    ExportLocations []GetCloudStorageFileSharesFileShareCurrentStateExportLocation
    Export locations for the file share:
    Location GetCloudStorageFileSharesFileShareCurrentStateLocation
    Current location:
    Name string
    Capability name.
    Protocol string
    File share protocol.
    ShareNetworkId string
    ID of the share network the file share is attached to.
    ShareType string
    File share type.
    Size int
    Size of the file share in GB.
    access_rules list(object)
    Current access rules for the file share:
    capabilities list(object)
    Action-availability flags derived from the file share status:
    description string
    File share description.
    export_locations list(object)
    Export locations for the file share:
    location object
    Current location:
    name string
    Capability name.
    protocol string
    File share protocol.
    share_network_id string
    ID of the share network the file share is attached to.
    share_type string
    File share type.
    size number
    Size of the file share in GB.
    accessRules List<GetCloudStorageFileSharesFileShareCurrentStateAccessRule>
    Current access rules for the file share:
    capabilities List<GetCloudStorageFileSharesFileShareCurrentStateCapability>
    Action-availability flags derived from the file share status:
    description String
    File share description.
    exportLocations List<GetCloudStorageFileSharesFileShareCurrentStateExportLocation>
    Export locations for the file share:
    location GetCloudStorageFileSharesFileShareCurrentStateLocation
    Current location:
    name String
    Capability name.
    protocol String
    File share protocol.
    shareNetworkId String
    ID of the share network the file share is attached to.
    shareType String
    File share type.
    size Integer
    Size of the file share in GB.
    accessRules GetCloudStorageFileSharesFileShareCurrentStateAccessRule[]
    Current access rules for the file share:
    capabilities GetCloudStorageFileSharesFileShareCurrentStateCapability[]
    Action-availability flags derived from the file share status:
    description string
    File share description.
    exportLocations GetCloudStorageFileSharesFileShareCurrentStateExportLocation[]
    Export locations for the file share:
    location GetCloudStorageFileSharesFileShareCurrentStateLocation
    Current location:
    name string
    Capability name.
    protocol string
    File share protocol.
    shareNetworkId string
    ID of the share network the file share is attached to.
    shareType string
    File share type.
    size number
    Size of the file share in GB.
    access_rules Sequence[GetCloudStorageFileSharesFileShareCurrentStateAccessRule]
    Current access rules for the file share:
    capabilities Sequence[GetCloudStorageFileSharesFileShareCurrentStateCapability]
    Action-availability flags derived from the file share status:
    description str
    File share description.
    export_locations Sequence[GetCloudStorageFileSharesFileShareCurrentStateExportLocation]
    Export locations for the file share:
    location GetCloudStorageFileSharesFileShareCurrentStateLocation
    Current location:
    name str
    Capability name.
    protocol str
    File share protocol.
    share_network_id str
    ID of the share network the file share is attached to.
    share_type str
    File share type.
    size int
    Size of the file share in GB.
    accessRules List<Property Map>
    Current access rules for the file share:
    capabilities List<Property Map>
    Action-availability flags derived from the file share status:
    description String
    File share description.
    exportLocations List<Property Map>
    Export locations for the file share:
    location Property Map
    Current location:
    name String
    Capability name.
    protocol String
    File share protocol.
    shareNetworkId String
    ID of the share network the file share is attached to.
    shareType String
    File share type.
    size Number
    Size of the file share in GB.

    GetCloudStorageFileSharesFileShareCurrentStateAccessRule

    AccessLevel string
    Access level.
    AccessTo string
    IP address or CIDR.
    CreatedAt string
    Access rule creation date.
    Id string
    Access rule ID.
    State string
    Access rule state.
    AccessLevel string
    Access level.
    AccessTo string
    IP address or CIDR.
    CreatedAt string
    Access rule creation date.
    Id string
    Access rule ID.
    State string
    Access rule state.
    access_level string
    Access level.
    access_to string
    IP address or CIDR.
    created_at string
    Access rule creation date.
    id string
    Access rule ID.
    state string
    Access rule state.
    accessLevel String
    Access level.
    accessTo String
    IP address or CIDR.
    createdAt String
    Access rule creation date.
    id String
    Access rule ID.
    state String
    Access rule state.
    accessLevel string
    Access level.
    accessTo string
    IP address or CIDR.
    createdAt string
    Access rule creation date.
    id string
    Access rule ID.
    state string
    Access rule state.
    access_level str
    Access level.
    access_to str
    IP address or CIDR.
    created_at str
    Access rule creation date.
    id str
    Access rule ID.
    state str
    Access rule state.
    accessLevel String
    Access level.
    accessTo String
    IP address or CIDR.
    createdAt String
    Access rule creation date.
    id String
    Access rule ID.
    state String
    Access rule state.

    GetCloudStorageFileSharesFileShareCurrentStateCapability

    Enabled bool
    Whether the capability is enabled.
    Name string
    Capability name.
    Reason string
    Reason why the capability is disabled.
    Enabled bool
    Whether the capability is enabled.
    Name string
    Capability name.
    Reason string
    Reason why the capability is disabled.
    enabled bool
    Whether the capability is enabled.
    name string
    Capability name.
    reason string
    Reason why the capability is disabled.
    enabled Boolean
    Whether the capability is enabled.
    name String
    Capability name.
    reason String
    Reason why the capability is disabled.
    enabled boolean
    Whether the capability is enabled.
    name string
    Capability name.
    reason string
    Reason why the capability is disabled.
    enabled bool
    Whether the capability is enabled.
    name str
    Capability name.
    reason str
    Reason why the capability is disabled.
    enabled Boolean
    Whether the capability is enabled.
    name String
    Capability name.
    reason String
    Reason why the capability is disabled.

    GetCloudStorageFileSharesFileShareCurrentStateExportLocation

    Path string
    Export path.
    Preferred bool
    Whether this is the preferred export location.
    Path string
    Export path.
    Preferred bool
    Whether this is the preferred export location.
    path string
    Export path.
    preferred bool
    Whether this is the preferred export location.
    path String
    Export path.
    preferred Boolean
    Whether this is the preferred export location.
    path string
    Export path.
    preferred boolean
    Whether this is the preferred export location.
    path str
    Export path.
    preferred bool
    Whether this is the preferred export location.
    path String
    Export path.
    preferred Boolean
    Whether this is the preferred export location.

    GetCloudStorageFileSharesFileShareCurrentStateLocation

    AvailabilityZone string
    Availability zone.
    Region string
    If set, only file shares located in this region are returned.
    AvailabilityZone string
    Availability zone.
    Region string
    If set, only file shares located in this region are returned.
    availability_zone string
    Availability zone.
    region string
    If set, only file shares located in this region are returned.
    availabilityZone String
    Availability zone.
    region String
    If set, only file shares located in this region are returned.
    availabilityZone string
    Availability zone.
    region string
    If set, only file shares located in this region are returned.
    availability_zone str
    Availability zone.
    region str
    If set, only file shares located in this region are returned.
    availabilityZone String
    Availability zone.
    region String
    If set, only file shares located in this region are returned.

    GetCloudStorageFileSharesFileShareLocation

    AvailabilityZone string
    Availability zone.
    Region string
    If set, only file shares located in this region are returned.
    AvailabilityZone string
    Availability zone.
    Region string
    If set, only file shares located in this region are returned.
    availability_zone string
    Availability zone.
    region string
    If set, only file shares located in this region are returned.
    availabilityZone String
    Availability zone.
    region String
    If set, only file shares located in this region are returned.
    availabilityZone string
    Availability zone.
    region string
    If set, only file shares located in this region are returned.
    availability_zone str
    Availability zone.
    region str
    If set, only file shares located in this region are returned.
    availabilityZone String
    Availability zone.
    region String
    If set, only file shares located in this region are returned.

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ovh Terraform Provider.
    ovh logo
    Viewing docs for OVHCloud v2.17.0
    published on Friday, Jul 17, 2026 by OVHcloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial