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 OpenZFSCopyStrategyType
  2. See UpdateOpenZFSVolumeOptionType
  3. See CopySnapshotAndUpdateVolumeResponseTypeDef
# copy_snapshot_and_update_volume method usage example with argument unpacking

kwargs: CopySnapshotAndUpdateVolumeRequestRequestTypeDef = {  # (1)
    "VolumeId": ...,
    "SourceSnapshotARN": ...,
}

parent.copy_snapshot_and_update_volume(**kwargs)
  1. See CopySnapshotAndUpdateVolumeRequestRequestTypeDef

create_backup#

Creates a backup of an existing Amazon FSx for Windows File Server file system, Amazon FSx for Lustre file system, Amazon FSx for NetApp ONTAP volume, or Amazon FSx for OpenZFS file system.

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

# create_backup method definition

def create_backup(
    self,
    *,
    FileSystemId: str = ...,
    ClientRequestToken: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    VolumeId: str = ...,
) -> CreateBackupResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateBackupResponseTypeDef
# create_backup method usage example with argument unpacking

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

parent.create_backup(**kwargs)
  1. See CreateBackupRequestRequestTypeDef

create_data_repository_association#

Creates an Amazon FSx for Lustre data repository association (DRA).

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

# create_data_repository_association method definition

def create_data_repository_association(
    self,
    *,
    FileSystemId: str,
    DataRepositoryPath: str,
    FileSystemPath: str = ...,
    BatchImportMetaDataOnCreate: bool = ...,
    ImportedFileChunkSize: int = ...,
    S3: Union[S3DataRepositoryConfigurationTypeDef, S3DataRepositoryConfigurationOutputTypeDef] = ...,  # (1)
    ClientRequestToken: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateDataRepositoryAssociationResponseTypeDef:  # (3)
    ...
  1. See S3DataRepositoryConfigurationTypeDef S3DataRepositoryConfigurationOutputTypeDef
  2. See TagTypeDef
  3. See CreateDataRepositoryAssociationResponseTypeDef
# create_data_repository_association method usage example with argument unpacking

kwargs: CreateDataRepositoryAssociationRequestRequestTypeDef = {  # (1)
    "FileSystemId": ...,
    "DataRepositoryPath": ...,
}

parent.create_data_repository_association(**kwargs)
  1. See CreateDataRepositoryAssociationRequestRequestTypeDef

create_data_repository_task#

Creates an Amazon FSx for Lustre data repository task.

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

# create_data_repository_task method definition

def create_data_repository_task(
    self,
    *,
    Type: DataRepositoryTaskTypeType,  # (1)
    FileSystemId: str,
    Report: CompletionReportTypeDef,  # (2)
    Paths: Sequence[str] = ...,
    ClientRequestToken: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (3)
    CapacityToRelease: int = ...,
    ReleaseConfiguration: ReleaseConfigurationTypeDef = ...,  # (4)
) -> CreateDataRepositoryTaskResponseTypeDef:  # (5)
    ...
  1. See DataRepositoryTaskTypeType
  2. See CompletionReportTypeDef
  3. See TagTypeDef
  4. See ReleaseConfigurationTypeDef
  5. See CreateDataRepositoryTaskResponseTypeDef
# create_data_repository_task method usage example with argument unpacking

kwargs: CreateDataRepositoryTaskRequestRequestTypeDef = {  # (1)
    "Type": ...,
    "FileSystemId": ...,
    "Report": ...,
}

parent.create_data_repository_task(**kwargs)
  1. See CreateDataRepositoryTaskRequestRequestTypeDef

create_file_cache#

Creates a new Amazon File Cache resource.

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