create_access_point
¶
create_access_point(
account_id: AccountId,
name: AccessPointName,
bucket: BucketName,
*,
config_overrides: Optional[S3ControlClientConfig] = None,
vpc_configuration: Optional[VpcConfiguration] = None,
public_access_block_configuration: Optional[PublicAccessBlockConfiguration] = None,
bucket_account_id: Optional[AccountId] = None,
scope: Optional[Scope] = None,
tags: Optional[TagList] = None,
) -> CreateAccessPointResult
Creates an access point and associates it to a specified bucket. For more information, see Managing access to shared datasets with access points or Managing access to shared datasets in directory buckets with access points in the Amazon S3 User Guide.
To create an access point and attach it to a volume on an Amazon FSx file system, see CreateAndAttachS3AccessPoint in the Amazon FSx API Reference.
S3 on Outposts only supports VPC-style access points.
For more information, see Accessing Amazon S3 on Outposts using virtual private cloud (VPC) only access points in the Amazon S3 User Guide.
All Amazon S3 on Outposts REST API requests for this action require an additional parameter of x-amz-outpost-id to be passed with the request. In addition, you must use an S3 on Outposts endpoint hostname prefix instead of s3-control. For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts endpoint hostname prefix and the x-amz-outpost-id derived by using the access point ARN, see the Examples section.
The following actions are related to CreateAccessPoint:
Parameters:
-
account_id(AccountId) –The Amazon Web Services account ID for the account that owns the specified access point.
-
name(AccessPointName) –The name you want to assign to this access point.
For directory buckets, the access point name must consist of a base name that you provide and suffix that includes the
ZoneID(Amazon Web Services Availability Zone or Local Zone) of your bucket location, followed by--xa-s3. For more information, see Managing access to shared datasets in directory buckets with access points in the Amazon S3 User Guide. -
bucket(BucketName) –The name of the bucket that you want to associate this access point with.
For using this parameter with Amazon S3 on Outposts with the REST API, you must specify the name and the x-amz-outpost-id as well.
For using this parameter with S3 on Outposts with the Amazon Web Services SDK and CLI, you must specify the ARN of the bucket accessed in the format
arn:aws:s3-outposts:. For example, to access the bucket: :outpost/ /bucket/ reportsthrough Outpostmy-outpostowned by account123456789012in Regionus-west-2, use the URL encoding ofarn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/bucket/reports. The value must be URL encoded. -
vpc_configuration(Optional[VpcConfiguration], default:None) –If you include this field, Amazon S3 restricts access to this access point to requests from the specified virtual private cloud (VPC).
This is required for creating an access point for Amazon S3 on Outposts buckets.
-
public_access_block_configuration(Optional[PublicAccessBlockConfiguration], default:None) –The
PublicAccessBlockconfiguration that you want to apply to the access point. -
bucket_account_id(Optional[AccountId], default:None) –The Amazon Web Services account ID associated with the S3 bucket associated with this access point.
For same account access point when your bucket and access point belong to the same account owner, the
BucketAccountIdis not required. For cross-account access point when your bucket and access point are not in the same account, theBucketAccountIdis required. -
scope(Optional[Scope], default:None) –For directory buckets, you can filter access control to specific prefixes, API operations, or a combination of both. For more information, see Managing access to shared datasets in directory buckets with access points in the Amazon S3 User Guide.
Scope is only supported for access points attached to directory buckets.
-
tags(Optional[TagList], default:None) –An array of tags that you can apply to an access point. Tags are key-value pairs of metadata used to control access to your access points. For more information about tags, see Using tags with Amazon S3. For information about tagging access points, see Using tags for attribute-based access control (ABAC).
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_s3_control/_services/s3_control.py
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 | |