/AWS1/IF_CHS=>CREATECHANNEL()¶
About CreateChannel¶
Creates a channel to which you can add users and send messages.
Restriction: You can't change a channel's privacy.
The x-amz-chime-bearer request header is mandatory. Use the
ARN of the AppInstanceUser or AppInstanceBot that makes the API call as the value in
the header.
Method Signature¶
METHODS /AWS1/IF_CHS~CREATECHANNEL
IMPORTING
!IV_APPINSTANCEARN TYPE /AWS1/CHSCHIMEARN OPTIONAL
!IV_NAME TYPE /AWS1/CHSNONEMPTYRESOURCENAME OPTIONAL
!IV_MODE TYPE /AWS1/CHSCHANNELMODE OPTIONAL
!IV_PRIVACY TYPE /AWS1/CHSCHANNELPRIVACY OPTIONAL
!IV_METADATA TYPE /AWS1/CHSMETADATA OPTIONAL
!IV_CLIENTREQUESTTOKEN TYPE /AWS1/CHSCLIENTREQUESTTOKEN OPTIONAL
!IT_TAGS TYPE /AWS1/CL_CHSTAG=>TT_TAGLIST OPTIONAL
!IV_CHIMEBEARER TYPE /AWS1/CHSCHIMEARN OPTIONAL
!IV_CHANNELID TYPE /AWS1/CHSCHANNELID OPTIONAL
!IT_MEMBERARNS TYPE /AWS1/CL_CHSCHANNELMEMBERARN00=>TT_CHANNELMEMBERARNS OPTIONAL
!IT_MODERATORARNS TYPE /AWS1/CL_CHSCHANNELMDERATORA00=>TT_CHANNELMODERATORARNS OPTIONAL
!IO_ELASTICCHANNELCONF TYPE REF TO /AWS1/CL_CHSELASTICCHANNELCONF OPTIONAL
!IO_EXPIRATIONSETTINGS TYPE REF TO /AWS1/CL_CHSEXPIRATIONSETTINGS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_chscreatechannelrsp
RAISING
/AWS1/CX_CHSBADREQUESTEX
/AWS1/CX_CHSCONFLICTEXCEPTION
/AWS1/CX_CHSFORBIDDENEXCEPTION
/AWS1/CX_CHSRESRCLIMITEXCDEX
/AWS1/CX_CHSSERVICEFAILUREEX
/AWS1/CX_CHSSERVICEUNAVAILEX
/AWS1/CX_CHSTHROTTLEDCLIENTEX
/AWS1/CX_CHSUNAUTHDCLIENTEX
/AWS1/CX_CHSCLIENTEXC
/AWS1/CX_CHSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_appinstancearn TYPE /AWS1/CHSCHIMEARN /AWS1/CHSCHIMEARN¶
The ARN of the channel request.
iv_name TYPE /AWS1/CHSNONEMPTYRESOURCENAME /AWS1/CHSNONEMPTYRESOURCENAME¶
The name of the channel.
iv_clientrequesttoken TYPE /AWS1/CHSCLIENTREQUESTTOKEN /AWS1/CHSCLIENTREQUESTTOKEN¶
The client token for the request. An
Idempotencytoken.
iv_chimebearer TYPE /AWS1/CHSCHIMEARN /AWS1/CHSCHIMEARN¶
The ARN of the
AppInstanceUserorAppInstanceBotthat makes the API call.
Optional arguments:¶
iv_mode TYPE /AWS1/CHSCHANNELMODE /AWS1/CHSCHANNELMODE¶
The channel mode:
UNRESTRICTEDorRESTRICTED. Administrators, moderators, and channel members can add themselves and other members to unrestricted channels. Only administrators and moderators can add members to restricted channels.
iv_privacy TYPE /AWS1/CHSCHANNELPRIVACY /AWS1/CHSCHANNELPRIVACY¶
The channel's privacy level:
PUBLICorPRIVATE. Private channels aren't discoverable by users outside the channel. Public channels are discoverable by anyone in theAppInstance.
iv_metadata TYPE /AWS1/CHSMETADATA /AWS1/CHSMETADATA¶
The metadata of the creation request. Limited to 1KB and UTF-8.
it_tags TYPE /AWS1/CL_CHSTAG=>TT_TAGLIST TT_TAGLIST¶
The tags for the creation request.
iv_channelid TYPE /AWS1/CHSCHANNELID /AWS1/CHSCHANNELID¶
An ID for the channel being created. If you do not specify an ID, a UUID will be created for the channel.
it_memberarns TYPE /AWS1/CL_CHSCHANNELMEMBERARN00=>TT_CHANNELMEMBERARNS TT_CHANNELMEMBERARNS¶
The ARNs of the channel members in the request.
it_moderatorarns TYPE /AWS1/CL_CHSCHANNELMDERATORA00=>TT_CHANNELMODERATORARNS TT_CHANNELMODERATORARNS¶
The ARNs of the channel moderators in the request.
io_elasticchannelconf TYPE REF TO /AWS1/CL_CHSELASTICCHANNELCONF /AWS1/CL_CHSELASTICCHANNELCONF¶
The attributes required to configure and create an elastic channel. An elastic channel can support a maximum of 1-million users, excluding moderators.
io_expirationsettings TYPE REF TO /AWS1/CL_CHSEXPIRATIONSETTINGS /AWS1/CL_CHSEXPIRATIONSETTINGS¶
Settings that control the interval after which the channel is automatically deleted.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_chscreatechannelrsp /AWS1/CL_CHSCREATECHANNELRSP¶
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->createchannel(
io_elasticchannelconf = new /aws1/cl_chselasticchannelconf(
iv_maximumsubchannels = 123
iv_minmembershippercentage = 123
iv_tgtmembershipspersubcha00 = 123
)
io_expirationsettings = new /aws1/cl_chsexpirationsettings(
iv_expirationcriterion = |string|
iv_expirationdays = 123
)
it_memberarns = VALUE /aws1/cl_chschannelmemberarn00=>tt_channelmemberarns(
( new /aws1/cl_chschannelmemberarn00( |string| ) )
)
it_moderatorarns = VALUE /aws1/cl_chschannelmderatora00=>tt_channelmoderatorarns(
( new /aws1/cl_chschannelmderatora00( |string| ) )
)
it_tags = VALUE /aws1/cl_chstag=>tt_taglist(
(
new /aws1/cl_chstag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_appinstancearn = |string|
iv_channelid = |string|
iv_chimebearer = |string|
iv_clientrequesttoken = |string|
iv_metadata = |string|
iv_mode = |string|
iv_name = |string|
iv_privacy = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_chimearn = lo_result->get_channelarn( ).
ENDIF.