oci.FileStorage.getMountTargets
This data source provides the list of Mount Targets in Oracle Cloud Infrastructure File Storage service.
Lists the mount target resources in the specified compartment.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testMountTargets = Oci.FileStorage.GetMountTargets.Invoke(new()
{
AvailabilityDomain = @var.Mount_target_availability_domain,
CompartmentId = @var.Compartment_id,
DisplayName = @var.Mount_target_display_name,
ExportSetId = oci_file_storage_export_set.Test_export_set.Id,
Id = @var.Mount_target_id,
State = @var.Mount_target_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.GetMountTargets(ctx, &filestorage.GetMountTargetsArgs{
AvailabilityDomain: _var.Mount_target_availability_domain,
CompartmentId: _var.Compartment_id,
DisplayName: pulumi.StringRef(_var.Mount_target_display_name),
ExportSetId: pulumi.StringRef(oci_file_storage_export_set.Test_export_set.Id),
Id: pulumi.StringRef(_var.Mount_target_id),
State: pulumi.StringRef(_var.Mount_target_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.GetMountTargetsArgs;
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 testMountTargets = FileStorageFunctions.getMountTargets(GetMountTargetsArgs.builder()
.availabilityDomain(var_.mount_target_availability_domain())
.compartmentId(var_.compartment_id())
.displayName(var_.mount_target_display_name())
.exportSetId(oci_file_storage_export_set.test_export_set().id())
.id(var_.mount_target_id())
.state(var_.mount_target_state())
.build());
}
}
import pulumi
import pulumi_oci as oci
test_mount_targets = oci.FileStorage.get_mount_targets(availability_domain=var["mount_target_availability_domain"],
compartment_id=var["compartment_id"],
display_name=var["mount_target_display_name"],
export_set_id=oci_file_storage_export_set["test_export_set"]["id"],
id=var["mount_target_id"],
state=var["mount_target_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testMountTargets = oci.FileStorage.getMountTargets({
availabilityDomain: _var.mount_target_availability_domain,
compartmentId: _var.compartment_id,
displayName: _var.mount_target_display_name,
exportSetId: oci_file_storage_export_set.test_export_set.id,
id: _var.mount_target_id,
state: _var.mount_target_state,
});
variables:
testMountTargets:
fn::invoke:
Function: oci:FileStorage:getMountTargets
Arguments:
availabilityDomain: ${var.mount_target_availability_domain}
compartmentId: ${var.compartment_id}
displayName: ${var.mount_target_display_name}
exportSetId: ${oci_file_storage_export_set.test_export_set.id}
id: ${var.mount_target_id}
state: ${var.mount_target_state}
Using getMountTargets
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 getMountTargets(args: GetMountTargetsArgs, opts?: InvokeOptions): Promise<GetMountTargetsResult>
function getMountTargetsOutput(args: GetMountTargetsOutputArgs, opts?: InvokeOptions): Output<GetMountTargetsResult>
def get_mount_targets(availability_domain: Optional[str] = None,
compartment_id: Optional[str] = None,
display_name: Optional[str] = None,
export_set_id: Optional[str] = None,
filters: Optional[Sequence[_filestorage.GetMountTargetsFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMountTargetsResult
def get_mount_targets_output(availability_domain: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
display_name: Optional[pulumi.Input[str]] = None,
export_set_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_filestorage.GetMountTargetsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetMountTargetsResult]
func GetMountTargets(ctx *Context, args *GetMountTargetsArgs, opts ...InvokeOption) (*GetMountTargetsResult, error)
func GetMountTargetsOutput(ctx *Context, args *GetMountTargetsOutputArgs, opts ...InvokeOption) GetMountTargetsResultOutput
> Note: This function is named GetMountTargets
in the Go SDK.
public static class GetMountTargets
{
public static Task<GetMountTargetsResult> InvokeAsync(GetMountTargetsArgs args, InvokeOptions? opts = null)
public static Output<GetMountTargetsResult> Invoke(GetMountTargetsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetMountTargetsResult> getMountTargets(GetMountTargetsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:FileStorage/getMountTargets:getMountTargets
arguments:
# arguments dictionary
The following arguments are supported:
- Availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- Export
Set stringId The OCID of the export set.
- Filters
List<Get
Mount Targets Filter> - 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.
- Availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- Export
Set stringId The OCID of the export set.
- Filters
[]Get
Mount Targets Filter - 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.
- availability
Domain String The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set StringId The OCID of the export set.
- filters
List<Get
Mount Targets Filter> - 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.
- availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID of the compartment.
- display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set stringId The OCID of the export set.
- filters
Get
Mount Targets Filter[] - 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.
- availability_
domain str The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment_
id str The OCID of the compartment.
- display_
name str A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export_
set_ strid The OCID of the export set.
- filters
Get
Mount Targets Filter] - 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.
- availability
Domain String The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set StringId The OCID of the export set.
- 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.
getMountTargets Result
The following output properties are available:
- Availability
Domain string The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment that contains the mount target.
- Mount
Targets List<GetMount Targets Mount Target> The list of mount_targets.
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- Export
Set stringId The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- Filters
List<Get
Mount Targets Filter> - Id string
The OCID of the mount target.
- State string
The current state of the mount target.
- Availability
Domain string The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment that contains the mount target.
- Mount
Targets []GetMount Targets Mount Target The list of mount_targets.
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- Export
Set stringId The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- Filters
[]Get
Mount Targets Filter - Id string
The OCID of the mount target.
- State string
The current state of the mount target.
- availability
Domain String The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment that contains the mount target.
- mount
Targets List<GetMount Targets Mount Target> The list of mount_targets.
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- export
Set StringId The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- filters
List<Get
Mount Targets Filter> - id String
The OCID of the mount target.
- state String
The current state of the mount target.
- availability
Domain string The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID of the compartment that contains the mount target.
- mount
Targets GetMount Targets Mount Target[] The list of mount_targets.
- display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- export
Set stringId The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- filters
Get
Mount Targets Filter[] - id string
The OCID of the mount target.
- state string
The current state of the mount target.
- availability_
domain str The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- compartment_
id str The OCID of the compartment that contains the mount target.
- mount_
targets GetMount Targets Mount Target] The list of mount_targets.
- display_
name str A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- export_
set_ strid The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- filters
Get
Mount Targets Filter] - id str
The OCID of the mount target.
- state str
The current state of the mount target.
- availability
Domain String The availability domain the mount target is in. May be unset as a blank or NULL value. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment that contains the mount target.
- mount
Targets List<Property Map> The list of mount_targets.
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Avoid entering confidential information. Example:
My mount target
- export
Set StringId The OCID of the associated export set. Controls what file systems will be exported through Network File System (NFS) protocol on this mount target.
- filters List<Property Map>
- id String
The OCID of the mount target.
- state String
The current state of the mount target.
Supporting Types
GetMountTargetsFilter
GetMountTargetsMountTarget
- Availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- Dictionary<string, object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- Export
Set stringId The OCID of the export set.
- Dictionary<string, object>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Hostname
Label string - Id string
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- Ip
Address string - Lifecycle
Details string Additional information about the current 'lifecycleState'.
- Nsg
Ids List<string> A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- Private
Ip List<string>Ids The OCIDs of the private IP addresses associated with this mount target.
- State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- Subnet
Id string The OCID of the subnet the mount target is in.
- Time
Created string The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- Availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID of the compartment.
- map[string]interface{}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- Export
Set stringId The OCID of the export set.
- map[string]interface{}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Hostname
Label string - Id string
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- Ip
Address string - Lifecycle
Details string Additional information about the current 'lifecycleState'.
- Nsg
Ids []string A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- Private
Ip []stringIds The OCIDs of the private IP addresses associated with this mount target.
- State string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- Subnet
Id string The OCID of the subnet the mount target is in.
- Time
Created string The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- Map<String,Object>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set StringId The OCID of the export set.
- Map<String,Object>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- hostname
Label String - id String
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- ip
Address String - lifecycle
Details String Additional information about the current 'lifecycleState'.
- nsg
Ids List<String> A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- private
Ip List<String>Ids The OCIDs of the private IP addresses associated with this mount target.
- state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- subnet
Id String The OCID of the subnet the mount target is in.
- time
Created String The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- availability
Domain string The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID of the compartment.
- {[key: string]: any}
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name string A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set stringId The OCID of the export set.
- {[key: string]: any}
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- hostname
Label string - id string
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- ip
Address string - lifecycle
Details string Additional information about the current 'lifecycleState'.
- nsg
Ids string[] A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- private
Ip string[]Ids The OCIDs of the private IP addresses associated with this mount target.
- state string
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- subnet
Id string The OCID of the subnet the mount target is in.
- time
Created string The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- availability_
domain str The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment_
id str The OCID of the compartment.
- Mapping[str, Any]
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display_
name str A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export_
set_ strid The OCID of the export set.
- Mapping[str, Any]
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- hostname_
label str - id str
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- ip_
address str - lifecycle_
details str Additional information about the current 'lifecycleState'.
- nsg_
ids Sequence[str] A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- private_
ip_ Sequence[str]ids The OCIDs of the private IP addresses associated with this mount target.
- state str
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- subnet_
id str The OCID of the subnet the mount target is in.
- time_
created str The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
- availability
Domain String The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID of the compartment.
- Map<Any>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- display
Name String A user-friendly name. It does not have to be unique, and it is changeable. Example:
My resource
- export
Set StringId The OCID of the export set.
- Map<Any>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- hostname
Label String - id String
Filter results by OCID. Must be an OCID of the correct type for the resouce type.
- ip
Address String - lifecycle
Details String Additional information about the current 'lifecycleState'.
- nsg
Ids List<String> A list of Network Security Group OCIDs associated with this mount target. A maximum of 5 is allowed. Setting this to an empty array after the list is created removes the mount target from all NSGs. For more information about NSGs, see Security Rules.
- private
Ip List<String>Ids The OCIDs of the private IP addresses associated with this mount target.
- state String
Filter results by the specified lifecycle state. Must be a valid state for the resource type.
- subnet
Id String The OCID of the subnet the mount target is in.
- time
Created String The date and time the mount target was created, expressed in RFC 3339 timestamp format. Example:
2016-08-25T21:10:29.600Z
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.