github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/efs/accessPoint.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 efs 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 // Provides an Elastic File System (EFS) access point. 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/efs" 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 := efs.NewAccessPoint(ctx, "test", &efs.AccessPointArgs{ 33 // FileSystemId: pulumi.Any(foo.Id), 34 // }) 35 // if err != nil { 36 // return err 37 // } 38 // return nil 39 // }) 40 // } 41 // 42 // ``` 43 // <!--End PulumiCodeChooser --> 44 // 45 // ## Import 46 // 47 // Using `pulumi import`, import the EFS access points using the `id`. For example: 48 // 49 // ```sh 50 // $ pulumi import aws:efs/accessPoint:AccessPoint test fsap-52a643fb 51 // ``` 52 type AccessPoint struct { 53 pulumi.CustomResourceState 54 55 // ARN of the access point. 56 Arn pulumi.StringOutput `pulumi:"arn"` 57 // ARN of the file system. 58 FileSystemArn pulumi.StringOutput `pulumi:"fileSystemArn"` 59 // ID of the file system for which the access point is intended. 60 FileSystemId pulumi.StringOutput `pulumi:"fileSystemId"` 61 OwnerId pulumi.StringOutput `pulumi:"ownerId"` 62 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 63 PosixUser AccessPointPosixUserPtrOutput `pulumi:"posixUser"` 64 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 65 RootDirectory AccessPointRootDirectoryOutput `pulumi:"rootDirectory"` 66 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 67 Tags pulumi.StringMapOutput `pulumi:"tags"` 68 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 69 // 70 // Deprecated: Please use `tags` instead. 71 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 72 } 73 74 // NewAccessPoint registers a new resource with the given unique name, arguments, and options. 75 func NewAccessPoint(ctx *pulumi.Context, 76 name string, args *AccessPointArgs, opts ...pulumi.ResourceOption) (*AccessPoint, error) { 77 if args == nil { 78 return nil, errors.New("missing one or more required arguments") 79 } 80 81 if args.FileSystemId == nil { 82 return nil, errors.New("invalid value for required argument 'FileSystemId'") 83 } 84 opts = internal.PkgResourceDefaultOpts(opts) 85 var resource AccessPoint 86 err := ctx.RegisterResource("aws:efs/accessPoint:AccessPoint", name, args, &resource, opts...) 87 if err != nil { 88 return nil, err 89 } 90 return &resource, nil 91 } 92 93 // GetAccessPoint gets an existing AccessPoint resource's state with the given name, ID, and optional 94 // state properties that are used to uniquely qualify the lookup (nil if not required). 95 func GetAccessPoint(ctx *pulumi.Context, 96 name string, id pulumi.IDInput, state *AccessPointState, opts ...pulumi.ResourceOption) (*AccessPoint, error) { 97 var resource AccessPoint 98 err := ctx.ReadResource("aws:efs/accessPoint:AccessPoint", name, id, state, &resource, opts...) 99 if err != nil { 100 return nil, err 101 } 102 return &resource, nil 103 } 104 105 // Input properties used for looking up and filtering AccessPoint resources. 106 type accessPointState struct { 107 // ARN of the access point. 108 Arn *string `pulumi:"arn"` 109 // ARN of the file system. 110 FileSystemArn *string `pulumi:"fileSystemArn"` 111 // ID of the file system for which the access point is intended. 112 FileSystemId *string `pulumi:"fileSystemId"` 113 OwnerId *string `pulumi:"ownerId"` 114 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 115 PosixUser *AccessPointPosixUser `pulumi:"posixUser"` 116 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 117 RootDirectory *AccessPointRootDirectory `pulumi:"rootDirectory"` 118 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 119 Tags map[string]string `pulumi:"tags"` 120 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 121 // 122 // Deprecated: Please use `tags` instead. 123 TagsAll map[string]string `pulumi:"tagsAll"` 124 } 125 126 type AccessPointState struct { 127 // ARN of the access point. 128 Arn pulumi.StringPtrInput 129 // ARN of the file system. 130 FileSystemArn pulumi.StringPtrInput 131 // ID of the file system for which the access point is intended. 132 FileSystemId pulumi.StringPtrInput 133 OwnerId pulumi.StringPtrInput 134 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 135 PosixUser AccessPointPosixUserPtrInput 136 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 137 RootDirectory AccessPointRootDirectoryPtrInput 138 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 139 Tags pulumi.StringMapInput 140 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 141 // 142 // Deprecated: Please use `tags` instead. 143 TagsAll pulumi.StringMapInput 144 } 145 146 func (AccessPointState) ElementType() reflect.Type { 147 return reflect.TypeOf((*accessPointState)(nil)).Elem() 148 } 149 150 type accessPointArgs struct { 151 // ID of the file system for which the access point is intended. 152 FileSystemId string `pulumi:"fileSystemId"` 153 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 154 PosixUser *AccessPointPosixUser `pulumi:"posixUser"` 155 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 156 RootDirectory *AccessPointRootDirectory `pulumi:"rootDirectory"` 157 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 158 Tags map[string]string `pulumi:"tags"` 159 } 160 161 // The set of arguments for constructing a AccessPoint resource. 162 type AccessPointArgs struct { 163 // ID of the file system for which the access point is intended. 164 FileSystemId pulumi.StringInput 165 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 166 PosixUser AccessPointPosixUserPtrInput 167 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 168 RootDirectory AccessPointRootDirectoryPtrInput 169 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 170 Tags pulumi.StringMapInput 171 } 172 173 func (AccessPointArgs) ElementType() reflect.Type { 174 return reflect.TypeOf((*accessPointArgs)(nil)).Elem() 175 } 176 177 type AccessPointInput interface { 178 pulumi.Input 179 180 ToAccessPointOutput() AccessPointOutput 181 ToAccessPointOutputWithContext(ctx context.Context) AccessPointOutput 182 } 183 184 func (*AccessPoint) ElementType() reflect.Type { 185 return reflect.TypeOf((**AccessPoint)(nil)).Elem() 186 } 187 188 func (i *AccessPoint) ToAccessPointOutput() AccessPointOutput { 189 return i.ToAccessPointOutputWithContext(context.Background()) 190 } 191 192 func (i *AccessPoint) ToAccessPointOutputWithContext(ctx context.Context) AccessPointOutput { 193 return pulumi.ToOutputWithContext(ctx, i).(AccessPointOutput) 194 } 195 196 // AccessPointArrayInput is an input type that accepts AccessPointArray and AccessPointArrayOutput values. 197 // You can construct a concrete instance of `AccessPointArrayInput` via: 198 // 199 // AccessPointArray{ AccessPointArgs{...} } 200 type AccessPointArrayInput interface { 201 pulumi.Input 202 203 ToAccessPointArrayOutput() AccessPointArrayOutput 204 ToAccessPointArrayOutputWithContext(context.Context) AccessPointArrayOutput 205 } 206 207 type AccessPointArray []AccessPointInput 208 209 func (AccessPointArray) ElementType() reflect.Type { 210 return reflect.TypeOf((*[]*AccessPoint)(nil)).Elem() 211 } 212 213 func (i AccessPointArray) ToAccessPointArrayOutput() AccessPointArrayOutput { 214 return i.ToAccessPointArrayOutputWithContext(context.Background()) 215 } 216 217 func (i AccessPointArray) ToAccessPointArrayOutputWithContext(ctx context.Context) AccessPointArrayOutput { 218 return pulumi.ToOutputWithContext(ctx, i).(AccessPointArrayOutput) 219 } 220 221 // AccessPointMapInput is an input type that accepts AccessPointMap and AccessPointMapOutput values. 222 // You can construct a concrete instance of `AccessPointMapInput` via: 223 // 224 // AccessPointMap{ "key": AccessPointArgs{...} } 225 type AccessPointMapInput interface { 226 pulumi.Input 227 228 ToAccessPointMapOutput() AccessPointMapOutput 229 ToAccessPointMapOutputWithContext(context.Context) AccessPointMapOutput 230 } 231 232 type AccessPointMap map[string]AccessPointInput 233 234 func (AccessPointMap) ElementType() reflect.Type { 235 return reflect.TypeOf((*map[string]*AccessPoint)(nil)).Elem() 236 } 237 238 func (i AccessPointMap) ToAccessPointMapOutput() AccessPointMapOutput { 239 return i.ToAccessPointMapOutputWithContext(context.Background()) 240 } 241 242 func (i AccessPointMap) ToAccessPointMapOutputWithContext(ctx context.Context) AccessPointMapOutput { 243 return pulumi.ToOutputWithContext(ctx, i).(AccessPointMapOutput) 244 } 245 246 type AccessPointOutput struct{ *pulumi.OutputState } 247 248 func (AccessPointOutput) ElementType() reflect.Type { 249 return reflect.TypeOf((**AccessPoint)(nil)).Elem() 250 } 251 252 func (o AccessPointOutput) ToAccessPointOutput() AccessPointOutput { 253 return o 254 } 255 256 func (o AccessPointOutput) ToAccessPointOutputWithContext(ctx context.Context) AccessPointOutput { 257 return o 258 } 259 260 // ARN of the access point. 261 func (o AccessPointOutput) Arn() pulumi.StringOutput { 262 return o.ApplyT(func(v *AccessPoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 263 } 264 265 // ARN of the file system. 266 func (o AccessPointOutput) FileSystemArn() pulumi.StringOutput { 267 return o.ApplyT(func(v *AccessPoint) pulumi.StringOutput { return v.FileSystemArn }).(pulumi.StringOutput) 268 } 269 270 // ID of the file system for which the access point is intended. 271 func (o AccessPointOutput) FileSystemId() pulumi.StringOutput { 272 return o.ApplyT(func(v *AccessPoint) pulumi.StringOutput { return v.FileSystemId }).(pulumi.StringOutput) 273 } 274 275 func (o AccessPointOutput) OwnerId() pulumi.StringOutput { 276 return o.ApplyT(func(v *AccessPoint) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput) 277 } 278 279 // Operating system user and group applied to all file system requests made using the access point. Detailed below. 280 func (o AccessPointOutput) PosixUser() AccessPointPosixUserPtrOutput { 281 return o.ApplyT(func(v *AccessPoint) AccessPointPosixUserPtrOutput { return v.PosixUser }).(AccessPointPosixUserPtrOutput) 282 } 283 284 // Directory on the Amazon EFS file system that the access point provides access to. Detailed below. 285 func (o AccessPointOutput) RootDirectory() AccessPointRootDirectoryOutput { 286 return o.ApplyT(func(v *AccessPoint) AccessPointRootDirectoryOutput { return v.RootDirectory }).(AccessPointRootDirectoryOutput) 287 } 288 289 // Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level 290 func (o AccessPointOutput) Tags() pulumi.StringMapOutput { 291 return o.ApplyT(func(v *AccessPoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 292 } 293 294 // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 295 // 296 // Deprecated: Please use `tags` instead. 297 func (o AccessPointOutput) TagsAll() pulumi.StringMapOutput { 298 return o.ApplyT(func(v *AccessPoint) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 299 } 300 301 type AccessPointArrayOutput struct{ *pulumi.OutputState } 302 303 func (AccessPointArrayOutput) ElementType() reflect.Type { 304 return reflect.TypeOf((*[]*AccessPoint)(nil)).Elem() 305 } 306 307 func (o AccessPointArrayOutput) ToAccessPointArrayOutput() AccessPointArrayOutput { 308 return o 309 } 310 311 func (o AccessPointArrayOutput) ToAccessPointArrayOutputWithContext(ctx context.Context) AccessPointArrayOutput { 312 return o 313 } 314 315 func (o AccessPointArrayOutput) Index(i pulumi.IntInput) AccessPointOutput { 316 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AccessPoint { 317 return vs[0].([]*AccessPoint)[vs[1].(int)] 318 }).(AccessPointOutput) 319 } 320 321 type AccessPointMapOutput struct{ *pulumi.OutputState } 322 323 func (AccessPointMapOutput) ElementType() reflect.Type { 324 return reflect.TypeOf((*map[string]*AccessPoint)(nil)).Elem() 325 } 326 327 func (o AccessPointMapOutput) ToAccessPointMapOutput() AccessPointMapOutput { 328 return o 329 } 330 331 func (o AccessPointMapOutput) ToAccessPointMapOutputWithContext(ctx context.Context) AccessPointMapOutput { 332 return o 333 } 334 335 func (o AccessPointMapOutput) MapIndex(k pulumi.StringInput) AccessPointOutput { 336 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AccessPoint { 337 return vs[0].(map[string]*AccessPoint)[vs[1].(string)] 338 }).(AccessPointOutput) 339 } 340 341 func init() { 342 pulumi.RegisterInputType(reflect.TypeOf((*AccessPointInput)(nil)).Elem(), &AccessPoint{}) 343 pulumi.RegisterInputType(reflect.TypeOf((*AccessPointArrayInput)(nil)).Elem(), AccessPointArray{}) 344 pulumi.RegisterInputType(reflect.TypeOf((*AccessPointMapInput)(nil)).Elem(), AccessPointMap{}) 345 pulumi.RegisterOutputType(AccessPointOutput{}) 346 pulumi.RegisterOutputType(AccessPointArrayOutput{}) 347 pulumi.RegisterOutputType(AccessPointMapOutput{}) 348 }