/AWS1/IF_KNS=>UPDATECHANNEL()¶
About UpdateChannel¶
Updates the data freshness interval or the Amazon CloudWatch Logs configuration of an existing channel. You cannot change the destination, source stream, record format, schema, encryption configuration, or service execution role of an existing channel. To change any other setting, delete the channel and create a new one.
Updating a channel is an asynchronous operation. Upon receiving the request, Amazon Kinesis Data Streams sets the channel to the UPDATING state and returns immediately. After the change is applied, Amazon Kinesis Data Streams sets the channel back to the ACTIVE state.
This operation has a call limit of 5 transactions per second (TPS) for each Amazon Web Services account. Exceeding 5 TPS results in a LimitExceededException.
Method Signature¶
METHODS /AWS1/IF_KNS~UPDATECHANNEL
IMPORTING
!IV_CHANNELARN TYPE /AWS1/KNSCHANNELARN OPTIONAL
!IO_S3DESTINATIONCONF TYPE REF TO /AWS1/CL_KNSS3DSTUPDATEINPUT OPTIONAL
!IO_S3TABLESDESTINATIONCONF TYPE REF TO /AWS1/CL_KNSS3TBLDSTUPDINPUT OPTIONAL
!IO_LOGGINGCONFIGURATION TYPE REF TO /AWS1/CL_KNSCHNLLOGUPDATEINPUT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_knsupdatechnloutput
RAISING
/AWS1/CX_KNSACCESSDENIEDEX
/AWS1/CX_KNSINVALIDARGUMENTEX
/AWS1/CX_KNSLIMITEXCEEDEDEX
/AWS1/CX_KNSRESOURCEINUSEEX
/AWS1/CX_KNSRESOURCENOTFOUNDEX
/AWS1/CX_KNSVALIDATIONEX
/AWS1/CX_KNSCLIENTEXC
/AWS1/CX_KNSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_channelarn TYPE /AWS1/KNSCHANNELARN /AWS1/KNSCHANNELARN¶
The Amazon Resource Name (ARN) of the channel to update.
Optional arguments:¶
io_s3destinationconf TYPE REF TO /AWS1/CL_KNSS3DSTUPDATEINPUT /AWS1/CL_KNSS3DSTUPDATEINPUT¶
The updated configuration for a general purpose Amazon S3 destination. Specify this parameter when the channel delivers to a general purpose Amazon S3 bucket. Only
DataFreshnessInSecondscan be updated.
io_s3tablesdestinationconf TYPE REF TO /AWS1/CL_KNSS3TBLDSTUPDINPUT /AWS1/CL_KNSS3TBLDSTUPDINPUT¶
The updated configuration for a streaming table destination. Specify this parameter when the channel delivers to streaming tables on Apache Iceberg in Amazon S3 Tables. Only
DataFreshnessInSecondscan be updated.
io_loggingconfiguration TYPE REF TO /AWS1/CL_KNSCHNLLOGUPDATEINPUT /AWS1/CL_KNSCHNLLOGUPDATEINPUT¶
The updated Amazon CloudWatch Logs configuration for the channel.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_knsupdatechnloutput /AWS1/CL_KNSUPDATECHNLOUTPUT¶
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->updatechannel(
io_loggingconfiguration = new /aws1/cl_knschnllogupdateinput(
io_cloudwatchlogs = new /aws1/cl_knscwlogsupdateinput(
iv_enabled = ABAP_TRUE
iv_loggroupname = |string|
iv_logstreamname = |string|
)
)
io_s3destinationconf = new /aws1/cl_knss3dstupdateinput( 123 )
io_s3tablesdestinationconf = new /aws1/cl_knss3tbldstupdinput( 123 )
iv_channelarn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_channeldescription = lo_result->get_channeldescription( ).
IF lo_channeldescription IS NOT INITIAL.
lv_channelname = lo_channeldescription->get_channelname( ).
lv_channelarn = lo_channeldescription->get_channelarn( ).
lv_channelid = lo_channeldescription->get_channelid( ).
lv_channelstatus = lo_channeldescription->get_channelstatus( ).
lv_channelstatusreason = lo_channeldescription->get_channelstatusreason( ).
lv_timestamp = lo_channeldescription->get_channelcreationtimestamp( ).
lv_rolearn = lo_channeldescription->get_serviceexecutionrolearn( ).
LOOP AT lo_channeldescription->get_streamconfigurationlist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_streamarn = lo_row_1->get_streamarn( ).
lv_timestamp = lo_row_1->get_streamcreationtimestamp( ).
lo_recordconfiguration = lo_row_1->get_recordconfiguration( ).
IF lo_recordconfiguration IS NOT INITIAL.
lv_recordformattype = lo_recordconfiguration->get_recordformattype( ).
lv_gsrschemaarn = lo_recordconfiguration->get_gsrschemaarn( ).
ENDIF.
ENDIF.
ENDLOOP.
lo_s3destinationdescriptio = lo_channeldescription->get_s3destinationconf( ).
IF lo_s3destinationdescriptio IS NOT INITIAL.
lv_datafreshnessinseconds = lo_s3destinationdescriptio->get_datafreshnessinseconds( ).
lo_deadletterqueues3config = lo_s3destinationdescriptio->get_deadletterqueues3conf( ).
IF lo_deadletterqueues3config IS NOT INITIAL.
lv_bucketarn = lo_deadletterqueues3config->get_bucketarn( ).
lv_expectedbucketowner = lo_deadletterqueues3config->get_expectedbucketowner( ).
lv_s3erroroutputprefix = lo_deadletterqueues3config->get_erroroutputprefix( ).
ENDIF.
lo_s3storageconfiguration = lo_s3destinationdescriptio->get_storageconfiguration( ).
IF lo_s3storageconfiguration IS NOT INITIAL.
lv_bucketarn = lo_s3storageconfiguration->get_bucketarn( ).
lv_expectedbucketowner = lo_s3storageconfiguration->get_expectedbucketowner( ).
lv_s3outputkeytemplate = lo_s3storageconfiguration->get_outputkeytemplate( ).
lv_s3storageclass = lo_s3storageconfiguration->get_storageclass( ).
lv_s3compressiontype = lo_s3storageconfiguration->get_compressiontype( ).
ENDIF.
ENDIF.
lo_s3tablesdestinationdesc = lo_channeldescription->get_s3tablesdestinationconf( ).
IF lo_s3tablesdestinationdesc IS NOT INITIAL.
lv_datafreshnessinseconds = lo_s3tablesdestinationdesc->get_datafreshnessinseconds( ).
lo_deadletterqueues3config = lo_s3tablesdestinationdesc->get_deadletterqueues3conf( ).
IF lo_deadletterqueues3config IS NOT INITIAL.
lv_bucketarn = lo_deadletterqueues3config->get_bucketarn( ).
lv_expectedbucketowner = lo_deadletterqueues3config->get_expectedbucketowner( ).
lv_s3erroroutputprefix = lo_deadletterqueues3config->get_erroroutputprefix( ).
ENDIF.
LOOP AT lo_s3tablesdestinationdesc->get_s3tablesconflist( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_tablebucketarn = lo_row_3->get_tablebucketarn( ).
lv_s3tablesnamespace = lo_row_3->get_namespace( ).
lv_s3tablestablename = lo_row_3->get_tablename( ).
lv_s3tablescompressiontype = lo_row_3->get_compressiontype( ).
lo_partitionspec = lo_row_3->get_partitionspec( ).
IF lo_partitionspec IS NOT INITIAL.
LOOP AT lo_partitionspec->get_partitionfields( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_partitiontransform = lo_row_5->get_transform( ).
lv_partitionsourcename = lo_row_5->get_sourcename( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
lo_channelencryptionconfig = lo_channeldescription->get_encryptionconfiguration( ).
IF lo_channelencryptionconfig IS NOT INITIAL.
lv_channelencryptiontype = lo_channelencryptionconfig->get_encryptiontype( ).
lv_keyid = lo_channelencryptionconfig->get_keyid( ).
ENDIF.
lo_channelloggingconfigura = lo_channeldescription->get_loggingconfiguration( ).
IF lo_channelloggingconfigura IS NOT INITIAL.
lo_cloudwatchlogs = lo_channelloggingconfigura->get_cloudwatchlogs( ).
IF lo_cloudwatchlogs IS NOT INITIAL.
lv_booleanobject = lo_cloudwatchlogs->get_enabled( ).
lv_cloudwatchloggroupname = lo_cloudwatchlogs->get_loggroupname( ).
lv_cloudwatchlogstreamname = lo_cloudwatchlogs->get_logstreamname( ).
ENDIF.
ENDIF.
ENDIF.
ENDIF.
To update a channel¶
To update a channel
DATA(lo_result) = lo_client->updatechannel(
io_loggingconfiguration = new /aws1/cl_knschnllogupdateinput(
io_cloudwatchlogs = new /aws1/cl_knscwlogsupdateinput(
iv_enabled = ABAP_TRUE
iv_loggroupname = |/aws/kinesis/my-channel|
iv_logstreamname = |my-channel-log-stream|
)
)
io_s3destinationconf = new /aws1/cl_knss3dstupdateinput( 600 )
iv_channelarn = |arn:aws:kinesis:us-east-1:123456789012:channel/my-channel-id|
).