public class UpdateShardCountRequest extends AmazonWebServiceRequest implements java.io.Serializable
Updates the shard count of the specified stream to the specified number of shards.
Updating the shard count is an asynchronous operation. Upon receiving the
request, Kinesis Data Streams returns immediately and sets the status of the
stream to UPDATING
. After the update is complete, Kinesis Data
Streams sets the status of the stream back to ACTIVE
. Depending
on the size of the stream, the scaling action could take a few minutes to
complete. You can continue to read and write data to your stream while its
status is UPDATING
.
To update the shard count, Kinesis Data Streams performs splits or merges on individual shards. This can cause short-lived shards to be created, in addition to the final shards. We recommend that you double or halve the shard count, as this results in the fewest number of splits or merges.
This operation has the following limits. You cannot do the following:
Scale more than twice per rolling 24-hour period per stream
Scale up to more than double your current shard count for a stream
Scale down below half your current shard count for a stream
Scale up to more than 500 shards in a stream
Scale a stream with more than 500 shards down unless the result is less than 500 shards
Scale up to more than the shard limit for your account
For the default limits for an AWS account, see Streams Limits in the Amazon Kinesis Data Streams Developer Guide. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the limits form.
Constructor and Description |
---|
UpdateShardCountRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getScalingType()
The scaling type.
|
java.lang.String |
getStreamName()
The name of the stream.
|
java.lang.Integer |
getTargetShardCount()
The new number of shards.
|
int |
hashCode() |
void |
setScalingType(ScalingType scalingType)
The scaling type.
|
void |
setScalingType(java.lang.String scalingType)
The scaling type.
|
void |
setStreamName(java.lang.String streamName)
The name of the stream.
|
void |
setTargetShardCount(java.lang.Integer targetShardCount)
The new number of shards.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
UpdateShardCountRequest |
withScalingType(ScalingType scalingType)
The scaling type.
|
UpdateShardCountRequest |
withScalingType(java.lang.String scalingType)
The scaling type.
|
UpdateShardCountRequest |
withStreamName(java.lang.String streamName)
The name of the stream.
|
UpdateShardCountRequest |
withTargetShardCount(java.lang.Integer targetShardCount)
The new number of shards.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getStreamName()
The name of the stream.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+
The name of the stream.
public void setStreamName(java.lang.String streamName)
The name of the stream.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+
streamName
- The name of the stream.
public UpdateShardCountRequest withStreamName(java.lang.String streamName)
The name of the stream.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [a-zA-Z0-9_.-]+
streamName
- The name of the stream.
public java.lang.Integer getTargetShardCount()
The new number of shards.
Constraints:
Range: 1 - 100000
The new number of shards.
public void setTargetShardCount(java.lang.Integer targetShardCount)
The new number of shards.
Constraints:
Range: 1 - 100000
targetShardCount
- The new number of shards.
public UpdateShardCountRequest withTargetShardCount(java.lang.Integer targetShardCount)
The new number of shards.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Range: 1 - 100000
targetShardCount
- The new number of shards.
public java.lang.String getScalingType()
The scaling type. Uniform scaling creates shards of equal size.
Constraints:
Allowed Values: UNIFORM_SCALING
The scaling type. Uniform scaling creates shards of equal size.
ScalingType
public void setScalingType(java.lang.String scalingType)
The scaling type. Uniform scaling creates shards of equal size.
Constraints:
Allowed Values: UNIFORM_SCALING
scalingType
- The scaling type. Uniform scaling creates shards of equal size.
ScalingType
public UpdateShardCountRequest withScalingType(java.lang.String scalingType)
The scaling type. Uniform scaling creates shards of equal size.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: UNIFORM_SCALING
scalingType
- The scaling type. Uniform scaling creates shards of equal size.
ScalingType
public void setScalingType(ScalingType scalingType)
The scaling type. Uniform scaling creates shards of equal size.
Constraints:
Allowed Values: UNIFORM_SCALING
scalingType
- The scaling type. Uniform scaling creates shards of equal size.
ScalingType
public UpdateShardCountRequest withScalingType(ScalingType scalingType)
The scaling type. Uniform scaling creates shards of equal size.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: UNIFORM_SCALING
scalingType
- The scaling type. Uniform scaling creates shards of equal size.
ScalingType
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.