UNPKG

@pulumi/aws

Version:

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

101 lines 4.18 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.ObjectLambdaAccessPoint = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage an S3 Object Lambda Access Point. * An Object Lambda access point is associated with exactly one standard access point and thus one Amazon S3 bucket. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.s3.Bucket("example", {bucket: "example"}); * const exampleAccessPoint = new aws.s3.AccessPoint("example", { * bucket: example.id, * name: "example", * }); * const exampleObjectLambdaAccessPoint = new aws.s3control.ObjectLambdaAccessPoint("example", { * name: "example", * configuration: { * supportingAccessPoint: exampleAccessPoint.arn, * transformationConfigurations: [{ * actions: ["GetObject"], * contentTransformation: { * awsLambda: { * functionArn: exampleAwsLambdaFunction.arn, * }, * }, * }], * }, * }); * ``` * * ## Import * * Using `pulumi import`, import Object Lambda Access Points using the `account_id` and `name`, separated by a colon (`:`). For example: * * ```sh * $ pulumi import aws:s3control/objectLambdaAccessPoint:ObjectLambdaAccessPoint example 123456789012:example * ``` */ class ObjectLambdaAccessPoint extends pulumi.CustomResource { /** * Get an existing ObjectLambdaAccessPoint 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new ObjectLambdaAccessPoint(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of ObjectLambdaAccessPoint. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ObjectLambdaAccessPoint.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["accountId"] = state?.accountId; resourceInputs["alias"] = state?.alias; resourceInputs["arn"] = state?.arn; resourceInputs["configuration"] = state?.configuration; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; } else { const args = argsOrState; if (args?.configuration === undefined && !opts.urn) { throw new Error("Missing required property 'configuration'"); } resourceInputs["accountId"] = args?.accountId; resourceInputs["configuration"] = args?.configuration; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["alias"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ObjectLambdaAccessPoint.__pulumiType, name, resourceInputs, opts); } } exports.ObjectLambdaAccessPoint = ObjectLambdaAccessPoint; /** @internal */ ObjectLambdaAccessPoint.__pulumiType = 'aws:s3control/objectLambdaAccessPoint:ObjectLambdaAccessPoint'; //# sourceMappingURL=objectLambdaAccessPoint.js.map