Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithUserKeyFile

Method
📦 CommunityToolkit.Aspire.Hosting.Sftp v13.6.1
func (SftpContainerResource) WithUserKeyFile(
username string,
keyFile string,
keyType KeyType,
) SftpContainerResource

Signature

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().

Applies to

This method applies to the following types: