commonMain.aws.sdk.kotlin.services.transfer.TransferClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of transfer-jvm Show documentation
Show all versions of transfer-jvm Show documentation
The AWS SDK for Kotlin client for Transfer
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.transfer
import aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider
import aws.sdk.kotlin.runtime.auth.credentials.internal.manage
import aws.sdk.kotlin.runtime.client.AwsSdkClientConfig
import aws.sdk.kotlin.runtime.config.AbstractAwsSdkClientFactory
import aws.sdk.kotlin.runtime.config.endpoints.resolveEndpointUrl
import aws.sdk.kotlin.runtime.config.profile.AwsProfile
import aws.sdk.kotlin.runtime.config.profile.AwsSharedConfig
import aws.sdk.kotlin.runtime.http.retries.AwsRetryPolicy
import aws.sdk.kotlin.services.transfer.auth.DefaultTransferAuthSchemeProvider
import aws.sdk.kotlin.services.transfer.auth.TransferAuthSchemeProvider
import aws.sdk.kotlin.services.transfer.endpoints.DefaultTransferEndpointProvider
import aws.sdk.kotlin.services.transfer.endpoints.TransferEndpointParameters
import aws.sdk.kotlin.services.transfer.endpoints.TransferEndpointProvider
import aws.sdk.kotlin.services.transfer.model.CreateAccessRequest
import aws.sdk.kotlin.services.transfer.model.CreateAccessResponse
import aws.sdk.kotlin.services.transfer.model.CreateAgreementRequest
import aws.sdk.kotlin.services.transfer.model.CreateAgreementResponse
import aws.sdk.kotlin.services.transfer.model.CreateConnectorRequest
import aws.sdk.kotlin.services.transfer.model.CreateConnectorResponse
import aws.sdk.kotlin.services.transfer.model.CreateProfileRequest
import aws.sdk.kotlin.services.transfer.model.CreateProfileResponse
import aws.sdk.kotlin.services.transfer.model.CreateServerRequest
import aws.sdk.kotlin.services.transfer.model.CreateServerResponse
import aws.sdk.kotlin.services.transfer.model.CreateUserRequest
import aws.sdk.kotlin.services.transfer.model.CreateUserResponse
import aws.sdk.kotlin.services.transfer.model.CreateWorkflowRequest
import aws.sdk.kotlin.services.transfer.model.CreateWorkflowResponse
import aws.sdk.kotlin.services.transfer.model.DeleteAccessRequest
import aws.sdk.kotlin.services.transfer.model.DeleteAccessResponse
import aws.sdk.kotlin.services.transfer.model.DeleteAgreementRequest
import aws.sdk.kotlin.services.transfer.model.DeleteAgreementResponse
import aws.sdk.kotlin.services.transfer.model.DeleteCertificateRequest
import aws.sdk.kotlin.services.transfer.model.DeleteCertificateResponse
import aws.sdk.kotlin.services.transfer.model.DeleteConnectorRequest
import aws.sdk.kotlin.services.transfer.model.DeleteConnectorResponse
import aws.sdk.kotlin.services.transfer.model.DeleteHostKeyRequest
import aws.sdk.kotlin.services.transfer.model.DeleteHostKeyResponse
import aws.sdk.kotlin.services.transfer.model.DeleteProfileRequest
import aws.sdk.kotlin.services.transfer.model.DeleteProfileResponse
import aws.sdk.kotlin.services.transfer.model.DeleteServerRequest
import aws.sdk.kotlin.services.transfer.model.DeleteServerResponse
import aws.sdk.kotlin.services.transfer.model.DeleteSshPublicKeyRequest
import aws.sdk.kotlin.services.transfer.model.DeleteSshPublicKeyResponse
import aws.sdk.kotlin.services.transfer.model.DeleteUserRequest
import aws.sdk.kotlin.services.transfer.model.DeleteUserResponse
import aws.sdk.kotlin.services.transfer.model.DeleteWorkflowRequest
import aws.sdk.kotlin.services.transfer.model.DeleteWorkflowResponse
import aws.sdk.kotlin.services.transfer.model.DescribeAccessRequest
import aws.sdk.kotlin.services.transfer.model.DescribeAccessResponse
import aws.sdk.kotlin.services.transfer.model.DescribeAgreementRequest
import aws.sdk.kotlin.services.transfer.model.DescribeAgreementResponse
import aws.sdk.kotlin.services.transfer.model.DescribeCertificateRequest
import aws.sdk.kotlin.services.transfer.model.DescribeCertificateResponse
import aws.sdk.kotlin.services.transfer.model.DescribeConnectorRequest
import aws.sdk.kotlin.services.transfer.model.DescribeConnectorResponse
import aws.sdk.kotlin.services.transfer.model.DescribeExecutionRequest
import aws.sdk.kotlin.services.transfer.model.DescribeExecutionResponse
import aws.sdk.kotlin.services.transfer.model.DescribeHostKeyRequest
import aws.sdk.kotlin.services.transfer.model.DescribeHostKeyResponse
import aws.sdk.kotlin.services.transfer.model.DescribeProfileRequest
import aws.sdk.kotlin.services.transfer.model.DescribeProfileResponse
import aws.sdk.kotlin.services.transfer.model.DescribeSecurityPolicyRequest
import aws.sdk.kotlin.services.transfer.model.DescribeSecurityPolicyResponse
import aws.sdk.kotlin.services.transfer.model.DescribeServerRequest
import aws.sdk.kotlin.services.transfer.model.DescribeServerResponse
import aws.sdk.kotlin.services.transfer.model.DescribeUserRequest
import aws.sdk.kotlin.services.transfer.model.DescribeUserResponse
import aws.sdk.kotlin.services.transfer.model.DescribeWorkflowRequest
import aws.sdk.kotlin.services.transfer.model.DescribeWorkflowResponse
import aws.sdk.kotlin.services.transfer.model.ImportCertificateRequest
import aws.sdk.kotlin.services.transfer.model.ImportCertificateResponse
import aws.sdk.kotlin.services.transfer.model.ImportHostKeyRequest
import aws.sdk.kotlin.services.transfer.model.ImportHostKeyResponse
import aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyRequest
import aws.sdk.kotlin.services.transfer.model.ImportSshPublicKeyResponse
import aws.sdk.kotlin.services.transfer.model.ListAccessesRequest
import aws.sdk.kotlin.services.transfer.model.ListAccessesResponse
import aws.sdk.kotlin.services.transfer.model.ListAgreementsRequest
import aws.sdk.kotlin.services.transfer.model.ListAgreementsResponse
import aws.sdk.kotlin.services.transfer.model.ListCertificatesRequest
import aws.sdk.kotlin.services.transfer.model.ListCertificatesResponse
import aws.sdk.kotlin.services.transfer.model.ListConnectorsRequest
import aws.sdk.kotlin.services.transfer.model.ListConnectorsResponse
import aws.sdk.kotlin.services.transfer.model.ListExecutionsRequest
import aws.sdk.kotlin.services.transfer.model.ListExecutionsResponse
import aws.sdk.kotlin.services.transfer.model.ListHostKeysRequest
import aws.sdk.kotlin.services.transfer.model.ListHostKeysResponse
import aws.sdk.kotlin.services.transfer.model.ListProfilesRequest
import aws.sdk.kotlin.services.transfer.model.ListProfilesResponse
import aws.sdk.kotlin.services.transfer.model.ListSecurityPoliciesRequest
import aws.sdk.kotlin.services.transfer.model.ListSecurityPoliciesResponse
import aws.sdk.kotlin.services.transfer.model.ListServersRequest
import aws.sdk.kotlin.services.transfer.model.ListServersResponse
import aws.sdk.kotlin.services.transfer.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.transfer.model.ListTagsForResourceResponse
import aws.sdk.kotlin.services.transfer.model.ListUsersRequest
import aws.sdk.kotlin.services.transfer.model.ListUsersResponse
import aws.sdk.kotlin.services.transfer.model.ListWorkflowsRequest
import aws.sdk.kotlin.services.transfer.model.ListWorkflowsResponse
import aws.sdk.kotlin.services.transfer.model.SendWorkflowStepStateRequest
import aws.sdk.kotlin.services.transfer.model.SendWorkflowStepStateResponse
import aws.sdk.kotlin.services.transfer.model.StartDirectoryListingRequest
import aws.sdk.kotlin.services.transfer.model.StartDirectoryListingResponse
import aws.sdk.kotlin.services.transfer.model.StartFileTransferRequest
import aws.sdk.kotlin.services.transfer.model.StartFileTransferResponse
import aws.sdk.kotlin.services.transfer.model.StartServerRequest
import aws.sdk.kotlin.services.transfer.model.StartServerResponse
import aws.sdk.kotlin.services.transfer.model.StopServerRequest
import aws.sdk.kotlin.services.transfer.model.StopServerResponse
import aws.sdk.kotlin.services.transfer.model.TagResourceRequest
import aws.sdk.kotlin.services.transfer.model.TagResourceResponse
import aws.sdk.kotlin.services.transfer.model.TestConnectionRequest
import aws.sdk.kotlin.services.transfer.model.TestConnectionResponse
import aws.sdk.kotlin.services.transfer.model.TestIdentityProviderRequest
import aws.sdk.kotlin.services.transfer.model.TestIdentityProviderResponse
import aws.sdk.kotlin.services.transfer.model.UntagResourceRequest
import aws.sdk.kotlin.services.transfer.model.UntagResourceResponse
import aws.sdk.kotlin.services.transfer.model.UpdateAccessRequest
import aws.sdk.kotlin.services.transfer.model.UpdateAccessResponse
import aws.sdk.kotlin.services.transfer.model.UpdateAgreementRequest
import aws.sdk.kotlin.services.transfer.model.UpdateAgreementResponse
import aws.sdk.kotlin.services.transfer.model.UpdateCertificateRequest
import aws.sdk.kotlin.services.transfer.model.UpdateCertificateResponse
import aws.sdk.kotlin.services.transfer.model.UpdateConnectorRequest
import aws.sdk.kotlin.services.transfer.model.UpdateConnectorResponse
import aws.sdk.kotlin.services.transfer.model.UpdateHostKeyRequest
import aws.sdk.kotlin.services.transfer.model.UpdateHostKeyResponse
import aws.sdk.kotlin.services.transfer.model.UpdateProfileRequest
import aws.sdk.kotlin.services.transfer.model.UpdateProfileResponse
import aws.sdk.kotlin.services.transfer.model.UpdateServerRequest
import aws.sdk.kotlin.services.transfer.model.UpdateServerResponse
import aws.sdk.kotlin.services.transfer.model.UpdateUserRequest
import aws.sdk.kotlin.services.transfer.model.UpdateUserResponse
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderConfig
import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor
import aws.smithy.kotlin.runtime.client.AbstractSdkClientBuilder
import aws.smithy.kotlin.runtime.client.AbstractSdkClientFactory
import aws.smithy.kotlin.runtime.client.LogMode
import aws.smithy.kotlin.runtime.client.RetryClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfig
import aws.smithy.kotlin.runtime.client.RetryStrategyClientConfigImpl
import aws.smithy.kotlin.runtime.client.SdkClient
import aws.smithy.kotlin.runtime.client.SdkClientConfig
import aws.smithy.kotlin.runtime.http.auth.AuthScheme
import aws.smithy.kotlin.runtime.http.auth.HttpAuthConfig
import aws.smithy.kotlin.runtime.http.config.HttpClientConfig
import aws.smithy.kotlin.runtime.http.config.HttpEngineConfig
import aws.smithy.kotlin.runtime.http.engine.HttpClientEngine
import aws.smithy.kotlin.runtime.http.engine.HttpEngineConfigImpl
import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor
import aws.smithy.kotlin.runtime.net.url.Url
import aws.smithy.kotlin.runtime.retries.RetryStrategy
import aws.smithy.kotlin.runtime.retries.policy.RetryPolicy
import aws.smithy.kotlin.runtime.telemetry.Global
import aws.smithy.kotlin.runtime.telemetry.TelemetryConfig
import aws.smithy.kotlin.runtime.telemetry.TelemetryProvider
import aws.smithy.kotlin.runtime.util.LazyAsyncValue
import kotlin.collections.List
import kotlin.jvm.JvmStatic
public const val ServiceId: String = "Transfer"
public const val SdkVersion: String = "1.3.30"
public const val ServiceApiVersion: String = "2018-11-05"
/**
* Transfer Family is a fully managed service that enables the transfer of files over the File Transfer Protocol (FTP), File Transfer Protocol over SSL (FTPS), or Secure Shell (SSH) File Transfer Protocol (SFTP) directly into and out of Amazon Simple Storage Service (Amazon S3) or Amazon EFS. Additionally, you can use Applicability Statement 2 (AS2) to transfer files into and out of Amazon S3. Amazon Web Services helps you seamlessly migrate your file transfer workflows to Transfer Family by integrating with existing authentication systems, and providing DNS routing with Amazon Route 53 so nothing changes for your customers and partners, or their applications. With your data in Amazon S3, you can use it with Amazon Web Services for processing, analytics, machine learning, and archiving. Getting started with Transfer Family is easy since there is no infrastructure to buy and set up.
*/
public interface TransferClient : SdkClient {
/**
* TransferClient's configuration
*/
public override val config: Config
public companion object : AbstractAwsSdkClientFactory()
{
@JvmStatic
override fun builder(): Builder = Builder()
override fun finalizeConfig(builder: Builder) {
super.finalizeConfig(builder)
builder.config.interceptors.add(0, ClockSkewInterceptor())
}
override suspend fun finalizeEnvironmentalConfig(builder: Builder, sharedConfig: LazyAsyncValue, activeProfile: LazyAsyncValue) {
super.finalizeEnvironmentalConfig(builder, sharedConfig, activeProfile)
builder.config.endpointUrl = builder.config.endpointUrl ?: resolveEndpointUrl(
sharedConfig,
"Transfer",
"TRANSFER",
"transfer",
)
}
}
public class Builder internal constructor(): AbstractSdkClientBuilder() {
override val config: Config.Builder = Config.Builder()
override fun newClient(config: Config): TransferClient = DefaultTransferClient(config)
}
public class Config private constructor(builder: Builder) : AwsSdkClientConfig, CredentialsProviderConfig, HttpAuthConfig, HttpClientConfig, HttpEngineConfig by builder.buildHttpEngineConfig(), RetryClientConfig, RetryStrategyClientConfig by builder.buildRetryStrategyClientConfig(), SdkClientConfig, TelemetryConfig {
override val clientName: String = builder.clientName
override val region: String? = builder.region
override val authSchemes: kotlin.collections.List = builder.authSchemes
override val credentialsProvider: CredentialsProvider = builder.credentialsProvider ?: DefaultChainCredentialsProvider(httpClient = httpClient, region = region).manage()
public val endpointProvider: TransferEndpointProvider = builder.endpointProvider ?: DefaultTransferEndpointProvider()
public val endpointUrl: Url? = builder.endpointUrl
override val interceptors: kotlin.collections.List = builder.interceptors
override val logMode: LogMode = builder.logMode ?: LogMode.Default
override val retryPolicy: RetryPolicy = builder.retryPolicy ?: AwsRetryPolicy.Default
override val telemetryProvider: TelemetryProvider = builder.telemetryProvider ?: TelemetryProvider.Global
override val useDualStack: Boolean = builder.useDualStack ?: false
override val useFips: Boolean = builder.useFips ?: false
override val applicationId: String? = builder.applicationId
public val authSchemeProvider: TransferAuthSchemeProvider = builder.authSchemeProvider ?: DefaultTransferAuthSchemeProvider()
public companion object {
public inline operator fun invoke(block: Builder.() -> kotlin.Unit): Config = Builder().apply(block).build()
}
public fun toBuilder(): Builder = Builder().apply {
clientName = [email protected]
region = [email protected]
authSchemes = [email protected]
credentialsProvider = [email protected]
endpointProvider = [email protected]
endpointUrl = [email protected]
httpClient = [email protected]
interceptors = [email protected]()
logMode = [email protected]
retryPolicy = [email protected]
retryStrategy = [email protected]
telemetryProvider = [email protected]
useDualStack = [email protected]
useFips = [email protected]
applicationId = [email protected]
authSchemeProvider = [email protected]
}
public class Builder : AwsSdkClientConfig.Builder, CredentialsProviderConfig.Builder, HttpAuthConfig.Builder, HttpClientConfig.Builder, HttpEngineConfig.Builder by HttpEngineConfigImpl.BuilderImpl(), RetryClientConfig.Builder, RetryStrategyClientConfig.Builder by RetryStrategyClientConfigImpl.BuilderImpl(), SdkClientConfig.Builder, TelemetryConfig.Builder {
/**
* A reader-friendly name for the client.
*/
override var clientName: String = "Transfer"
/**
* The AWS region (e.g. `us-west-2`) to make requests to. See about AWS
* [global infrastructure](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/) for more
* information
*/
override var region: String? = null
/**
* Register new or override default [AuthScheme]s configured for this client. By default, the set
* of auth schemes configured comes from the service model. An auth scheme configured explicitly takes
* precedence over the defaults and can be used to customize identity resolution and signing for specific
* authentication schemes.
*/
override var authSchemes: kotlin.collections.List = emptyList()
/**
* The AWS credentials provider to use for authenticating requests. If not provided a
* [aws.sdk.kotlin.runtime.auth.credentials.DefaultChainCredentialsProvider] instance will be used.
* NOTE: The caller is responsible for managing the lifetime of the provider when set. The SDK
* client will not close it when the client is closed.
*/
override var credentialsProvider: CredentialsProvider? = null
/**
* The endpoint provider used to determine where to make service requests. **This is an advanced config
* option.**
*
* Endpoint resolution occurs as part of the workflow for every request made via the service client.
*
* The inputs to endpoint resolution are defined on a per-service basis (see [EndpointParameters]).
*/
public var endpointProvider: TransferEndpointProvider? = null
/**
* A custom endpoint to route requests to. The endpoint set here is passed to the configured
* [endpointProvider], which may inspect and modify it as needed.
*
* Setting a custom endpointUrl should generally be preferred to overriding the [endpointProvider] and is
* the recommended way to route requests to development or preview instances of a service.
*
* **This is an advanced config option.**
*/
public var endpointUrl: Url? = null
/**
* Add an [aws.smithy.kotlin.runtime.client.Interceptor] that will have access to read and modify
* the request and response objects as they are processed by the SDK.
* Interceptors added using this method are executed in the order they are configured and are always
* later than any added automatically by the SDK.
*/
override var interceptors: kotlin.collections.MutableList = kotlin.collections.mutableListOf()
/**
* Configure events that will be logged. By default clients will not output
* raw requests or responses. Use this setting to opt-in to additional debug logging.
*
* This can be used to configure logging of requests, responses, retries, etc of SDK clients.
*
* **NOTE**: Logging of raw requests or responses may leak sensitive information! It may also have
* performance considerations when dumping the request/response body. This is primarily a tool for
* debug purposes.
*/
override var logMode: LogMode? = null
/**
* The policy to use for evaluating operation results and determining whether/how to retry.
*/
override var retryPolicy: RetryPolicy? = null
/**
* The telemetry provider used to instrument the SDK operations with. By default, the global telemetry
* provider will be used.
*/
override var telemetryProvider: TelemetryProvider? = null
/**
* Flag to toggle whether to use dual-stack endpoints when making requests.
* See [https://docs.aws.amazon.com/sdkref/latest/guide/feature-endpoints.html] for more information.
* ` Disabled by default.
*/
override var useDualStack: Boolean? = null
/**
* Flag to toggle whether to use [FIPS](https://aws.amazon.com/compliance/fips/) endpoints when making requests.
* ` Disabled by default.
*/
override var useFips: Boolean? = null
/**
* An optional application specific identifier.
* When set it will be appended to the User-Agent header of every request in the form of: `app/{applicationId}`.
* When not explicitly set, the value will be loaded from the following locations:
*
* - JVM System Property: `aws.userAgentAppId`
* - Environment variable: `AWS_SDK_UA_APP_ID`
* - Shared configuration profile attribute: `sdk_ua_app_id`
*
* See [shared configuration settings](https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html)
* reference for more information on environment variables and shared config settings.
*/
override var applicationId: String? = null
/**
* Configure the provider used to resolve the authentication scheme to use for a particular operation.
*/
public var authSchemeProvider: TransferAuthSchemeProvider? = null
override fun build(): Config = Config(this)
}
}
/**
* 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. For example, a Microsoft Active Directory might contain 50,000 users, but only a small fraction might need the ability to transfer files to the server. An administrator can use `CreateAccess` to limit the access to the correct set of users who need this ability.
*/
public suspend fun createAccess(input: CreateAccessRequest): CreateAccessResponse
/**
* Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes.
*
* The partner is identified with the `PartnerProfileId`, and the AS2 process is identified with the `LocalProfileId`.
*/
public suspend fun createAgreement(input: CreateAgreementRequest): CreateAgreementResponse
/**
* Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol. For AS2, the connector is required for sending files to an externally hosted AS2 server. For SFTP, the connector is required when sending files to an SFTP server or receiving files from an SFTP server. For more details about connectors, see [Configure AS2 connectors](https://docs.aws.amazon.com/transfer/latest/userguide/configure-as2-connector.html) and [Create SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/configure-sftp-connector.html).
*
* You must specify exactly one configuration object: either for AS2 (`As2Config`) or SFTP (`SftpConfig`).
*/
public suspend fun createConnector(input: CreateConnectorRequest): CreateConnectorResponse
/**
* Creates the local or partner profile to use for AS2 transfers.
*/
public suspend fun createProfile(input: CreateProfileRequest): CreateProfileResponse
/**
* Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services. When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated `ServerId` property that is assigned to the newly created server.
*/
public suspend fun createServer(input: CreateServerRequest = CreateServerRequest { }): CreateServerResponse
/**
* Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create and associate users with servers that have the `IdentityProviderType` set to `SERVICE_MANAGED`. Using parameters for `CreateUser`, you can specify the user name, set the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.
*/
public suspend fun createUser(input: CreateUserRequest): CreateUserResponse
/**
* Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes. After creating a workflow, you can associate the workflow created with any transfer servers by specifying the `workflow-details` field in `CreateServer` and `UpdateServer` operations.
*/
public suspend fun createWorkflow(input: CreateWorkflowRequest): CreateWorkflowResponse
/**
* Allows you to delete the access specified in the `ServerID` and `ExternalID` parameters.
*/
public suspend fun deleteAccess(input: DeleteAccessRequest): DeleteAccessResponse
/**
* Delete the agreement that's specified in the provided `AgreementId`.
*/
public suspend fun deleteAgreement(input: DeleteAgreementRequest): DeleteAgreementResponse
/**
* Deletes the certificate that's specified in the `CertificateId` parameter.
*/
public suspend fun deleteCertificate(input: DeleteCertificateRequest): DeleteCertificateResponse
/**
* Deletes the connector that's specified in the provided `ConnectorId`.
*/
public suspend fun deleteConnector(input: DeleteConnectorRequest): DeleteConnectorResponse
/**
* Deletes the host key that's specified in the `HostKeyId` parameter.
*/
public suspend fun deleteHostKey(input: DeleteHostKeyRequest): DeleteHostKeyResponse
/**
* Deletes the profile that's specified in the `ProfileId` parameter.
*/
public suspend fun deleteProfile(input: DeleteProfileRequest): DeleteProfileResponse
/**
* Deletes the file transfer protocol-enabled server that you specify.
*
* No response returns from this operation.
*/
public suspend fun deleteServer(input: DeleteServerRequest): DeleteServerResponse
/**
* Deletes a user's Secure Shell (SSH) public key.
*/
public suspend fun deleteSshPublicKey(input: DeleteSshPublicKeyRequest): DeleteSshPublicKeyResponse
/**
* Deletes the user belonging to a file transfer protocol-enabled server you specify.
*
* No response returns from this operation.
*
* When you delete a user from a server, the user's information is lost.
*/
public suspend fun deleteUser(input: DeleteUserRequest): DeleteUserResponse
/**
* Deletes the specified workflow.
*/
public suspend fun deleteWorkflow(input: DeleteWorkflowRequest): DeleteWorkflowResponse
/**
* Describes the access that is assigned to the specific file transfer protocol-enabled server, as identified by its `ServerId` property and its `ExternalId`.
*
* The response from this call returns the properties of the access that is associated with the `ServerId` value that was specified.
*/
public suspend fun describeAccess(input: DescribeAccessRequest): DescribeAccessResponse
/**
* Describes the agreement that's identified by the `AgreementId`.
*/
public suspend fun describeAgreement(input: DescribeAgreementRequest): DescribeAgreementResponse
/**
* Describes the certificate that's identified by the `CertificateId`.
*/
public suspend fun describeCertificate(input: DescribeCertificateRequest): DescribeCertificateResponse
/**
* Describes the connector that's identified by the `ConnectorId.`
*/
public suspend fun describeConnector(input: DescribeConnectorRequest): DescribeConnectorResponse
/**
* You can use `DescribeExecution` to check the details of the execution of the specified workflow.
*
* This API call only returns details for in-progress workflows.
*
* If you provide an ID for an execution that is not in progress, or if the execution doesn't match the specified workflow ID, you receive a `ResourceNotFound` exception.
*/
public suspend fun describeExecution(input: DescribeExecutionRequest): DescribeExecutionResponse
/**
* Returns the details of the host key that's specified by the `HostKeyId` and `ServerId`.
*/
public suspend fun describeHostKey(input: DescribeHostKeyRequest): DescribeHostKeyResponse
/**
* Returns the details of the profile that's specified by the `ProfileId`.
*/
public suspend fun describeProfile(input: DescribeProfileRequest): DescribeProfileResponse
/**
* Describes the security policy that is attached to your server or SFTP connector. The response contains a description of the security policy's properties. For more information about security policies, see [Working with security policies for servers](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html) or [Working with security policies for SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies-connectors.html).
*/
public suspend fun describeSecurityPolicy(input: DescribeSecurityPolicyRequest): DescribeSecurityPolicyResponse
/**
* Describes a file transfer protocol-enabled server that you specify by passing the `ServerId` parameter.
*
* The response contains a description of a server's properties. When you set `EndpointType` to VPC, the response will contain the `EndpointDetails`.
*/
public suspend fun describeServer(input: DescribeServerRequest): DescribeServerResponse
/**
* Describes the user assigned to the specific file transfer protocol-enabled server, as identified by its `ServerId` property.
*
* The response from this call returns the properties of the user associated with the `ServerId` value that was specified.
*/
public suspend fun describeUser(input: DescribeUserRequest): DescribeUserResponse
/**
* Describes the specified workflow.
*/
public suspend fun describeWorkflow(input: DescribeWorkflowRequest): DescribeWorkflowResponse
/**
* Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner profiles.
*/
public suspend fun importCertificate(input: ImportCertificateRequest): ImportCertificateResponse
/**
* Adds a host key to the server that's specified by the `ServerId` parameter.
*/
public suspend fun importHostKey(input: ImportHostKeyRequest): ImportHostKeyResponse
/**
* Adds a Secure Shell (SSH) public key to a Transfer Family user identified by a `UserName` value assigned to the specific file transfer protocol-enabled server, identified by `ServerId`.
*
* The response returns the `UserName` value, the `ServerId` value, and the name of the `SshPublicKeyId`.
*/
public suspend fun importSshPublicKey(input: ImportSshPublicKeyRequest): ImportSshPublicKeyResponse
/**
* Lists the details for all the accesses you have on your server.
*/
public suspend fun listAccesses(input: ListAccessesRequest): ListAccessesResponse
/**
* Returns a list of the agreements for the server that's identified by the `ServerId` that you supply. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for `NextToken`, you can supply that value to continue listing agreements from where you left off.
*/
public suspend fun listAgreements(input: ListAgreementsRequest): ListAgreementsResponse
/**
* Returns a list of the current certificates that have been imported into Transfer Family. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for the `NextToken` parameter, you can supply that value to continue listing certificates from where you left off.
*/
public suspend fun listCertificates(input: ListCertificatesRequest = ListCertificatesRequest { }): ListCertificatesResponse
/**
* Lists the connectors for the specified Region.
*/
public suspend fun listConnectors(input: ListConnectorsRequest = ListConnectorsRequest { }): ListConnectorsResponse
/**
* Lists all in-progress executions for the specified workflow.
*
* If the specified workflow ID cannot be found, `ListExecutions` returns a `ResourceNotFound` exception.
*/
public suspend fun listExecutions(input: ListExecutionsRequest): ListExecutionsResponse
/**
* Returns a list of host keys for the server that's specified by the `ServerId` parameter.
*/
public suspend fun listHostKeys(input: ListHostKeysRequest): ListHostKeysResponse
/**
* Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for `NextToken`, you can supply that value to continue listing profiles from where you left off.
*/
public suspend fun listProfiles(input: ListProfilesRequest = ListProfilesRequest { }): ListProfilesResponse
/**
* Lists the security policies that are attached to your servers and SFTP connectors. For more information about security policies, see [Working with security policies for servers](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html) or [Working with security policies for SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies-connectors.html).
*/
public suspend fun listSecurityPolicies(input: ListSecurityPoliciesRequest = ListSecurityPoliciesRequest { }): ListSecurityPoliciesResponse
/**
* Lists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.
*/
public suspend fun listServers(input: ListServersRequest = ListServersRequest { }): ListServersResponse
/**
* Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.
*/
public suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse
/**
* Lists the users for a file transfer protocol-enabled server that you specify by passing the `ServerId` parameter.
*/
public suspend fun listUsers(input: ListUsersRequest): ListUsersResponse
/**
* Lists all workflows associated with your Amazon Web Services account for your current region.
*/
public suspend fun listWorkflows(input: ListWorkflowsRequest = ListWorkflowsRequest { }): ListWorkflowsResponse
/**
* Sends a callback for asynchronous custom steps.
*
* The `ExecutionId`, `WorkflowId`, and `Token` are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status.
*/
public suspend fun sendWorkflowStepState(input: SendWorkflowStepStateRequest): SendWorkflowStepStateResponse
/**
* Retrieves a list of the contents of a directory from a remote SFTP server. You specify the connector ID, the output path, and the remote directory path. You can also specify the optional `MaxItems` value to control the maximum number of items that are listed from the remote directory. This API returns a list of all files and directories in the remote directory (up to the maximum value), but does not return files or folders in sub-directories. That is, it only returns a list of files and directories one-level deep.
*
* After you receive the listing file, you can provide the files that you want to transfer to the `RetrieveFilePaths` parameter of the `StartFileTransfer` API call.
*
* The naming convention for the output file is ` connector-ID-listing-ID.json`. The output file contains the following information:
* + `filePath`: the complete path of a remote file, relative to the directory of the listing request for your SFTP connector on the remote server.
* + `modifiedTimestamp`: the last time the file was modified, in UTC time format. This field is optional. If the remote file attributes don't contain a timestamp, it is omitted from the file listing.
* + `size`: the size of the file, in bytes. This field is optional. If the remote file attributes don't contain a file size, it is omitted from the file listing.
* + `path`: the complete path of a remote directory, relative to the directory of the listing request for your SFTP connector on the remote server.
* + `truncated`: a flag indicating whether the list output contains all of the items contained in the remote directory or not. If your `Truncated` output value is true, you can increase the value provided in the optional `max-items` input attribute to be able to list more items (up to the maximum allowed list size of 10,000 items).
*/
public suspend fun startDirectoryListing(input: StartDirectoryListingRequest): StartDirectoryListingResponse
/**
* Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
* + For an AS2 connector, you specify the `ConnectorId` and one or more `SendFilePaths` to identify the files you want to transfer.
* + For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the `ConnectorId`. Depending on the direction of the transfer, you also specify the following items:
* + If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more `RetrieveFilePaths` to identify the files you want to transfer, and a `LocalDirectoryPath` to specify the destination folder.
* + If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more `SendFilePaths` to identify the files you want to transfer, and a `RemoteDirectoryPath` to specify the destination folder.
*/
public suspend fun startFileTransfer(input: StartFileTransferRequest): StartFileTransferResponse
/**
* Changes the state of a file transfer protocol-enabled server from `OFFLINE` to `ONLINE`. It has no impact on a server that is already `ONLINE`. An `ONLINE` server can accept and process file transfer jobs.
*
* The state of `STARTING` indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of `START_FAILED` can indicate an error condition.
*
* No response is returned from this call.
*/
public suspend fun startServer(input: StartServerRequest): StartServerResponse
/**
* Changes the state of a file transfer protocol-enabled server from `ONLINE` to `OFFLINE`. An `OFFLINE` server cannot accept and process file transfer jobs. Information tied to your server, such as server and user properties, are not affected by stopping your server.
*
* Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the server to stop being billed.
*
* The state of `STOPPING` indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of `STOP_FAILED` can indicate an error condition.
*
* No response is returned from this call.
*/
public suspend fun stopServer(input: StopServerRequest): StopServerResponse
/**
* Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.
*
* There is no response returned from this call.
*/
public suspend fun tagResource(input: TagResourceRequest): TagResourceResponse
/**
* Tests whether your SFTP connector is set up successfully. We highly recommend that you call this operation to test your ability to transfer files between local Amazon Web Services storage and a trading partner's SFTP server.
*/
public suspend fun testConnection(input: TestConnectionRequest): TestConnectionResponse
/**
* If the `IdentityProviderType` of a file transfer protocol-enabled server is `AWS_DIRECTORY_SERVICE` or `API_Gateway`, tests whether your identity provider is set up successfully. We highly recommend that you call this operation to test your authentication method as soon as you create your server. By doing so, you can troubleshoot issues with the identity provider integration to ensure that your users can successfully use the service.
*
* The `ServerId` and `UserName` parameters are required. The `ServerProtocol`, `SourceIp`, and `UserPassword` are all optional.
*
* Note the following:
* + You cannot use `TestIdentityProvider` if the `IdentityProviderType` of your server is `SERVICE_MANAGED`.
* + `TestIdentityProvider` does not work with keys: it only accepts passwords.
* + `TestIdentityProvider` can test the password operation for a custom Identity Provider that handles keys and passwords.
* + If you provide any incorrect values for any parameters, the `Response` field is empty.
* + If you provide a server ID for a server that uses service-managed users, you get an error: ` An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth `
* + If you enter a Server ID for the `--server-id` parameter that does not identify an actual Transfer server, you receive the following error: `An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server`. It is possible your sever is in a different region. You can specify a region by adding the following: `--region region-code`, such as `--region us-east-2` to specify a server in **US East (Ohio)**.
*/
public suspend fun testIdentityProvider(input: TestIdentityProviderRequest): TestIdentityProviderResponse
/**
* Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.
*
* No response is returned from this call.
*/
public suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse
/**
* Allows you to update parameters for the access specified in the `ServerID` and `ExternalID` parameters.
*/
public suspend fun updateAccess(input: UpdateAccessRequest): UpdateAccessResponse
/**
* Updates some of the parameters for an existing agreement. Provide the `AgreementId` and the `ServerId` for the agreement that you want to update, along with the new values for the parameters to update.
*/
public suspend fun updateAgreement(input: UpdateAgreementRequest): UpdateAgreementResponse
/**
* Updates the active and inactive dates for a certificate.
*/
public suspend fun updateCertificate(input: UpdateCertificateRequest): UpdateCertificateResponse
/**
* Updates some of the parameters for an existing connector. Provide the `ConnectorId` for the connector that you want to update, along with the new values for the parameters to update.
*/
public suspend fun updateConnector(input: UpdateConnectorRequest): UpdateConnectorResponse
/**
* Updates the description for the host key that's specified by the `ServerId` and `HostKeyId` parameters.
*/
public suspend fun updateHostKey(input: UpdateHostKeyRequest): UpdateHostKeyResponse
/**
* Updates some of the parameters for an existing profile. Provide the `ProfileId` for the profile that you want to update, along with the new values for the parameters to update.
*/
public suspend fun updateProfile(input: UpdateProfileRequest): UpdateProfileResponse
/**
* Updates the file transfer protocol-enabled server's properties after that server has been created.
*
* The `UpdateServer` call returns the `ServerId` of the server you updated.
*/
public suspend fun updateServer(input: UpdateServerRequest): UpdateServerResponse
/**
* Assigns new properties to a user. Parameters you pass modify any or all of the following: the home directory, role, and policy for the `UserName` and `ServerId` you specify.
*
* The response returns the `ServerId` and the `UserName` for the updated user.
*
* In the console, you can select *Restricted* when you create or update a user. This ensures that the user can't access anything outside of their home directory. The programmatic way to configure this behavior is to update the user. Set their `HomeDirectoryType` to `LOGICAL`, and specify `HomeDirectoryMappings` with `Entry` as root (`/`) and `Target` as their home directory.
*
* For example, if the user's home directory is `/test/admin-user`, the following command updates the user so that their configuration in the console shows the *Restricted* flag as selected.
*
* ` aws transfer update-user --server-id <server-id> --user-name admin-user --home-directory-type LOGICAL --home-directory-mappings "[{\"Entry\":\"/\", \"Target\":\"/test/admin-user\"}]"`
*/
public suspend fun updateUser(input: UpdateUserRequest): UpdateUserResponse
}
/**
* Create a copy of the client with one or more configuration values overridden.
* This method allows the caller to perform scoped config overrides for one or more client operations.
*
* Any resources created on your behalf will be shared between clients, and will only be closed when ALL clients using them are closed.
* If you provide a resource (e.g. [HttpClientEngine]) to the SDK, you are responsible for managing the lifetime of that resource.
*/
public fun TransferClient.withConfig(block: TransferClient.Config.Builder.() -> Unit): TransferClient {
val newConfig = config.toBuilder().apply(block).build()
return DefaultTransferClient(newConfig)
}
/**
* 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. For example, a Microsoft Active Directory might contain 50,000 users, but only a small fraction might need the ability to transfer files to the server. An administrator can use `CreateAccess` to limit the access to the correct set of users who need this ability.
*/
public suspend inline fun TransferClient.createAccess(crossinline block: CreateAccessRequest.Builder.() -> Unit): CreateAccessResponse = createAccess(CreateAccessRequest.Builder().apply(block).build())
/**
* Creates an agreement. An agreement is a bilateral trading partner agreement, or partnership, between an Transfer Family server and an AS2 process. The agreement defines the file and message transfer relationship between the server and the AS2 process. To define an agreement, Transfer Family combines a server, local profile, partner profile, certificate, and other attributes.
*
* The partner is identified with the `PartnerProfileId`, and the AS2 process is identified with the `LocalProfileId`.
*/
public suspend inline fun TransferClient.createAgreement(crossinline block: CreateAgreementRequest.Builder.() -> Unit): CreateAgreementResponse = createAgreement(CreateAgreementRequest.Builder().apply(block).build())
/**
* Creates the connector, which captures the parameters for a connection for the AS2 or SFTP protocol. For AS2, the connector is required for sending files to an externally hosted AS2 server. For SFTP, the connector is required when sending files to an SFTP server or receiving files from an SFTP server. For more details about connectors, see [Configure AS2 connectors](https://docs.aws.amazon.com/transfer/latest/userguide/configure-as2-connector.html) and [Create SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/configure-sftp-connector.html).
*
* You must specify exactly one configuration object: either for AS2 (`As2Config`) or SFTP (`SftpConfig`).
*/
public suspend inline fun TransferClient.createConnector(crossinline block: CreateConnectorRequest.Builder.() -> Unit): CreateConnectorResponse = createConnector(CreateConnectorRequest.Builder().apply(block).build())
/**
* Creates the local or partner profile to use for AS2 transfers.
*/
public suspend inline fun TransferClient.createProfile(crossinline block: CreateProfileRequest.Builder.() -> Unit): CreateProfileResponse = createProfile(CreateProfileRequest.Builder().apply(block).build())
/**
* Instantiates an auto-scaling virtual server based on the selected file transfer protocol in Amazon Web Services. When you make updates to your file transfer protocol-enabled server or when you work with users, use the service-generated `ServerId` property that is assigned to the newly created server.
*/
public suspend inline fun TransferClient.createServer(crossinline block: CreateServerRequest.Builder.() -> Unit): CreateServerResponse = createServer(CreateServerRequest.Builder().apply(block).build())
/**
* Creates a user and associates them with an existing file transfer protocol-enabled server. You can only create and associate users with servers that have the `IdentityProviderType` set to `SERVICE_MANAGED`. Using parameters for `CreateUser`, you can specify the user name, set the home directory, store the user's public key, and assign the user's Identity and Access Management (IAM) role. You can also optionally add a session policy, and assign metadata with tags that can be used to group and search for users.
*/
public suspend inline fun TransferClient.createUser(crossinline block: CreateUserRequest.Builder.() -> Unit): CreateUserResponse = createUser(CreateUserRequest.Builder().apply(block).build())
/**
* Allows you to create a workflow with specified steps and step details the workflow invokes after file transfer completes. After creating a workflow, you can associate the workflow created with any transfer servers by specifying the `workflow-details` field in `CreateServer` and `UpdateServer` operations.
*/
public suspend inline fun TransferClient.createWorkflow(crossinline block: CreateWorkflowRequest.Builder.() -> Unit): CreateWorkflowResponse = createWorkflow(CreateWorkflowRequest.Builder().apply(block).build())
/**
* Allows you to delete the access specified in the `ServerID` and `ExternalID` parameters.
*/
public suspend inline fun TransferClient.deleteAccess(crossinline block: DeleteAccessRequest.Builder.() -> Unit): DeleteAccessResponse = deleteAccess(DeleteAccessRequest.Builder().apply(block).build())
/**
* Delete the agreement that's specified in the provided `AgreementId`.
*/
public suspend inline fun TransferClient.deleteAgreement(crossinline block: DeleteAgreementRequest.Builder.() -> Unit): DeleteAgreementResponse = deleteAgreement(DeleteAgreementRequest.Builder().apply(block).build())
/**
* Deletes the certificate that's specified in the `CertificateId` parameter.
*/
public suspend inline fun TransferClient.deleteCertificate(crossinline block: DeleteCertificateRequest.Builder.() -> Unit): DeleteCertificateResponse = deleteCertificate(DeleteCertificateRequest.Builder().apply(block).build())
/**
* Deletes the connector that's specified in the provided `ConnectorId`.
*/
public suspend inline fun TransferClient.deleteConnector(crossinline block: DeleteConnectorRequest.Builder.() -> Unit): DeleteConnectorResponse = deleteConnector(DeleteConnectorRequest.Builder().apply(block).build())
/**
* Deletes the host key that's specified in the `HostKeyId` parameter.
*/
public suspend inline fun TransferClient.deleteHostKey(crossinline block: DeleteHostKeyRequest.Builder.() -> Unit): DeleteHostKeyResponse = deleteHostKey(DeleteHostKeyRequest.Builder().apply(block).build())
/**
* Deletes the profile that's specified in the `ProfileId` parameter.
*/
public suspend inline fun TransferClient.deleteProfile(crossinline block: DeleteProfileRequest.Builder.() -> Unit): DeleteProfileResponse = deleteProfile(DeleteProfileRequest.Builder().apply(block).build())
/**
* Deletes the file transfer protocol-enabled server that you specify.
*
* No response returns from this operation.
*/
public suspend inline fun TransferClient.deleteServer(crossinline block: DeleteServerRequest.Builder.() -> Unit): DeleteServerResponse = deleteServer(DeleteServerRequest.Builder().apply(block).build())
/**
* Deletes a user's Secure Shell (SSH) public key.
*/
public suspend inline fun TransferClient.deleteSshPublicKey(crossinline block: DeleteSshPublicKeyRequest.Builder.() -> Unit): DeleteSshPublicKeyResponse = deleteSshPublicKey(DeleteSshPublicKeyRequest.Builder().apply(block).build())
/**
* Deletes the user belonging to a file transfer protocol-enabled server you specify.
*
* No response returns from this operation.
*
* When you delete a user from a server, the user's information is lost.
*/
public suspend inline fun TransferClient.deleteUser(crossinline block: DeleteUserRequest.Builder.() -> Unit): DeleteUserResponse = deleteUser(DeleteUserRequest.Builder().apply(block).build())
/**
* Deletes the specified workflow.
*/
public suspend inline fun TransferClient.deleteWorkflow(crossinline block: DeleteWorkflowRequest.Builder.() -> Unit): DeleteWorkflowResponse = deleteWorkflow(DeleteWorkflowRequest.Builder().apply(block).build())
/**
* Describes the access that is assigned to the specific file transfer protocol-enabled server, as identified by its `ServerId` property and its `ExternalId`.
*
* The response from this call returns the properties of the access that is associated with the `ServerId` value that was specified.
*/
public suspend inline fun TransferClient.describeAccess(crossinline block: DescribeAccessRequest.Builder.() -> Unit): DescribeAccessResponse = describeAccess(DescribeAccessRequest.Builder().apply(block).build())
/**
* Describes the agreement that's identified by the `AgreementId`.
*/
public suspend inline fun TransferClient.describeAgreement(crossinline block: DescribeAgreementRequest.Builder.() -> Unit): DescribeAgreementResponse = describeAgreement(DescribeAgreementRequest.Builder().apply(block).build())
/**
* Describes the certificate that's identified by the `CertificateId`.
*/
public suspend inline fun TransferClient.describeCertificate(crossinline block: DescribeCertificateRequest.Builder.() -> Unit): DescribeCertificateResponse = describeCertificate(DescribeCertificateRequest.Builder().apply(block).build())
/**
* Describes the connector that's identified by the `ConnectorId.`
*/
public suspend inline fun TransferClient.describeConnector(crossinline block: DescribeConnectorRequest.Builder.() -> Unit): DescribeConnectorResponse = describeConnector(DescribeConnectorRequest.Builder().apply(block).build())
/**
* You can use `DescribeExecution` to check the details of the execution of the specified workflow.
*
* This API call only returns details for in-progress workflows.
*
* If you provide an ID for an execution that is not in progress, or if the execution doesn't match the specified workflow ID, you receive a `ResourceNotFound` exception.
*/
public suspend inline fun TransferClient.describeExecution(crossinline block: DescribeExecutionRequest.Builder.() -> Unit): DescribeExecutionResponse = describeExecution(DescribeExecutionRequest.Builder().apply(block).build())
/**
* Returns the details of the host key that's specified by the `HostKeyId` and `ServerId`.
*/
public suspend inline fun TransferClient.describeHostKey(crossinline block: DescribeHostKeyRequest.Builder.() -> Unit): DescribeHostKeyResponse = describeHostKey(DescribeHostKeyRequest.Builder().apply(block).build())
/**
* Returns the details of the profile that's specified by the `ProfileId`.
*/
public suspend inline fun TransferClient.describeProfile(crossinline block: DescribeProfileRequest.Builder.() -> Unit): DescribeProfileResponse = describeProfile(DescribeProfileRequest.Builder().apply(block).build())
/**
* Describes the security policy that is attached to your server or SFTP connector. The response contains a description of the security policy's properties. For more information about security policies, see [Working with security policies for servers](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html) or [Working with security policies for SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies-connectors.html).
*/
public suspend inline fun TransferClient.describeSecurityPolicy(crossinline block: DescribeSecurityPolicyRequest.Builder.() -> Unit): DescribeSecurityPolicyResponse = describeSecurityPolicy(DescribeSecurityPolicyRequest.Builder().apply(block).build())
/**
* Describes a file transfer protocol-enabled server that you specify by passing the `ServerId` parameter.
*
* The response contains a description of a server's properties. When you set `EndpointType` to VPC, the response will contain the `EndpointDetails`.
*/
public suspend inline fun TransferClient.describeServer(crossinline block: DescribeServerRequest.Builder.() -> Unit): DescribeServerResponse = describeServer(DescribeServerRequest.Builder().apply(block).build())
/**
* Describes the user assigned to the specific file transfer protocol-enabled server, as identified by its `ServerId` property.
*
* The response from this call returns the properties of the user associated with the `ServerId` value that was specified.
*/
public suspend inline fun TransferClient.describeUser(crossinline block: DescribeUserRequest.Builder.() -> Unit): DescribeUserResponse = describeUser(DescribeUserRequest.Builder().apply(block).build())
/**
* Describes the specified workflow.
*/
public suspend inline fun TransferClient.describeWorkflow(crossinline block: DescribeWorkflowRequest.Builder.() -> Unit): DescribeWorkflowResponse = describeWorkflow(DescribeWorkflowRequest.Builder().apply(block).build())
/**
* Imports the signing and encryption certificates that you need to create local (AS2) profiles and partner profiles.
*/
public suspend inline fun TransferClient.importCertificate(crossinline block: ImportCertificateRequest.Builder.() -> Unit): ImportCertificateResponse = importCertificate(ImportCertificateRequest.Builder().apply(block).build())
/**
* Adds a host key to the server that's specified by the `ServerId` parameter.
*/
public suspend inline fun TransferClient.importHostKey(crossinline block: ImportHostKeyRequest.Builder.() -> Unit): ImportHostKeyResponse = importHostKey(ImportHostKeyRequest.Builder().apply(block).build())
/**
* Adds a Secure Shell (SSH) public key to a Transfer Family user identified by a `UserName` value assigned to the specific file transfer protocol-enabled server, identified by `ServerId`.
*
* The response returns the `UserName` value, the `ServerId` value, and the name of the `SshPublicKeyId`.
*/
public suspend inline fun TransferClient.importSshPublicKey(crossinline block: ImportSshPublicKeyRequest.Builder.() -> Unit): ImportSshPublicKeyResponse = importSshPublicKey(ImportSshPublicKeyRequest.Builder().apply(block).build())
/**
* Lists the details for all the accesses you have on your server.
*/
public suspend inline fun TransferClient.listAccesses(crossinline block: ListAccessesRequest.Builder.() -> Unit): ListAccessesResponse = listAccesses(ListAccessesRequest.Builder().apply(block).build())
/**
* Returns a list of the agreements for the server that's identified by the `ServerId` that you supply. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for `NextToken`, you can supply that value to continue listing agreements from where you left off.
*/
public suspend inline fun TransferClient.listAgreements(crossinline block: ListAgreementsRequest.Builder.() -> Unit): ListAgreementsResponse = listAgreements(ListAgreementsRequest.Builder().apply(block).build())
/**
* Returns a list of the current certificates that have been imported into Transfer Family. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for the `NextToken` parameter, you can supply that value to continue listing certificates from where you left off.
*/
public suspend inline fun TransferClient.listCertificates(crossinline block: ListCertificatesRequest.Builder.() -> Unit): ListCertificatesResponse = listCertificates(ListCertificatesRequest.Builder().apply(block).build())
/**
* Lists the connectors for the specified Region.
*/
public suspend inline fun TransferClient.listConnectors(crossinline block: ListConnectorsRequest.Builder.() -> Unit): ListConnectorsResponse = listConnectors(ListConnectorsRequest.Builder().apply(block).build())
/**
* Lists all in-progress executions for the specified workflow.
*
* If the specified workflow ID cannot be found, `ListExecutions` returns a `ResourceNotFound` exception.
*/
public suspend inline fun TransferClient.listExecutions(crossinline block: ListExecutionsRequest.Builder.() -> Unit): ListExecutionsResponse = listExecutions(ListExecutionsRequest.Builder().apply(block).build())
/**
* Returns a list of host keys for the server that's specified by the `ServerId` parameter.
*/
public suspend inline fun TransferClient.listHostKeys(crossinline block: ListHostKeysRequest.Builder.() -> Unit): ListHostKeysResponse = listHostKeys(ListHostKeysRequest.Builder().apply(block).build())
/**
* Returns a list of the profiles for your system. If you want to limit the results to a certain number, supply a value for the `MaxResults` parameter. If you ran the command previously and received a value for `NextToken`, you can supply that value to continue listing profiles from where you left off.
*/
public suspend inline fun TransferClient.listProfiles(crossinline block: ListProfilesRequest.Builder.() -> Unit): ListProfilesResponse = listProfiles(ListProfilesRequest.Builder().apply(block).build())
/**
* Lists the security policies that are attached to your servers and SFTP connectors. For more information about security policies, see [Working with security policies for servers](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies.html) or [Working with security policies for SFTP connectors](https://docs.aws.amazon.com/transfer/latest/userguide/security-policies-connectors.html).
*/
public suspend inline fun TransferClient.listSecurityPolicies(crossinline block: ListSecurityPoliciesRequest.Builder.() -> Unit): ListSecurityPoliciesResponse = listSecurityPolicies(ListSecurityPoliciesRequest.Builder().apply(block).build())
/**
* Lists the file transfer protocol-enabled servers that are associated with your Amazon Web Services account.
*/
public suspend inline fun TransferClient.listServers(crossinline block: ListServersRequest.Builder.() -> Unit): ListServersResponse = listServers(ListServersRequest.Builder().apply(block).build())
/**
* Lists all of the tags associated with the Amazon Resource Name (ARN) that you specify. The resource can be a user, server, or role.
*/
public suspend inline fun TransferClient.listTagsForResource(crossinline block: ListTagsForResourceRequest.Builder.() -> Unit): ListTagsForResourceResponse = listTagsForResource(ListTagsForResourceRequest.Builder().apply(block).build())
/**
* Lists the users for a file transfer protocol-enabled server that you specify by passing the `ServerId` parameter.
*/
public suspend inline fun TransferClient.listUsers(crossinline block: ListUsersRequest.Builder.() -> Unit): ListUsersResponse = listUsers(ListUsersRequest.Builder().apply(block).build())
/**
* Lists all workflows associated with your Amazon Web Services account for your current region.
*/
public suspend inline fun TransferClient.listWorkflows(crossinline block: ListWorkflowsRequest.Builder.() -> Unit): ListWorkflowsResponse = listWorkflows(ListWorkflowsRequest.Builder().apply(block).build())
/**
* Sends a callback for asynchronous custom steps.
*
* The `ExecutionId`, `WorkflowId`, and `Token` are passed to the target resource during execution of a custom step of a workflow. You must include those with their callback as well as providing a status.
*/
public suspend inline fun TransferClient.sendWorkflowStepState(crossinline block: SendWorkflowStepStateRequest.Builder.() -> Unit): SendWorkflowStepStateResponse = sendWorkflowStepState(SendWorkflowStepStateRequest.Builder().apply(block).build())
/**
* Retrieves a list of the contents of a directory from a remote SFTP server. You specify the connector ID, the output path, and the remote directory path. You can also specify the optional `MaxItems` value to control the maximum number of items that are listed from the remote directory. This API returns a list of all files and directories in the remote directory (up to the maximum value), but does not return files or folders in sub-directories. That is, it only returns a list of files and directories one-level deep.
*
* After you receive the listing file, you can provide the files that you want to transfer to the `RetrieveFilePaths` parameter of the `StartFileTransfer` API call.
*
* The naming convention for the output file is ` connector-ID-listing-ID.json`. The output file contains the following information:
* + `filePath`: the complete path of a remote file, relative to the directory of the listing request for your SFTP connector on the remote server.
* + `modifiedTimestamp`: the last time the file was modified, in UTC time format. This field is optional. If the remote file attributes don't contain a timestamp, it is omitted from the file listing.
* + `size`: the size of the file, in bytes. This field is optional. If the remote file attributes don't contain a file size, it is omitted from the file listing.
* + `path`: the complete path of a remote directory, relative to the directory of the listing request for your SFTP connector on the remote server.
* + `truncated`: a flag indicating whether the list output contains all of the items contained in the remote directory or not. If your `Truncated` output value is true, you can increase the value provided in the optional `max-items` input attribute to be able to list more items (up to the maximum allowed list size of 10,000 items).
*/
public suspend inline fun TransferClient.startDirectoryListing(crossinline block: StartDirectoryListingRequest.Builder.() -> Unit): StartDirectoryListingResponse = startDirectoryListing(StartDirectoryListingRequest.Builder().apply(block).build())
/**
* Begins a file transfer between local Amazon Web Services storage and a remote AS2 or SFTP server.
* + For an AS2 connector, you specify the `ConnectorId` and one or more `SendFilePaths` to identify the files you want to transfer.
* + For an SFTP connector, the file transfer can be either outbound or inbound. In both cases, you specify the `ConnectorId`. Depending on the direction of the transfer, you also specify the following items:
* + If you are transferring file from a partner's SFTP server to Amazon Web Services storage, you specify one or more `RetrieveFilePaths` to identify the files you want to transfer, and a `LocalDirectoryPath` to specify the destination folder.
* + If you are transferring file to a partner's SFTP server from Amazon Web Services storage, you specify one or more `SendFilePaths` to identify the files you want to transfer, and a `RemoteDirectoryPath` to specify the destination folder.
*/
public suspend inline fun TransferClient.startFileTransfer(crossinline block: StartFileTransferRequest.Builder.() -> Unit): StartFileTransferResponse = startFileTransfer(StartFileTransferRequest.Builder().apply(block).build())
/**
* Changes the state of a file transfer protocol-enabled server from `OFFLINE` to `ONLINE`. It has no impact on a server that is already `ONLINE`. An `ONLINE` server can accept and process file transfer jobs.
*
* The state of `STARTING` indicates that the server is in an intermediate state, either not fully able to respond, or not fully online. The values of `START_FAILED` can indicate an error condition.
*
* No response is returned from this call.
*/
public suspend inline fun TransferClient.startServer(crossinline block: StartServerRequest.Builder.() -> Unit): StartServerResponse = startServer(StartServerRequest.Builder().apply(block).build())
/**
* Changes the state of a file transfer protocol-enabled server from `ONLINE` to `OFFLINE`. An `OFFLINE` server cannot accept and process file transfer jobs. Information tied to your server, such as server and user properties, are not affected by stopping your server.
*
* Stopping the server does not reduce or impact your file transfer protocol endpoint billing; you must delete the server to stop being billed.
*
* The state of `STOPPING` indicates that the server is in an intermediate state, either not fully able to respond, or not fully offline. The values of `STOP_FAILED` can indicate an error condition.
*
* No response is returned from this call.
*/
public suspend inline fun TransferClient.stopServer(crossinline block: StopServerRequest.Builder.() -> Unit): StopServerResponse = stopServer(StopServerRequest.Builder().apply(block).build())
/**
* Attaches a key-value pair to a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.
*
* There is no response returned from this call.
*/
public suspend inline fun TransferClient.tagResource(crossinline block: TagResourceRequest.Builder.() -> Unit): TagResourceResponse = tagResource(TagResourceRequest.Builder().apply(block).build())
/**
* Tests whether your SFTP connector is set up successfully. We highly recommend that you call this operation to test your ability to transfer files between local Amazon Web Services storage and a trading partner's SFTP server.
*/
public suspend inline fun TransferClient.testConnection(crossinline block: TestConnectionRequest.Builder.() -> Unit): TestConnectionResponse = testConnection(TestConnectionRequest.Builder().apply(block).build())
/**
* If the `IdentityProviderType` of a file transfer protocol-enabled server is `AWS_DIRECTORY_SERVICE` or `API_Gateway`, tests whether your identity provider is set up successfully. We highly recommend that you call this operation to test your authentication method as soon as you create your server. By doing so, you can troubleshoot issues with the identity provider integration to ensure that your users can successfully use the service.
*
* The `ServerId` and `UserName` parameters are required. The `ServerProtocol`, `SourceIp`, and `UserPassword` are all optional.
*
* Note the following:
* + You cannot use `TestIdentityProvider` if the `IdentityProviderType` of your server is `SERVICE_MANAGED`.
* + `TestIdentityProvider` does not work with keys: it only accepts passwords.
* + `TestIdentityProvider` can test the password operation for a custom Identity Provider that handles keys and passwords.
* + If you provide any incorrect values for any parameters, the `Response` field is empty.
* + If you provide a server ID for a server that uses service-managed users, you get an error: ` An error occurred (InvalidRequestException) when calling the TestIdentityProvider operation: s-server-ID not configured for external auth `
* + If you enter a Server ID for the `--server-id` parameter that does not identify an actual Transfer server, you receive the following error: `An error occurred (ResourceNotFoundException) when calling the TestIdentityProvider operation: Unknown server`. It is possible your sever is in a different region. You can specify a region by adding the following: `--region region-code`, such as `--region us-east-2` to specify a server in **US East (Ohio)**.
*/
public suspend inline fun TransferClient.testIdentityProvider(crossinline block: TestIdentityProviderRequest.Builder.() -> Unit): TestIdentityProviderResponse = testIdentityProvider(TestIdentityProviderRequest.Builder().apply(block).build())
/**
* Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Resources are users, servers, roles, and other entities.
*
* No response is returned from this call.
*/
public suspend inline fun TransferClient.untagResource(crossinline block: UntagResourceRequest.Builder.() -> Unit): UntagResourceResponse = untagResource(UntagResourceRequest.Builder().apply(block).build())
/**
* Allows you to update parameters for the access specified in the `ServerID` and `ExternalID` parameters.
*/
public suspend inline fun TransferClient.updateAccess(crossinline block: UpdateAccessRequest.Builder.() -> Unit): UpdateAccessResponse = updateAccess(UpdateAccessRequest.Builder().apply(block).build())
/**
* Updates some of the parameters for an existing agreement. Provide the `AgreementId` and the `ServerId` for the agreement that you want to update, along with the new values for the parameters to update.
*/
public suspend inline fun TransferClient.updateAgreement(crossinline block: UpdateAgreementRequest.Builder.() -> Unit): UpdateAgreementResponse = updateAgreement(UpdateAgreementRequest.Builder().apply(block).build())
/**
* Updates the active and inactive dates for a certificate.
*/
public suspend inline fun TransferClient.updateCertificate(crossinline block: UpdateCertificateRequest.Builder.() -> Unit): UpdateCertificateResponse = updateCertificate(UpdateCertificateRequest.Builder().apply(block).build())
/**
* Updates some of the parameters for an existing connector. Provide the `ConnectorId` for the connector that you want to update, along with the new values for the parameters to update.
*/
public suspend inline fun TransferClient.updateConnector(crossinline block: UpdateConnectorRequest.Builder.() -> Unit): UpdateConnectorResponse = updateConnector(UpdateConnectorRequest.Builder().apply(block).build())
/**
* Updates the description for the host key that's specified by the `ServerId` and `HostKeyId` parameters.
*/
public suspend inline fun TransferClient.updateHostKey(crossinline block: UpdateHostKeyRequest.Builder.() -> Unit): UpdateHostKeyResponse = updateHostKey(UpdateHostKeyRequest.Builder().apply(block).build())
/**
* Updates some of the parameters for an existing profile. Provide the `ProfileId` for the profile that you want to update, along with the new values for the parameters to update.
*/
public suspend inline fun TransferClient.updateProfile(crossinline block: UpdateProfileRequest.Builder.() -> Unit): UpdateProfileResponse = updateProfile(UpdateProfileRequest.Builder().apply(block).build())
/**
* Updates the file transfer protocol-enabled server's properties after that server has been created.
*
* The `UpdateServer` call returns the `ServerId` of the server you updated.
*/
public suspend inline fun TransferClient.updateServer(crossinline block: UpdateServerRequest.Builder.() -> Unit): UpdateServerResponse = updateServer(UpdateServerRequest.Builder().apply(block).build())
/**
* Assigns new properties to a user. Parameters you pass modify any or all of the following: the home directory, role, and policy for the `UserName` and `ServerId` you specify.
*
* The response returns the `ServerId` and the `UserName` for the updated user.
*
* In the console, you can select *Restricted* when you create or update a user. This ensures that the user can't access anything outside of their home directory. The programmatic way to configure this behavior is to update the user. Set their `HomeDirectoryType` to `LOGICAL`, and specify `HomeDirectoryMappings` with `Entry` as root (`/`) and `Target` as their home directory.
*
* For example, if the user's home directory is `/test/admin-user`, the following command updates the user so that their configuration in the console shows the *Restricted* flag as selected.
*
* ` aws transfer update-user --server-id <server-id> --user-name admin-user --home-directory-type LOGICAL --home-directory-mappings "[{\"Entry\":\"/\", \"Target\":\"/test/admin-user\"}]"`
*/
public suspend inline fun TransferClient.updateUser(crossinline block: UpdateUserRequest.Builder.() -> Unit): UpdateUserResponse = updateUser(UpdateUserRequest.Builder().apply(block).build())