github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/datasync/locationFsxWindows.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package datasync
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Manages an AWS DataSync FSx Windows Location.
    16  //
    17  // ## Example Usage
    18  //
    19  // <!--Start PulumiCodeChooser -->
    20  // ```go
    21  // package main
    22  //
    23  // import (
    24  //
    25  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/datasync"
    26  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    27  //
    28  // )
    29  //
    30  //	func main() {
    31  //		pulumi.Run(func(ctx *pulumi.Context) error {
    32  //			_, err := datasync.NewLocationFsxWindows(ctx, "example", &datasync.LocationFsxWindowsArgs{
    33  //				FsxFilesystemArn: pulumi.Any(exampleAwsFsxWindowsFileSystem.Arn),
    34  //				User:             pulumi.String("SomeUser"),
    35  //				Password:         pulumi.String("SuperSecretPassw0rd"),
    36  //				SecurityGroupArns: pulumi.StringArray{
    37  //					exampleAwsSecurityGroup.Arn,
    38  //				},
    39  //			})
    40  //			if err != nil {
    41  //				return err
    42  //			}
    43  //			return nil
    44  //		})
    45  //	}
    46  //
    47  // ```
    48  // <!--End PulumiCodeChooser -->
    49  //
    50  // ## Import
    51  //
    52  // Using `pulumi import`, import `aws_datasync_location_fsx_windows_file_system` using the `DataSync-ARN#FSx-Windows-ARN`. For example:
    53  //
    54  // ```sh
    55  // $ pulumi import aws:datasync/locationFsxWindows:LocationFsxWindows example arn:aws:datasync:us-west-2:123456789012:location/loc-12345678901234567#arn:aws:fsx:us-west-2:476956259333:file-system/fs-08e04cd442c1bb94a
    56  // ```
    57  type LocationFsxWindows struct {
    58  	pulumi.CustomResourceState
    59  
    60  	// Amazon Resource Name (ARN) of the DataSync Location.
    61  	Arn pulumi.StringOutput `pulumi:"arn"`
    62  	// The time that the FSx for Windows location was created.
    63  	CreationTime pulumi.StringOutput `pulumi:"creationTime"`
    64  	// The name of the Windows domain that the FSx for Windows server belongs to.
    65  	Domain pulumi.StringPtrOutput `pulumi:"domain"`
    66  	// The Amazon Resource Name (ARN) for the FSx for Windows file system.
    67  	FsxFilesystemArn pulumi.StringOutput `pulumi:"fsxFilesystemArn"`
    68  	// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
    69  	Password pulumi.StringOutput `pulumi:"password"`
    70  	// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
    71  	SecurityGroupArns pulumi.StringArrayOutput `pulumi:"securityGroupArns"`
    72  	// Subdirectory to perform actions as source or destination.
    73  	Subdirectory pulumi.StringOutput `pulumi:"subdirectory"`
    74  	// Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    75  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    76  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    77  	//
    78  	// Deprecated: Please use `tags` instead.
    79  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    80  	// The URL of the FSx for Windows location that was described.
    81  	Uri pulumi.StringOutput `pulumi:"uri"`
    82  	// The user who has the permissions to access files and folders in the FSx for Windows file system.
    83  	User pulumi.StringOutput `pulumi:"user"`
    84  }
    85  
    86  // NewLocationFsxWindows registers a new resource with the given unique name, arguments, and options.
    87  func NewLocationFsxWindows(ctx *pulumi.Context,
    88  	name string, args *LocationFsxWindowsArgs, opts ...pulumi.ResourceOption) (*LocationFsxWindows, error) {
    89  	if args == nil {
    90  		return nil, errors.New("missing one or more required arguments")
    91  	}
    92  
    93  	if args.FsxFilesystemArn == nil {
    94  		return nil, errors.New("invalid value for required argument 'FsxFilesystemArn'")
    95  	}
    96  	if args.Password == nil {
    97  		return nil, errors.New("invalid value for required argument 'Password'")
    98  	}
    99  	if args.SecurityGroupArns == nil {
   100  		return nil, errors.New("invalid value for required argument 'SecurityGroupArns'")
   101  	}
   102  	if args.User == nil {
   103  		return nil, errors.New("invalid value for required argument 'User'")
   104  	}
   105  	if args.Password != nil {
   106  		args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput)
   107  	}
   108  	secrets := pulumi.AdditionalSecretOutputs([]string{
   109  		"password",
   110  	})
   111  	opts = append(opts, secrets)
   112  	opts = internal.PkgResourceDefaultOpts(opts)
   113  	var resource LocationFsxWindows
   114  	err := ctx.RegisterResource("aws:datasync/locationFsxWindows:LocationFsxWindows", name, args, &resource, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	return &resource, nil
   119  }
   120  
   121  // GetLocationFsxWindows gets an existing LocationFsxWindows resource's state with the given name, ID, and optional
   122  // state properties that are used to uniquely qualify the lookup (nil if not required).
   123  func GetLocationFsxWindows(ctx *pulumi.Context,
   124  	name string, id pulumi.IDInput, state *LocationFsxWindowsState, opts ...pulumi.ResourceOption) (*LocationFsxWindows, error) {
   125  	var resource LocationFsxWindows
   126  	err := ctx.ReadResource("aws:datasync/locationFsxWindows:LocationFsxWindows", name, id, state, &resource, opts...)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	return &resource, nil
   131  }
   132  
   133  // Input properties used for looking up and filtering LocationFsxWindows resources.
   134  type locationFsxWindowsState struct {
   135  	// Amazon Resource Name (ARN) of the DataSync Location.
   136  	Arn *string `pulumi:"arn"`
   137  	// The time that the FSx for Windows location was created.
   138  	CreationTime *string `pulumi:"creationTime"`
   139  	// The name of the Windows domain that the FSx for Windows server belongs to.
   140  	Domain *string `pulumi:"domain"`
   141  	// The Amazon Resource Name (ARN) for the FSx for Windows file system.
   142  	FsxFilesystemArn *string `pulumi:"fsxFilesystemArn"`
   143  	// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
   144  	Password *string `pulumi:"password"`
   145  	// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
   146  	SecurityGroupArns []string `pulumi:"securityGroupArns"`
   147  	// Subdirectory to perform actions as source or destination.
   148  	Subdirectory *string `pulumi:"subdirectory"`
   149  	// Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   150  	Tags map[string]string `pulumi:"tags"`
   151  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   152  	//
   153  	// Deprecated: Please use `tags` instead.
   154  	TagsAll map[string]string `pulumi:"tagsAll"`
   155  	// The URL of the FSx for Windows location that was described.
   156  	Uri *string `pulumi:"uri"`
   157  	// The user who has the permissions to access files and folders in the FSx for Windows file system.
   158  	User *string `pulumi:"user"`
   159  }
   160  
   161  type LocationFsxWindowsState struct {
   162  	// Amazon Resource Name (ARN) of the DataSync Location.
   163  	Arn pulumi.StringPtrInput
   164  	// The time that the FSx for Windows location was created.
   165  	CreationTime pulumi.StringPtrInput
   166  	// The name of the Windows domain that the FSx for Windows server belongs to.
   167  	Domain pulumi.StringPtrInput
   168  	// The Amazon Resource Name (ARN) for the FSx for Windows file system.
   169  	FsxFilesystemArn pulumi.StringPtrInput
   170  	// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
   171  	Password pulumi.StringPtrInput
   172  	// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
   173  	SecurityGroupArns pulumi.StringArrayInput
   174  	// Subdirectory to perform actions as source or destination.
   175  	Subdirectory pulumi.StringPtrInput
   176  	// Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   177  	Tags pulumi.StringMapInput
   178  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   179  	//
   180  	// Deprecated: Please use `tags` instead.
   181  	TagsAll pulumi.StringMapInput
   182  	// The URL of the FSx for Windows location that was described.
   183  	Uri pulumi.StringPtrInput
   184  	// The user who has the permissions to access files and folders in the FSx for Windows file system.
   185  	User pulumi.StringPtrInput
   186  }
   187  
   188  func (LocationFsxWindowsState) ElementType() reflect.Type {
   189  	return reflect.TypeOf((*locationFsxWindowsState)(nil)).Elem()
   190  }
   191  
   192  type locationFsxWindowsArgs struct {
   193  	// The name of the Windows domain that the FSx for Windows server belongs to.
   194  	Domain *string `pulumi:"domain"`
   195  	// The Amazon Resource Name (ARN) for the FSx for Windows file system.
   196  	FsxFilesystemArn string `pulumi:"fsxFilesystemArn"`
   197  	// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
   198  	Password string `pulumi:"password"`
   199  	// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
   200  	SecurityGroupArns []string `pulumi:"securityGroupArns"`
   201  	// Subdirectory to perform actions as source or destination.
   202  	Subdirectory *string `pulumi:"subdirectory"`
   203  	// Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   204  	Tags map[string]string `pulumi:"tags"`
   205  	// The user who has the permissions to access files and folders in the FSx for Windows file system.
   206  	User string `pulumi:"user"`
   207  }
   208  
   209  // The set of arguments for constructing a LocationFsxWindows resource.
   210  type LocationFsxWindowsArgs struct {
   211  	// The name of the Windows domain that the FSx for Windows server belongs to.
   212  	Domain pulumi.StringPtrInput
   213  	// The Amazon Resource Name (ARN) for the FSx for Windows file system.
   214  	FsxFilesystemArn pulumi.StringInput
   215  	// The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
   216  	Password pulumi.StringInput
   217  	// The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
   218  	SecurityGroupArns pulumi.StringArrayInput
   219  	// Subdirectory to perform actions as source or destination.
   220  	Subdirectory pulumi.StringPtrInput
   221  	// Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   222  	Tags pulumi.StringMapInput
   223  	// The user who has the permissions to access files and folders in the FSx for Windows file system.
   224  	User pulumi.StringInput
   225  }
   226  
   227  func (LocationFsxWindowsArgs) ElementType() reflect.Type {
   228  	return reflect.TypeOf((*locationFsxWindowsArgs)(nil)).Elem()
   229  }
   230  
   231  type LocationFsxWindowsInput interface {
   232  	pulumi.Input
   233  
   234  	ToLocationFsxWindowsOutput() LocationFsxWindowsOutput
   235  	ToLocationFsxWindowsOutputWithContext(ctx context.Context) LocationFsxWindowsOutput
   236  }
   237  
   238  func (*LocationFsxWindows) ElementType() reflect.Type {
   239  	return reflect.TypeOf((**LocationFsxWindows)(nil)).Elem()
   240  }
   241  
   242  func (i *LocationFsxWindows) ToLocationFsxWindowsOutput() LocationFsxWindowsOutput {
   243  	return i.ToLocationFsxWindowsOutputWithContext(context.Background())
   244  }
   245  
   246  func (i *LocationFsxWindows) ToLocationFsxWindowsOutputWithContext(ctx context.Context) LocationFsxWindowsOutput {
   247  	return pulumi.ToOutputWithContext(ctx, i).(LocationFsxWindowsOutput)
   248  }
   249  
   250  // LocationFsxWindowsArrayInput is an input type that accepts LocationFsxWindowsArray and LocationFsxWindowsArrayOutput values.
   251  // You can construct a concrete instance of `LocationFsxWindowsArrayInput` via:
   252  //
   253  //	LocationFsxWindowsArray{ LocationFsxWindowsArgs{...} }
   254  type LocationFsxWindowsArrayInput interface {
   255  	pulumi.Input
   256  
   257  	ToLocationFsxWindowsArrayOutput() LocationFsxWindowsArrayOutput
   258  	ToLocationFsxWindowsArrayOutputWithContext(context.Context) LocationFsxWindowsArrayOutput
   259  }
   260  
   261  type LocationFsxWindowsArray []LocationFsxWindowsInput
   262  
   263  func (LocationFsxWindowsArray) ElementType() reflect.Type {
   264  	return reflect.TypeOf((*[]*LocationFsxWindows)(nil)).Elem()
   265  }
   266  
   267  func (i LocationFsxWindowsArray) ToLocationFsxWindowsArrayOutput() LocationFsxWindowsArrayOutput {
   268  	return i.ToLocationFsxWindowsArrayOutputWithContext(context.Background())
   269  }
   270  
   271  func (i LocationFsxWindowsArray) ToLocationFsxWindowsArrayOutputWithContext(ctx context.Context) LocationFsxWindowsArrayOutput {
   272  	return pulumi.ToOutputWithContext(ctx, i).(LocationFsxWindowsArrayOutput)
   273  }
   274  
   275  // LocationFsxWindowsMapInput is an input type that accepts LocationFsxWindowsMap and LocationFsxWindowsMapOutput values.
   276  // You can construct a concrete instance of `LocationFsxWindowsMapInput` via:
   277  //
   278  //	LocationFsxWindowsMap{ "key": LocationFsxWindowsArgs{...} }
   279  type LocationFsxWindowsMapInput interface {
   280  	pulumi.Input
   281  
   282  	ToLocationFsxWindowsMapOutput() LocationFsxWindowsMapOutput
   283  	ToLocationFsxWindowsMapOutputWithContext(context.Context) LocationFsxWindowsMapOutput
   284  }
   285  
   286  type LocationFsxWindowsMap map[string]LocationFsxWindowsInput
   287  
   288  func (LocationFsxWindowsMap) ElementType() reflect.Type {
   289  	return reflect.TypeOf((*map[string]*LocationFsxWindows)(nil)).Elem()
   290  }
   291  
   292  func (i LocationFsxWindowsMap) ToLocationFsxWindowsMapOutput() LocationFsxWindowsMapOutput {
   293  	return i.ToLocationFsxWindowsMapOutputWithContext(context.Background())
   294  }
   295  
   296  func (i LocationFsxWindowsMap) ToLocationFsxWindowsMapOutputWithContext(ctx context.Context) LocationFsxWindowsMapOutput {
   297  	return pulumi.ToOutputWithContext(ctx, i).(LocationFsxWindowsMapOutput)
   298  }
   299  
   300  type LocationFsxWindowsOutput struct{ *pulumi.OutputState }
   301  
   302  func (LocationFsxWindowsOutput) ElementType() reflect.Type {
   303  	return reflect.TypeOf((**LocationFsxWindows)(nil)).Elem()
   304  }
   305  
   306  func (o LocationFsxWindowsOutput) ToLocationFsxWindowsOutput() LocationFsxWindowsOutput {
   307  	return o
   308  }
   309  
   310  func (o LocationFsxWindowsOutput) ToLocationFsxWindowsOutputWithContext(ctx context.Context) LocationFsxWindowsOutput {
   311  	return o
   312  }
   313  
   314  // Amazon Resource Name (ARN) of the DataSync Location.
   315  func (o LocationFsxWindowsOutput) Arn() pulumi.StringOutput {
   316  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   317  }
   318  
   319  // The time that the FSx for Windows location was created.
   320  func (o LocationFsxWindowsOutput) CreationTime() pulumi.StringOutput {
   321  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput)
   322  }
   323  
   324  // The name of the Windows domain that the FSx for Windows server belongs to.
   325  func (o LocationFsxWindowsOutput) Domain() pulumi.StringPtrOutput {
   326  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringPtrOutput { return v.Domain }).(pulumi.StringPtrOutput)
   327  }
   328  
   329  // The Amazon Resource Name (ARN) for the FSx for Windows file system.
   330  func (o LocationFsxWindowsOutput) FsxFilesystemArn() pulumi.StringOutput {
   331  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.FsxFilesystemArn }).(pulumi.StringOutput)
   332  }
   333  
   334  // The password of the user who has the permissions to access files and folders in the FSx for Windows file system.
   335  func (o LocationFsxWindowsOutput) Password() pulumi.StringOutput {
   336  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput)
   337  }
   338  
   339  // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.
   340  func (o LocationFsxWindowsOutput) SecurityGroupArns() pulumi.StringArrayOutput {
   341  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringArrayOutput { return v.SecurityGroupArns }).(pulumi.StringArrayOutput)
   342  }
   343  
   344  // Subdirectory to perform actions as source or destination.
   345  func (o LocationFsxWindowsOutput) Subdirectory() pulumi.StringOutput {
   346  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.Subdirectory }).(pulumi.StringOutput)
   347  }
   348  
   349  // Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   350  func (o LocationFsxWindowsOutput) Tags() pulumi.StringMapOutput {
   351  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   352  }
   353  
   354  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   355  //
   356  // Deprecated: Please use `tags` instead.
   357  func (o LocationFsxWindowsOutput) TagsAll() pulumi.StringMapOutput {
   358  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   359  }
   360  
   361  // The URL of the FSx for Windows location that was described.
   362  func (o LocationFsxWindowsOutput) Uri() pulumi.StringOutput {
   363  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput)
   364  }
   365  
   366  // The user who has the permissions to access files and folders in the FSx for Windows file system.
   367  func (o LocationFsxWindowsOutput) User() pulumi.StringOutput {
   368  	return o.ApplyT(func(v *LocationFsxWindows) pulumi.StringOutput { return v.User }).(pulumi.StringOutput)
   369  }
   370  
   371  type LocationFsxWindowsArrayOutput struct{ *pulumi.OutputState }
   372  
   373  func (LocationFsxWindowsArrayOutput) ElementType() reflect.Type {
   374  	return reflect.TypeOf((*[]*LocationFsxWindows)(nil)).Elem()
   375  }
   376  
   377  func (o LocationFsxWindowsArrayOutput) ToLocationFsxWindowsArrayOutput() LocationFsxWindowsArrayOutput {
   378  	return o
   379  }
   380  
   381  func (o LocationFsxWindowsArrayOutput) ToLocationFsxWindowsArrayOutputWithContext(ctx context.Context) LocationFsxWindowsArrayOutput {
   382  	return o
   383  }
   384  
   385  func (o LocationFsxWindowsArrayOutput) Index(i pulumi.IntInput) LocationFsxWindowsOutput {
   386  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocationFsxWindows {
   387  		return vs[0].([]*LocationFsxWindows)[vs[1].(int)]
   388  	}).(LocationFsxWindowsOutput)
   389  }
   390  
   391  type LocationFsxWindowsMapOutput struct{ *pulumi.OutputState }
   392  
   393  func (LocationFsxWindowsMapOutput) ElementType() reflect.Type {
   394  	return reflect.TypeOf((*map[string]*LocationFsxWindows)(nil)).Elem()
   395  }
   396  
   397  func (o LocationFsxWindowsMapOutput) ToLocationFsxWindowsMapOutput() LocationFsxWindowsMapOutput {
   398  	return o
   399  }
   400  
   401  func (o LocationFsxWindowsMapOutput) ToLocationFsxWindowsMapOutputWithContext(ctx context.Context) LocationFsxWindowsMapOutput {
   402  	return o
   403  }
   404  
   405  func (o LocationFsxWindowsMapOutput) MapIndex(k pulumi.StringInput) LocationFsxWindowsOutput {
   406  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocationFsxWindows {
   407  		return vs[0].(map[string]*LocationFsxWindows)[vs[1].(string)]
   408  	}).(LocationFsxWindowsOutput)
   409  }
   410  
   411  func init() {
   412  	pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxWindowsInput)(nil)).Elem(), &LocationFsxWindows{})
   413  	pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxWindowsArrayInput)(nil)).Elem(), LocationFsxWindowsArray{})
   414  	pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxWindowsMapInput)(nil)).Elem(), LocationFsxWindowsMap{})
   415  	pulumi.RegisterOutputType(LocationFsxWindowsOutput{})
   416  	pulumi.RegisterOutputType(LocationFsxWindowsArrayOutput{})
   417  	pulumi.RegisterOutputType(LocationFsxWindowsMapOutput{})
   418  }