Skip to content

FSxClient#

Index > FSx > FSxClient

Auto-generated documentation for FSx type annotations stubs module mypy-boto3-fsx.

FSxClient#

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

# FSxClient usage example

from boto3.session import Session
from mypy_boto3_fsx.client import FSxClient

def get_fsx_client() -> FSxClient:
    return Session().client("fsx")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("fsx")

try:
    do_something(client)
except (
    client.exceptions.ActiveDirectoryError,
    client.exceptions.BackupBeingCopied,
    client.exceptions.BackupInProgress,
    client.exceptions.BackupNotFound,
    client.exceptions.BackupRestoring,
    client.exceptions.BadRequest,
    client.exceptions.ClientError,
    client.exceptions.DataRepositoryAssociationNotFound,
    client.exceptions.DataRepositoryTaskEnded,
    client.exceptions.DataRepositoryTaskExecuting,
    client.exceptions.DataRepositoryTaskNotFound,
    client.exceptions.FileCacheNotFound,
    client.exceptions.FileSystemNotFound,
    client.exceptions.IncompatibleParameterError,
    client.exceptions.IncompatibleRegionForMultiAZ,
    client.exceptions.InternalServerError,
    client.exceptions.InvalidDataRepositoryType,
    client.exceptions.InvalidDestinationKmsKey,
    client.exceptions.InvalidExportPath,
    client.exceptions.InvalidImportPath,
    client.exceptions.InvalidNetworkSettings,
    client.exceptions.InvalidPerUnitStorageThroughput,
    client.exceptions.InvalidRegion,
    client.exceptions.InvalidSourceKmsKey,
    client.exceptions.MissingFileCacheConfiguration,
    client.exceptions.MissingFileSystemConfiguration,
    client.exceptions.MissingVolumeConfiguration,
    client.exceptions.NotServiceResourceError,
    client.exceptions.ResourceDoesNotSupportTagging,
    client.exceptions.ResourceNotFound,
    client.exceptions.ServiceLimitExceeded,
    client.exceptions.SnapshotNotFound,
    client.exceptions.SourceBackupUnavailable,
    client.exceptions.StorageVirtualMachineNotFound,
    client.exceptions.UnsupportedOperation,
    client.exceptions.VolumeNotFound,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_fsx.client import Exceptions

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

Methods#

associate_file_system_aliases#

Use this action to associate one or more Domain Name Server (DNS) aliases with an existing Amazon FSx for Windows File Server file system.

Type annotations and code completion for boto3.client("fsx").associate_file_system_aliases method. boto3 documentation

# associate_file_system_aliases method definition

def associate_file_system_aliases(
    self,
    *,
    FileSystemId: str,
    Aliases: Sequence[str],
    ClientRequestToken: str = ...,
) -> AssociateFileSystemAliasesResponseTypeDef:  # (1)
    ...
  1. See AssociateFileSystemAliasesResponseTypeDef
# associate_file_system_aliases method usage example with argument unpacking

kwargs: AssociateFileSystemAliasesRequestRequestTypeDef = {  # (1)
    "FileSystemId": ...,
    "Aliases": ...,
}

parent.associate_file_system_aliases(**kwargs)
  1. See AssociateFileSystemAliasesRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_data_repository_task#

Cancels an existing Amazon FSx for Lustre data repository task if that task is in either the PENDING or EXECUTING state.

Type annotations and code completion for boto3.client("fsx").cancel_data_repository_task method. boto3 documentation

# cancel_data_repository_task method definition

def cancel_data_repository_task(
    self,
    *,
    TaskId: str,
) -> CancelDataRepositoryTaskResponseTypeDef:  # (1)
    ...
  1. See CancelDataRepositoryTaskResponseTypeDef
# cancel_data_repository_task method usage example with argument unpacking

kwargs: CancelDataRepositoryTaskRequestRequestTypeDef = {  # (1)
    "TaskId": ...,
}

parent.cancel_data_repository_task(**kwargs)
  1. See CancelDataRepositoryTaskRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

copy_backup#

Copies an existing backup within the same Amazon Web Services account to another Amazon Web Services Region (cross-Region copy) or within the same Amazon Web Services Region (in-Region copy).

Type annotations and code completion for boto3.client("fsx").copy_backup method. boto3 documentation

# copy_backup method definition

def copy_backup(
    self,
    *,
    SourceBackupId: str,
    ClientRequestToken: str = ...,
    SourceRegion: str = ...,
    KmsKeyId: str = ...,
    CopyTags: bool = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CopyBackupResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CopyBackupResponseTypeDef
# copy_backup method usage example with argument unpacking

kwargs: CopyBackupRequestRequestTypeDef = {  # (1)
    "SourceBackupId": ...,
}

parent.copy_backup(**kwargs)
  1. See CopyBackupRequestRequestTypeDef

copy_snapshot_and_update_volume#

Updates an existing volume by using a snapshot from another Amazon FSx for OpenZFS file system.

Type annotations and code completion for boto3.client("fsx").copy_snapshot_and_update_volume method. boto3 documentation

# copy_snapshot_and_update_volume method definition

def copy_snapshot_and_update_volume(
    self,
    *,
    VolumeId: str,
    SourceSnapshotARN: str,
    ClientRequestToken: str = ...,
    CopyStrategy: OpenZFSCopyStrategyType = ...,  # (1)
    Options: Sequence[UpdateOpenZFSVolumeOptionType] = ...,  # (2)
) -> CopySnapshotAndUpdateVolumeResponseTypeDef:  # (3)
    ...
  1. See