/AWS1/IF_S3C=>CREATEACCESSGRANTSLOCATION()¶
About CreateAccessGrantsLocation¶
The S3 data location that you would like to register in your S3 Access Grants instance. Your S3 data must be in the same Region as your S3 Access Grants instance. The location can be one of the following:
-
The default S3 location
s3:// -
A bucket -
S3:// -
A bucket and prefix -
S3:///
When you register a location, you must include the IAM role that has permission to manage the S3 location that you are registering. Give S3 Access Grants permission to assume this role using a policy. S3 Access Grants assumes this role to manage access to the location and to vend temporary credentials to grantees or client applications.
- Permissions
-
You must have the
s3:CreateAccessGrantsLocationpermission to use this operation. - Additional Permissions
-
You must also have the following permission for the specified IAM role:
iam:PassRole
You must URL encode any signed header values that contain spaces. For example, if your header value is my file.txt, containing two spaces after my, you must URL encode this value to my%20%20file.txt.
Method Signature¶
METHODS /AWS1/IF_S3C~CREATEACCESSGRANTSLOCATION
IMPORTING
!IV_ACCOUNTID TYPE /AWS1/S3CACCOUNTID OPTIONAL
!IV_LOCATIONSCOPE TYPE /AWS1/S3CS3PREFIX OPTIONAL
!IV_IAMROLEARN TYPE /AWS1/S3CIAMROLEARN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_S3CTAG=>TT_TAGLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_s3ccreaccgrantslocrs
RAISING
/AWS1/CX_S3CCLIENTEXC
/AWS1/CX_S3CSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_accountid TYPE /AWS1/S3CACCOUNTID /AWS1/S3CACCOUNTID¶
The Amazon Web Services account ID of the S3 Access Grants instance.
iv_locationscope TYPE /AWS1/S3CS3PREFIX /AWS1/S3CS3PREFIX¶
The S3 path to the location that you are registering. The location scope can be the default S3 location
s3://, the S3 path to a buckets3://, or the S3 path to a bucket and prefixs3://. A prefix in S3 is a string of characters at the beginning of an object key name used to organize the objects that you store in your S3 buckets. For example, object key names that start with the/ engineering/prefix or object key names that start with themarketing/campaigns/prefix.
iv_iamrolearn TYPE /AWS1/S3CIAMROLEARN /AWS1/S3CIAMROLEARN¶
The Amazon Resource Name (ARN) of the IAM role for the registered location. S3 Access Grants assumes this role to manage access to the registered location.
Optional arguments:¶
it_tags TYPE /AWS1/CL_S3CTAG=>TT_TAGLIST TT_TAGLIST¶
The Amazon Web Services resource tags that you are adding to the S3 Access Grants location. Each tag is a label consisting of a user-defined key and value. Tags can help you manage, identify, organize, search for, and filter resources.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_s3ccreaccgrantslocrs /AWS1/CL_S3CCREACCGRANTSLOCRS¶
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->createaccessgrantslocation(
it_tags = VALUE /aws1/cl_s3ctag=>tt_taglist(
(
new /aws1/cl_s3ctag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_accountid = |string|
iv_iamrolearn = |string|
iv_locationscope = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_creationtimestamp = lo_result->get_createdat( ).
lv_accessgrantslocationid = lo_result->get_accessgrantslocationid( ).
lv_accessgrantslocationarn = lo_result->get_accessgrantslocationarn( ).
lv_s3prefix = lo_result->get_locationscope( ).
lv_iamrolearn = lo_result->get_iamrolearn( ).
ENDIF.