github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/s3control/objectLambdaAccessPoint.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 s3control 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 a resource to manage an S3 Object Lambda Access Point. 16 // An Object Lambda access point is associated with exactly one standard access point and thus one Amazon S3 bucket. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3" 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3control" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // example, err := s3.NewBucketV2(ctx, "example", &s3.BucketV2Args{ 35 // Bucket: pulumi.String("example"), 36 // }) 37 // if err != nil { 38 // return err 39 // } 40 // exampleAccessPoint, err := s3.NewAccessPoint(ctx, "example", &s3.AccessPointArgs{ 41 // Bucket: example.ID(), 42 // Name: pulumi.String("example"), 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // _, err = s3control.NewObjectLambdaAccessPoint(ctx, "example", &s3control.ObjectLambdaAccessPointArgs{ 48 // Name: pulumi.String("example"), 49 // Configuration: &s3control.ObjectLambdaAccessPointConfigurationArgs{ 50 // SupportingAccessPoint: exampleAccessPoint.Arn, 51 // TransformationConfigurations: s3control.ObjectLambdaAccessPointConfigurationTransformationConfigurationArray{ 52 // &s3control.ObjectLambdaAccessPointConfigurationTransformationConfigurationArgs{ 53 // Actions: pulumi.StringArray{ 54 // pulumi.String("GetObject"), 55 // }, 56 // ContentTransformation: &s3control.ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationArgs{ 57 // AwsLambda: &s3control.ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaArgs{ 58 // FunctionArn: pulumi.Any(exampleAwsLambdaFunction.Arn), 59 // }, 60 // }, 61 // }, 62 // }, 63 // }, 64 // }) 65 // if err != nil { 66 // return err 67 // } 68 // return nil 69 // }) 70 // } 71 // 72 // ``` 73 // <!--End PulumiCodeChooser --> 74 // 75 // ## Import 76 // 77 // Using `pulumi import`, import Object Lambda Access Points using the `account_id` and `name`, separated by a colon (`:`). For example: 78 // 79 // ```sh 80 // $ pulumi import aws:s3control/objectLambdaAccessPoint:ObjectLambdaAccessPoint example 123456789012:example 81 // ``` 82 type ObjectLambdaAccessPoint struct { 83 pulumi.CustomResourceState 84 85 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 86 AccountId pulumi.StringOutput `pulumi:"accountId"` 87 // Alias for the S3 Object Lambda Access Point. 88 Alias pulumi.StringOutput `pulumi:"alias"` 89 // Amazon Resource Name (ARN) of the Object Lambda Access Point. 90 Arn pulumi.StringOutput `pulumi:"arn"` 91 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 92 Configuration ObjectLambdaAccessPointConfigurationOutput `pulumi:"configuration"` 93 // The name for this Object Lambda Access Point. 94 Name pulumi.StringOutput `pulumi:"name"` 95 } 96 97 // NewObjectLambdaAccessPoint registers a new resource with the given unique name, arguments, and options. 98 func NewObjectLambdaAccessPoint(ctx *pulumi.Context, 99 name string, args *ObjectLambdaAccessPointArgs, opts ...pulumi.ResourceOption) (*ObjectLambdaAccessPoint, error) { 100 if args == nil { 101 return nil, errors.New("missing one or more required arguments") 102 } 103 104 if args.Configuration == nil { 105 return nil, errors.New("invalid value for required argument 'Configuration'") 106 } 107 opts = internal.PkgResourceDefaultOpts(opts) 108 var resource ObjectLambdaAccessPoint 109 err := ctx.RegisterResource("aws:s3control/objectLambdaAccessPoint:ObjectLambdaAccessPoint", name, args, &resource, opts...) 110 if err != nil { 111 return nil, err 112 } 113 return &resource, nil 114 } 115 116 // GetObjectLambdaAccessPoint gets an existing ObjectLambdaAccessPoint resource's state with the given name, ID, and optional 117 // state properties that are used to uniquely qualify the lookup (nil if not required). 118 func GetObjectLambdaAccessPoint(ctx *pulumi.Context, 119 name string, id pulumi.IDInput, state *ObjectLambdaAccessPointState, opts ...pulumi.ResourceOption) (*ObjectLambdaAccessPoint, error) { 120 var resource ObjectLambdaAccessPoint 121 err := ctx.ReadResource("aws:s3control/objectLambdaAccessPoint:ObjectLambdaAccessPoint", name, id, state, &resource, opts...) 122 if err != nil { 123 return nil, err 124 } 125 return &resource, nil 126 } 127 128 // Input properties used for looking up and filtering ObjectLambdaAccessPoint resources. 129 type objectLambdaAccessPointState struct { 130 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 131 AccountId *string `pulumi:"accountId"` 132 // Alias for the S3 Object Lambda Access Point. 133 Alias *string `pulumi:"alias"` 134 // Amazon Resource Name (ARN) of the Object Lambda Access Point. 135 Arn *string `pulumi:"arn"` 136 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 137 Configuration *ObjectLambdaAccessPointConfiguration `pulumi:"configuration"` 138 // The name for this Object Lambda Access Point. 139 Name *string `pulumi:"name"` 140 } 141 142 type ObjectLambdaAccessPointState struct { 143 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 144 AccountId pulumi.StringPtrInput 145 // Alias for the S3 Object Lambda Access Point. 146 Alias pulumi.StringPtrInput 147 // Amazon Resource Name (ARN) of the Object Lambda Access Point. 148 Arn pulumi.StringPtrInput 149 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 150 Configuration ObjectLambdaAccessPointConfigurationPtrInput 151 // The name for this Object Lambda Access Point. 152 Name pulumi.StringPtrInput 153 } 154 155 func (ObjectLambdaAccessPointState) ElementType() reflect.Type { 156 return reflect.TypeOf((*objectLambdaAccessPointState)(nil)).Elem() 157 } 158 159 type objectLambdaAccessPointArgs struct { 160 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 161 AccountId *string `pulumi:"accountId"` 162 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 163 Configuration ObjectLambdaAccessPointConfiguration `pulumi:"configuration"` 164 // The name for this Object Lambda Access Point. 165 Name *string `pulumi:"name"` 166 } 167 168 // The set of arguments for constructing a ObjectLambdaAccessPoint resource. 169 type ObjectLambdaAccessPointArgs struct { 170 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 171 AccountId pulumi.StringPtrInput 172 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 173 Configuration ObjectLambdaAccessPointConfigurationInput 174 // The name for this Object Lambda Access Point. 175 Name pulumi.StringPtrInput 176 } 177 178 func (ObjectLambdaAccessPointArgs) ElementType() reflect.Type { 179 return reflect.TypeOf((*objectLambdaAccessPointArgs)(nil)).Elem() 180 } 181 182 type ObjectLambdaAccessPointInput interface { 183 pulumi.Input 184 185 ToObjectLambdaAccessPointOutput() ObjectLambdaAccessPointOutput 186 ToObjectLambdaAccessPointOutputWithContext(ctx context.Context) ObjectLambdaAccessPointOutput 187 } 188 189 func (*ObjectLambdaAccessPoint) ElementType() reflect.Type { 190 return reflect.TypeOf((**ObjectLambdaAccessPoint)(nil)).Elem() 191 } 192 193 func (i *ObjectLambdaAccessPoint) ToObjectLambdaAccessPointOutput() ObjectLambdaAccessPointOutput { 194 return i.ToObjectLambdaAccessPointOutputWithContext(context.Background()) 195 } 196 197 func (i *ObjectLambdaAccessPoint) ToObjectLambdaAccessPointOutputWithContext(ctx context.Context) ObjectLambdaAccessPointOutput { 198 return pulumi.ToOutputWithContext(ctx, i).(ObjectLambdaAccessPointOutput) 199 } 200 201 // ObjectLambdaAccessPointArrayInput is an input type that accepts ObjectLambdaAccessPointArray and ObjectLambdaAccessPointArrayOutput values. 202 // You can construct a concrete instance of `ObjectLambdaAccessPointArrayInput` via: 203 // 204 // ObjectLambdaAccessPointArray{ ObjectLambdaAccessPointArgs{...} } 205 type ObjectLambdaAccessPointArrayInput interface { 206 pulumi.Input 207 208 ToObjectLambdaAccessPointArrayOutput() ObjectLambdaAccessPointArrayOutput 209 ToObjectLambdaAccessPointArrayOutputWithContext(context.Context) ObjectLambdaAccessPointArrayOutput 210 } 211 212 type ObjectLambdaAccessPointArray []ObjectLambdaAccessPointInput 213 214 func (ObjectLambdaAccessPointArray) ElementType() reflect.Type { 215 return reflect.TypeOf((*[]*ObjectLambdaAccessPoint)(nil)).Elem() 216 } 217 218 func (i ObjectLambdaAccessPointArray) ToObjectLambdaAccessPointArrayOutput() ObjectLambdaAccessPointArrayOutput { 219 return i.ToObjectLambdaAccessPointArrayOutputWithContext(context.Background()) 220 } 221 222 func (i ObjectLambdaAccessPointArray) ToObjectLambdaAccessPointArrayOutputWithContext(ctx context.Context) ObjectLambdaAccessPointArrayOutput { 223 return pulumi.ToOutputWithContext(ctx, i).(ObjectLambdaAccessPointArrayOutput) 224 } 225 226 // ObjectLambdaAccessPointMapInput is an input type that accepts ObjectLambdaAccessPointMap and ObjectLambdaAccessPointMapOutput values. 227 // You can construct a concrete instance of `ObjectLambdaAccessPointMapInput` via: 228 // 229 // ObjectLambdaAccessPointMap{ "key": ObjectLambdaAccessPointArgs{...} } 230 type ObjectLambdaAccessPointMapInput interface { 231 pulumi.Input 232 233 ToObjectLambdaAccessPointMapOutput() ObjectLambdaAccessPointMapOutput 234 ToObjectLambdaAccessPointMapOutputWithContext(context.Context) ObjectLambdaAccessPointMapOutput 235 } 236 237 type ObjectLambdaAccessPointMap map[string]ObjectLambdaAccessPointInput 238 239 func (ObjectLambdaAccessPointMap) ElementType() reflect.Type { 240 return reflect.TypeOf((*map[string]*ObjectLambdaAccessPoint)(nil)).Elem() 241 } 242 243 func (i ObjectLambdaAccessPointMap) ToObjectLambdaAccessPointMapOutput() ObjectLambdaAccessPointMapOutput { 244 return i.ToObjectLambdaAccessPointMapOutputWithContext(context.Background()) 245 } 246 247 func (i ObjectLambdaAccessPointMap) ToObjectLambdaAccessPointMapOutputWithContext(ctx context.Context) ObjectLambdaAccessPointMapOutput { 248 return pulumi.ToOutputWithContext(ctx, i).(ObjectLambdaAccessPointMapOutput) 249 } 250 251 type ObjectLambdaAccessPointOutput struct{ *pulumi.OutputState } 252 253 func (ObjectLambdaAccessPointOutput) ElementType() reflect.Type { 254 return reflect.TypeOf((**ObjectLambdaAccessPoint)(nil)).Elem() 255 } 256 257 func (o ObjectLambdaAccessPointOutput) ToObjectLambdaAccessPointOutput() ObjectLambdaAccessPointOutput { 258 return o 259 } 260 261 func (o ObjectLambdaAccessPointOutput) ToObjectLambdaAccessPointOutputWithContext(ctx context.Context) ObjectLambdaAccessPointOutput { 262 return o 263 } 264 265 // The AWS account ID for the owner of the bucket for which you want to create an Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. 266 func (o ObjectLambdaAccessPointOutput) AccountId() pulumi.StringOutput { 267 return o.ApplyT(func(v *ObjectLambdaAccessPoint) pulumi.StringOutput { return v.AccountId }).(pulumi.StringOutput) 268 } 269 270 // Alias for the S3 Object Lambda Access Point. 271 func (o ObjectLambdaAccessPointOutput) Alias() pulumi.StringOutput { 272 return o.ApplyT(func(v *ObjectLambdaAccessPoint) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput) 273 } 274 275 // Amazon Resource Name (ARN) of the Object Lambda Access Point. 276 func (o ObjectLambdaAccessPointOutput) Arn() pulumi.StringOutput { 277 return o.ApplyT(func(v *ObjectLambdaAccessPoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 278 } 279 280 // A configuration block containing details about the Object Lambda Access Point. See Configuration below for more details. 281 func (o ObjectLambdaAccessPointOutput) Configuration() ObjectLambdaAccessPointConfigurationOutput { 282 return o.ApplyT(func(v *ObjectLambdaAccessPoint) ObjectLambdaAccessPointConfigurationOutput { return v.Configuration }).(ObjectLambdaAccessPointConfigurationOutput) 283 } 284 285 // The name for this Object Lambda Access Point. 286 func (o ObjectLambdaAccessPointOutput) Name() pulumi.StringOutput { 287 return o.ApplyT(func(v *ObjectLambdaAccessPoint) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 288 } 289 290 type ObjectLambdaAccessPointArrayOutput struct{ *pulumi.OutputState } 291 292 func (ObjectLambdaAccessPointArrayOutput) ElementType() reflect.Type { 293 return reflect.TypeOf((*[]*ObjectLambdaAccessPoint)(nil)).Elem() 294 } 295 296 func (o ObjectLambdaAccessPointArrayOutput) ToObjectLambdaAccessPointArrayOutput() ObjectLambdaAccessPointArrayOutput { 297 return o 298 } 299 300 func (o ObjectLambdaAccessPointArrayOutput) ToObjectLambdaAccessPointArrayOutputWithContext(ctx context.Context) ObjectLambdaAccessPointArrayOutput { 301 return o 302 } 303 304 func (o ObjectLambdaAccessPointArrayOutput) Index(i pulumi.IntInput) ObjectLambdaAccessPointOutput { 305 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ObjectLambdaAccessPoint { 306 return vs[0].([]*ObjectLambdaAccessPoint)[vs[1].(int)] 307 }).(ObjectLambdaAccessPointOutput) 308 } 309 310 type ObjectLambdaAccessPointMapOutput struct{ *pulumi.OutputState } 311 312 func (ObjectLambdaAccessPointMapOutput) ElementType() reflect.Type { 313 return reflect.TypeOf((*map[string]*ObjectLambdaAccessPoint)(nil)).Elem() 314 } 315 316 func (o ObjectLambdaAccessPointMapOutput) ToObjectLambdaAccessPointMapOutput() ObjectLambdaAccessPointMapOutput { 317 return o 318 } 319 320 func (o ObjectLambdaAccessPointMapOutput) ToObjectLambdaAccessPointMapOutputWithContext(ctx context.Context) ObjectLambdaAccessPointMapOutput { 321 return o 322 } 323 324 func (o ObjectLambdaAccessPointMapOutput) MapIndex(k pulumi.StringInput) ObjectLambdaAccessPointOutput { 325 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ObjectLambdaAccessPoint { 326 return vs[0].(map[string]*ObjectLambdaAccessPoint)[vs[1].(string)] 327 }).(ObjectLambdaAccessPointOutput) 328 } 329 330 func init() { 331 pulumi.RegisterInputType(reflect.TypeOf((*ObjectLambdaAccessPointInput)(nil)).Elem(), &ObjectLambdaAccessPoint{}) 332 pulumi.RegisterInputType(reflect.TypeOf((*ObjectLambdaAccessPointArrayInput)(nil)).Elem(), ObjectLambdaAccessPointArray{}) 333 pulumi.RegisterInputType(reflect.TypeOf((*ObjectLambdaAccessPointMapInput)(nil)).Elem(), ObjectLambdaAccessPointMap{}) 334 pulumi.RegisterOutputType(ObjectLambdaAccessPointOutput{}) 335 pulumi.RegisterOutputType(ObjectLambdaAccessPointArrayOutput{}) 336 pulumi.RegisterOutputType(ObjectLambdaAccessPointMapOutput{}) 337 }