DataSync
public struct DataSync
Client object for interacting with AWS DataSync service.
AWS DataSync AWS DataSync is a managed data transfer service that makes it simpler for you to automate moving data between on-premises storage and Amazon Simple Storage Service (Amazon S3) or Amazon Elastic File System (Amazon EFS). This API interface reference for AWS DataSync contains documentation for a programming interface that you can use to manage AWS DataSync.
-
Undocumented
Declaration
Swift
public let client: AWSClient
-
Initialize the DataSync client
Declaration
Swift
public init(accessKeyId: String? = nil, secretAccessKey: String? = nil, sessionToken: String? = nil, region: AWSSDKSwiftCore.Region? = nil, endpoint: String? = nil, middlewares: [AWSServiceMiddleware] = [], eventLoopGroupProvider: AWSClient.EventLoopGroupProvider = .useAWSClientShared)
Parameters
accessKeyId
Public access key provided by AWS
secretAccessKey
Private access key provided by AWS
sessionToken
Token provided by STS.AssumeRole() which allows access to another AWS account
region
Region of server you want to communicate with
endpoint
Custom endpoint URL to use instead of standard AWS servers
middlewares
Array of middlewares to apply to requests and responses
eventLoopGroupProvider
EventLoopGroup to use. Use
useAWSClientShared
if the client shall manage its own EventLoopGroup.
-
Cancels execution of a task. When you cancel a task execution, the transfer of some files is abruptly interrupted. The contents of files that are transferred to the destination might be incomplete or inconsistent with the source files. However, if you start a new task execution on the same task and you allow the task execution to complete, file content on the destination is complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, AWS DataSync successfully complete the transfer when you start the next task execution.
Declaration
Swift
public func cancelTaskExecution(_ input: CancelTaskExecutionRequest) -> EventLoopFuture<CancelTaskExecutionResponse>
-
Activates an AWS DataSync agent that you have deployed on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this AWS Region. You can activate the agent in a VPC (virtual private cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public Internet. You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run. Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.
Declaration
Swift
public func createAgent(_ input: CreateAgentRequest) -> EventLoopFuture<CreateAgentResponse>
-
Creates an endpoint for an Amazon EFS file system.
Declaration
Swift
public func createLocationEfs(_ input: CreateLocationEfsRequest) -> EventLoopFuture<CreateLocationEfsResponse>
-
Creates an endpoint for an Amazon FSx for Windows file system.
Declaration
Swift
public func createLocationFsxWindows(_ input: CreateLocationFsxWindowsRequest) -> EventLoopFuture<CreateLocationFsxWindowsResponse>
-
Defines a file system on a Network File System (NFS) server that can be read from or written to.
Declaration
Swift
public func createLocationNfs(_ input: CreateLocationNfsRequest) -> EventLoopFuture<CreateLocationNfsResponse>
-
Creates an endpoint for a self-managed object storage bucket.
Declaration
Swift
public func createLocationObjectStorage(_ input: CreateLocationObjectStorageRequest) -> EventLoopFuture<CreateLocationObjectStorageResponse>
-
Creates an endpoint for an Amazon S3 bucket. For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access Management (IAM) role that has the required permissions. You can set up the required permissions by creating an IAM policy that grants the required permissions and attaching the policy to the role. An example of such a policy is shown in the examples section. For more information, see https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location in the AWS DataSync User Guide.
Declaration
Swift
public func createLocationS3(_ input: CreateLocationS3Request) -> EventLoopFuture<CreateLocationS3Response>
-
Defines a file system on a Server Message Block (SMB) server that can be read from or written to.
Declaration
Swift
public func createLocationSmb(_ input: CreateLocationSmbRequest) -> EventLoopFuture<CreateLocationSmbResponse>
-
Creates a task. A task is a set of two locations (source and destination) and a set of Options that you use to control the behavior of a task. If you don’t specify Options when you create a task, AWS DataSync populates them with service defaults. When you create a task, it first enters the CREATING state. During CREATING AWS DataSync attempts to mount the on-premises Network File System (NFS) location. The task transitions to the AVAILABLE state without waiting for the AWS location to become mounted. If required, AWS DataSync mounts the AWS location before each task execution. If an agent that is associated with a source (NFS) location goes offline, the task transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING status for more than a few minutes, it means that your agent might be having trouble mounting the source NFS file system. Check the task’s ErrorCode and ErrorDetail. Mount issues are often caused by either a misconfigured firewall or a mistyped NFS server host name.
Declaration
Swift
public func createTask(_ input: CreateTaskRequest) -> EventLoopFuture<CreateTaskResponse>
-
Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN) of the agent in your request. The operation disassociates the agent from your AWS account. However, it doesn’t delete the agent virtual machine (VM) from your on-premises environment.
Declaration
Swift
public func deleteAgent(_ input: DeleteAgentRequest) -> EventLoopFuture<DeleteAgentResponse>
-
Deletes the configuration of a location used by AWS DataSync.
Declaration
Swift
public func deleteLocation(_ input: DeleteLocationRequest) -> EventLoopFuture<DeleteLocationResponse>
-
Deletes a task.
Declaration
Swift
public func deleteTask(_ input: DeleteTaskRequest) -> EventLoopFuture<DeleteTaskResponse>
-
Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request.
Declaration
Swift
public func describeAgent(_ input: DescribeAgentRequest) -> EventLoopFuture<DescribeAgentResponse>
-
Returns metadata, such as the path information about an Amazon EFS location.
Declaration
Swift
public func describeLocationEfs(_ input: DescribeLocationEfsRequest) -> EventLoopFuture<DescribeLocationEfsResponse>
-
Returns metadata, such as the path information about an Amazon FSx for Windows location.
Declaration
Swift
public func describeLocationFsxWindows(_ input: DescribeLocationFsxWindowsRequest) -> EventLoopFuture<DescribeLocationFsxWindowsResponse>
-
Returns metadata, such as the path information, about an NFS location.
Declaration
Swift
public func describeLocationNfs(_ input: DescribeLocationNfsRequest) -> EventLoopFuture<DescribeLocationNfsResponse>
-
Returns metadata about a self-managed object storage server location.
Declaration
Swift
public func describeLocationObjectStorage(_ input: DescribeLocationObjectStorageRequest) -> EventLoopFuture<DescribeLocationObjectStorageResponse>
-
Returns metadata, such as bucket name, about an Amazon S3 bucket location.
Declaration
Swift
public func describeLocationS3(_ input: DescribeLocationS3Request) -> EventLoopFuture<DescribeLocationS3Response>
-
Returns metadata, such as the path and user information about an SMB location.
Declaration
Swift
public func describeLocationSmb(_ input: DescribeLocationSmbRequest) -> EventLoopFuture<DescribeLocationSmbResponse>
-
Returns metadata about a task.
Declaration
Swift
public func describeTask(_ input: DescribeTaskRequest) -> EventLoopFuture<DescribeTaskResponse>
-
Returns detailed metadata about a task that is being executed.
Declaration
Swift
public func describeTaskExecution(_ input: DescribeTaskExecutionRequest) -> EventLoopFuture<DescribeTaskExecutionResponse>
-
Returns a list of agents owned by an AWS account in the AWS Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN). By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response. If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.
Declaration
Swift
public func listAgents(_ input: ListAgentsRequest) -> EventLoopFuture<ListAgentsResponse>
-
Returns a list of source and destination locations. If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.
Declaration
Swift
public func listLocations(_ input: ListLocationsRequest) -> EventLoopFuture<ListLocationsResponse>
-
Returns all the tags associated with a specified resource.
Declaration
Swift
public func listTagsForResource(_ input: ListTagsForResourceRequest) -> EventLoopFuture<ListTagsForResourceResponse>
-
Returns a list of executed tasks.
Declaration
Swift
public func listTaskExecutions(_ input: ListTaskExecutionsRequest) -> EventLoopFuture<ListTaskExecutionsResponse>
-
Returns a list of all the tasks.
Declaration
Swift
public func listTasks(_ input: ListTasksRequest) -> EventLoopFuture<ListTasksResponse>
-
Starts a specific invocation of a task. A TaskExecution value represents an individual run of a task. Each task can have at most one TaskExecution at a time. TaskExecution has the following transition phases: INITIALIZING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. For detailed information, see the Task Execution section in the Components and Terminology topic in the AWS DataSync User Guide.
Declaration
Swift
public func startTaskExecution(_ input: StartTaskExecutionRequest) -> EventLoopFuture<StartTaskExecutionResponse>
-
Applies a key-value pair to an AWS resource.
Declaration
Swift
public func tagResource(_ input: TagResourceRequest) -> EventLoopFuture<TagResourceResponse>
-
Removes a tag from an AWS resource.
Declaration
Swift
public func untagResource(_ input: UntagResourceRequest) -> EventLoopFuture<UntagResourceResponse>
-
Updates the name of an agent.
Declaration
Swift
public func updateAgent(_ input: UpdateAgentRequest) -> EventLoopFuture<UpdateAgentResponse>
-
Updates the metadata associated with a task.
Declaration
Swift
public func updateTask(_ input: UpdateTaskRequest) -> EventLoopFuture<UpdateTaskResponse>
-
Returns a list of agents owned by an AWS account in the AWS Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN). By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response. If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.
Declaration
Swift
public func listAgentsPaginator(_ input: ListAgentsRequest, onPage: @escaping (ListAgentsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Returns a list of source and destination locations. If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.
Declaration
Swift
public func listLocationsPaginator(_ input: ListLocationsRequest, onPage: @escaping (ListLocationsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Returns all the tags associated with a specified resource.
Declaration
Swift
public func listTagsForResourcePaginator(_ input: ListTagsForResourceRequest, onPage: @escaping (ListTagsForResourceResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Returns a list of executed tasks.
Declaration
Swift
public func listTaskExecutionsPaginator(_ input: ListTaskExecutionsRequest, onPage: @escaping (ListTaskExecutionsResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Returns a list of all the tasks.
Declaration
Swift
public func listTasksPaginator(_ input: ListTasksRequest, onPage: @escaping (ListTasksResponse, EventLoop) -> EventLoopFuture<Bool>) -> EventLoopFuture<Void>
-
Undocumented
See moreDeclaration
Swift
public struct ListAgentsRequest : AWSShape
extension DataSync.ListAgentsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListLocationsRequest : AWSShape
extension DataSync.ListLocationsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListTagsForResourceRequest : AWSShape
extension DataSync.ListTagsForResourceRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListTaskExecutionsRequest : AWSShape
extension DataSync.ListTaskExecutionsRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public struct ListTasksRequest : AWSShape
extension DataSync.ListTasksRequest: AWSPaginateStringToken
-
Undocumented
See moreDeclaration
Swift
public enum AgentStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Atime : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum EndpointType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum FilterType : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Gid : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum LocationFilterName : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum LogLevel : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Mtime : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum NfsVersion : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum ObjectStorageServerProtocol : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Operator : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum OverwriteMode : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PhaseStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PosixPermissions : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PreserveDeletedFiles : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum PreserveDevices : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum S3StorageClass : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum SmbVersion : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum TaskExecutionStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum TaskFilterName : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum TaskQueueing : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum TaskStatus : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum TransferMode : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum Uid : String, CustomStringConvertible, Codable
-
Undocumented
See moreDeclaration
Swift
public enum VerifyMode : String, CustomStringConvertible, Codable