Try AWS Native preview for resources not in the classic version.
aws.datasync.NfsLocation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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:
- On
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- Server
Hostname 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.
- Mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- 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.
- On
Prem NfsConfig Location On Prem Config Args - Configuration block containing information for connecting to the NFS File System.
- Server
Hostname 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.
- Mount
Options NfsLocation Mount Options Args - Configuration block containing mount options used by DataSync to access the NFS Server.
- 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.
- on
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- 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.
- on
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- {[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_ Nfsconfig Location On Prem Config Args - 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 NfsLocation Mount Options Args - Configuration block containing mount options used by DataSync to access the NFS Server.
- 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.
- on
Prem Property MapConfig - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- mount
Options Property Map - Configuration block containing mount options used by DataSync to access the NFS Server.
- 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:
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.
- Arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- Mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- On
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- Server
Hostname 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.
- 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. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Uri string
- Arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- Mount
Options NfsLocation Mount Options Args - Configuration block containing mount options used by DataSync to access the NFS Server.
- On
Prem NfsConfig Location On Prem Config Args - Configuration block containing information for connecting to the NFS File System.
- Server
Hostname 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.
- 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. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - Uri string
- arn String
- Amazon Resource Name (ARN) of the DataSync Location.
- mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- on
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- 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. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - uri String
- arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- mount
Options NfsLocation Mount Options - Configuration block containing mount options used by DataSync to access the NFS Server.
- on
Prem NfsConfig Location On Prem Config - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- {[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. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - uri string
- arn str
- Amazon Resource Name (ARN) of the DataSync Location.
- mount_
options NfsLocation Mount Options Args - Configuration block containing mount options used by DataSync to access the NFS Server.
- on_
prem_ Nfsconfig Location On Prem Config Args - 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.
- 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. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - uri str
- arn String
- Amazon Resource Name (ARN) of the DataSync Location.
- mount
Options Property Map - Configuration block containing mount options used by DataSync to access the NFS Server.
- on
Prem Property MapConfig - Configuration block containing information for connecting to the NFS File System.
- server
Hostname 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.
- 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. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - 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
andNFS4_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
andNFS4_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
andNFS4_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
andNFS4_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
andNFS4_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
andNFS4_1
. Default:AUTOMATIC
NfsLocationOnPremConfig, NfsLocationOnPremConfigArgs
- Agent
Arns List<string> - List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
- Agent
Arns []string - List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
- agent
Arns List<String> - List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
- agent
Arns 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.
- agent
Arns 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.
Try AWS Native preview for resources not in the classic version.