Skip to content
Docs Try Aspire
Docs Try

HostedAgentResourceBuilderExtensions Methods

Class Methods 6 members
Extension methods for adding hosted agent applications to the distributed application model.
AsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) Section titled AsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
In both run and publish modes, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> AsHostedAgent<T>(
this IResourceBuilder<T> builder,
Action<HostedAgentConfiguration>? configure = null)
{
// ...
}
}
builder IResourceBuilder<T>
configure Action<HostedAgentConfiguration> optional
This overload is not available in polyglot app hosts because run-mode hosted agents are not yet implemented.
AsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) Section titled AsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
In both run and publish modes, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> AsHostedAgent<T>(
this IResourceBuilder<T> builder,
IResourceBuilder<AzureCognitiveServicesProjectResource>? project = null,
Action<HostedAgentConfiguration>? configure = null)
{
// ...
}
}
builder IResourceBuilder<T>
project IResourceBuilder<AzureCognitiveServicesProjectResource> optional
configure Action<HostedAgentConfiguration> optional
This overload is not available in polyglot app hosts because run-mode hosted agents are not yet implemented.
PublishAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) Section titled PublishAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
Publish the containerized agent as a hosted agent in Microsoft Foundry. If a project resource is not provided, the method will attempt to find an existing Microsoft Foundry project resource in the application model. If none exists, a new project resource (and its parent account resource) will be created automatically.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> PublishAsHostedAgent<T>(
this IResourceBuilder<T> builder,
Action<HostedAgentConfiguration> configure)
{
// ...
}
}
builder IResourceBuilder<T>
configure Action<HostedAgentConfiguration>
PublishAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) Section titled PublishAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
Publish the containerized agent as a hosted agent in Microsoft Foundry. If a project resource is not provided, the method will attempt to find an existing Microsoft Foundry project resource in the application model. If none exists, a new project resource (and its parent account resource) will be created automatically.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> PublishAsHostedAgent<T>(
this IResourceBuilder<T> builder,
IResourceBuilder<AzureCognitiveServicesProjectResource>? project = null,
Action<HostedAgentConfiguration>? configure = null)
{
// ...
}
}
builder IResourceBuilder<T>
project IResourceBuilder<AzureCognitiveServicesProjectResource> optional
configure Action<HostedAgentConfiguration> optional
RunAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) Section titled RunAsHostedAgent(IResourceBuilder<T>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
In run mode, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> RunAsHostedAgent<T>(
this IResourceBuilder<T> builder,
Action<HostedAgentConfiguration> configure)
{
// ...
}
}
builder IResourceBuilder<T>
configure Action<HostedAgentConfiguration>
This overload is not available in polyglot app hosts because run-mode hosted agents are not yet implemented.
RunAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) Section titled RunAsHostedAgent(IResourceBuilder<T>, IResourceBuilder<AzureCognitiveServicesProjectResource>, Action<HostedAgentConfiguration>) extension IResourceBuilder<T>
In run mode, build, deploy, and run the containerized agent as a hosted agent in Microsoft Foundry.
public static class HostedAgentResourceBuilderExtensions
{
public static IResourceBuilder<T> RunAsHostedAgent<T>(
this IResourceBuilder<T> builder,
IResourceBuilder<AzureCognitiveServicesProjectResource>? project = null,
Action<HostedAgentConfiguration>? configure = null)
{
// ...
}
}
builder IResourceBuilder<T>
project IResourceBuilder<AzureCognitiveServicesProjectResource> optional
configure Action<HostedAgentConfiguration> optional
This overload is not available in polyglot app hosts because run-mode hosted agents are not yet implemented.