Skip to content

KinesisClient#

Index > Kinesis > KinesisClient

Auto-generated documentation for Kinesis type annotations stubs module mypy-boto3-kinesis.

KinesisClient#

Type annotations and code completion for boto3.client("kinesis"). boto3 documentation

# KinesisClient usage example

from boto3.session import Session
from mypy_boto3_kinesis.client import KinesisClient

def get_kinesis_client() -> KinesisClient:
    return Session().client("kinesis")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("kinesis").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("kinesis")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ExpiredIteratorException,
    client.exceptions.ExpiredNextTokenException,
    client.exceptions.InternalFailureException,
    client.exceptions.InvalidArgumentException,
    client.exceptions.KMSAccessDeniedException,
    client.exceptions.KMSDisabledException,
    client.exceptions.KMSInvalidStateException,
    client.exceptions.KMSNotFoundException,
    client.exceptions.KMSOptInRequired,
    client.exceptions.KMSThrottlingException,
    client.exceptions.LimitExceededException,
    client.exceptions.ProvisionedThroughputExceededException,
    client.exceptions.ResourceInUseException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_kinesis.client import Exceptions

def handle_error(exc: Exceptions.AccessDeniedException) -> None:
    ...

Methods#

add_tags_to_stream#

Adds or updates tags for the specified Kinesis data stream.

Type annotations and code completion for boto3.client("kinesis").add_tags_to_stream method. boto3 documentation

# add_tags_to_stream method definition

def add_tags_to_stream(
    self,
    *,
    Tags: Mapping[str, str],
    StreamName: str = ...,
    StreamARN: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# add_tags_to_stream method usage example with argument unpacking

kwargs: AddTagsToStreamInputRequestTypeDef = {  # (1)
    "Tags": ...,
}

parent.add_tags_to_stream(**kwargs)
  1. See AddTagsToStreamInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("kinesis").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("kinesis").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_stream#

Creates a Kinesis data stream.

Type annotations and code completion for boto3.client("kinesis").create_stream method. boto3 documentation

# create_stream method definition

def create_stream(
    self,
    *,
    StreamName: str,
    ShardCount: int = ...,
    StreamModeDetails: StreamModeDetailsTypeDef = ...,  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See StreamModeDetailsTypeDef
  2. See EmptyResponseMetadataTypeDef
# create_stream method usage example with argument unpacking

kwargs: CreateStreamInputRequestTypeDef = {  # (1)
    "StreamName": ...,
}

parent.create_stream(**kwargs)
  1. See CreateStreamInputRequestTypeDef

decrease_stream_retention_period#

Decreases the Kinesis data stream's retention period, which is the length of time data records are accessible after they are added to the stream.

Type annotations and code completion for boto3.client("kinesis").decrease_stream_retention_period method. boto3 documentation

# decrease_stream_retention_period method definition

def decrease_stream_retention_period(
    self,
    *,
    RetentionPeriodHours: int,
    StreamName: str = ...,
    StreamARN: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# decrease_stream_retention_period method usage example with argument unpacking

kwargs: DecreaseStreamRetentionPeriodInputRequestTypeDef = {  # (1)
    "RetentionPeriodHours": ...,
}

parent.decrease_stream_retention_period(**kwargs)
  1. See DecreaseStreamRetentionPeriodInputRequestTypeDef

delete_resource_policy#

Delete a policy for the specified data stream or consumer.

Type annotations and code completion for boto3.client("kinesis").delete_resource_policy method. boto3 documentation

# delete_resource_policy method definition

def delete_resource_policy(
    self,
    *,
    ResourceARN: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_resource_policy method usage example with argument unpacking

kwargs: DeleteResourcePolicyInputRequestTypeDef = {  # (1)
    "ResourceARN": ...,
}

parent.delete_resource_policy(**kwargs)
  1. See DeleteResourcePolicyInputRequestTypeDef

delete_stream#

Deletes a Kinesis data stream and all its shards and data.

Type annotations and code completion for boto3.client("kinesis").delete_stream method. boto3 documentation

# delete_stream method definition

def delete_stream(
    self,
    *,
    StreamName: str = ...,
    EnforceConsumerDeletion: bool = ...,
    StreamARN: str = ...,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_stream method usage example with argument unpacking

kwargs: DeleteStreamInputRequestTypeDef = {  # (1)
    "StreamName": ...,
}

parent.delete_stream(**kwargs)
  1. See DeleteStreamInputRequestTypeDef

deregister_stream_consumer#

To deregister a consumer, provide its ARN.

Type annotations and code completion for boto3.client("kinesis").deregister_stream_consumer method.