Expand description
Provides a resource to manage an S3 Access Point.
NOTE on Access Points and Access Point Policies: This provider provides both a standalone Access Point Policy resource and an Access Point resource with a resource policy defined in-line. You cannot use an Access Point with in-line resource policy in conjunction with an Access Point Policy resource. Doing so will cause a conflict of policies and will overwrite the access point’s resource policy.
Advanced usage: To use a custom API endpoint for this resource, use the
s3control
endpoint provider configuration), not thes3
endpoint provider configuration.
This resource cannot be used with S3 directory buckets.
§Example Usage
§AWS Partition General Purpose Bucket
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = bucket_v_2::create(
"example",
BucketV2Args::builder().bucket("example").build_struct(),
);
let exampleAccessPoint = access_point::create(
"exampleAccessPoint",
AccessPointArgs::builder().bucket("${example.id}").name("example").build_struct(),
);
}
§S3 on Outposts Bucket
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = bucket::create(
"example",
BucketArgs::builder().bucket("example").build_struct(),
);
let exampleAccessPoint = access_point::create(
"exampleAccessPoint",
AccessPointArgs::builder()
.bucket("${example.arn}")
.name("example")
.vpc_configuration(
AccessPointVpcConfiguration::builder()
.vpcId("${exampleVpc.id}")
.build_struct(),
)
.build_struct(),
);
let exampleVpc = vpc::create(
"exampleVpc",
VpcArgs::builder().cidr_block("10.0.0.0/16").build_struct(),
);
}
§Import
Import using the ARN for Access Points associated with an S3 on Outposts Bucket:
Using pulumi import
to import. For example:
Import using the account_id
and name
separated by a colon (:
) for Access Points associated with an AWS Partition S3 Bucket:
$ pulumi import aws:s3/accessPoint:AccessPoint example 123456789012:example
Import using the ARN for Access Points associated with an S3 on Outposts Bucket:
$ pulumi import aws:s3/accessPoint:AccessPoint example arn:aws:s3-outposts:us-east-1:123456789012:outpost/op-1234567890123456/accesspoint/example
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments