# AzureHostedAgentResource

- Kind: `class`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Foundry/HostedAgent/AzureHostedAgentResource.cs)
- Inherits: `Resource`
- Implements: `IResource`, `IResourceWithEnvironment`

A Microsoft Foundry hosted agent resource.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

public class AzureHostedAgentResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithEnvironment
{
    // ...
}
```

## Constructors

- [AzureHostedAgentResource(string, IResource, Action<HostedAgentConfiguration>)](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource/constructors.md#constructor-string-iresource-action-hostedagentconfiguration) -- Creates a new instance of the [AzureHostedAgentResource](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource.md) class.

## Properties

- [Configure](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource/properties.md#configure) : `Action<HostedAgentConfiguration>` `get; set` -- Configuration action to customize the hosted agent definition during deployment.
- [Image](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource/properties.md#image) : `ContainerImageReference` `get` -- The fully qualified image name for the hosted agent.
- [Target](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource/properties.md#target) : `IResource` `get` -- The target containerized workload that this hosted agent deploys.
- [Version](/reference/api/csharp/aspire.hosting.foundry/azurehostedagentresource/properties.md#version) : `StaticValueProvider<string>` `get` -- Once deployed, the version that is assigned to this hosted agent.
