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. boto3 documentation

# assign_tape_pool method definition

def assign_tape_pool(
    self,
    *,
    TapeARN: str,
    PoolId: str,
    BypassGovernanceRetention: bool = ...,
) -> AssignTapePoolOutputTypeDef:  # (1)
    ...
  1. See AssignTapePoolOutputTypeDef
# assign_tape_pool method usage example with argument unpacking

kwargs: AssignTapePoolInputRequestTypeDef = {  # (1)
    "TapeARN": ...,
    "PoolId": ...,
}

parent.assign_tape_pool(**kwargs)
  1. See AssignTapePoolInputRequestTypeDef

associate_file_system#

Associate an Amazon FSx file system with the FSx File Gateway.

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

# associate_file_system method definition

def associate_file_system(
    self,
    *,
    UserName: str,
    Password: str,
    ClientToken: str,
    GatewayARN: str,
    LocationARN: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    AuditDestinationARN: str = ...,
    CacheAttributes: CacheAttributesTypeDef = ...,  # (2)
    EndpointNetworkConfiguration: EndpointNetworkConfigurationTypeDef = ...,  # (3)
) -> AssociateFileSystemOutputTypeDef:  # (4)
    ...
  1. See TagTypeDef
  2. See CacheAttributesTypeDef
  3. See EndpointNetworkConfigurationTypeDef
  4. See AssociateFileSystemOutputTypeDef
# associate_file_system method usage example with argument unpacking

kwargs: AssociateFileSystemInputRequestTypeDef = {  # (1)
    "UserName": ...,
    "Password": ...,
    "ClientToken": ...,
    "GatewayARN": ...,
    "LocationARN": ...,
}

parent.associate_file_system(**kwargs)
  1. See AssociateFileSystemInputRequestTypeDef

attach_volume#

Connects a volume to an iSCSI connection and then attaches the volume to the specified gateway.

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

# attach_volume method definition

def attach_volume(
    self,
    *,
    GatewayARN: str,
    VolumeARN: str,
    NetworkInterfaceId: str,
    TargetName: str = ...,
    DiskId: str = ...,
) -> AttachVolumeOutputTypeDef:  # (1)
    ...
  1. See AttachVolumeOutputTypeDef
# attach_volume method usage example with argument unpacking

kwargs: AttachVolumeInputRequestTypeDef = {  # (1)
    "GatewayARN": ...,
    "VolumeARN": ...,
    "NetworkInterfaceId": ...,
}

parent.attach_volume(**kwargs)
  1. See AttachVolumeInputRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_archival#

Cancels archiving of a virtual tape to the virtual tape shelf (VTS) after the archiving process is initiated.

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