1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. FileStorage
  5. getExports
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.FileStorage.getExports

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Exports in Oracle Cloud Infrastructure File Storage service.

    Lists export resources by compartment, file system, or export set. You must specify an export set ID, a file system ID, and / or a compartment ID.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testExports = oci.FileStorage.getExports({
        compartmentId: compartmentId,
        exportSetId: testExportSet.id,
        fileSystemId: testFileSystem.id,
        id: exportId,
        state: exportState,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_exports = oci.FileStorage.get_exports(compartment_id=compartment_id,
        export_set_id=test_export_set["id"],
        file_system_id=test_file_system["id"],
        id=export_id,
        state=export_state)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/FileStorage"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := FileStorage.GetExports(ctx, &filestorage.GetExportsArgs{
    			CompartmentId: pulumi.StringRef(compartmentId),
    			ExportSetId:   pulumi.StringRef(testExportSet.Id),
    			FileSystemId:  pulumi.StringRef(testFileSystem.Id),
    			Id:            pulumi.StringRef(exportId),
    			State:         pulumi.StringRef(exportState),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testExports = Oci.FileStorage.GetExports.Invoke(new()
        {
            CompartmentId = compartmentId,
            ExportSetId = testExportSet.Id,
            FileSystemId = testFileSystem.Id,
            Id = exportId,
            State = exportState,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.FileStorage.FileStorageFunctions;
    import com.pulumi.oci.FileStorage.inputs.GetExportsArgs;
    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 testExports = FileStorageFunctions.getExports(GetExportsArgs.builder()
                .compartmentId(compartmentId)
                .exportSetId(testExportSet.id())
                .fileSystemId(testFileSystem.id())
                .id(exportId)
                .state(exportState)
                .build());
    
        }
    }
    
    variables:
      testExports:
        fn::invoke:
          Function: oci:FileStorage:getExports
          Arguments:
            compartmentId: ${compartmentId}
            exportSetId: ${testExportSet.id}
            fileSystemId: ${testFileSystem.id}
            id: ${exportId}
            state: ${exportState}
    

    Using getExports

    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 getExports(args: GetExportsArgs, opts?: InvokeOptions): Promise<GetExportsResult>
    function getExportsOutput(args: GetExportsOutputArgs, opts?: InvokeOptions): Output<GetExportsResult>
    def get_exports(compartment_id: Optional[str] = None,
                    export_set_id: Optional[str] = None,
                    file_system_id: Optional[str] = None,
                    filters: Optional[Sequence[_filestorage.GetExportsFilter]] = None,
                    id: Optional[str] = None,
                    state: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetExportsResult
    def get_exports_output(compartment_id: Optional[pulumi.Input[str]] = None,
                    export_set_id: Optional[pulumi.Input[str]] = None,
                    file_system_id: Optional[pulumi.Input[str]] = None,
                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[_filestorage.GetExportsFilterArgs]]]] = None,
                    id: Optional[pulumi.Input[str]] = None,
                    state: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetExportsResult]
    func GetExports(ctx *Context, args *GetExportsArgs, opts ...InvokeOption) (*GetExportsResult, error)
    func GetExportsOutput(ctx *Context, args *GetExportsOutputArgs, opts ...InvokeOption) GetExportsResultOutput

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

    public static class GetExports 
    {
        public static Task<GetExportsResult> InvokeAsync(GetExportsArgs args, InvokeOptions? opts = null)
        public static Output<GetExportsResult> Invoke(GetExportsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExportsResult> getExports(GetExportsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:FileStorage/getExports:getExports
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    ExportSetId string
    The OCID of the export set.
    FileSystemId string
    The OCID of the file system.
    Filters List<GetExportsFilter>
    Id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    CompartmentId string
    The OCID of the compartment.
    ExportSetId string
    The OCID of the export set.
    FileSystemId string
    The OCID of the file system.
    Filters []GetExportsFilter
    Id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId String
    The OCID of the compartment.
    exportSetId String
    The OCID of the export set.
    fileSystemId String
    The OCID of the file system.
    filters List<GetExportsFilter>
    id String
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId string
    The OCID of the compartment.
    exportSetId string
    The OCID of the export set.
    fileSystemId string
    The OCID of the file system.
    filters GetExportsFilter[]
    id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    state string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartment_id str
    The OCID of the compartment.
    export_set_id str
    The OCID of the export set.
    file_system_id str
    The OCID of the file system.
    filters Sequence[filestorage.GetExportsFilter]
    id str
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    state str
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    compartmentId String
    The OCID of the compartment.
    exportSetId String
    The OCID of the export set.
    fileSystemId String
    The OCID of the file system.
    filters List<Property Map>
    id String
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.

    getExports Result

    The following output properties are available:

    Exports List<GetExportsExport>
    The list of exports.
    CompartmentId string
    ExportSetId string
    The OCID of this export's export set.
    FileSystemId string
    The OCID of this export's file system.
    Filters List<GetExportsFilter>
    Id string
    The OCID of this export.
    State string
    The current state of this export.
    Exports []GetExportsExport
    The list of exports.
    CompartmentId string
    ExportSetId string
    The OCID of this export's export set.
    FileSystemId string
    The OCID of this export's file system.
    Filters []GetExportsFilter
    Id string
    The OCID of this export.
    State string
    The current state of this export.
    exports List<GetExportsExport>
    The list of exports.
    compartmentId String
    exportSetId String
    The OCID of this export's export set.
    fileSystemId String
    The OCID of this export's file system.
    filters List<GetExportsFilter>
    id String
    The OCID of this export.
    state String
    The current state of this export.
    exports GetExportsExport[]
    The list of exports.
    compartmentId string
    exportSetId string
    The OCID of this export's export set.
    fileSystemId string
    The OCID of this export's file system.
    filters GetExportsFilter[]
    id string
    The OCID of this export.
    state string
    The current state of this export.
    exports Sequence[filestorage.GetExportsExport]
    The list of exports.
    compartment_id str
    export_set_id str
    The OCID of this export's export set.
    file_system_id str
    The OCID of this export's file system.
    filters Sequence[filestorage.GetExportsFilter]
    id str
    The OCID of this export.
    state str
    The current state of this export.
    exports List<Property Map>
    The list of exports.
    compartmentId String
    exportSetId String
    The OCID of this export's export set.
    fileSystemId String
    The OCID of this export's file system.
    filters List<Property Map>
    id String
    The OCID of this export.
    state String
    The current state of this export.

    Supporting Types

    GetExportsExport

    ExportOptions List<GetExportsExportExportOption>
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    ExportSetId string
    The OCID of the export set.
    FileSystemId string
    The OCID of the file system.
    Id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    IsIdmapGroupsForSysAuth bool
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    Path string
    Path used to access the associated file system.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    TimeCreated string
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    ExportOptions []GetExportsExportExportOption
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    ExportSetId string
    The OCID of the export set.
    FileSystemId string
    The OCID of the file system.
    Id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    IsIdmapGroupsForSysAuth bool
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    Path string
    Path used to access the associated file system.
    State string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    TimeCreated string
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    exportOptions List<GetExportsExportExportOption>
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    exportSetId String
    The OCID of the export set.
    fileSystemId String
    The OCID of the file system.
    id String
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    isIdmapGroupsForSysAuth Boolean
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    path String
    Path used to access the associated file system.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    timeCreated String
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    exportOptions GetExportsExportExportOption[]
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    exportSetId string
    The OCID of the export set.
    fileSystemId string
    The OCID of the file system.
    id string
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    isIdmapGroupsForSysAuth boolean
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    path string
    Path used to access the associated file system.
    state string
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    timeCreated string
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    export_options Sequence[filestorage.GetExportsExportExportOption]
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    export_set_id str
    The OCID of the export set.
    file_system_id str
    The OCID of the file system.
    id str
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    is_idmap_groups_for_sys_auth bool
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    path str
    Path used to access the associated file system.
    state str
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    time_created str
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z
    exportOptions List<Property Map>
    Policies that apply to NFS requests made through this export. exportOptions contains a sequential list of ClientOptions. Each ClientOptions item defines the export options that are applied to a specified set of clients.
    exportSetId String
    The OCID of the export set.
    fileSystemId String
    The OCID of the file system.
    id String
    Filter results by OCID. Must be an OCID of the correct type for the resouce type.
    isIdmapGroupsForSysAuth Boolean
    Whether or not the export should use ID mapping for Unix groups rather than the group list provided within an NFS request's RPC header. When this flag is true the Unix UID from the RPC header is used to retrieve the list of secondary groups from a the ID mapping subsystem. The primary GID is always taken from the RPC header. If ID mapping is not configured, incorrectly configured, unavailable, or cannot be used to determine a list of secondary groups then an empty secondary group list is used for authorization. If the number of groups exceeds the limit of 256 groups, the list retrieved from LDAP is truncated to the first 256 groups read.
    path String
    Path used to access the associated file system.
    state String
    Filter results by the specified lifecycle state. Must be a valid state for the resource type.
    timeCreated String
    The date and time the export was created, expressed in RFC 3339 timestamp format. Example: 2016-08-25T21:10:29.600Z

    GetExportsExportExportOption

    Access string
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    AllowedAuths List<string>
    Array of allowed NFS authentication types.
    AnonymousGid string
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    AnonymousUid string
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    IdentitySquash string
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    IsAnonymousAccessAllowed bool
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    RequirePrivilegedSourcePort bool
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    Source string
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
    Access string
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    AllowedAuths []string
    Array of allowed NFS authentication types.
    AnonymousGid string
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    AnonymousUid string
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    IdentitySquash string
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    IsAnonymousAccessAllowed bool
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    RequirePrivilegedSourcePort bool
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    Source string
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
    access String
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    allowedAuths List<String>
    Array of allowed NFS authentication types.
    anonymousGid String
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    anonymousUid String
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    identitySquash String
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    isAnonymousAccessAllowed Boolean
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    requirePrivilegedSourcePort Boolean
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    source String
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
    access string
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    allowedAuths string[]
    Array of allowed NFS authentication types.
    anonymousGid string
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    anonymousUid string
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    identitySquash string
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    isAnonymousAccessAllowed boolean
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    requirePrivilegedSourcePort boolean
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    source string
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
    access str
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    allowed_auths Sequence[str]
    Array of allowed NFS authentication types.
    anonymous_gid str
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    anonymous_uid str
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    identity_squash str
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    is_anonymous_access_allowed bool
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    require_privileged_source_port bool
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    source str
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.
    access String
    Type of access to grant clients using the file system through this export. If unspecified defaults to READ_WRITE.
    allowedAuths List<String>
    Array of allowed NFS authentication types.
    anonymousGid String
    GID value to remap to when squashing a client GID (see identitySquash for more details.) If unspecified defaults to 65534.
    anonymousUid String
    UID value to remap to when squashing a client UID (see identitySquash for more details.) If unspecified, defaults to 65534.
    identitySquash String
    Used when clients accessing the file system through this export have their UID and GID remapped to 'anonymousUid' and 'anonymousGid'. If ALL, all users and groups are remapped; if ROOT, only the root user and group (UID/GID 0) are remapped; if NONE, no remapping is done. If unspecified, defaults to ROOT.
    isAnonymousAccessAllowed Boolean
    Whether or not to enable anonymous access to the file system through this export in cases where a user isn't found in the LDAP server used for ID mapping. If true, and the user is not found in the LDAP directory, the operation uses the Squash UID and Squash GID.
    requirePrivilegedSourcePort Boolean
    If true, clients accessing the file system through this export must connect from a privileged source port. If unspecified, defaults to true.
    source String
    Clients these options should apply to. Must be a either single IPv4 address or single IPv4 CIDR block.

    GetExportsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi