Class 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());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Object Lambda Access Point policies using the `account_id` and `name`, separated by a colon (`:`). For example: ```sh $ pulumi import aws:s3control/objectLambdaAccessPointPolicy:ObjectLambdaAccessPointPolicy example 123456789012:example ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • 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()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.