/
locationNfs.go
176 lines (145 loc) · 6.71 KB
/
locationNfs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package datasync
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource schema for AWS::DataSync::LocationNFS
type LocationNfs struct {
pulumi.CustomResourceState
// The Amazon Resource Name (ARN) of the NFS location.
LocationArn pulumi.StringOutput `pulumi:"locationArn"`
// The URL of the NFS location that was described.
LocationUri pulumi.StringOutput `pulumi:"locationUri"`
MountOptions LocationNfsMountOptionsPtrOutput `pulumi:"mountOptions"`
OnPremConfig LocationNfsOnPremConfigOutput `pulumi:"onPremConfig"`
// The name of the NFS server. This value is the IP address or DNS name of the NFS server.
ServerHostname pulumi.StringPtrOutput `pulumi:"serverHostname"`
// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination.
Subdirectory pulumi.StringPtrOutput `pulumi:"subdirectory"`
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayOutput `pulumi:"tags"`
}
// NewLocationNfs registers a new resource with the given unique name, arguments, and options.
func NewLocationNfs(ctx *pulumi.Context,
name string, args *LocationNfsArgs, opts ...pulumi.ResourceOption) (*LocationNfs, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.OnPremConfig == nil {
return nil, errors.New("invalid value for required argument 'OnPremConfig'")
}
replaceOnChanges := pulumi.ReplaceOnChanges([]string{
"serverHostname",
})
opts = append(opts, replaceOnChanges)
opts = internal.PkgResourceDefaultOpts(opts)
var resource LocationNfs
err := ctx.RegisterResource("aws-native:datasync:LocationNfs", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetLocationNfs gets an existing LocationNfs resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetLocationNfs(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *LocationNfsState, opts ...pulumi.ResourceOption) (*LocationNfs, error) {
var resource LocationNfs
err := ctx.ReadResource("aws-native:datasync:LocationNfs", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering LocationNfs resources.
type locationNfsState struct {
}
type LocationNfsState struct {
}
func (LocationNfsState) ElementType() reflect.Type {
return reflect.TypeOf((*locationNfsState)(nil)).Elem()
}
type locationNfsArgs struct {
MountOptions *LocationNfsMountOptions `pulumi:"mountOptions"`
OnPremConfig LocationNfsOnPremConfig `pulumi:"onPremConfig"`
// The name of the NFS server. This value is the IP address or DNS name of the NFS server.
ServerHostname *string `pulumi:"serverHostname"`
// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination.
Subdirectory *string `pulumi:"subdirectory"`
// An array of key-value pairs to apply to this resource.
Tags []aws.Tag `pulumi:"tags"`
}
// The set of arguments for constructing a LocationNfs resource.
type LocationNfsArgs struct {
MountOptions LocationNfsMountOptionsPtrInput
OnPremConfig LocationNfsOnPremConfigInput
// The name of the NFS server. This value is the IP address or DNS name of the NFS server.
ServerHostname pulumi.StringPtrInput
// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination.
Subdirectory pulumi.StringPtrInput
// An array of key-value pairs to apply to this resource.
Tags aws.TagArrayInput
}
func (LocationNfsArgs) ElementType() reflect.Type {
return reflect.TypeOf((*locationNfsArgs)(nil)).Elem()
}
type LocationNfsInput interface {
pulumi.Input
ToLocationNfsOutput() LocationNfsOutput
ToLocationNfsOutputWithContext(ctx context.Context) LocationNfsOutput
}
func (*LocationNfs) ElementType() reflect.Type {
return reflect.TypeOf((**LocationNfs)(nil)).Elem()
}
func (i *LocationNfs) ToLocationNfsOutput() LocationNfsOutput {
return i.ToLocationNfsOutputWithContext(context.Background())
}
func (i *LocationNfs) ToLocationNfsOutputWithContext(ctx context.Context) LocationNfsOutput {
return pulumi.ToOutputWithContext(ctx, i).(LocationNfsOutput)
}
type LocationNfsOutput struct{ *pulumi.OutputState }
func (LocationNfsOutput) ElementType() reflect.Type {
return reflect.TypeOf((**LocationNfs)(nil)).Elem()
}
func (o LocationNfsOutput) ToLocationNfsOutput() LocationNfsOutput {
return o
}
func (o LocationNfsOutput) ToLocationNfsOutputWithContext(ctx context.Context) LocationNfsOutput {
return o
}
// The Amazon Resource Name (ARN) of the NFS location.
func (o LocationNfsOutput) LocationArn() pulumi.StringOutput {
return o.ApplyT(func(v *LocationNfs) pulumi.StringOutput { return v.LocationArn }).(pulumi.StringOutput)
}
// The URL of the NFS location that was described.
func (o LocationNfsOutput) LocationUri() pulumi.StringOutput {
return o.ApplyT(func(v *LocationNfs) pulumi.StringOutput { return v.LocationUri }).(pulumi.StringOutput)
}
func (o LocationNfsOutput) MountOptions() LocationNfsMountOptionsPtrOutput {
return o.ApplyT(func(v *LocationNfs) LocationNfsMountOptionsPtrOutput { return v.MountOptions }).(LocationNfsMountOptionsPtrOutput)
}
func (o LocationNfsOutput) OnPremConfig() LocationNfsOnPremConfigOutput {
return o.ApplyT(func(v *LocationNfs) LocationNfsOnPremConfigOutput { return v.OnPremConfig }).(LocationNfsOnPremConfigOutput)
}
// The name of the NFS server. This value is the IP address or DNS name of the NFS server.
func (o LocationNfsOutput) ServerHostname() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocationNfs) pulumi.StringPtrOutput { return v.ServerHostname }).(pulumi.StringPtrOutput)
}
// The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination.
func (o LocationNfsOutput) Subdirectory() pulumi.StringPtrOutput {
return o.ApplyT(func(v *LocationNfs) pulumi.StringPtrOutput { return v.Subdirectory }).(pulumi.StringPtrOutput)
}
// An array of key-value pairs to apply to this resource.
func (o LocationNfsOutput) Tags() aws.TagArrayOutput {
return o.ApplyT(func(v *LocationNfs) aws.TagArrayOutput { return v.Tags }).(aws.TagArrayOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*LocationNfsInput)(nil)).Elem(), &LocationNfs{})
pulumi.RegisterOutputType(LocationNfsOutput{})
}