NfsLocation
Manages an NFS Location within AWS DataSync.
NOTE: The DataSync Agents must be available before creating this resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.DataSync.NfsLocation("example", new Aws.DataSync.NfsLocationArgs
{
OnPremConfig = new Aws.DataSync.Inputs.NfsLocationOnPremConfigArgs
{
AgentArns =
{
aws_datasync_agent.Example.Arn,
},
},
ServerHostname = "nfs.example.com",
Subdirectory = "/exported/path",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/datasync"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := datasync.NewNfsLocation(ctx, "example", &datasync.NfsLocationArgs{
OnPremConfig: &datasync.NfsLocationOnPremConfigArgs{
AgentArns: pulumi.StringArray{
pulumi.String(aws_datasync_agent.Example.Arn),
},
},
ServerHostname: pulumi.String("nfs.example.com"),
Subdirectory: pulumi.String("/exported/path"),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.datasync.NfsLocation("example",
on_prem_config={
"agent_arns": [aws_datasync_agent["example"]["arn"]],
},
server_hostname="nfs.example.com",
subdirectory="/exported/path")import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.datasync.NfsLocation("example", {
onPremConfig: {
agentArns: [aws_datasync_agent_example.arn],
},
serverHostname: "nfs.example.com",
subdirectory: "/exported/path",
});Create a NfsLocation Resource
new NfsLocation(name: string, args: NfsLocationArgs, opts?: CustomResourceOptions);def NfsLocation(resource_name, opts=None, on_prem_config=None, server_hostname=None, subdirectory=None, tags=None, __props__=None);func NewNfsLocation(ctx *Context, name string, args NfsLocationArgs, opts ...ResourceOption) (*NfsLocation, error)public NfsLocation(string name, NfsLocationArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
NfsLocation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The NfsLocation resource accepts the following input properties:
- 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.
- Dictionary<string, string>
Key-value pairs of resource tags to assign to the DataSync Location.
- 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.
- 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.
- on_
prem_ Dict[Nfsconfig Location On Prem Config] 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.
- Dict[str, str]
Key-value pairs of resource tags to assign to the DataSync Location.
Outputs
All input properties are implicitly available as output properties. Additionally, the NfsLocation resource produces the following output properties:
Look up an 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): NfsLocationstatic get(resource_name, id, opts=None, arn=None, on_prem_config=None, server_hostname=None, subdirectory=None, tags=None, uri=None, __props__=None);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)- 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.
The following state arguments are supported:
- Arn string
Amazon Resource Name (ARN) of the DataSync Location.
- 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.
- Dictionary<string, string>
Key-value pairs of resource tags to assign to the DataSync Location.
- Uri string
- Arn string
Amazon Resource Name (ARN) of the DataSync Location.
- 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.
- Uri string
- arn string
Amazon Resource Name (ARN) of the DataSync Location.
- 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.
- uri string
- arn str
Amazon Resource Name (ARN) of the DataSync Location.
- on_
prem_ Dict[Nfsconfig Location On Prem Config] 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.
- Dict[str, str]
Key-value pairs of resource tags to assign to the DataSync Location.
- uri str
Supporting Types
NfsLocationOnPremConfig
- Agent
Arns List<string> List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
- agent_
arns List[str] List of Amazon Resource Names (ARNs) of the DataSync Agents used to connect to the NFS server.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.