/AWS1/IF_KYS=>CREATEKEYSPACE()¶
About CreateKeyspace¶
The CreateKeyspace operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names must be unique within each Region.
CreateKeyspace is an asynchronous operation. You can monitor the creation status of the new keyspace by using the GetKeyspace operation.
For more information, see Create a keyspace in the Amazon Keyspaces Developer Guide.
Method Signature¶
METHODS /AWS1/IF_KYS~CREATEKEYSPACE
IMPORTING
!IV_KEYSPACENAME TYPE /AWS1/KYSKEYSPACENAME OPTIONAL
!IT_TAGS TYPE /AWS1/CL_KYSTAG=>TT_TAGLIST OPTIONAL
!IO_REPLICATIONSPECIFICATION TYPE REF TO /AWS1/CL_KYSREPLICATIONSPEC OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_kyscreatekeyspacersp
RAISING
/AWS1/CX_KYSACCESSDENIEDEX
/AWS1/CX_KYSCONFLICTEXCEPTION
/AWS1/CX_KYSINTERNALSERVEREX
/AWS1/CX_KYSSERVICEQUOTAEXCDEX
/AWS1/CX_KYSVALIDATIONEX
/AWS1/CX_KYSCLIENTEXC
/AWS1/CX_KYSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_keyspacename TYPE /AWS1/KYSKEYSPACENAME /AWS1/KYSKEYSPACENAME¶
The name of the keyspace to be created.
Optional arguments:¶
it_tags TYPE /AWS1/CL_KYSTAG=>TT_TAGLIST TT_TAGLIST¶
A list of key-value pair tags to be attached to the keyspace.
For more information, see Adding tags and labels to Amazon Keyspaces resources in the Amazon Keyspaces Developer Guide.
io_replicationspecification TYPE REF TO /AWS1/CL_KYSREPLICATIONSPEC /AWS1/CL_KYSREPLICATIONSPEC¶
The replication specification of the keyspace includes:
replicationStrategy- the required value isSINGLE_REGIONorMULTI_REGION.
regionList- if thereplicationStrategyisMULTI_REGION, theregionListrequires the current Region and at least one additional Amazon Web Services Region where the keyspace is going to be replicated in.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_kyscreatekeyspacersp /AWS1/CL_KYSCREATEKEYSPACERSP¶
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->createkeyspace(
io_replicationspecification = new /aws1/cl_kysreplicationspec(
it_regionlist = VALUE /aws1/cl_kysregionlist_w=>tt_regionlist(
( new /aws1/cl_kysregionlist_w( |string| ) )
)
iv_replicationstrategy = |string|
)
it_tags = VALUE /aws1/cl_kystag=>tt_taglist(
(
new /aws1/cl_kystag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_keyspacename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_arn = lo_result->get_resourcearn( ).
ENDIF.