oci logo
Oracle Cloud Infrastructure v0.13.0, Mar 28 23

oci.FileStorage.getExports

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

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testExports = Oci.FileStorage.GetExports.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        ExportSetId = oci_file_storage_export_set.Test_export_set.Id,
        FileSystemId = oci_file_storage_file_system.Test_file_system.Id,
        Id = @var.Export_id,
        State = @var.Export_state,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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(_var.Compartment_id),
			ExportSetId:   pulumi.StringRef(oci_file_storage_export_set.Test_export_set.Id),
			FileSystemId:  pulumi.StringRef(oci_file_storage_file_system.Test_file_system.Id),
			Id:            pulumi.StringRef(_var.Export_id),
			State:         pulumi.StringRef(_var.Export_state),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(var_.compartment_id())
            .exportSetId(oci_file_storage_export_set.test_export_set().id())
            .fileSystemId(oci_file_storage_file_system.test_file_system().id())
            .id(var_.export_id())
            .state(var_.export_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_exports = oci.FileStorage.get_exports(compartment_id=var["compartment_id"],
    export_set_id=oci_file_storage_export_set["test_export_set"]["id"],
    file_system_id=oci_file_storage_file_system["test_file_system"]["id"],
    id=var["export_id"],
    state=var["export_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testExports = oci.FileStorage.getExports({
    compartmentId: _var.compartment_id,
    exportSetId: oci_file_storage_export_set.test_export_set.id,
    fileSystemId: oci_file_storage_file_system.test_file_system.id,
    id: _var.export_id,
    state: _var.export_state,
});
variables:
  testExports:
    fn::invoke:
      Function: oci:FileStorage:getExports
      Arguments:
        compartmentId: ${var.compartment_id}
        exportSetId: ${oci_file_storage_export_set.test_export_set.id}
        fileSystemId: ${oci_file_storage_file_system.test_file_system.id}
        id: ${var.export_id}
        state: ${var.export_state}

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 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 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 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.

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.

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.

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.

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 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.

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.

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_ONLY.

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.

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_ONLY.

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.

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_ONLY.

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.

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_ONLY.

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.

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_ONLY.

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.

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_ONLY.

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.

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.