Skip to content

TransferClient#

Index > Transfer > TransferClient

Auto-generated documentation for Transfer type annotations stubs module mypy-boto3-transfer.

TransferClient#

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

# TransferClient usage example

from boto3.session import Session
from mypy_boto3_transfer.client import TransferClient

def get_transfer_client() -> TransferClient:
    return Session().client("transfer")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("transfer")

try:
    do_something(client)
except (
    client.exceptions.AccessDeniedException,
    client.exceptions.ClientError,
    client.exceptions.ConflictException,
    client.exceptions.InternalServiceError,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.InvalidRequestException,
    client.exceptions.ResourceExistsException,
    client.exceptions.ResourceNotFoundException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.ThrottlingException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_transfer.client import Exceptions

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

Methods#

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("transfer").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("transfer").close method. boto3 documentation

# close method definition

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

create_access#

Used by administrators to choose which groups in the directory should have access to upload and download files over the enabled protocols using Transfer Family.

Type annotations and code completion for boto3.client("transfer").create_access method. boto3 documentation

# create_access method definition

def create_access(
    self,
    *,
    Role: str,
    ServerId: str,
    ExternalId: str,
    HomeDirectory: str = ...,
    HomeDirectoryType: HomeDirectoryTypeType = ...,  # (1)
    HomeDirectoryMappings: Sequence[HomeDirectoryMapEntryTypeDef] = ...,  # (2)
    Policy: str = ...,
    PosixProfile: Union[PosixProfileTypeDef, PosixProfileOutputTypeDef] = ...,  # (3)
) -> CreateAccessResponseTypeDef:  # (4)
    ...
  1. See HomeDirectoryTypeType
  2. See HomeDirectoryMapEntryTypeDef
  3. See PosixProfileTypeDef PosixProfileOutputTypeDef
  4. See CreateAccessResponseTypeDef
# create_access method usage example with argument unpacking

kwargs: CreateAccessRequestRequestTypeDef = {  # (1)
    "Role": ...,
    "ServerId": ...,
    "ExternalId": ...,
}

parent.create_access(**kwargs)
  1. See CreateAccessRequestRequestTypeDef

create_agreement#

Creates an agreement.

Type annotations and code completion for boto3.client("transfer").create_agreement method. boto3 documentation

# create_agreement method definition

def create_agreement(
    self,
    *,
    ServerId: str,
    LocalProfileId: str,
    PartnerProfileId: str,
    BaseDirectory: str,
    AccessRole: str,
    Description: str = ...,
    Status: AgreementStatusTypeType = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateAgreementResponseTypeDef:  # (3)
    ...
  1. See AgreementStatusTypeType
  2. See TagTypeDef
  3. See CreateAgreementResponseTypeDef
# create_agreement method usage example with argument unpacking

kwargs: CreateAgreementRequestRequestTypeDef = {  # (1)
    "ServerId": ...,
    "LocalProfileId": ...,
    "PartnerProfileId": ...,
    "BaseDirectory": ...,
    "AccessRole": ...,
}

parent.create_agreement(**kwargs)
  1. See CreateAgreementRequestRequestTypeDef

create_connector#

Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol.

Type annotations and code completion for boto3.client("transfer").create_connector method. boto3 documentation

# create_connector method definition

def create_connector(
    self,
    *,
    Url: str,
    AccessRole: str,
    As2Config: As2ConnectorConfigTypeDef = ...,  # (1)
    LoggingRole: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
    SftpConfig: Union[SftpConnectorConfigTypeDef, SftpConnectorConfigOutputTypeDef] = ...,  # (3)
    SecurityPolicyName: str = ...,
) -> CreateConnectorResponseTypeDef:  # (4)
    ...
  1. See As2ConnectorConfigTypeDef
  2. See TagTypeDef
  3. See SftpConnectorConfigTypeDef SftpConnectorConfigOutputTypeDef
  4. See CreateConnectorResponseTypeDef
# create_connector method usage example with argument unpacking

kwargs: CreateConnectorRequestRequestTypeDef = {  # (1)
    "Url": ...,
    "AccessRole": ...,
}

parent.create_connector(**kwargs)
  1. See CreateConnectorRequestRequestTypeDef

create_profile#

Creates the local or partner profile to use for AS2 transfers.

Type annotations and code completion for boto3.client("transfer").create_profile method. boto3 documentation

# create_profile method definition

def create_profile(
    self,
    *,
    As2Id: str,
    ProfileType: ProfileTypeType,  # (1)
    CertificateIds: Sequence[str] = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (2)
) -> CreateProfileResponseTypeDef:  # (3)
    ...
  1. See ProfileTypeType
  2. See TagTypeDef
  3. See CreateProfileResponseTypeDef
# create_profile method usage example with argument unpacking

kwargs: CreateProfileRequestRequestTypeDef = {  # (1)
    "As2Id": ...,
    "ProfileType": ...,
}

parent.create_profile(**kwargs)
  1. See CreateProfileRequestRequestTypeDef

create_server#

Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services.

Type annotations and code completion for boto3.client("transfer").create_server method. boto3 documentation

# create_server method definition

def create_server(
    self,
    *,
    Certificate: str = ...,
    Domain: DomainType = ...,  # (1)
    EndpointDetails: Union[EndpointDetailsTypeDef, EndpointDetailsOutputTypeDef] = ...,  # (2)
    EndpointType: EndpointTypeType = ...,  # (3)
    HostKey: str = ...,
    IdentityProviderDetails: IdentityProviderDetailsTypeDef = ...,  # (4)
    IdentityProviderType: IdentityProviderTypeType = ...,  # (5)
    LoggingRole: str = ...,
    PostAuthenticationLoginBanner: str = ...,
    PreAuthenticationLoginBanner: str = ...,
    Protocols: Sequence[ProtocolType] = ...,  # (6)
    ProtocolDetails: Union[ProtocolDetailsTypeDef, ProtocolDetailsOutputTypeDef] = ...,  # (7)
    SecurityPolicyName: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (8)
    WorkflowDetails: Union[WorkflowDetailsTypeDef, WorkflowDetailsOutputTypeDef] = ...,  # (9)
    StructuredLogDestinations: Sequence[str] = ...,
    S3StorageOptions: S3StorageOptionsTypeDef = ...,  # (10)
) -> CreateServerResponseTypeDef:  # (11)
    ...
  1. See DomainType
  2. See EndpointDetailsTypeDef EndpointDetailsOutputTypeDef
  3. See EndpointTypeType
  4. See IdentityProviderDetailsTypeDef
  5. See IdentityProviderTypeType
  6. See ProtocolType
  7. See ProtocolDetailsTypeDef ProtocolDetailsOutputTypeDef
  8. See TagTypeDef
  9. See WorkflowDetailsTypeDef WorkflowDetailsOutputTypeDef
  10. See S3StorageOptionsTypeDef
  11. See CreateServerResponseTypeDef
# create_server method usage example with argument unpacking

kwargs: CreateServerRequestRequestTypeDef = {  # (1)
    "Certificate": ...,
}

parent.create_server(**kwargs)
  1. See CreateServerRequestRequestTypeDef

create_user#

Creates a user and associates them with an existing file transfer protocol-enabled server.

Type annotations and code completion for boto3.client("transfer").create_user method.