github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/datasync/locationFsxLustre.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 Lustre 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.NewLocationFsxLustre(ctx, "example", &datasync.LocationFsxLustreArgs{ 33 // FsxFilesystemArn: pulumi.Any(exampleAwsFsxLustreFileSystem.Arn), 34 // SecurityGroupArns: pulumi.StringArray{ 35 // exampleAwsSecurityGroup.Arn, 36 // }, 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 // 48 // ## Import 49 // 50 // Using `pulumi import`, import `aws_datasync_location_fsx_lustre_file_system` using the `DataSync-ARN#FSx-Lustre-ARN`. For example: 51 // 52 // ```sh 53 // $ pulumi import aws:datasync/locationFsxLustre:LocationFsxLustre example arn:aws:datasync:us-west-2:123456789012:location/loc-12345678901234567#arn:aws:fsx:us-west-2:476956259333:file-system/fs-08e04cd442c1bb94a 54 // ``` 55 type LocationFsxLustre struct { 56 pulumi.CustomResourceState 57 58 // Amazon Resource Name (ARN) of the DataSync Location. 59 Arn pulumi.StringOutput `pulumi:"arn"` 60 // The time that the FSx for Lustre location was created. 61 CreationTime pulumi.StringOutput `pulumi:"creationTime"` 62 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 63 FsxFilesystemArn pulumi.StringOutput `pulumi:"fsxFilesystemArn"` 64 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 65 SecurityGroupArns pulumi.StringArrayOutput `pulumi:"securityGroupArns"` 66 // Subdirectory to perform actions as source or destination. 67 Subdirectory pulumi.StringOutput `pulumi:"subdirectory"` 68 // 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. 69 Tags pulumi.StringMapOutput `pulumi:"tags"` 70 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 71 // 72 // Deprecated: Please use `tags` instead. 73 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 74 // The URL of the FSx for Lustre location that was described. 75 Uri pulumi.StringOutput `pulumi:"uri"` 76 } 77 78 // NewLocationFsxLustre registers a new resource with the given unique name, arguments, and options. 79 func NewLocationFsxLustre(ctx *pulumi.Context, 80 name string, args *LocationFsxLustreArgs, opts ...pulumi.ResourceOption) (*LocationFsxLustre, error) { 81 if args == nil { 82 return nil, errors.New("missing one or more required arguments") 83 } 84 85 if args.FsxFilesystemArn == nil { 86 return nil, errors.New("invalid value for required argument 'FsxFilesystemArn'") 87 } 88 if args.SecurityGroupArns == nil { 89 return nil, errors.New("invalid value for required argument 'SecurityGroupArns'") 90 } 91 opts = internal.PkgResourceDefaultOpts(opts) 92 var resource LocationFsxLustre 93 err := ctx.RegisterResource("aws:datasync/locationFsxLustre:LocationFsxLustre", name, args, &resource, opts...) 94 if err != nil { 95 return nil, err 96 } 97 return &resource, nil 98 } 99 100 // GetLocationFsxLustre gets an existing LocationFsxLustre resource's state with the given name, ID, and optional 101 // state properties that are used to uniquely qualify the lookup (nil if not required). 102 func GetLocationFsxLustre(ctx *pulumi.Context, 103 name string, id pulumi.IDInput, state *LocationFsxLustreState, opts ...pulumi.ResourceOption) (*LocationFsxLustre, error) { 104 var resource LocationFsxLustre 105 err := ctx.ReadResource("aws:datasync/locationFsxLustre:LocationFsxLustre", name, id, state, &resource, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return &resource, nil 110 } 111 112 // Input properties used for looking up and filtering LocationFsxLustre resources. 113 type locationFsxLustreState struct { 114 // Amazon Resource Name (ARN) of the DataSync Location. 115 Arn *string `pulumi:"arn"` 116 // The time that the FSx for Lustre location was created. 117 CreationTime *string `pulumi:"creationTime"` 118 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 119 FsxFilesystemArn *string `pulumi:"fsxFilesystemArn"` 120 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 121 SecurityGroupArns []string `pulumi:"securityGroupArns"` 122 // Subdirectory to perform actions as source or destination. 123 Subdirectory *string `pulumi:"subdirectory"` 124 // 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. 125 Tags map[string]string `pulumi:"tags"` 126 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 127 // 128 // Deprecated: Please use `tags` instead. 129 TagsAll map[string]string `pulumi:"tagsAll"` 130 // The URL of the FSx for Lustre location that was described. 131 Uri *string `pulumi:"uri"` 132 } 133 134 type LocationFsxLustreState struct { 135 // Amazon Resource Name (ARN) of the DataSync Location. 136 Arn pulumi.StringPtrInput 137 // The time that the FSx for Lustre location was created. 138 CreationTime pulumi.StringPtrInput 139 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 140 FsxFilesystemArn pulumi.StringPtrInput 141 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 142 SecurityGroupArns pulumi.StringArrayInput 143 // Subdirectory to perform actions as source or destination. 144 Subdirectory pulumi.StringPtrInput 145 // 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. 146 Tags pulumi.StringMapInput 147 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 148 // 149 // Deprecated: Please use `tags` instead. 150 TagsAll pulumi.StringMapInput 151 // The URL of the FSx for Lustre location that was described. 152 Uri pulumi.StringPtrInput 153 } 154 155 func (LocationFsxLustreState) ElementType() reflect.Type { 156 return reflect.TypeOf((*locationFsxLustreState)(nil)).Elem() 157 } 158 159 type locationFsxLustreArgs struct { 160 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 161 FsxFilesystemArn string `pulumi:"fsxFilesystemArn"` 162 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 163 SecurityGroupArns []string `pulumi:"securityGroupArns"` 164 // Subdirectory to perform actions as source or destination. 165 Subdirectory *string `pulumi:"subdirectory"` 166 // 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. 167 Tags map[string]string `pulumi:"tags"` 168 } 169 170 // The set of arguments for constructing a LocationFsxLustre resource. 171 type LocationFsxLustreArgs struct { 172 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 173 FsxFilesystemArn pulumi.StringInput 174 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 175 SecurityGroupArns pulumi.StringArrayInput 176 // Subdirectory to perform actions as source or destination. 177 Subdirectory pulumi.StringPtrInput 178 // 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. 179 Tags pulumi.StringMapInput 180 } 181 182 func (LocationFsxLustreArgs) ElementType() reflect.Type { 183 return reflect.TypeOf((*locationFsxLustreArgs)(nil)).Elem() 184 } 185 186 type LocationFsxLustreInput interface { 187 pulumi.Input 188 189 ToLocationFsxLustreOutput() LocationFsxLustreOutput 190 ToLocationFsxLustreOutputWithContext(ctx context.Context) LocationFsxLustreOutput 191 } 192 193 func (*LocationFsxLustre) ElementType() reflect.Type { 194 return reflect.TypeOf((**LocationFsxLustre)(nil)).Elem() 195 } 196 197 func (i *LocationFsxLustre) ToLocationFsxLustreOutput() LocationFsxLustreOutput { 198 return i.ToLocationFsxLustreOutputWithContext(context.Background()) 199 } 200 201 func (i *LocationFsxLustre) ToLocationFsxLustreOutputWithContext(ctx context.Context) LocationFsxLustreOutput { 202 return pulumi.ToOutputWithContext(ctx, i).(LocationFsxLustreOutput) 203 } 204 205 // LocationFsxLustreArrayInput is an input type that accepts LocationFsxLustreArray and LocationFsxLustreArrayOutput values. 206 // You can construct a concrete instance of `LocationFsxLustreArrayInput` via: 207 // 208 // LocationFsxLustreArray{ LocationFsxLustreArgs{...} } 209 type LocationFsxLustreArrayInput interface { 210 pulumi.Input 211 212 ToLocationFsxLustreArrayOutput() LocationFsxLustreArrayOutput 213 ToLocationFsxLustreArrayOutputWithContext(context.Context) LocationFsxLustreArrayOutput 214 } 215 216 type LocationFsxLustreArray []LocationFsxLustreInput 217 218 func (LocationFsxLustreArray) ElementType() reflect.Type { 219 return reflect.TypeOf((*[]*LocationFsxLustre)(nil)).Elem() 220 } 221 222 func (i LocationFsxLustreArray) ToLocationFsxLustreArrayOutput() LocationFsxLustreArrayOutput { 223 return i.ToLocationFsxLustreArrayOutputWithContext(context.Background()) 224 } 225 226 func (i LocationFsxLustreArray) ToLocationFsxLustreArrayOutputWithContext(ctx context.Context) LocationFsxLustreArrayOutput { 227 return pulumi.ToOutputWithContext(ctx, i).(LocationFsxLustreArrayOutput) 228 } 229 230 // LocationFsxLustreMapInput is an input type that accepts LocationFsxLustreMap and LocationFsxLustreMapOutput values. 231 // You can construct a concrete instance of `LocationFsxLustreMapInput` via: 232 // 233 // LocationFsxLustreMap{ "key": LocationFsxLustreArgs{...} } 234 type LocationFsxLustreMapInput interface { 235 pulumi.Input 236 237 ToLocationFsxLustreMapOutput() LocationFsxLustreMapOutput 238 ToLocationFsxLustreMapOutputWithContext(context.Context) LocationFsxLustreMapOutput 239 } 240 241 type LocationFsxLustreMap map[string]LocationFsxLustreInput 242 243 func (LocationFsxLustreMap) ElementType() reflect.Type { 244 return reflect.TypeOf((*map[string]*LocationFsxLustre)(nil)).Elem() 245 } 246 247 func (i LocationFsxLustreMap) ToLocationFsxLustreMapOutput() LocationFsxLustreMapOutput { 248 return i.ToLocationFsxLustreMapOutputWithContext(context.Background()) 249 } 250 251 func (i LocationFsxLustreMap) ToLocationFsxLustreMapOutputWithContext(ctx context.Context) LocationFsxLustreMapOutput { 252 return pulumi.ToOutputWithContext(ctx, i).(LocationFsxLustreMapOutput) 253 } 254 255 type LocationFsxLustreOutput struct{ *pulumi.OutputState } 256 257 func (LocationFsxLustreOutput) ElementType() reflect.Type { 258 return reflect.TypeOf((**LocationFsxLustre)(nil)).Elem() 259 } 260 261 func (o LocationFsxLustreOutput) ToLocationFsxLustreOutput() LocationFsxLustreOutput { 262 return o 263 } 264 265 func (o LocationFsxLustreOutput) ToLocationFsxLustreOutputWithContext(ctx context.Context) LocationFsxLustreOutput { 266 return o 267 } 268 269 // Amazon Resource Name (ARN) of the DataSync Location. 270 func (o LocationFsxLustreOutput) Arn() pulumi.StringOutput { 271 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 272 } 273 274 // The time that the FSx for Lustre location was created. 275 func (o LocationFsxLustreOutput) CreationTime() pulumi.StringOutput { 276 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringOutput { return v.CreationTime }).(pulumi.StringOutput) 277 } 278 279 // The Amazon Resource Name (ARN) for the FSx for Lustre file system. 280 func (o LocationFsxLustreOutput) FsxFilesystemArn() pulumi.StringOutput { 281 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringOutput { return v.FsxFilesystemArn }).(pulumi.StringOutput) 282 } 283 284 // The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Lustre file system. 285 func (o LocationFsxLustreOutput) SecurityGroupArns() pulumi.StringArrayOutput { 286 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringArrayOutput { return v.SecurityGroupArns }).(pulumi.StringArrayOutput) 287 } 288 289 // Subdirectory to perform actions as source or destination. 290 func (o LocationFsxLustreOutput) Subdirectory() pulumi.StringOutput { 291 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringOutput { return v.Subdirectory }).(pulumi.StringOutput) 292 } 293 294 // 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. 295 func (o LocationFsxLustreOutput) Tags() pulumi.StringMapOutput { 296 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 297 } 298 299 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 300 // 301 // Deprecated: Please use `tags` instead. 302 func (o LocationFsxLustreOutput) TagsAll() pulumi.StringMapOutput { 303 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 304 } 305 306 // The URL of the FSx for Lustre location that was described. 307 func (o LocationFsxLustreOutput) Uri() pulumi.StringOutput { 308 return o.ApplyT(func(v *LocationFsxLustre) pulumi.StringOutput { return v.Uri }).(pulumi.StringOutput) 309 } 310 311 type LocationFsxLustreArrayOutput struct{ *pulumi.OutputState } 312 313 func (LocationFsxLustreArrayOutput) ElementType() reflect.Type { 314 return reflect.TypeOf((*[]*LocationFsxLustre)(nil)).Elem() 315 } 316 317 func (o LocationFsxLustreArrayOutput) ToLocationFsxLustreArrayOutput() LocationFsxLustreArrayOutput { 318 return o 319 } 320 321 func (o LocationFsxLustreArrayOutput) ToLocationFsxLustreArrayOutputWithContext(ctx context.Context) LocationFsxLustreArrayOutput { 322 return o 323 } 324 325 func (o LocationFsxLustreArrayOutput) Index(i pulumi.IntInput) LocationFsxLustreOutput { 326 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LocationFsxLustre { 327 return vs[0].([]*LocationFsxLustre)[vs[1].(int)] 328 }).(LocationFsxLustreOutput) 329 } 330 331 type LocationFsxLustreMapOutput struct{ *pulumi.OutputState } 332 333 func (LocationFsxLustreMapOutput) ElementType() reflect.Type { 334 return reflect.TypeOf((*map[string]*LocationFsxLustre)(nil)).Elem() 335 } 336 337 func (o LocationFsxLustreMapOutput) ToLocationFsxLustreMapOutput() LocationFsxLustreMapOutput { 338 return o 339 } 340 341 func (o LocationFsxLustreMapOutput) ToLocationFsxLustreMapOutputWithContext(ctx context.Context) LocationFsxLustreMapOutput { 342 return o 343 } 344 345 func (o LocationFsxLustreMapOutput) MapIndex(k pulumi.StringInput) LocationFsxLustreOutput { 346 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LocationFsxLustre { 347 return vs[0].(map[string]*LocationFsxLustre)[vs[1].(string)] 348 }).(LocationFsxLustreOutput) 349 } 350 351 func init() { 352 pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxLustreInput)(nil)).Elem(), &LocationFsxLustre{}) 353 pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxLustreArrayInput)(nil)).Elem(), LocationFsxLustreArray{}) 354 pulumi.RegisterInputType(reflect.TypeOf((*LocationFsxLustreMapInput)(nil)).Elem(), LocationFsxLustreMap{}) 355 pulumi.RegisterOutputType(LocationFsxLustreOutput{}) 356 pulumi.RegisterOutputType(LocationFsxLustreArrayOutput{}) 357 pulumi.RegisterOutputType(LocationFsxLustreMapOutput{}) 358 }