Amazon Kinesis Shards API

Operations for listing, splitting, merging, and managing shards within a stream.

Documentation

📖
Documentation
https://docs.aws.amazon.com/kinesis/latest/APIReference/
📖
GettingStarted
https://aws.amazon.com/kinesis/data-streams/getting-started/
📖
Documentation
https://docs.aws.amazon.com/streams/latest/dev/introduction.html
📖
APIReference
https://docs.aws.amazon.com/kinesis/latest/APIReference/
📖
RateLimits
https://docs.aws.amazon.com/streams/latest/dev/service-sizes-and-limits.html
📖
Documentation
https://docs.aws.amazon.com/firehose/latest/APIReference/
📖
GettingStarted
https://aws.amazon.com/kinesis/data-firehose/getting-started/
📖
Documentation
https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html
📖
Documentation
https://docs.aws.amazon.com/managed-flink/latest/apiv2/Welcome.html
📖
GettingStarted
https://docs.aws.amazon.com/managed-flink/latest/java/getting-started.html
📖
Documentation
https://docs.aws.amazon.com/managed-flink/latest/java/what-is.html
📖
Documentation
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/
📖
GettingStarted
https://aws.amazon.com/kinesis/video-streams/getting-started/
📖
APIReference
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Reference.html
📖
Documentation
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_Streams_Media.html
📖
Documentation
https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_Operations_Amazon_Kinesis_Video_Streams_Archived_Media.html
📖
Documentation
https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/what-is-kvswebrtc.html

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

amazon-kinesis-shards-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Kinesis Data Streams Account Shards API
  description: Amazon Kinesis Data Streams is a massively scalable and durable real-time data streaming service. It can continuously capture gigabytes of data per second from hundreds of thousands of sources such as website clickstreams, database event streams, financial transactions, social media feeds, IT logs, and location-tracking events. The Kinesis Data Streams API uses a JSON protocol over HTTP with the X-Amz-Target header to specify the action.
  version: '2013-12-02'
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/kinesis/data-streams/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-logo:
    url: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg
servers:
- url: https://kinesis.{region}.amazonaws.com
  description: Amazon Kinesis Data Streams regional endpoint
  variables:
    region:
      default: us-east-1
      description: AWS region
      enum:
      - us-east-1
      - us-east-2
      - us-west-1
      - us-west-2
      - eu-west-1
      - eu-west-2
      - eu-west-3
      - eu-central-1
      - eu-north-1
      - ap-northeast-1
      - ap-northeast-2
      - ap-southeast-1
      - ap-southeast-2
      - ap-south-1
      - sa-east-1
      - ca-central-1
security:
- aws_sigv4: []
tags:
- name: Shards
  description: Operations for listing, splitting, merging, and managing shards within a stream.
paths:
  /#X-Amz-Target=Kinesis_20131202.ListShards:
    post:
      operationId: ListShards
      summary: Amazon Kinesis List shards in a stream
      description: Lists the shards in a stream and provides information about each shard. This operation has a limit of 100 transactions per second per data stream.
      tags:
      - Shards
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-ListShards'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/ListShardsInput'
      responses:
        '200':
          description: Shard list returned successfully.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ListShardsOutput'
        '400':
          description: Invalid argument or limit exceeded.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /#X-Amz-Target=Kinesis_20131202.SplitShard:
    post:
      operationId: SplitShard
      summary: Amazon Kinesis Split a shard into two shards
      description: Splits a shard into two new shards in the Kinesis data stream, to increase the stream's capacity to ingest and transport data. SplitShard is called when there is a need to increase the overall capacity of a stream because of an expected increase in the volume of data records being ingested.
      tags:
      - Shards
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-SplitShard'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/SplitShardInput'
      responses:
        '200':
          description: Shard split initiated successfully.
        '400':
          description: Invalid argument or resource limit exceeded.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /#X-Amz-Target=Kinesis_20131202.MergeShards:
    post:
      operationId: MergeShards
      summary: Amazon Kinesis Merge two adjacent shards
      description: Merges two adjacent shards in a Kinesis data stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps.
      tags:
      - Shards
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-MergeShards'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/MergeShardsInput'
      responses:
        '200':
          description: Shard merge initiated successfully.
        '400':
          description: Invalid argument or resource limit exceeded.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /#X-Amz-Target=Kinesis_20131202.UpdateShardCount:
    post:
      operationId: UpdateShardCount
      summary: Amazon Kinesis Update the shard count for a stream
      description: Updates the shard count of the specified stream to the specified number of shards. This API is only supported for the streams with the provisioned capacity mode.
      tags:
      - Shards
      parameters:
      - $ref: '#/components/parameters/X-Amz-Target-UpdateShardCount'
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/UpdateShardCountInput'
      responses:
        '200':
          description: Shard count update initiated successfully.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/UpdateShardCountOutput'
        '400':
          description: Invalid argument or resource limit exceeded.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ScalingType:
      type: string
      enum:
      - UNIFORM_SCALING
      description: The scaling type for the UpdateShardCount operation.
    UpdateShardCountOutput:
      type: object
      properties:
        StreamName:
          $ref: '#/components/schemas/StreamName'
        StreamARN:
          $ref: '#/components/schemas/StreamARN'
        CurrentShardCount:
          type: integer
          description: The current number of shards.
        TargetShardCount:
          type: integer
          description: The updated number of shards.
    ListShardsOutput:
      type: object
      properties:
        Shards:
          type: array
          items:
            $ref: '#/components/schemas/Shard'
          description: An array of JSON objects representing shards.
        NextToken:
          type: string
          description: Pagination token for the next call.
    UpdateShardCountInput:
      type: object
      required:
      - TargetShardCount
      - ScalingType
      properties:
        StreamName:
          $ref: '#/components/schemas/StreamName'
        StreamARN:
          $ref: '#/components/schemas/StreamARN'
        TargetShardCount:
          type: integer
          minimum: 1
          description: The new number of shards.
        ScalingType:
          $ref: '#/components/schemas/ScalingType'
    SplitShardInput:
      type: object
      required:
      - ShardToSplit
      - NewStartingHashKey
      properties:
        StreamName:
          $ref: '#/components/schemas/StreamName'
        StreamARN:
          $ref: '#/components/schemas/StreamARN'
        ShardToSplit:
          $ref: '#/components/schemas/ShardId'
        NewStartingHashKey:
          type: string
          description: A hash key value for the starting hash key of one of the child shards created by the split.
    SequenceNumberRange:
      type: object
      description: The range of possible sequence numbers for the shard.
      required:
      - StartingSequenceNumber
      properties:
        StartingSequenceNumber:
          $ref: '#/components/schemas/SequenceNumber'
        EndingSequenceNumber:
          $ref: '#/components/schemas/SequenceNumber'
    SequenceNumber:
      type: string
      pattern: 0|([1-9]\d{0,128})
      description: The sequence number assigned to a data record. Sequence numbers increase over time within a shard.
    StreamName:
      type: string
      minLength: 1
      maxLength: 128
      pattern: '[a-zA-Z0-9_.-]+'
      description: The name of the Kinesis data stream.
    MergeShardsInput:
      type: object
      required:
      - ShardToMerge
      - AdjacentShardToMerge
      properties:
        StreamName:
          $ref: '#/components/schemas/StreamName'
        StreamARN:
          $ref: '#/components/schemas/StreamARN'
        ShardToMerge:
          $ref: '#/components/schemas/ShardId'
        AdjacentShardToMerge:
          $ref: '#/components/schemas/ShardId'
    StreamARN:
      type: string
      minLength: 1
      maxLength: 2048
      pattern: arn:aws.*:kinesis:.*:\d{12}:stream/\S+
      description: The ARN of the Kinesis data stream.
    ErrorResponse:
      type: object
      properties:
        __type:
          type: string
          description: The error type identifier.
        message:
          type: string
          description: A human-readable description of the error.
    Shard:
      type: object
      description: A uniquely identified group of data records in a Kinesis data stream.
      required:
      - ShardId
      - HashKeyRange
      - SequenceNumberRange
      properties:
        ShardId:
          $ref: '#/components/schemas/ShardId'
        ParentShardId:
          $ref: '#/components/schemas/ShardId'
        AdjacentParentShardId:
          $ref: '#/components/schemas/ShardId'
        HashKeyRange:
          $ref: '#/components/schemas/HashKeyRange'
        SequenceNumberRange:
          $ref: '#/components/schemas/SequenceNumberRange'
    HashKeyRange:
      type: object
      description: The range of possible hash key values for the shard.
      required:
      - StartingHashKey
      - EndingHashKey
      properties:
        StartingHashKey:
          type: string
          description: The starting hash key of the hash key range.
        EndingHashKey:
          type: string
          description: The ending hash key of the hash key range.
    ShardId:
      type: string
      minLength: 1
      maxLength: 128
      pattern: '[a-zA-Z0-9_.-]+'
      description: The unique identifier of the shard within the stream.
    ListShardsInput:
      type: object
      properties:
        StreamName:
          $ref: '#/components/schemas/StreamName'
        StreamARN:
          $ref: '#/components/schemas/StreamARN'
        NextToken:
          type: string
        ExclusiveStartShardId:
          $ref: '#/components/schemas/ShardId'
        MaxResults:
          type: integer
          minimum: 1
          maximum: 10000
        StreamCreationTimestamp:
          type: number
          format: double
        ShardFilter:
          type: object
          properties:
            Type:
              type: string
              enum:
              - AFTER_SHARD_ID
              - AT_TRIM_HORIZON
              - FROM_TRIM_HORIZON
              - AT_LATEST
              - AT_TIMESTAMP
              - FROM_TIMESTAMP
            ShardId:
              $ref: '#/components/schemas/ShardId'
            Timestamp:
              type: number
              format: double
  parameters:
    X-Amz-Target-MergeShards:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - Kinesis_20131202.MergeShards
    X-Amz-Target-SplitShard:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - Kinesis_20131202.SplitShard
    X-Amz-Target-UpdateShardCount:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - Kinesis_20131202.UpdateShardCount
    X-Amz-Target-ListShards:
      name: X-Amz-Target
      in: header
      required: true
      schema:
        type: string
        enum:
        - Kinesis_20131202.ListShards
  securitySchemes:
    aws_sigv4:
      type: apiKey
      name: Authorization
      in: header
      description: AWS Signature Version 4 authentication. Requests must be signed with the access key ID and secret access key of an IAM principal.
externalDocs:
  description: Amazon Kinesis Data Streams API Reference
  url: https://docs.aws.amazon.com/kinesis/latest/APIReference/