Skip to content

DataSyncClient#

Index > DataSync > DataSyncClient

Auto-generated documentation for DataSync type annotations stubs module mypy-boto3-datasync.

DataSyncClient#

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

# DataSyncClient usage example

from boto3.session import Session
from mypy_boto3_datasync.client import DataSyncClient

def get_datasync_client() -> DataSyncClient:
    return Session().client("datasync")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("datasync")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.InternalException,
    client.exceptions.InvalidRequestException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_datasync.client import Exceptions

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

Methods#

add_storage_system#

Creates an Amazon Web Services resource for an on-premises storage system that you want DataSync Discovery to collect information about.

Type annotations and code completion for boto3.client("datasync").add_storage_system method. boto3 documentation

# add_storage_system method definition

def add_storage_system(
    self,
    *,
    ServerConfiguration: DiscoveryServerConfigurationTypeDef,  # (1)
    SystemType: DiscoverySystemTypeType,  # (2)
    AgentArns: Sequence[str],
    ClientToken: str,
    Credentials: CredentialsTypeDef,  # (3)
    CloudWatchLogGroupArn: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (4)
    Name: str = ...,
) -> AddStorageSystemResponseTypeDef:  # (5)
    ...
  1. See DiscoveryServerConfigurationTypeDef
  2. See DiscoverySystemTypeType
  3. See CredentialsTypeDef
  4. See TagListEntryTypeDef
  5. See AddStorageSystemResponseTypeDef
# add_storage_system method usage example with argument unpacking

kwargs: AddStorageSystemRequestRequestTypeDef = {  # (1)
    "ServerConfiguration": ...,
    "SystemType": ...,
    "AgentArns": ...,
    "ClientToken": ...,
    "Credentials": ...,
}

parent.add_storage_system(**kwargs)
  1. See AddStorageSystemRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

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

# can_paginate method definition

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

cancel_task_execution#

Stops an DataSync task execution that's in progress.

Type annotations and code completion for boto3.client("datasync").cancel_task_execution method. boto3 documentation

# cancel_task_execution method definition

def cancel_task_execution(
    self,
    *,
    TaskExecutionArn: str,
) -> Dict[str, Any]:
    ...
# cancel_task_execution method usage example with argument unpacking

kwargs: CancelTaskExecutionRequestRequestTypeDef = {  # (1)
    "TaskExecutionArn": ...,
}

parent.cancel_task_execution(**kwargs)
  1. See CancelTaskExecutionRequestRequestTypeDef

close#

Closes underlying endpoint connections.

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

# close method definition

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

create_agent#

Activates an DataSync agent that you've deployed in your storage environment.

Type annotations and code completion for boto3.client("datasync").create_agent method. boto3 documentation

# create_agent method definition

def create_agent(
    self,
    *,
    ActivationKey: str,
    AgentName: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (1)
    VpcEndpointId: str = ...,
    SubnetArns: Sequence[str] = ...,
    SecurityGroupArns: Sequence[str] = ...,
) -> CreateAgentResponseTypeDef:  # (2)
    ...
  1. See TagListEntryTypeDef
  2. See CreateAgentResponseTypeDef
# create_agent method usage example with argument unpacking

kwargs: CreateAgentRequestRequestTypeDef = {  # (1)
    "ActivationKey": ...,
}

parent.create_agent(**kwargs)
  1. See CreateAgentRequestRequestTypeDef

create_location_azure_blob#

Creates a transfer location for a Microsoft Azure Blob Storage container.

Type annotations and code completion for boto3.client("datasync").create_location_azure_blob method. boto3 documentation

# create_location_azure_blob method definition

def create_location_azure_blob(
    self,
    *,
    ContainerUrl: str,
    AuthenticationType: AzureBlobAuthenticationTypeType,  # (1)
    AgentArns: Sequence[str],
    SasConfiguration: AzureBlobSasConfigurationTypeDef = ...,  # (2)
    BlobType: AzureBlobTypeType = ...,  # (3)
    AccessTier: AzureAccessTierType = ...,  # (4)
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (5)
) -> CreateLocationAzureBlobResponseTypeDef:  # (6)
    ...
  1. See AzureBlobAuthenticationTypeType
  2. See AzureBlobSasConfigurationTypeDef
  3. See AzureBlobTypeType
  4. See AzureAccessTierType
  5. See TagListEntryTypeDef
  6. See CreateLocationAzureBlobResponseTypeDef
# create_location_azure_blob method usage example with argument unpacking

kwargs: CreateLocationAzureBlobRequestRequestTypeDef = {  # (1)
    "ContainerUrl": ...,
    "AuthenticationType": ...,
    "AgentArns": ...,
}

parent.create_location_azure_blob(**kwargs)
  1. See CreateLocationAzureBlobRequestRequestTypeDef

create_location_efs#

Creates a transfer location for an Amazon EFS file system.

Type annotations and code completion for boto3.client("datasync").create_location_efs method. boto3 documentation

# create_location_efs method definition

def create_location_efs(
    self,
    *,
    EfsFilesystemArn: str,
    Ec2Config: Ec2ConfigTypeDef,  # (1)
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (2)
    AccessPointArn: str = ...,
    FileSystemAccessRoleArn: str = ...,
    InTransitEncryption: EfsInTransitEncryptionType = ...,  # (3)
) -> CreateLocationEfsResponseTypeDef:  # (4)
    ...
  1. See Ec2ConfigTypeDef
  2. See TagListEntryTypeDef
  3. See EfsInTransitEncryptionType
  4. See CreateLocationEfsResponseTypeDef
# create_location_efs method usage example with argument unpacking

kwargs: CreateLocationEfsRequestRequestTypeDef = {  # (1)
    "EfsFilesystemArn": ...,
    "Ec2Config": ...,
}

parent.create_location_efs(**kwargs)
  1. See CreateLocationEfsRequestRequestTypeDef

create_location_fsx_lustre#

Creates a transfer location for an Amazon FSx for Lustre file system.

Type annotations and code completion for boto3.client("datasync").create_location_fsx_lustre method. boto3 documentation

# create_location_fsx_lustre method definition

def create_location_fsx_lustre(
    self,
    *,
    FsxFilesystemArn: str,
    SecurityGroupArns: Sequence[str],
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (1)
) -> CreateLocationFsxLustreResponseTypeDef:  # (2)
    ...
  1. See TagListEntryTypeDef
  2. See CreateLocationFsxLustreResponseTypeDef
# create_location_fsx_lustre method usage example with argument unpacking

kwargs: CreateLocationFsxLustreRequestRequestTypeDef = {  # (1)
    "FsxFilesystemArn": ...,
    "SecurityGroupArns": ...,
}

parent.create_location_fsx_lustre(**kwargs)
  1. See CreateLocationFsxLustreRequestRequestTypeDef

create_location_fsx_ontap#

Creates a transfer location for an Amazon FSx for NetApp ONTAP file system.

Type annotations and code completion for boto3.client("datasync").create_location_fsx_ontap method. boto3 documentation

# create_location_fsx_ontap method definition

def create_location_fsx_ontap(
    self,
    *,
    Protocol: FsxProtocolTypeDef,  # (1)
    SecurityGroupArns: Sequence[str],
    StorageVirtualMachineArn: str,
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (2)
) -> CreateLocationFsxOntapResponseTypeDef:  # (3)
    ...
  1. See FsxProtocolTypeDef
  2. See TagListEntryTypeDef
  3. See CreateLocationFsxOntapResponseTypeDef
# create_location_fsx_ontap method usage example with argument unpacking

kwargs: CreateLocationFsxOntapRequestRequestTypeDef = {  # (1)
    "Protocol": ...,
    "SecurityGroupArns": ...,
    "StorageVirtualMachineArn": ...,
}

parent.create_location_fsx_ontap(**kwargs)
  1. See CreateLocationFsxOntapRequestRequestTypeDef

create_location_fsx_open_zfs#

Creates a transfer location for an Amazon FSx for OpenZFS file system.

Type annotations and code completion for boto3.client("datasync").create_location_fsx_open_zfs method. boto3 documentation

# create_location_fsx_open_zfs method definition

def create_location_fsx_open_zfs(
    self,
    *,
    FsxFilesystemArn: str,
    Protocol: FsxProtocolTypeDef,  # (1)
    SecurityGroupArns: Sequence[str],
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (2)
) -> CreateLocationFsxOpenZfsResponseTypeDef:  # (3)
    ...
  1. See FsxProtocolTypeDef
  2. See TagListEntryTypeDef
  3. See CreateLocationFsxOpenZfsResponseTypeDef
# create_location_fsx_open_zfs method usage example with argument unpacking

kwargs: CreateLocationFsxOpenZfsRequestRequestTypeDef = {  # (1)
    "FsxFilesystemArn": ...,
    "Protocol": ...,
    "SecurityGroupArns": ...,
}

parent.create_location_fsx_open_zfs(**kwargs)
  1. See CreateLocationFsxOpenZfsRequestRequestTypeDef

create_location_fsx_windows#

Creates a transfer location for an Amazon FSx for Windows File Server file system.

Type annotations and code completion for boto3.client("datasync").create_location_fsx_windows method. boto3 documentation

# create_location_fsx_windows method definition

def create_location_fsx_windows(
    self,
    *,
    FsxFilesystemArn: str,
    SecurityGroupArns: Sequence[str],
    User: str,
    Password: str,
    Subdirectory: str = ...,
    Tags: Sequence[TagListEntryTypeDef] = ...,  # (1)
    Domain: str = ...,
) -> CreateLocationFsxWindowsResponseTypeDef:  # (2)
    ...
  1. See TagListEntryTypeDef
  2. See CreateLocationFsxWindowsResponseTypeDef
# create_location_fsx_windows method usage example with argument unpacking

kwargs: CreateLocationFsxWindowsRequestRequestTypeDef = {  # (1)
    "FsxFilesystemArn": ...,
    "SecurityGroupArns": ...,
    "User": ...,
    "Password": ...,
}

parent.create_location_fsx_windows(**kwargs)
  1. See