Skip to content
v2.278.0

CfnAccessPointProps Struct ​

Properties for defining a CfnAccessPoint.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_s3 as s3 } from 'aws-cdk-lib';

declare const policy: any;
const cfnAccessPointProps: s3.CfnAccessPointProps = {
  bucket: 'bucket',

  // the properties below are optional
  bucketAccountId: 'bucketAccountId',
  name: 'name',
  policy: policy,
  publicAccessBlockConfiguration: {
    blockPublicAcls: false,
    blockPublicPolicy: false,
    ignorePublicAcls: false,
    restrictPublicBuckets: false,
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  vpcConfiguration: {
    vpcId: 'vpcId',
  },
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_s3 as s3

# policy: Any

cfn_access_point_props = s3.CfnAccessPointProps(
    bucket="bucket",

    # the properties below are optional
    bucket_account_id="bucketAccountId",
    name="name",
    policy=policy,
    public_access_block_configuration=s3.CfnAccessPoint.PublicAccessBlockConfigurationProperty(
        block_public_acls=False,
        block_public_policy=False,
        ignore_public_acls=False,
        restrict_public_buckets=False
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    vpc_configuration=s3.CfnAccessPoint.VpcConfigurationProperty(
        vpc_id="vpcId"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.s3.*;

Object policy;

CfnAccessPointProps cfnAccessPointProps = CfnAccessPointProps.builder()
        .bucket("bucket")

        // the properties below are optional
        .bucketAccountId("bucketAccountId")
        .name("name")
        .policy(policy)
        .publicAccessBlockConfiguration(PublicAccessBlockConfigurationProperty.builder()
                .blockPublicAcls(false)
                .blockPublicPolicy(false)
                .ignorePublicAcls(false)
                .restrictPublicBuckets(false)
                .build())
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .vpcConfiguration(VpcConfigurationProperty.builder()
                .vpcId("vpcId")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.S3;

var policy;

var cfnAccessPointProps = new CfnAccessPointProps {
    Bucket = "bucket",

    // the properties below are optional
    BucketAccountId = "bucketAccountId",
    Name = "name",
    Policy = policy,
    PublicAccessBlockConfiguration = new PublicAccessBlockConfigurationProperty {
        BlockPublicAcls = false,
        BlockPublicPolicy = false,
        IgnorePublicAcls = false,
        RestrictPublicBuckets = false
    },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VpcConfiguration = new VpcConfigurationProperty {
        VpcId = "vpcId"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

var policy interface{}

cfnAccessPointProps := &CfnAccessPointProps{
	Bucket: jsii.String("bucket"),

	// the properties below are optional
	BucketAccountId: jsii.String("bucketAccountId"),
	Name: jsii.String("name"),
	Policy: policy,
	PublicAccessBlockConfiguration: &PublicAccessBlockConfigurationProperty{
		BlockPublicAcls: jsii.Boolean(false),
		BlockPublicPolicy: jsii.Boolean(false),
		IgnorePublicAcls: jsii.Boolean(false),
		RestrictPublicBuckets: jsii.Boolean(false),
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VpcConfiguration: &VpcConfigurationProperty{
		VpcId: jsii.String("vpcId"),
	},
}

Properties ​

bucketstring | IBucketRefbuckettyping.Union[str, IBucketRef]bucketStringBucketstringBucketinterface{} required #
The name of the bucket associated with this access point.
bucketAccountIdoptionalstringbucket_account_idoptionalstrbucketAccountIdoptionalStringBucketAccountIdoptionalstringBucketAccountIdoptional*string #
The AWS account ID associated with the S3 bucket associated with this access point.
nameoptionalstringnameoptionalstrnameoptionalStringNameoptionalstringNameoptional*string #
The name of this access point.

If you don't specify a name, AWS CloudFormation generates a unique ID and uses that ID for the access point name.

policyoptionalanypolicyoptionalAnypolicyoptionalObjectPolicyoptionalobjectPolicyoptionalinterface{} #
The access point policy associated with this access point.
publicAccessBlockConfigurationoptionalIResolvable | CfnAccessPoint.PublicAccessBlockConfigurationPropertypublic_access_block_configurationoptionaltyping.Union[IResolvable, PublicAccessBlockConfigurationProperty]publicAccessBlockConfigurationoptionalIResolvablePublicAccessBlockConfigurationoptionalIResolvablePublicAccessBlockConfigurationoptionalinterface{} #
The PublicAccessBlock configuration that you want to apply to this Amazon S3 bucket.
notes

You can enable the configuration options in any combination. For more information about when Amazon S3 considers a bucket or object public, see The Meaning of "Public" in the Amazon S3 User Guide .

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of tags that you can apply to access points.
notes

Tags are key-value pairs of metadata used to categorize your access points and control access. For more information, see Using tags for attribute-based access control (ABAC) .

vpcConfigurationoptionalIResolvable | CfnAccessPoint.VpcConfigurationPropertyvpc_configurationoptionaltyping.Union[IResolvable, VpcConfigurationProperty]vpcConfigurationoptionalIResolvableVpcConfigurationoptionalIResolvableVpcConfigurationoptionalinterface{} #
The Virtual Private Cloud (VPC) configuration for this access point, if one exists.