Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

SftpContainerResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Sftp v13.6.1

A resource that represents an SFTP container.

type SftpContainerResource interface {
ExpressionValue
IComputeResource
Resource
ResourceWithArgs
ResourceWithConnectionString
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
ConnectionString for the atmoz SFTP server in the form of sftp://host:port.
ConnectionStringExpression() *ReferenceExpression
propertyHostEndpointReferenceExpressionget
Gets the host endpoint reference for this resource.
Host() EndpointReferenceExpression
propertyPortEndpointReferenceExpressionget
Gets the port endpoint reference for this resource.
Port() EndpointReferenceExpression
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the atmoz SFTP endpoint.
UriExpression() *ReferenceExpression

Methods

methodWithHostKeyFilebuilder
Adds a bind mount for the specified host key file to an SFTP container resource.
WithHostKeyFile(
keyFile string,
keyType KeyType,
) SftpContainerResource
keyFilestringThe path to the host key file.
keyTypeKeyTypeThe type of the host key.
SftpContainerResource

The IResourceBuilder.

Returns a handle; failures surface later via Err().

methodWithUserKeyFilebuilder
Adds a bind mount for the public key file of the specified user to an SFTP container resource.
WithUserKeyFile(
username string,
keyFile string,
keyType KeyType,
) SftpContainerResource
usernamestringThe user whose public key is being bind mounted
keyFilestringThe public key file of the specified user (will be bind mounted on the server).
keyTypeKeyTypeThe type of the host key.
SftpContainerResource

The IResourceBuilder.

Returns a handle; failures surface later via Err().

methodWithUsersFilebuilder
Adds a bind mount for the users.conf file to an SFTP container resource.
WithUsersFile(usersFile string) SftpContainerResource
usersFilestringThe path to the users.conf file.
SftpContainerResource

The IResourceBuilder.

Returns a handle; failures surface later via Err().