ObjectLambdaAccessPointPolicyArgs

data class ObjectLambdaAccessPointPolicyArgs(val accountId: Output<String>? = null, val name: Output<String>? = null, val policy: Output<String>? = null) : ConvertibleToJava<ObjectLambdaAccessPointPolicyArgs>

Provides a resource to manage an S3 Object Lambda Access Point resource policy.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.BucketV2;
import com.pulumi.aws.s3.AccessPoint;
import com.pulumi.aws.s3.AccessPointArgs;
import com.pulumi.aws.s3control.ObjectLambdaAccessPoint;
import com.pulumi.aws.s3control.ObjectLambdaAccessPointArgs;
import com.pulumi.aws.s3control.inputs.ObjectLambdaAccessPointConfigurationArgs;
import com.pulumi.aws.s3control.ObjectLambdaAccessPointPolicy;
import com.pulumi.aws.s3control.ObjectLambdaAccessPointPolicyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleBucketV2 = new BucketV2("exampleBucketV2");
var exampleAccessPoint = new AccessPoint("exampleAccessPoint", AccessPointArgs.builder()
.bucket(exampleBucketV2.id())
.build());
var exampleObjectLambdaAccessPoint = new ObjectLambdaAccessPoint("exampleObjectLambdaAccessPoint", ObjectLambdaAccessPointArgs.builder()
.configuration(ObjectLambdaAccessPointConfigurationArgs.builder()
.supportingAccessPoint(exampleAccessPoint.arn())
.transformationConfigurations(ObjectLambdaAccessPointConfigurationTransformationConfigurationArgs.builder()
.actions("GetObject")
.contentTransformation(ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationArgs.builder()
.awsLambda(ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaArgs.builder()
.functionArn(aws_lambda_function.example().arn())
.build())
.build())
.build())
.build())
.build());
var exampleObjectLambdaAccessPointPolicy = new ObjectLambdaAccessPointPolicy("exampleObjectLambdaAccessPointPolicy", ObjectLambdaAccessPointPolicyArgs.builder()
.policy(exampleObjectLambdaAccessPoint.arn().applyValue(arn -> serializeJson(
jsonObject(
jsonProperty("Version", "2008-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Effect", "Allow"),
jsonProperty("Action", "s3-object-lambda:GetObject"),
jsonProperty("Principal", jsonObject(
jsonProperty("AWS", data.aws_caller_identity().current().account_id())
)),
jsonProperty("Resource", arn)
)))
))))
.build());
}
}

Import

Object Lambda Access Point policies can be imported using the account_id and name, separated by a colon (:), e.g.

$ pulumi import aws:s3control/objectLambdaAccessPointPolicy:ObjectLambdaAccessPointPolicy example 123456789012:example

Constructors

Link copied to clipboard
constructor(accountId: Output<String>? = null, name: Output<String>? = null, policy: Output<String>? = null)

Properties

Link copied to clipboard
val accountId: Output<String>? = null

The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider.

Link copied to clipboard
val name: Output<String>? = null

The name of the Object Lambda Access Point.

Link copied to clipboard
val policy: Output<String>? = null

The Object Lambda Access Point resource policy document.

Functions

Link copied to clipboard
open override fun toJava(): ObjectLambdaAccessPointPolicyArgs