1. Packages
  2. AWS Classic
  3. API Docs
  4. datasync
  5. NfsLocation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.datasync.NfsLocation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Manages an NFS Location within AWS DataSync.

    NOTE: The DataSync Agents must be available before creating this resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.datasync.NfsLocation("example", {
        serverHostname: "nfs.example.com",
        subdirectory: "/exported/path",
        onPremConfig: {
            agentArns: [exampleAwsDatasyncAgent.arn],
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.datasync.NfsLocation("example",
        server_hostname="nfs.example.com",
        subdirectory="/exported/path",
        on_prem_config={
            "agentArns": [example_aws_datasync_agent["arn"]],
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datasync.NewNfsLocation(ctx, "example", &datasync.NfsLocationArgs{
    			ServerHostname: pulumi.String("nfs.example.com"),
    			Subdirectory:   pulumi.String("/exported/path"),
    			OnPremConfig: &datasync.NfsLocationOnPremConfigArgs{
    				AgentArns: pulumi.StringArray{
    					exampleAwsDatasyncAgent.Arn,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.DataSync.NfsLocation("example", new()
        {
            ServerHostname = "nfs.example.com",
            Subdirectory = "/exported/path",
            OnPremConfig = new Aws.DataSync.Inputs.NfsLocationOnPremConfigArgs
            {
                AgentArns = new[]
                {
                    exampleAwsDatasyncAgent.Arn,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.datasync.NfsLocation;
    import com.pulumi.aws.datasync.NfsLocationArgs;
    import com.pulumi.aws.datasync.inputs.NfsLocationOnPremConfigArgs;
    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) {
            var example = new NfsLocation("example", NfsLocationArgs.builder()
                .serverHostname("nfs.example.com")
                .subdirectory("/exported/path")
                .onPremConfig(NfsLocationOnPremConfigArgs.builder()
                    .agentArns(exampleAwsDatasyncAgent.arn())
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:datasync:NfsLocation
        properties:
          serverHostname: nfs.example.com
          subdirectory: /exported/path
          onPremConfig:
            agentArns:
              - ${exampleAwsDatasyncAgent.arn}
    

    Create NfsLocation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NfsLocation(name: string, args: NfsLocationArgs, opts?: CustomResourceOptions);
    @overload
    def NfsLocation(resource_name: str,
                    args: NfsLocationArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NfsLocation(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    on_prem_config: Optional[NfsLocationOnPremConfigArgs] = None,
                    server_hostname: Optional[str] = None,
                    subdirectory: Optional[str] = None,
                    mount_options: Optional[NfsLocationMountOptionsArgs] = None,
                    tags: Optional[Mapping[str, str]] = None)
    func NewNfsLocation(ctx *Context, name string, args NfsLocationArgs, opts ...ResourceOption) (*NfsLocation, error)
    public NfsLocation(string name, NfsLocationArgs args, CustomResourceOptions? opts = null)
    public NfsLocation(String name, NfsLocationArgs args)
    public NfsLocation(String name, NfsLocationArgs args, CustomResourceOptions options)
    
    type: aws:datasync:NfsLocation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NfsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NfsLocationArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NfsLocationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NfsLocationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NfsLocationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var nfsLocationResource = new Aws.DataSync.NfsLocation("nfsLocationResource", new()
    {
        OnPremConfig = new Aws.DataSync.Inputs.NfsLocationOnPremConfigArgs
        {
            AgentArns = new[]
            {
                "string",
            },
        },
        ServerHostname = "string",
        Subdirectory = "string",
        MountOptions = new Aws.DataSync.Inputs.NfsLocationMountOptionsArgs
        {
            Version = "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := datasync.NewNfsLocation(ctx, "nfsLocationResource", &datasync.NfsLocationArgs{
    	OnPremConfig: &datasync.NfsLocationOnPremConfigArgs{
    		AgentArns: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	ServerHostname: pulumi.String("string"),
    	Subdirectory:   pulumi.String("string"),
    	MountOptions: &datasync.NfsLocationMountOptionsArgs{
    		Version: pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var nfsLocationResource = new NfsLocation("nfsLocationResource", NfsLocationArgs.builder()
        .onPremConfig(NfsLocationOnPremConfigArgs.builder()
            .agentArns("string")
            .build())
        .serverHostname("string")
        .subdirectory("string")
        .mountOptions(NfsLocationMountOptionsArgs.builder()
            .version("string")
            .build())
        .tags(Map.of("string", "string"))
        .build());
    
    nfs_location_resource = aws.datasync.NfsLocation("nfsLocationResource",
        on_prem_config={
            "agentArns": ["string"],
        },
        server_hostname="string",
        subdirectory="string",
        mount_options={
            "version": "string",
        },
        tags={
            "string": "string",
        })
    
    const nfsLocationResource = new aws.datasync.NfsLocation("nfsLocationResource", {
        onPremConfig: {
            agentArns: ["string"],
        },
        serverHostname: "string",
        subdirectory: "string",
        mountOptions: {
            version: "string",
        },
        tags: {
            string: "string",
        },
    });
    
    type: aws:datasync:NfsLocation
    properties:
        mountOptions:
            version: string
        onPremConfig:
            agentArns:
                - string
        serverHostname: string
        subdirectory: string
        tags:
            string: string
    

    NfsLocation Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The NfsLocation resource accepts the following input properties:

    OnPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    ServerHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    Subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    MountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    Tags Dictionary<string, string>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    OnPremConfig NfsLocationOnPremConfigArgs
    Configuration block containing information for connecting to the NFS File System.
    ServerHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    Subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    MountOptions NfsLocationMountOptionsArgs
    Configuration block containing mount options used by DataSync to access the NFS Server.
    Tags map[string]string
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    onPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    serverHostname String
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory String
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    mountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    tags Map<String,String>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    onPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    serverHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    mountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    tags {[key: string]: string}
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    on_prem_config NfsLocationOnPremConfigArgs
    Configuration block containing information for connecting to the NFS File System.
    server_hostname str
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory str
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    mount_options NfsLocationMountOptionsArgs
    Configuration block containing mount options used by DataSync to access the NFS Server.
    tags Mapping[str, str]
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    onPremConfig Property Map
    Configuration block containing information for connecting to the NFS File System.
    serverHostname String
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory String
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    mountOptions Property Map
    Configuration block containing mount options used by DataSync to access the NFS Server.
    tags Map<String>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NfsLocation resource produces the following output properties:

    Arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Uri string
    Arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Uri string
    arn String
    Amazon Resource Name (ARN) of the DataSync Location.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri String
    arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri string
    arn str
    Amazon Resource Name (ARN) of the DataSync Location.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri str
    arn String
    Amazon Resource Name (ARN) of the DataSync Location.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri String

    Look up Existing NfsLocation Resource

    Get an existing NfsLocation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NfsLocationState, opts?: CustomResourceOptions): NfsLocation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            mount_options: Optional[NfsLocationMountOptionsArgs] = None,
            on_prem_config: Optional[NfsLocationOnPremConfigArgs] = None,
            server_hostname: Optional[str] = None,
            subdirectory: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            uri: Optional[str] = None) -> NfsLocation
    func GetNfsLocation(ctx *Context, name string, id IDInput, state *NfsLocationState, opts ...ResourceOption) (*NfsLocation, error)
    public static NfsLocation Get(string name, Input<string> id, NfsLocationState? state, CustomResourceOptions? opts = null)
    public static NfsLocation get(String name, Output<String> id, NfsLocationState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    MountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    OnPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    ServerHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    Subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    Tags Dictionary<string, string>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Uri string
    Arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    MountOptions NfsLocationMountOptionsArgs
    Configuration block containing mount options used by DataSync to access the NFS Server.
    OnPremConfig NfsLocationOnPremConfigArgs
    Configuration block containing information for connecting to the NFS File System.
    ServerHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    Subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    Tags map[string]string
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Uri string
    arn String
    Amazon Resource Name (ARN) of the DataSync Location.
    mountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    onPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    serverHostname String
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory String
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    tags Map<String,String>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri String
    arn string
    Amazon Resource Name (ARN) of the DataSync Location.
    mountOptions NfsLocationMountOptions
    Configuration block containing mount options used by DataSync to access the NFS Server.
    onPremConfig NfsLocationOnPremConfig
    Configuration block containing information for connecting to the NFS File System.
    serverHostname string
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory string
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    tags {[key: string]: string}
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri string
    arn str
    Amazon Resource Name (ARN) of the DataSync Location.
    mount_options NfsLocationMountOptionsArgs
    Configuration block containing mount options used by DataSync to access the NFS Server.
    on_prem_config NfsLocationOnPremConfigArgs
    Configuration block containing information for connecting to the NFS File System.
    server_hostname str
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory str
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    tags Mapping[str, str]
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri str
    arn String
    Amazon Resource Name (ARN) of the DataSync Location.
    mountOptions Property Map
    Configuration block containing mount options used by DataSync to access the NFS Server.
    onPremConfig Property Map
    Configuration block containing information for connecting to the NFS File System.
    serverHostname String
    Specifies the IP address or DNS name of the NFS server. The DataSync Agent(s) use this to mount the NFS server.
    subdirectory String
    Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
    tags Map<String>
    Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    uri String

    Supporting Types

    NfsLocationMountOptions, NfsLocationMountOptionsArgs

    Version string
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC
    Version string
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC
    version String
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC
    version string
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC
    version str
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC
    version String
    The specific NFS version that you want DataSync to use for mounting your NFS share. Valid values: AUTOMATIC, NFS3, NFS4_0 and NFS4_1. Default: AUTOMATIC

    NfsLocationOnPremConfig, NfsLocationOnPremConfigArgs

    AgentArns List<string>
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
    AgentArns []string
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
    agentArns List<String>
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
    agentArns string[]
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
    agent_arns Sequence[str]
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
    agentArns List<String>
    List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.

    Import

    Using pulumi import, import aws_datasync_location_nfs using the DataSync Task Amazon Resource Name (ARN). For example:

    $ pulumi import aws:datasync/nfsLocation:NfsLocation example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi