aws.datasync.LocationSmb
Explore with Pulumi AI
Manages a SMB 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.LocationSmb("example", {
serverHostname: "smb.example.com",
subdirectory: "/exported/path",
user: "Guest",
password: "ANotGreatPassword",
agentArns: [exampleAwsDatasyncAgent.arn],
});
import pulumi
import pulumi_aws as aws
example = aws.datasync.LocationSmb("example",
server_hostname="smb.example.com",
subdirectory="/exported/path",
user="Guest",
password="ANotGreatPassword",
agent_arns=[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.NewLocationSmb(ctx, "example", &datasync.LocationSmbArgs{
ServerHostname: pulumi.String("smb.example.com"),
Subdirectory: pulumi.String("/exported/path"),
User: pulumi.String("Guest"),
Password: pulumi.String("ANotGreatPassword"),
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.LocationSmb("example", new()
{
ServerHostname = "smb.example.com",
Subdirectory = "/exported/path",
User = "Guest",
Password = "ANotGreatPassword",
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.LocationSmb;
import com.pulumi.aws.datasync.LocationSmbArgs;
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 LocationSmb("example", LocationSmbArgs.builder()
.serverHostname("smb.example.com")
.subdirectory("/exported/path")
.user("Guest")
.password("ANotGreatPassword")
.agentArns(exampleAwsDatasyncAgent.arn())
.build());
}
}
resources:
example:
type: aws:datasync:LocationSmb
properties:
serverHostname: smb.example.com
subdirectory: /exported/path
user: Guest
password: ANotGreatPassword
agentArns:
- ${exampleAwsDatasyncAgent.arn}
Create LocationSmb Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LocationSmb(name: string, args: LocationSmbArgs, opts?: CustomResourceOptions);
@overload
def LocationSmb(resource_name: str,
args: LocationSmbArgs,
opts: Optional[ResourceOptions] = None)
@overload
def LocationSmb(resource_name: str,
opts: Optional[ResourceOptions] = None,
agent_arns: Optional[Sequence[str]] = None,
password: Optional[str] = None,
server_hostname: Optional[str] = None,
subdirectory: Optional[str] = None,
user: Optional[str] = None,
domain: Optional[str] = None,
mount_options: Optional[LocationSmbMountOptionsArgs] = None,
tags: Optional[Mapping[str, str]] = None)
func NewLocationSmb(ctx *Context, name string, args LocationSmbArgs, opts ...ResourceOption) (*LocationSmb, error)
public LocationSmb(string name, LocationSmbArgs args, CustomResourceOptions? opts = null)
public LocationSmb(String name, LocationSmbArgs args)
public LocationSmb(String name, LocationSmbArgs args, CustomResourceOptions options)
type: aws:datasync:LocationSmb
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 LocationSmbArgs
- 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 LocationSmbArgs
- 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 LocationSmbArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LocationSmbArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LocationSmbArgs
- 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 locationSmbResource = new Aws.DataSync.LocationSmb("locationSmbResource", new()
{
AgentArns = new[]
{
"string",
},
Password = "string",
ServerHostname = "string",
Subdirectory = "string",
User = "string",
Domain = "string",
MountOptions = new Aws.DataSync.Inputs.LocationSmbMountOptionsArgs
{
Version = "string",
},
Tags =
{
{ "string", "string" },
},
});
example, err := datasync.NewLocationSmb(ctx, "locationSmbResource", &datasync.LocationSmbArgs{
AgentArns: pulumi.StringArray{
pulumi.String("string"),
},
Password: pulumi.String("string"),
ServerHostname: pulumi.String("string"),
Subdirectory: pulumi.String("string"),
User: pulumi.String("string"),
Domain: pulumi.String("string"),
MountOptions: &datasync.LocationSmbMountOptionsArgs{
Version: pulumi.String("string"),
},
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var locationSmbResource = new LocationSmb("locationSmbResource", LocationSmbArgs.builder()
.agentArns("string")
.password("string")
.serverHostname("string")
.subdirectory("string")
.user("string")
.domain("string")
.mountOptions(LocationSmbMountOptionsArgs.builder()
.version("string")
.build())
.tags(Map.of("string", "string"))
.build());
location_smb_resource = aws.datasync.LocationSmb("locationSmbResource",
agent_arns=["string"],
password="string",
server_hostname="string",
subdirectory="string",
user="string",
domain="string",
mount_options={
"version": "string",
},
tags={
"string": "string",
})
const locationSmbResource = new aws.datasync.LocationSmb("locationSmbResource", {
agentArns: ["string"],
password: "string",
serverHostname: "string",
subdirectory: "string",
user: "string",
domain: "string",
mountOptions: {
version: "string",
},
tags: {
string: "string",
},
});
type: aws:datasync:LocationSmb
properties:
agentArns:
- string
domain: string
mountOptions:
version: string
password: string
serverHostname: string
subdirectory: string
tags:
string: string
user: string
LocationSmb Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The LocationSmb resource accepts the following input properties:
- Agent
Arns List<string> - A list of DataSync Agent ARNs with which this location will be associated.
- Password string
- The password of the user who can mount the share and has file permissions in the SMB.
- Server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- Subdirectory string
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- User string
- The user who can mount the share and has file and folder permissions in the SMB share.
- Domain string
- The name of the Windows domain the SMB server belongs to.
- Mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - 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.
- Agent
Arns []string - A list of DataSync Agent ARNs with which this location will be associated.
- Password string
- The password of the user who can mount the share and has file permissions in the SMB.
- Server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- Subdirectory string
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- User string
- The user who can mount the share and has file and folder permissions in the SMB share.
- Domain string
- The name of the Windows domain the SMB server belongs to.
- Mount
Options LocationSmb Mount Options Args - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - 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.
- agent
Arns List<String> - A list of DataSync Agent ARNs with which this location will be associated.
- password String
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname String - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- subdirectory String
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- user String
- The user who can mount the share and has file and folder permissions in the SMB share.
- domain String
- The name of the Windows domain the SMB server belongs to.
- mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - 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.
- agent
Arns string[] - A list of DataSync Agent ARNs with which this location will be associated.
- password string
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- subdirectory string
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- user string
- The user who can mount the share and has file and folder permissions in the SMB share.
- domain string
- The name of the Windows domain the SMB server belongs to.
- mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - {[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.
- agent_
arns Sequence[str] - A list of DataSync Agent ARNs with which this location will be associated.
- password str
- The password of the user who can mount the share and has file permissions in the SMB.
- server_
hostname str - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- subdirectory str
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- user str
- The user who can mount the share and has file and folder permissions in the SMB share.
- domain str
- The name of the Windows domain the SMB server belongs to.
- mount_
options LocationSmb Mount Options Args - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - 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.
- agent
Arns List<String> - A list of DataSync Agent ARNs with which this location will be associated.
- password String
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname String - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- subdirectory String
- Subdirectory to perform actions as source or destination. Should be exported by the NFS server.
- user String
- The user who can mount the share and has file and folder permissions in the SMB share.
- domain String
- The name of the Windows domain the SMB server belongs to.
- mount
Options Property Map - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - 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 LocationSmb resource produces the following output properties:
Look up Existing LocationSmb Resource
Get an existing LocationSmb 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?: LocationSmbState, opts?: CustomResourceOptions): LocationSmb
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
agent_arns: Optional[Sequence[str]] = None,
arn: Optional[str] = None,
domain: Optional[str] = None,
mount_options: Optional[LocationSmbMountOptionsArgs] = None,
password: Optional[str] = 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,
user: Optional[str] = None) -> LocationSmb
func GetLocationSmb(ctx *Context, name string, id IDInput, state *LocationSmbState, opts ...ResourceOption) (*LocationSmb, error)
public static LocationSmb Get(string name, Input<string> id, LocationSmbState? state, CustomResourceOptions? opts = null)
public static LocationSmb get(String name, Output<String> id, LocationSmbState 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.
- Agent
Arns List<string> - A list of DataSync Agent ARNs with which this location will be associated.
- Arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- Domain string
- The name of the Windows domain the SMB server belongs to.
- Mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - Password string
- The password of the user who can mount the share and has file permissions in the SMB.
- Server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- User string
- The user who can mount the share and has file and folder permissions in the SMB share.
- Agent
Arns []string - A list of DataSync Agent ARNs with which this location will be associated.
- Arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- Domain string
- The name of the Windows domain the SMB server belongs to.
- Mount
Options LocationSmb Mount Options Args - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - Password string
- The password of the user who can mount the share and has file permissions in the SMB.
- Server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- User string
- The user who can mount the share and has file and folder permissions in the SMB share.
- agent
Arns List<String> - A list of DataSync Agent ARNs with which this location will be associated.
- arn String
- Amazon Resource Name (ARN) of the DataSync Location.
- domain String
- The name of the Windows domain the SMB server belongs to.
- mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - password String
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname String - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- user String
- The user who can mount the share and has file and folder permissions in the SMB share.
- agent
Arns string[] - A list of DataSync Agent ARNs with which this location will be associated.
- arn string
- Amazon Resource Name (ARN) of the DataSync Location.
- domain string
- The name of the Windows domain the SMB server belongs to.
- mount
Options LocationSmb Mount Options - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - password string
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname string - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- user string
- The user who can mount the share and has file and folder permissions in the SMB share.
- agent_
arns Sequence[str] - A list of DataSync Agent ARNs with which this location will be associated.
- arn str
- Amazon Resource Name (ARN) of the DataSync Location.
- domain str
- The name of the Windows domain the SMB server belongs to.
- mount_
options LocationSmb Mount Options Args - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - password str
- The password of the user who can mount the share and has file permissions in the SMB.
- server_
hostname str - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- user str
- The user who can mount the share and has file and folder permissions in the SMB share.
- agent
Arns List<String> - A list of DataSync Agent ARNs with which this location will be associated.
- arn String
- Amazon Resource Name (ARN) of the DataSync Location.
- domain String
- The name of the Windows domain the SMB server belongs to.
- mount
Options Property Map - Configuration block containing mount options used by DataSync to access the SMB Server. Can be
AUTOMATIC
,SMB2
, orSMB3
. - password String
- The password of the user who can mount the share and has file permissions in the SMB.
- server
Hostname String - Specifies the IP address or DNS name of the SMB server. The DataSync Agent(s) use this to mount the SMB share.
- 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
- user String
- The user who can mount the share and has file and folder permissions in the SMB share.
Supporting Types
LocationSmbMountOptions, LocationSmbMountOptionsArgs
- Version string
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
- Version string
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
- version String
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
- version string
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
- version str
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
- version String
- The specific SMB version that you want DataSync to use for mounting your SMB share. Valid values:
AUTOMATIC
,SMB2
, andSMB3
. Default:AUTOMATIC
Import
Using pulumi import
, import aws_datasync_location_smb
using the Amazon Resource Name (ARN). For example:
$ pulumi import aws:datasync/locationSmb:LocationSmb 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.