/AWS1/IF_S3F=>CREATEFILESYSTEM()¶
About CreateFileSystem¶
Creates an S3 File System resource scoped to a bucket or prefix within a bucket, enabling file system access to S3 data. To create a file system, you need an S3 bucket and an IAM role that grants the service permission to access the bucket.
Method Signature¶
METHODS /AWS1/IF_S3F~CREATEFILESYSTEM
IMPORTING
!IV_BUCKET TYPE /AWS1/S3FBUCKETARN OPTIONAL
!IV_PREFIX TYPE /AWS1/S3FSTRING OPTIONAL
!IV_CLIENTTOKEN TYPE /AWS1/S3FCREATIONTOKEN OPTIONAL
!IV_KMSKEYID TYPE /AWS1/S3FKMSKEYID OPTIONAL
!IV_ROLEARN TYPE /AWS1/S3FROLEARN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_S3FTAG=>TT_TAGLIST OPTIONAL
!IV_ACCEPTBUCKETWARNING TYPE /AWS1/S3FBOOLEAN OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3fcreatefilesysrsp
RAISING
/AWS1/CX_S3FTHROTTLINGEX
/AWS1/CX_S3FCONFLICTEXCEPTION
/AWS1/CX_S3FINTERNALSERVEREX
/AWS1/CX_S3FRESOURCENOTFOUNDEX
/AWS1/CX_S3FSERVICEQUOTAEXCDEX
/AWS1/CX_S3FVLDTNEXCEPTION
/AWS1/CX_S3FCLIENTEXC
/AWS1/CX_S3FSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_bucket TYPE /AWS1/S3FBUCKETARN /AWS1/S3FBUCKETARN¶
The Amazon Resource Name (ARN) of the S3 bucket that will be accessible through the file system. The bucket must exist and be in the same Amazon Web Services Region as the file system.
iv_rolearn TYPE /AWS1/S3FROLEARN /AWS1/S3FROLEARN¶
The ARN of the IAM role that grants the S3 Files service permission to read and write data between the file system and the S3 bucket. This role must have the necessary permissions to access the specified bucket and prefix.
Optional arguments:¶
iv_prefix TYPE /AWS1/S3FSTRING /AWS1/S3FSTRING¶
An optional prefix within the S3 bucket to scope the file system access. If specified, the file system provides access only to objects with keys that begin with this prefix. If not specified, the file system provides access to the entire bucket.
iv_clienttoken TYPE /AWS1/S3FCREATIONTOKEN /AWS1/S3FCREATIONTOKEN¶
A unique, case-sensitive identifier that you provide to ensure idempotent creation. Up to 64 ASCII characters are allowed. If you don't specify a client token, the Amazon Web Services SDK automatically generates one.
iv_kmskeyid TYPE /AWS1/S3FKMSKEYID /AWS1/S3FKMSKEYID¶
The ARN, key ID, or alias of the KMS key to use for encryption. If not specified, the service uses a service-owned key for encryption. You can specify a KMS key using the following formats: key ID, ARN, key alias, or key alias ARN. If you use
KmsKeyId, the file system will be encrypted.
it_tags TYPE /AWS1/CL_S3FTAG=>TT_TAGLIST TT_TAGLIST¶
An array of key-value pairs to apply as tags to the file system resource. Each tag is a user-defined key-value pair. You can use tags to categorize and manage your file systems. Each key must be unique for the resource.
iv_acceptbucketwarning TYPE /AWS1/S3FBOOLEAN /AWS1/S3FBOOLEAN¶
Set to true to acknowledge and accept any warnings about the bucket configuration. If not specified, the operation may fail if there are bucket configuration warnings.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3fcreatefilesysrsp /AWS1/CL_S3FCREATEFILESYSRSP¶
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->createfilesystem(
it_tags = VALUE /aws1/cl_s3ftag=>tt_taglist(
(
new /aws1/cl_s3ftag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_acceptbucketwarning = ABAP_TRUE
iv_bucket = |string|
iv_clienttoken = |string|
iv_kmskeyid = |string|
iv_prefix = |string|
iv_rolearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_timestamp = lo_result->get_creationtime( ).
lv_filesystemarn = lo_result->get_filesystemarn( ).
lv_filesystemid = lo_result->get_filesystemid( ).
lv_bucketarn = lo_result->get_bucket( ).
lv_string = lo_result->get_prefix( ).
lv_clienttoken = lo_result->get_clienttoken( ).
lv_kmskeyid = lo_result->get_kmskeyid( ).
lv_lifecyclestate = lo_result->get_status( ).
lv_statusmessage = lo_result->get_statusmessage( ).
lv_rolearn = lo_result->get_rolearn( ).
lv_awsaccountid = lo_result->get_ownerid( ).
LOOP AT lo_result->get_tags( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_tagkey = lo_row_1->get_key( ).
lv_tagvalue = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_tagvalue = lo_result->get_name( ).
ENDIF.