/AWS1/IF_S3C=>CREATEBUCKET()¶
About CreateBucket¶
This action creates an Amazon S3 on Outposts bucket. To create an S3 bucket, see Create Bucket in the Amazon S3 API Reference.
Creates a new Outposts bucket. By creating the bucket, you become the bucket owner. To create an Outposts bucket, you must have S3 on Outposts. For more information, see Using Amazon S3 on Outposts in Amazon S3 User Guide.
Not every string is an acceptable bucket name. For information on bucket naming restrictions, see Working with Amazon S3 Buckets.
S3 on Outposts buckets support:
-
Tags
-
LifecycleConfigurations for deleting expired objects
For a complete list of restrictions and Amazon S3 feature limitations on S3 on Outposts, see Amazon S3 on Outposts Restrictions and Limitations.
For an example of the request syntax for Amazon S3 on Outposts that uses the S3 on Outposts
endpoint hostname prefix and x-amz-outpost-id in your API request, see the
Examples section.
The following actions are related to CreateBucket for
Amazon S3 on Outposts:
Method Signature¶
METHODS /AWS1/IF_S3C~CREATEBUCKET
IMPORTING
!IV_ACL TYPE /AWS1/S3CBUCKETCANNEDACL OPTIONAL
!IV_BUCKET TYPE /AWS1/S3CBUCKETNAME OPTIONAL
!IO_CREATEBUCKETCONFIGURATION TYPE REF TO /AWS1/CL_S3CCREATEBUCKETCONF OPTIONAL
!IV_GRANTFULLCONTROL TYPE /AWS1/S3CGRANTFULLCONTROL OPTIONAL
!IV_GRANTREAD TYPE /AWS1/S3CGRANTREAD OPTIONAL
!IV_GRANTREADACP TYPE /AWS1/S3CGRANTREADACP OPTIONAL
!IV_GRANTWRITE TYPE /AWS1/S3CGRANTWRITE OPTIONAL
!IV_GRANTWRITEACP TYPE /AWS1/S3CGRANTWRITEACP OPTIONAL
!IV_OBJECTLOCKENABLEDFORBKT TYPE /AWS1/S3COBJLOCKENABLEDFORBKT OPTIONAL
!IV_OUTPOSTID TYPE /AWS1/S3CNONEMPTYMAXLENGTH6400 OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3ccreatebucketresult
RAISING
/AWS1/CX_S3CBUCKETALRDYEXISTS
/AWS1/CX_S3CBKTALRDYOWNEDBYYOU
/AWS1/CX_S3CCLIENTEXC
/AWS1/CX_S3CSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_bucket TYPE /AWS1/S3CBUCKETNAME /AWS1/S3CBUCKETNAME¶
The name of the bucket.
Optional arguments:¶
iv_acl TYPE /AWS1/S3CBUCKETCANNEDACL /AWS1/S3CBUCKETCANNEDACL¶
The canned ACL to apply to the bucket.
This is not supported by Amazon S3 on Outposts buckets.
io_createbucketconfiguration TYPE REF TO /AWS1/CL_S3CCREATEBUCKETCONF /AWS1/CL_S3CCREATEBUCKETCONF¶
The configuration information for the bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_grantfullcontrol TYPE /AWS1/S3CGRANTFULLCONTROL /AWS1/S3CGRANTFULLCONTROL¶
Allows grantee the read, write, read ACP, and write ACP permissions on the bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_grantread TYPE /AWS1/S3CGRANTREAD /AWS1/S3CGRANTREAD¶
Allows grantee to list the objects in the bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_grantreadacp TYPE /AWS1/S3CGRANTREADACP /AWS1/S3CGRANTREADACP¶
Allows grantee to read the bucket ACL.
This is not supported by Amazon S3 on Outposts buckets.
iv_grantwrite TYPE /AWS1/S3CGRANTWRITE /AWS1/S3CGRANTWRITE¶
Allows grantee to create, overwrite, and delete any object in the bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_grantwriteacp TYPE /AWS1/S3CGRANTWRITEACP /AWS1/S3CGRANTWRITEACP¶
Allows grantee to write the ACL for the applicable bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_objectlockenabledforbkt TYPE /AWS1/S3COBJLOCKENABLEDFORBKT /AWS1/S3COBJLOCKENABLEDFORBKT¶
Specifies whether you want S3 Object Lock to be enabled for the new bucket.
This is not supported by Amazon S3 on Outposts buckets.
iv_outpostid TYPE /AWS1/S3CNONEMPTYMAXLENGTH6400 /AWS1/S3CNONEMPTYMAXLENGTH6400¶
The ID of the Outposts where the bucket is being created.
This ID is required by Amazon S3 on Outposts buckets.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3ccreatebucketresult /AWS1/CL_S3CCREATEBUCKETRESULT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createbucket(
io_createbucketconfiguration = new /aws1/cl_s3ccreatebucketconf( |string| )
iv_acl = |string|
iv_bucket = |string|
iv_grantfullcontrol = |string|
iv_grantread = |string|
iv_grantreadacp = |string|
iv_grantwrite = |string|
iv_grantwriteacp = |string|
iv_objectlockenabledforbkt = ABAP_TRUE
iv_outpostid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_location = lo_result->get_location( ).
lv_s3regionalbucketarn = lo_result->get_bucketarn( ).
ENDIF.