# FlociAzureContainerResource

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

Resource for the Floci Azure emulator container.

## Definition

```typescript
interface FlociAzureContainerResource
  extends IComputeResource,
    IExpressionValue,
    IManifestExpressionProvider,
    IResource,
    IResourceWithArgs,
    IResourceWithConnectionString,
    IResourceWithEndpoints,
    IResourceWithEnvironment,
    IResourceWithProbes,
    IResourceWithWaitSupport,
    IValueProvider,
    IValueWithReferences {
  readonly connectionStringExpression: ReferenceExpression;
  readonly host: EndpointReferenceExpression;
  readonly port: EndpointReferenceExpression;
  readonly primaryEndpoint: EndpointReference;
  readonly scheme: EndpointReferenceExpression;
  withCosmos(
      name?: string,
      accountName?: string): FlociAzureCosmosResource;
  withDataBindMount(
      source: string,
      isReadOnly?: boolean): FlociAzureContainerResource;
  withDataVolume(
      name: string,
      isReadOnly?: boolean): FlociAzureContainerResource;
  withDockerSocket(socketPath?: string): FlociAzureContainerResource;
  withFlociUI(configureContainer?: (obj: FlociUIContainerResource) => Promise<void>, containerName?: string): FlociAzureContainerResource;
  withServiceBus(
      name?: string,
      amqpPort?: number,
      amqpTlsPort?: number): FlociAzureServiceBusResource;
  withStorage(name?: string): FlociAzureStorageResource;
}
```

## Properties

- `connectionStringExpression`: `ReferenceExpression` `get` -- Gets the emulator endpoint URL, following the primary endpoint's `Scheme`.
- `host`: `EndpointReferenceExpression` `get` -- Gets the host endpoint reference for the primary endpoint.
- `port`: `EndpointReferenceExpression` `get` -- Gets the port endpoint reference for the primary endpoint.
- `primaryEndpoint`: `EndpointReference` `get` -- Gets the primary endpoint reference for the Floci container.
- `scheme`: `EndpointReferenceExpression` `get` -- Gets the scheme endpoint reference for the primary endpoint. `http` unless a TLS certificate has been configured, in which case the endpoint is switched to `https` before the application starts. Floci serves both on the same port, so the port never changes.

## Methods

- [withCosmos](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withcosmos.md) -- `method` -- Adds a Cosmos DB child resource to the Floci Azure emulator
    ```typescript
  withCosmos(name?: string, accountName?: string): FlociAzureCosmosResource
  ```
- [withDataBindMount](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withdatabindmount.md) -- `method` -- Configures a bind mount for persistent Floci Azure state.
    ```typescript
  withDataBindMount(source: string, isReadOnly?: boolean): FlociAzureContainerResource
  ```
- [withDataVolume](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withdatavolume.md) -- `method` -- Configures a named data volume for persistent Floci Azure state.
    ```typescript
  withDataVolume(name: string, isReadOnly?: boolean): FlociAzureContainerResource
  ```
- [withDockerSocket](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withdockersocket.md) -- `method` -- Mounts the Docker socket into the Floci Azure container so that Azure Functions and other container-backed services can launch sibling containers. Also sets `FLOCI_AZ_DOCKER_DOCKER_HOST` to `unix:///var/run/docker.sock` (the container-side path where the socket is always mounted) so Floci can connect to it.
    ```typescript
  withDockerSocket(socketPath?: string): FlociAzureContainerResource
  ```
- [withFlociUI](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withflociui.md) -- `method` -- Adds a Floci UI web console container for the Floci Azure resource
    ```typescript
  withFlociUI(configureContainer?: (obj: FlociUIContainerResource) => Promise<void>, containerName?: string): FlociAzureContainerResource
  ```
- [withServiceBus](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withservicebus.md) -- `method` -- Adds a Service Bus child resource to the Floci Azure emulator
    ```typescript
  withServiceBus(name?: string, amqpPort?: number, amqpTlsPort?: number): FlociAzureServiceBusResource
  ```
- [withStorage](/reference/api/typescript/communitytoolkit.aspire.hosting.floci/flociazurecontainerresource/withstorage.md) -- `method` -- Adds a Storage child resource to the Floci Azure emulator
    ```typescript
  withStorage(name?: string): FlociAzureStorageResource
  ```
