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