Skip to content

EFSClient#

Index > EFS > EFSClient

Auto-generated documentation for EFS type annotations stubs module mypy-boto3-efs.

EFSClient#

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

# EFSClient usage example

from boto3.session import Session
from mypy_boto3_efs.client import EFSClient

def get_efs_client() -> EFSClient:
    return Session().client("efs")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("efs")

try:
    do_something(client)
except (
    client.exceptions.AccessPointAlreadyExists,
    client.exceptions.AccessPointLimitExceeded,
    client.exceptions.AccessPointNotFound,
    client.exceptions.AvailabilityZonesMismatch,
    client.exceptions.BadRequest,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.DependencyTimeout,
    client.exceptions.FileSystemAlreadyExists,
    client.exceptions.FileSystemInUse,
    client.exceptions.FileSystemLimitExceeded,
    client.exceptions.FileSystemNotFound,
    client.exceptions.IncorrectFileSystemLifeCycleState,
    client.exceptions.IncorrectMountTargetState,
    client.exceptions.InsufficientThroughputCapacity,
    client.exceptions.InternalServerError,
    client.exceptions.InvalidPolicyException,
    client.exceptions.IpAddressInUse,
    client.exceptions.MountTargetConflict,
    client.exceptions.MountTargetNotFound,
    client.exceptions.NetworkInterfaceLimitExceeded,
    client.exceptions.NoFreeAddressesInSubnet,
    client.exceptions.PolicyNotFound,
    client.exceptions.ReplicationAlreadyExists,
    client.exceptions.ReplicationNotFound,
    client.exceptions.SecurityGroupLimitExceeded,
    client.exceptions.SecurityGroupNotFound,
    client.exceptions.SubnetNotFound,
    client.exceptions.ThrottlingException,
    client.exceptions.ThroughputLimitExceeded,
    client.exceptions.TooManyRequests,
    client.exceptions.UnsupportedAvailabilityZone,
    client.exceptions.ValidationException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_efs.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_access_point#

Creates an EFS access point.

Type annotations and code completion for boto3.client("efs").create_access_point method. boto3 documentation

# create_access_point method definition

def create_access_point(
    self,
    *,
    ClientToken: str,
    FileSystemId: str,
    Tags: Sequence[TagTypeDef] = ...,  # (1)
    PosixUser: Union[PosixUserTypeDef, PosixUserExtraOutputTypeDef] = ...,  # (2)
    RootDirectory: RootDirectoryTypeDef = ...,  # (3)
) -> AccessPointDescriptionResponseTypeDef:  # (4)
    ...
  1. See TagTypeDef
  2. See PosixUserTypeDef PosixUserExtraOutputTypeDef
  3. See RootDirectoryTypeDef
  4. See AccessPointDescriptionResponseTypeDef
# create_access_point method usage example with argument unpacking

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

parent.create_access_point(**kwargs)
  1. See CreateAccessPointRequestRequestTypeDef

create_file_system#

Creates a new, empty file system.

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

# create_file_system method definition

def create_file_system(
    self,
    *,
    CreationToken: str,
    PerformanceMode: PerformanceModeType = ...,  # (1)
    Encrypted: bool = ...,
    KmsKeyId: str = ...,
    ThroughputMode: ThroughputModeType = ...,  # (2)
    ProvisionedThroughputInMibps: float = ...,
    AvailabilityZoneName: str = ...,
    Backup: bool = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (3)
) -> FileSystemDescriptionResponseTypeDef:  # (4)
    ...
  1. See PerformanceModeType
  2. See ThroughputModeType
  3. See TagTypeDef
  4. See FileSystemDescriptionResponseTypeDef
# create_file_system method usage example with argument unpacking

kwargs: CreateFileSystemRequestRequestTypeDef = {  # (1)
    "CreationToken": ...,
}

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

create_mount_target#

Creates a mount target for a file system.

Type annotations and code completion for boto3.client("efs").create_mount_target method. boto3 documentation

# create_mount_target method definition

def create_mount_target(
    self,
    *,
    FileSystemId: str,
    SubnetId: str,
    IpAddress: str = ...,
    SecurityGroups: Sequence[str] = ...,
) -> MountTargetDescriptionResponseTypeDef:  # (1)
    ...
  1. See MountTargetDescriptionResponseTypeDef
# create_mount_target method usage example with argument unpacking

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

parent.create_mount_target(**kwargs)
  1. See CreateMountTargetRequestRequestTypeDef

create_replication_configuration#

Creates a replication configuration that replicates an existing EFS file system to a new, read-only file system.

Type annotations and code completion for boto3.client("efs").create_replication_configuration method. boto3 documentation

# create_replication_configuration method definition

def create_replication_configuration(
    self,
    *,
    SourceFileSystemId: str,
    Destinations: Sequence[DestinationToCreateTypeDef],  # (1)
) -> ReplicationConfigurationDescriptionResponseTypeDef:  # (2)
    ...
  1. See DestinationToCreateTypeDef
  2. See ReplicationConfigurationDescriptionResponseTypeDef
# create_replication_configuration method usage example with argument unpacking

kwargs: CreateReplicationConfigurationRequestRequestTypeDef = {  # (1)
    "SourceFileSystemId": ...,
    "Destinations": ...,
}

parent.create_replication_configuration(**kwargs)
  1. See CreateReplicationConfigurationRequestRequestTypeDef

create_tags#

.

Type annotations and code completion for boto3.client("efs").create_tags method. boto3 documentation

# create_tags method definition

def create_tags(
    self,
    *,
    FileSystemId: str,
    Tags: Sequence[TagTypeDef],  # (1)
) -> EmptyResponseMetadataTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See EmptyResponseMetadataTypeDef
# create_tags method usage example with argument unpacking

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

parent.create_tags(**kwargs)
  1. See CreateTagsRequestRequestTypeDef

delete_access_point#

Deletes the specified access point.

Type annotations and code completion for boto3.client("efs").delete_access_point method. boto3 documentation

# delete_access_point method definition

def delete_access_point(
    self,
    *,
    AccessPointId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_access_point method usage example with argument unpacking

kwargs: DeleteAccessPointRequestRequestTypeDef = {  # (1)
    "AccessPointId": ...,
}

parent.delete_access_point(**kwargs)
  1. See DeleteAccessPointRequestRequestTypeDef

delete_file_system#

Deletes a file system, permanently severing access to its contents.

Type annotations and code completion for boto3.client("efs").delete_file_system method. boto3 documentation

# delete_file_system method definition

def delete_file_system(
    self,
    *,
    FileSystemId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_file_system method usage example with argument unpacking

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

parent.delete_file_system(**kwargs)
  1. See DeleteFileSystemRequestRequestTypeDef

delete_file_system_policy#

Deletes the FileSystemPolicy for the specified file system.

Type annotations and code completion for boto3.client("efs").delete_file_system_policy method. boto3 documentation

# delete_file_system_policy method definition

def delete_file_system_policy(
    self,
    *,
    FileSystemId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_file_system_policy method usage example with argument unpacking

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

parent.delete_file_system_policy(**kwargs)
  1. See DeleteFileSystemPolicyRequestRequestTypeDef

delete_mount_target#

Deletes the specified mount target.

Type annotations and code completion for boto3.client("efs").delete_mount_target method. boto3 documentation

# delete_mount_target method definition

def delete_mount_target(
    self,
    *,
    MountTargetId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
# delete_mount_target method usage example with argument unpacking

kwargs: DeleteMountTargetRequestRequestTypeDef = {  # (1)
    "MountTargetId": ...,
}

parent.delete_mount_target(**kwargs)
  1. See DeleteMountTargetRequestRequestTypeDef

delete_replication_configuration#

Deletes a replication configuration.

Type annotations and code completion for boto3.client("efs").delete_replication_configuration method.