/AWS1/IF_DSY=>CREATELOCATIONS3()¶
About CreateLocationS3¶
Creates a transfer location for an Amazon S3 bucket. DataSync can use this location as a source or destination for transferring data.
Before you begin, make sure that you read the following topics:
For more information, see Configuring transfers with Amazon S3.
Method Signature¶
METHODS /AWS1/IF_DSY~CREATELOCATIONS3
IMPORTING
!IV_SUBDIRECTORY TYPE /AWS1/DSYS3SUBDIRECTORY OPTIONAL
!IV_S3BUCKETARN TYPE /AWS1/DSYS3BUCKETARN OPTIONAL
!IV_S3STORAGECLASS TYPE /AWS1/DSYS3STORAGECLASS OPTIONAL
!IO_S3CONFIG TYPE REF TO /AWS1/CL_DSYS3CONFIG OPTIONAL
!IT_AGENTARNS TYPE /AWS1/CL_DSYAGENTARNLIST_W=>TT_AGENTARNLIST OPTIONAL
!IT_TAGS TYPE /AWS1/CL_DSYTAGLISTENTRY=>TT_INPUTTAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dsycreatelocs3rsp
RAISING
/AWS1/CX_DSYINTERNALEXCEPTION
/AWS1/CX_DSYINVALIDREQUESTEX
/AWS1/CX_DSYCLIENTEXC
/AWS1/CX_DSYSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_s3bucketarn TYPE /AWS1/DSYS3BUCKETARN /AWS1/DSYS3BUCKETARN¶
Specifies the ARN of the S3 bucket that you want to use as a location. (When creating your DataSync task later, you specify whether this location is a transfer source or destination.)
If your S3 bucket is located on an Outposts resource, you must specify an Amazon S3 access point. For more information, see Managing data access with Amazon S3 access points in the Amazon S3 User Guide.
io_s3config TYPE REF TO /AWS1/CL_DSYS3CONFIG /AWS1/CL_DSYS3CONFIG¶
S3Config
Optional arguments:¶
iv_subdirectory TYPE /AWS1/DSYS3SUBDIRECTORY /AWS1/DSYS3SUBDIRECTORY¶
Specifies a prefix in the S3 bucket that DataSync reads from or writes to (depending on whether the bucket is a source or destination location).
DataSync can't transfer objects with a prefix that begins with a slash (
/) or includes//,/./, or/../patterns. For example:
/photos
photos//2006/January
photos/./2006/February
photos/../2006/March
iv_s3storageclass TYPE /AWS1/DSYS3STORAGECLASS /AWS1/DSYS3STORAGECLASS¶
Specifies the storage class that you want your objects to use when Amazon S3 is a transfer destination.
For buckets in Amazon Web Services Regions, the storage class defaults to
STANDARD. For buckets on Outposts, the storage class defaults toOUTPOSTS.For more information, see Storage class considerations with Amazon S3 transfers.
it_agentarns TYPE /AWS1/CL_DSYAGENTARNLIST_W=>TT_AGENTARNLIST TT_AGENTARNLIST¶
(Amazon S3 on Outposts only) Specifies the Amazon Resource Name (ARN) of the DataSync agent on your Outpost.
For more information, see Deploy your DataSync agent on Outposts.
it_tags TYPE /AWS1/CL_DSYTAGLISTENTRY=>TT_INPUTTAGLIST TT_INPUTTAGLIST¶
Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your transfer location.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dsycreatelocs3rsp /AWS1/CL_DSYCREATELOCS3RSP¶
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->createlocations3(
io_s3config = new /aws1/cl_dsys3config( |string| )
it_agentarns = VALUE /aws1/cl_dsyagentarnlist_w=>tt_agentarnlist(
( new /aws1/cl_dsyagentarnlist_w( |string| ) )
)
it_tags = VALUE /aws1/cl_dsytaglistentry=>tt_inputtaglist(
(
new /aws1/cl_dsytaglistentry(
iv_key = |string|
iv_value = |string|
)
)
)
iv_s3bucketarn = |string|
iv_s3storageclass = |string|
iv_subdirectory = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_locationarn = lo_result->get_locationarn( ).
ENDIF.