Package com.pulumi.aws.s3control
Class ObjectLambdaAccessPointPolicy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.s3control.ObjectLambdaAccessPointPolicy
-
public class ObjectLambdaAccessPointPolicy extends com.pulumi.resources.CustomResource
Provides a resource to manage an S3 Object Lambda Access Point resource policy. ## Example Usage <!--Start PulumiCodeChooser -->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.BucketV2Args; 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 example = new BucketV2("example", BucketV2Args.builder() .bucket("example") .build()); var exampleAccessPoint = new AccessPoint("exampleAccessPoint", AccessPointArgs.builder() .bucket(example.id()) .name("example") .build()); var exampleObjectLambdaAccessPoint = new ObjectLambdaAccessPoint("exampleObjectLambdaAccessPoint", ObjectLambdaAccessPointArgs.builder() .name("example") .configuration(ObjectLambdaAccessPointConfigurationArgs.builder() .supportingAccessPoint(exampleAccessPoint.arn()) .transformationConfigurations(ObjectLambdaAccessPointConfigurationTransformationConfigurationArgs.builder() .actions("GetObject") .contentTransformation(ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationArgs.builder() .awsLambda(ObjectLambdaAccessPointConfigurationTransformationConfigurationContentTransformationAwsLambdaArgs.builder() .functionArn(exampleAwsLambdaFunction.arn()) .build()) .build()) .build()) .build()) .build()); var exampleObjectLambdaAccessPointPolicy = new ObjectLambdaAccessPointPolicy("exampleObjectLambdaAccessPointPolicy", ObjectLambdaAccessPointPolicyArgs.builder() .name(exampleObjectLambdaAccessPoint.name()) .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", current.accountId()) )), jsonProperty("Resource", arn) ))) )))) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description ObjectLambdaAccessPointPolicy(java.lang.String name)
ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args)
ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
accountId()
static ObjectLambdaAccessPointPolicy
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ObjectLambdaAccessPointPolicyState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.Boolean>
hasPublicAccessPolicy()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
policy()
-
-
-
Constructor Detail
-
ObjectLambdaAccessPointPolicy
public ObjectLambdaAccessPointPolicy(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
ObjectLambdaAccessPointPolicy
public ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
ObjectLambdaAccessPointPolicy
public ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
accountId
public com.pulumi.core.Output<java.lang.String> accountId()
- Returns:
- The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider.
-
hasPublicAccessPolicy
public com.pulumi.core.Output<java.lang.Boolean> hasPublicAccessPolicy()
- Returns:
- Indicates whether this access point currently has a policy that allows public access.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the Object Lambda Access Point.
-
policy
public com.pulumi.core.Output<java.lang.String> policy()
- Returns:
- The Object Lambda Access Point resource policy document.
-
get
public static ObjectLambdaAccessPointPolicy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ObjectLambdaAccessPointPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-