@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
145 lines (144 loc) • 5.9 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage an S3 Object Lambda Access Point resource policy.
*
* ## 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,
* },
* },
* }],
* },
* });
* const exampleObjectLambdaAccessPointPolicy = new aws.s3control.ObjectLambdaAccessPointPolicy("example", {
* name: exampleObjectLambdaAccessPoint.name,
* policy: pulumi.jsonStringify({
* Version: "2008-10-17",
* Statement: [{
* Effect: "Allow",
* Action: "s3-object-lambda:GetObject",
* Principal: {
* AWS: current.accountId,
* },
* Resource: exampleObjectLambdaAccessPoint.arn,
* }],
* }),
* });
* ```
*
* ## 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
* ```
*/
export declare class ObjectLambdaAccessPointPolicy extends pulumi.CustomResource {
/**
* Get an existing ObjectLambdaAccessPointPolicy 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: string, id: pulumi.Input<pulumi.ID>, state?: ObjectLambdaAccessPointPolicyState, opts?: pulumi.CustomResourceOptions): ObjectLambdaAccessPointPolicy;
/**
* Returns true if the given object is an instance of ObjectLambdaAccessPointPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is ObjectLambdaAccessPointPolicy;
/**
* The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider.
*/
readonly accountId: pulumi.Output<string>;
/**
* Indicates whether this access point currently has a policy that allows public access.
*/
readonly hasPublicAccessPolicy: pulumi.Output<boolean>;
/**
* The name of the Object Lambda Access Point.
*/
readonly name: pulumi.Output<string>;
/**
* The Object Lambda Access Point resource policy document.
*/
readonly policy: pulumi.Output<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Create a ObjectLambdaAccessPointPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ObjectLambdaAccessPointPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ObjectLambdaAccessPointPolicy resources.
*/
export interface ObjectLambdaAccessPointPolicyState {
/**
* The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider.
*/
accountId?: pulumi.Input<string>;
/**
* Indicates whether this access point currently has a policy that allows public access.
*/
hasPublicAccessPolicy?: pulumi.Input<boolean>;
/**
* The name of the Object Lambda Access Point.
*/
name?: pulumi.Input<string>;
/**
* The Object Lambda Access Point resource policy document.
*/
policy?: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ObjectLambdaAccessPointPolicy resource.
*/
export interface ObjectLambdaAccessPointPolicyArgs {
/**
* The AWS account ID for the account that owns the Object Lambda Access Point. Defaults to automatically determined account ID of the AWS provider.
*/
accountId?: pulumi.Input<string>;
/**
* The name of the Object Lambda Access Point.
*/
name?: pulumi.Input<string>;
/**
* The Object Lambda Access Point resource policy document.
*/
policy: pulumi.Input<string>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}