# SftpContainerResource

- Module: [CommunityToolkit.Aspire.Hosting.Sftp](/reference/api/go/communitytoolkit.aspire.hosting.sftp.md)
- Version: `13.6.1`
- Kind: `handle`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

A resource that represents an SFTP container.

## Definition

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

## Embeds

- `ExpressionValue`
- `IComputeResource`
- `Resource`
- `ResourceWithArgs`
- `ResourceWithConnectionString`
- `ResourceWithEndpoints`
- `ResourceWithEnvironment`
- `ResourceWithWaitSupport`

## Properties

- `ConnectionStringExpression`: `*ReferenceExpression` `get` -- ConnectionString for the atmoz SFTP server in the form of sftp://host:port.
- `Host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for this resource.
- `Port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for this resource.
- `UriExpression`: `*ReferenceExpression` `get` -- Gets the connection URI expression for the atmoz SFTP endpoint.

## Methods

- [WithHostKeyFile](/reference/api/go/communitytoolkit.aspire.hosting.sftp/sftpcontainerresource/withhostkeyfile.md) -- `method` -- Adds a bind mount for the specified host key file to an SFTP container resource.
  ```go
  WithHostKeyFile(keyFile string, keyType KeyType) SftpContainerResource
  ```
- [WithUserKeyFile](/reference/api/go/communitytoolkit.aspire.hosting.sftp/sftpcontainerresource/withuserkeyfile.md) -- `method` -- Adds a bind mount for the public key file of the specified user to an SFTP container resource.
  ```go
  WithUserKeyFile(username string, keyFile string, keyType KeyType) SftpContainerResource
  ```
- [WithUsersFile](/reference/api/go/communitytoolkit.aspire.hosting.sftp/sftpcontainerresource/withusersfile.md) -- `method` -- Adds a bind mount for the users.conf file to an SFTP container resource.
  ```go
  WithUsersFile(usersFile string) SftpContainerResource
  ```
