Skip to content

EBSClient

Index > EBS > EBSClient

Auto-generated documentation for EBS type annotations stubs module mypy-boto3-ebs.

EBSClient

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

Usage example
from boto3.session import Session
from mypy_boto3_ebs.client import EBSClient

def get_ebs_client() -> EBSClient:
    return Session().client("ebs")

Exceptions

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

Usage example
client = boto3.client("ebs")

try:
    do_something(client)
except (
    client.AccessDeniedException,
    client.ClientError,
    client.ConcurrentLimitExceededException,
    client.ConflictException,
    client.InternalServerException,
    client.RequestThrottledException,
    client.ResourceNotFoundException,
    client.ServiceQuotaExceededException,
    client.ValidationException,
) as e:
    print(e)
Type checking example
from mypy_boto3_ebs.client import Exceptions

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

Methods

can_paginate

Check if an operation can be paginated.

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

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

close

Closes underlying endpoint connections.

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

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

complete_snapshot

Seals and completes the snapshot after all of the required blocks of data have been written to it.

Type annotations and code completion for boto3.client("ebs").complete_snapshot method. boto3 documentation

Method definition
def complete_snapshot(
    self,
    *,
    SnapshotId: str,
    ChangedBlocksCount: int,
    Checksum: str = ...,
    ChecksumAlgorithm: ChecksumAlgorithmType = ...,  # (1)
    ChecksumAggregationMethod: ChecksumAggregationMethodType = ...,  # (2)
) -> CompleteSnapshotResponseTypeDef:  # (3)
    ...
  1. See ChecksumAlgorithmType
  2. See ChecksumAggregationMethodType
  3. See CompleteSnapshotResponseTypeDef
Usage example with kwargs
kwargs: CompleteSnapshotRequestRequestTypeDef = {  # (1)
    "SnapshotId": ...,
    "ChangedBlocksCount": ...,
}

parent.complete_snapshot(**kwargs)
  1. See CompleteSnapshotRequestRequestTypeDef

generate_presigned_url

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("ebs").generate_presigned_url method. boto3 documentation

Method definition
def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_snapshot_block

Returns the data in a block in an Amazon Elastic Block Store snapshot.

Type annotations and code completion for boto3.client("ebs").get_snapshot_block method. boto3 documentation

Method definition
def get_snapshot_block(
    self,
    *,
    SnapshotId: str,
    BlockIndex: int,
    BlockToken: str,
) -> GetSnapshotBlockResponseTypeDef:  # (1)
    ...
  1. See GetSnapshotBlockResponseTypeDef
Usage example with kwargs
kwargs: GetSnapshotBlockRequestRequestTypeDef = {  # (1)
    "SnapshotId": ...,
    "BlockIndex": ...,
    "BlockToken": ...,
}

parent.get_snapshot_block(**kwargs)
  1. See GetSnapshotBlockRequestRequestTypeDef

list_changed_blocks

Returns information about the blocks that are different between two Amazon Elastic Block Store snapshots of the same volume/snapshot lineage.

Type annotations and code completion for boto3.client("ebs").list_changed_blocks method. boto3 documentation

Method definition
def list_changed_blocks(
    self,
    *,
    SecondSnapshotId: str,
    FirstSnapshotId: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
    StartingBlockIndex: int = ...,
) -> ListChangedBlocksResponseTypeDef:  # (1)
    ...
  1. See ListChangedBlocksResponseTypeDef
Usage example with kwargs
kwargs: ListChangedBlocksRequestRequestTypeDef = {  # (1)
    "SecondSnapshotId": ...,
}

parent.list_changed_blocks(**kwargs)
  1. See ListChangedBlocksRequestRequestTypeDef

list_snapshot_blocks

Returns information about the blocks in an Amazon Elastic Block Store snapshot.

Type annotations and code completion for boto3.client("ebs").list_snapshot_blocks method. boto3 documentation

Method definition
def list_snapshot_blocks(
    self,
    *,
    SnapshotId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
    StartingBlockIndex: int = ...,
) -> ListSnapshotBlocksResponseTypeDef:  # (1)
    ...
  1. See ListSnapshotBlocksResponseTypeDef
Usage example with kwargs
kwargs: ListSnapshotBlocksRequestRequestTypeDef = {  # (1)
    "SnapshotId": ...,
}

parent.list_snapshot_blocks(**kwargs)
  1. See ListSnapshotBlocksRequestRequestTypeDef

put_snapshot_block

Writes a block of data to a snapshot.

Type annotations and code completion for boto3.client("ebs").put_snapshot_block method. boto3 documentation

Method definition
def put_snapshot_block(
    self,
    *,
    SnapshotId: str,
    BlockIndex: int,
    BlockData: Union[str, bytes, IO[Any], StreamingBody],
    DataLength: int,
    Checksum: str,
    ChecksumAlgorithm: ChecksumAlgorithmType,  # (1)
    Progress: int = ...,
) -> PutSnapshotBlockResponseTypeDef:  # (2)
    ...
  1. See ChecksumAlgorithmType
  2. See PutSnapshotBlockResponseTypeDef
Usage example with kwargs
kwargs: PutSnapshotBlockRequestRequestTypeDef = {  # (1)
    "SnapshotId": ...,
    "BlockIndex": ...,
    "BlockData": ...,
    "DataLength": ...,
    "Checksum": ...,
    "ChecksumAlgorithm": ...,
}

parent.put_snapshot_block(**kwargs)
  1. See PutSnapshotBlockRequestRequestTypeDef

start_snapshot

Creates a new Amazon EBS snapshot.

Type annotations and code completion for boto3.client("ebs").start_snapshot method. boto3 documentation

Method definition
def start_snapshot(
    self,
    *,
    VolumeSize: int,
    ParentSnapshotId: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    Description: str = ...,
    ClientToken: str = ...,
    Encrypted: bool = ...,
    KmsKeyArn: str = ...,
    Timeout: int = ...,
) -> StartSnapshotResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See StartSnapshotResponseTypeDef
Usage example with kwargs
kwargs: StartSnapshotRequestRequestTypeDef = {  # (1)
    "VolumeSize": ...,
}

parent.start_snapshot(**kwargs)
  1. See StartSnapshotRequestRequestTypeDef