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

# EBSClient 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.

# Exceptions.exceptions usage example

client = boto3.client("ebs")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConcurrentLimitExceededException,
    client.exceptions.ConflictException,
    client.exceptions.InternalServerException,
    client.exceptions.RequestThrottledException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceQuotaExceededException,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions 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

# 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("ebs").close method. boto3 documentation

# close 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

# complete_snapshot 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
# complete_snapshot method usage example with argument unpacking

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

# generate_presigned_url 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

# get_snapshot_block method definition

def get_snapshot_block(
    self,
    *,
    SnapshotId: str,
    BlockIndex: int,
    BlockToken: str,
) -> GetSnapshotBlockResponseTypeDef:  # (1)
    ...
  1. See GetSnapshotBlockResponseTypeDef
# get_snapshot_block method usage example with argument unpacking

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

# list_changed_blocks method definition

def list_changed_blocks(
    self,
    *,
    SecondSnapshotId: str,
    FirstSnapshotId: str = ...,
    NextToken: str = ...,
    MaxResults: int = ...,
    StartingBlockIndex: int = ...,
) -> ListChangedBlocksResponseTypeDef:  # (1)
    ...
  1. See ListChangedBlocksResponseTypeDef
# list_changed_blocks method usage example with argument unpacking

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

# list_snapshot_blocks method definition

def list_snapshot_blocks(
    self,
    *,
    SnapshotId: str,
    NextToken: str = ...,
    MaxResults: int = ...,
    StartingBlockIndex: int = ...,
) -> ListSnapshotBlocksResponseTypeDef:  # (1)
    ...
  1. See ListSnapshotBlocksResponseTypeDef
# list_snapshot_blocks method usage example with argument unpacking

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

# put_snapshot_block method definition

def put_snapshot_block(
    self,
    *,
    SnapshotId: str,
    BlockIndex: int,
    BlockData: BlobTypeDef,
    DataLength: int,
    Checksum: str,
    ChecksumAlgorithm: ChecksumAlgorithmType,  # (1)
    Progress: int = ...,
) -> PutSnapshotBlockResponseTypeDef:  # (2)
    ...
  1. See ChecksumAlgorithmType
  2. See PutSnapshotBlockResponseTypeDef
# put_snapshot_block method usage example with argument unpacking

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

# start_snapshot 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
# start_snapshot method usage example with argument unpacking

kwargs: StartSnapshotRequestRequestTypeDef = {  # (1)
    "VolumeSize": ...,
}

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