All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.s3control.ObjectLambdaAccessPointPolicy Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.s3control;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.s3control.ObjectLambdaAccessPointPolicyArgs;
import com.pulumi.aws.s3control.inputs.ObjectLambdaAccessPointPolicyState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * Provides a resource to manage an S3 Object Lambda Access Point resource policy.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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 * ``` * */ @ResourceType(type="aws:s3control/objectLambdaAccessPointPolicy:ObjectLambdaAccessPointPolicy") public class ObjectLambdaAccessPointPolicy extends com.pulumi.resources.CustomResource { /** * The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. * */ @Export(name="accountId", refs={String.class}, tree="[0]") private Output accountId; /** * @return The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider. * */ public Output accountId() { return this.accountId; } /** * Indicates whether this access point currently has a policy that allows public access. * */ @Export(name="hasPublicAccessPolicy", refs={Boolean.class}, tree="[0]") private Output hasPublicAccessPolicy; /** * @return Indicates whether this access point currently has a policy that allows public access. * */ public Output hasPublicAccessPolicy() { return this.hasPublicAccessPolicy; } /** * The name of the Object Lambda Access Point. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the Object Lambda Access Point. * */ public Output name() { return this.name; } /** * The Object Lambda Access Point resource policy document. * */ @Export(name="policy", refs={String.class}, tree="[0]") private Output policy; /** * @return The Object Lambda Access Point resource policy document. * */ public Output policy() { return this.policy; } /** * * @param name The _unique_ name of the resulting resource. */ public ObjectLambdaAccessPointPolicy(java.lang.String name) { this(name, ObjectLambdaAccessPointPolicyArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ObjectLambdaAccessPointPolicy(java.lang.String name, ObjectLambdaAccessPointPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:s3control/objectLambdaAccessPointPolicy:ObjectLambdaAccessPointPolicy", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ObjectLambdaAccessPointPolicy(java.lang.String name, Output id, @Nullable ObjectLambdaAccessPointPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:s3control/objectLambdaAccessPointPolicy:ObjectLambdaAccessPointPolicy", name, state, makeResourceOptions(options, id), false); } private static ObjectLambdaAccessPointPolicyArgs makeArgs(ObjectLambdaAccessPointPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ObjectLambdaAccessPointPolicyArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ObjectLambdaAccessPointPolicy get(java.lang.String name, Output id, @Nullable ObjectLambdaAccessPointPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ObjectLambdaAccessPointPolicy(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy