Skip to content

StorageGatewayClient#

Index > StorageGateway > StorageGatewayClient

Auto-generated documentation for StorageGateway type annotations stubs module mypy-boto3-storagegateway.

StorageGatewayClient#

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

# StorageGatewayClient usage example

from boto3.session import Session
from mypy_boto3_storagegateway.client import StorageGatewayClient

def get_storagegateway_client() -> StorageGatewayClient:
    return Session().client("storagegateway")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("storagegateway")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InternalServerError,
    client.exceptions.InvalidGatewayRequestException,
    client.exceptions.ServiceUnavailableError,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_storagegateway.client import Exceptions

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

Methods#

activate_gateway#

Activates the gateway you previously deployed on your host.

Type annotations and code completion for boto3.client("storagegateway").activate_gateway method. boto3 documentation

# activate_gateway method definition

def activate_gateway(
    self,
    *,
    ActivationKey: str,
    GatewayName: str,
    GatewayTimezone: str,
    GatewayRegion: str,
    GatewayType: str = ...,
    TapeDriveType: str = ...,
    MediumChangerType: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> ActivateGatewayOutputTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See ActivateGatewayOutputTypeDef
# activate_gateway method usage example with argument unpacking

kwargs: ActivateGatewayInputRequestTypeDef = {  # (1)
    "ActivationKey": ...,
    "GatewayName": ...,
    "GatewayTimezone": ...,
    "GatewayRegion": ...,
}

parent.activate_gateway(**kwargs)
  1. See ActivateGatewayInputRequestTypeDef

add_cache#

Configures one or more gateway local disks as cache for a gateway.

Type annotations and code completion for boto3.client("storagegateway").add_cache method. boto3 documentation

# add_cache method definition

def add_cache(
    self,
    *,
    GatewayARN: str,
    DiskIds: Sequence[str],
) -> AddCacheOutputTypeDef:  # (1)
    ...
  1. See AddCacheOutputTypeDef
# add_cache method usage example with argument unpacking

kwargs: AddCacheInputRequestTypeDef = {  # (1)
    "GatewayARN": ...,
    "DiskIds": ...,
}

parent.add_cache(**kwargs)
  1. See AddCacheInputRequestTypeDef

add_tags_to_resource#

Adds one or more tags to the specified resource.

Type annotations and code completion for boto3.client("storagegateway").add_tags_to_resource method. boto3 documentation

# add_tags_to_resource method definition

def add_tags_to_resource(
    self,
    *,
    ResourceARN: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> AddTagsToResourceOutputTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See AddTagsToResourceOutputTypeDef
# add_tags_to_resource method usage example with argument unpacking

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

parent.add_tags_to_resource(**kwargs)
  1. See AddTagsToResourceInputRequestTypeDef

add_upload_buffer#

Configures one or more gateway local disks as upload buffer for a specified gateway.

Type annotations and code completion for boto3.client("storagegateway").add_upload_buffer method. boto3 documentation

# add_upload_buffer method definition

def add_upload_buffer(
    self,
    *,
    GatewayARN: str,
    DiskIds: Sequence[str],
) -> AddUploadBufferOutputTypeDef:  # (1)
    ...
  1. See AddUploadBufferOutputTypeDef
# add_upload_buffer method usage example with argument unpacking

kwargs: AddUploadBufferInputRequestTypeDef = {  # (1)
    "GatewayARN": ...,
    "DiskIds": ...,
}

parent.add_upload_buffer(**kwargs)
  1. See AddUploadBufferInputRequestTypeDef

add_working_storage#

Configures one or more gateway local disks as working storage for a gateway.

Type annotations and code completion for boto3.client("storagegateway").add_working_storage method. boto3 documentation

# add_working_storage method definition

def add_working_storage(
    self,
    *,
    GatewayARN: str,
    DiskIds: Sequence[str],
) -> AddWorkingStorageOutputTypeDef:  # (1)
    ...
  1. See AddWorkingStorageOutputTypeDef
# add_working_storage method usage example with argument unpacking

kwargs: AddWorkingStorageInputRequestTypeDef = {  # (1)
    "GatewayARN": ...,
    "DiskIds": ...,
}

parent.add_working_storage(**kwargs)
  1. See AddWorkingStorageInputRequestTypeDef

assign_tape_pool#

Assigns a tape to a tape pool for archiving.

Type annotations and code completion for boto3.client("storagegateway").assign_tape_pool method.