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: PosixProfileTypeDef = ...,  # (3)
) -> CreateAccessResponseTypeDef:  # (4)
    ...
  1. See HomeDirectoryTypeType
  2. See HomeDirectoryMapEntryTypeDef
  3. See PosixProfileTypeDef
  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: SftpConnectorConfigTypeDef = ...,  # (3)
) -> CreateConnectorResponseTypeDef:  # (4)
    ...
  1. See As2ConnectorConfigTypeDef
  2. See TagTypeDef
  3. See SftpConnectorConfigTypeDef
  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: EndpointDetailsTypeDef = ...,  # (2)
    EndpointType: EndpointTypeType = ...,  # (3)
    HostKey: str = ...,
    IdentityProviderDetails: IdentityProviderDetailsTypeDef = ...,  # (4)
    IdentityProviderType: IdentityProviderTypeType = ...,  # (5)
    LoggingRole: str = ...,
    PostAuthenticationLoginBanner: str = ...,
    PreAuthenticationLoginBanner: str = ...,
    Protocols: Sequence[ProtocolType] = ...,  # (6)
    ProtocolDetails: ProtocolDetailsTypeDef = ...,  # (7)
    SecurityPolicyName: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (8)
    WorkflowDetails: WorkflowDetailsTypeDef = ...,  # (9)
    StructuredLogDestinations: Sequence[str] = ...,
    S3StorageOptions: S3StorageOptionsTypeDef = ...,  # (10)
) -> CreateServerResponseTypeDef:  # (11)
    ...
  1. See DomainType
  2. See EndpointDetailsTypeDef
  3. See EndpointTypeType
  4. See IdentityProviderDetailsTypeDef
  5. See IdentityProviderTypeType
  6. See ProtocolType
  7. See ProtocolDetailsTypeDef
  8. See TagTypeDef
  9. See WorkflowDetailsTypeDef
  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. boto3 documentation

# create_user method definition

def create_user(
    self,
    *,
    Role: str,
    ServerId: str,
    UserName: str,
    HomeDirectory: str = ...,
    HomeDirectoryType: HomeDirectoryTypeType = ...,  # (1)
    HomeDirectoryMappings: Sequence[HomeDirectoryMapEntryTypeDef] = ...,  # (2)
    Policy: str = ...,
    PosixProfile: PosixProfileTypeDef = ...,  # (3)
    SshPublicKeyBody: str = ...,
    Tags: Sequence[TagTypeDef] = ...,  # (4)
) -> CreateUserResponseTypeDef:  # (5)
    ...
  1. See HomeDirectoryTypeType
  2. See HomeDirectoryMapEntryTypeDef
  3. See PosixProfileTypeDef
  4. See TagTypeDef
  5. See CreateUserResponseTypeDef
# create_user method usage example with argument unpacking

kwargs: CreateUserRequestRequestTypeDef = {  # (1)
    "Role": ...,
    "ServerId": ...,
    "UserName": ...,
}

parent.create_user(**kwargs)
  1. See CreateUserRequestRequestTypeDef

create_workflow#

Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes.

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

# create_workflow method definition

def create_workflow(
    self,
    *,
    Steps: Sequence[WorkflowStepTypeDef],  # (1)
    Description: str = ...,
    OnExceptionSteps: Sequence[WorkflowStepTypeDef] = ...,  # (1)
    Tags: Sequence[TagTypeDef] = ...,  # (3)
) -> CreateWorkflowResponseTypeDef:  # (4)
    ...
  1. See WorkflowStepTypeDef
  2. See WorkflowStepTypeDef
  3. See TagTypeDef
  4. See CreateWorkflowResponseTypeDef
# create_workflow method usage example with argument unpacking

kwargs: CreateWorkflowRequestRequestTypeDef = {  # (1)
    "Steps": ...,
}

parent.create_workflow(**kwargs)
  1. See CreateWorkflowRequestRequestTypeDef

delete_access#

Allows you to delete the access specified in the ServerID and ExternalID parameters.

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

# delete_access method definition

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

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

parent.delete_access(**kwargs)
  1. See DeleteAccessRequestRequestTypeDef

delete_agreement#

Delete the agreement that's specified in the provided AgreementId.

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