/AWS1/IF_KNS=>UPDSTREAMRECORDDISTRIBSTRAG()¶
About UpdateStreamRecordDistributionStrategy¶
Updates the record distribution strategy for the specified Amazon Kinesis Data Streams on-demand data stream. The record distribution strategy determines how Amazon Kinesis Data Streams distributes records across the shards in a stream.
You must specify the stream using the StreamARN parameter.
The record distribution strategy is a stream-level setting. You can switch between the following strategies at any time, and the change takes effect immediately without downtime, data loss, or disruption to producer or consumer applications:
-
AUTO– Amazon Kinesis Data Streams distributes records evenly across shards using service-managed algorithms, and ignores any partition key andExplicitHashKeythat a producer provides. Use this strategy for stateless workloads that do not require partition-key ordering. -
USER_PARTITION_KEY– Producers must provide a partition key, and Amazon Kinesis Data Streams uses the partition key to determine shard placement. Records that share a partition key are sent to the same shard. This is the default strategy.
This operation is only supported for data streams that use the on-demand capacity
mode. Provisioned capacity mode streams do not support the record distribution strategy
setting. Attempting to set AUTO on a provisioned stream results in an
InvalidArgumentException.
New records that arrive after the change are distributed according to the new strategy. Records already in the stream keep their original shard assignments and are not redistributed.
Method Signature¶
METHODS /AWS1/IF_KNS~UPDSTREAMRECORDDISTRIBSTRAG
IMPORTING
!IV_STREAMARN TYPE /AWS1/KNSSTREAMARN OPTIONAL
!IV_STREAMID TYPE /AWS1/KNSSTREAMID OPTIONAL
!IV_RECORDDISTRIBSTRATEGY TYPE /AWS1/KNSRECORDDISTRIBSTRATEGY OPTIONAL
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_streamarn TYPE /AWS1/KNSSTREAMARN /AWS1/KNSSTREAMARN¶
The Amazon Resource Name (ARN) of the stream to update.
iv_recorddistribstrategy TYPE /AWS1/KNSRECORDDISTRIBSTRATEGY /AWS1/KNSRECORDDISTRIBSTRATEGY¶
The record distribution strategy to apply to the stream. Specify one of the following values:
AUTO– Amazon Kinesis Data Streams distributes records evenly across shards and ignores any partition key andExplicitHashKeythat producers supply.
USER_PARTITION_KEY– Producers must supply a partition key, which Amazon Kinesis Data Streams uses to determine shard placement. This is the default.
Optional arguments:¶
iv_streamid TYPE /AWS1/KNSSTREAMID /AWS1/KNSSTREAMID¶
Not Implemented. Reserved for future use.
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.
lo_client->updstreamrecorddistribstrag(
iv_recorddistribstrategy = |string|
iv_streamarn = |string|
iv_streamid = |string|
).