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: S3DataRepositoryConfigurationTypeDef = ...,  # (1)
    ClientRequestToken: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateDataRepositoryAssociationResponseTypeDef:  # (3)
    ...
  1. See S3DataRepositoryConfigurationTypeDef
  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. boto3 documentation

# create_file_cache method definition

def create_file_cache(
    self,
    *,
    FileCacheType: FileCacheTypeType,  # (1)
    FileCacheTypeVersion: str,
    StorageCapacity: int,
    SubnetIds: Sequence[str],
    ClientRequestToken: str = ...,
    SecurityGroupIds: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    CopyTagsToDataRepositoryAssociations: bool = ...,
    KmsKeyId: str = ...,
    LustreConfiguration: CreateFileCacheLustreConfigurationTypeDef = ...,  # (3)
    DataRepositoryAssociations: Sequence[FileCacheDataRepositoryAssociationTypeDef] = ...,  # (4)
) -> CreateFileCacheResponseTypeDef:  # (5)
    ...
  1. See FileCacheTypeType
  2. See TagTypeDef
  3. See CreateFileCacheLustreConfigurationTypeDef
  4. See FileCacheDataRepositoryAssociationTypeDef
  5. See CreateFileCacheResponseTypeDef
# create_file_cache method usage example with argument unpacking

kwargs: CreateFileCacheRequestRequestTypeDef = {  # (1)
    "FileCacheType": ...,
    "FileCacheTypeVersion": ...,
    "StorageCapacity": ...,
    "SubnetIds": ...,
}

parent.create_file_cache(**kwargs)
  1. See CreateFileCacheRequestRequestTypeDef

create_file_system#

Creates a new, empty Amazon FSx file system.

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

# create_file_system method definition

def create_file_system(
    self,
    *,
    FileSystemType: FileSystemTypeType,  # (1)
    StorageCapacity: int,
    SubnetIds: Sequence[str],
    ClientRequestToken: str = ...,
    StorageType: StorageTypeType = ...,  # (2)
    SecurityGroupIds: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (3)
    KmsKeyId: str = ...,
    WindowsConfiguration: CreateFileSystemWindowsConfigurationTypeDef = ...,  # (4)
    LustreConfiguration: CreateFileSystemLustreConfigurationTypeDef = ...,  # (5)
    OntapConfiguration: CreateFileSystemOntapConfigurationTypeDef = ...,  # (6)
    FileSystemTypeVersion: str = ...,
    OpenZFSConfiguration: CreateFileSystemOpenZFSConfigurationTypeDef = ...,  # (7)
) -> CreateFileSystemResponseTypeDef:  # (8)
    ...
  1. See FileSystemTypeType
  2. See StorageTypeType
  3. See TagTypeDef
  4. See CreateFileSystemWindowsConfigurationTypeDef
  5. See CreateFileSystemLustreConfigurationTypeDef
  6. See CreateFileSystemOntapConfigurationTypeDef
  7. See CreateFileSystemOpenZFSConfigurationTypeDef
  8. See CreateFileSystemResponseTypeDef
# create_file_system method usage example with argument unpacking

kwargs: CreateFileSystemRequestRequestTypeDef = {  # (1)
    "FileSystemType": ...,
    "StorageCapacity": ...,
    "SubnetIds": ...,
}

parent.create_file_system(**kwargs)
  1. See CreateFileSystemRequestRequestTypeDef

create_file_system_from_backup#

Creates a new Amazon FSx for Lustre, Amazon FSx for Windows File Server, or Amazon FSx for OpenZFS file system from an existing Amazon FSx backup.

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

# create_file_system_from_backup method definition

def create_file_system_from_backup(
    self,
    *,
    BackupId: str,
    SubnetIds: Sequence[str],
    ClientRequestToken: str = ...,
    SecurityGroupIds: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    WindowsConfiguration: CreateFileSystemWindowsConfigurationTypeDef = ...,  # (2)
    LustreConfiguration: CreateFileSystemLustreConfigurationTypeDef = ...,  # (3)
    StorageType: StorageTypeType = ...,  # (4)
    KmsKeyId: str = ...,
    FileSystemTypeVersion: str = ...,
    OpenZFSConfiguration: CreateFileSystemOpenZFSConfigurationTypeDef = ...,  # (5)
    StorageCapacity: int = ...,
) -> CreateFileSystemFromBackupResponseTypeDef:  # (6)
    ...
  1. See TagTypeDef
  2. See CreateFileSystemWindowsConfigurationTypeDef
  3. See CreateFileSystemLustreConfigurationTypeDef
  4. See StorageTypeType
  5. See CreateFileSystemOpenZFSConfigurationTypeDef
  6. See CreateFileSystemFromBackupResponseTypeDef
# create_file_system_from_backup method usage example with argument unpacking

kwargs: CreateFileSystemFromBackupRequestRequestTypeDef = {  # (1)
    "BackupId": ...,
    "SubnetIds": ...,
}

parent.create_file_system_from_backup(**kwargs)
  1. See CreateFileSystemFromBackupRequestRequestTypeDef

create_snapshot#

Creates a snapshot of an existing Amazon FSx for OpenZFS volume.

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