# AzureFunctionsAppResource Constructors

- Package: [Aspire.Hosting.Azure.Functions](/reference/api/csharp/aspire.hosting.azure.functions.md)
- Type: [AzureFunctionsAppResource](/reference/api/csharp/aspire.hosting.azure.functions/azurefunctionsappresource.md)
- Kind: `Constructors`
- Members: `1`

Represents an Azure Functions app resource that is launched from a source directory.

<a id="constructor"></a>
<a id="constructor-string-string-string-azurefunctionslanguage"></a>

## AzureFunctionsAppResource(string, string, string, AzureFunctionsLanguage)

- Name: `Constructor(string, string, string, AzureFunctionsLanguage)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Azure.Functions/AzureFunctionsResource.cs#L82-L92)

Represents an Azure Functions app resource that is launched from a source directory.

```csharp
public class AzureFunctionsAppResource
{
    public AzureFunctionsAppResource(
        string name,
        string command,
        string appDirectory,
        AzureFunctionsLanguage language)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `command` (`string`)
  The command used to start the local Azure Functions app.
- `appDirectory` (`string`)
  The directory that contains the Azure Functions app.
- `language` ([AzureFunctionsLanguage](/reference/api/csharp/aspire.hosting.azure.functions/azurefunctionslanguage.md))
  The authoring language used by the Azure Functions app.

## Exceptions

- `ArgumentNullException` -- Thrown when `appDirectory` is null.
- `ArgumentException` -- Thrown when `appDirectory` is empty.

## Remarks

This resource is intended for Azure Functions apps that are not represented by a .NET project file, such as TypeScript or JavaScript Functions apps that run on the Node language worker.
