Skip to content
Docs Try Aspire

ElasticvueBuilderExtensions Methods

Class Methods 2 members
Provides extension methods for Elasticvue resources to an Hosting.IDistributedApplicationBuilder.
WithElasticvue(IResourceBuilder<ElasticsearchResource>, Action<IResourceBuilder<ElasticvueContainerResource>>, string?) Section titled WithElasticvue(IResourceBuilder<ElasticsearchResource>, Action<IResourceBuilder<ElasticvueContainerResource>>, string?) extension IResourceBuilder<ElasticsearchResource>
Adds an administration and development platform for Elasticsearch to the application model using Elasticvue.
public static class ElasticvueBuilderExtensions
{
public static IResourceBuilder<ElasticsearchResource> WithElasticvue(
this IResourceBuilder<ElasticsearchResource> builder,
Action<IResourceBuilder<ElasticvueContainerResource>>? configureContainer = null,
string? containerName = null)
{
// ...
}
}
builder IResourceBuilder<ElasticsearchResource> The Elasticsearch server resource builder.
configureContainer Action<IResourceBuilder<ElasticvueContainerResource>> optional Configuration callback for Elasticvue container resource.
containerName string? optional The name of the container (Optional).
IResourceBuilder<ElasticsearchResource> A reference to the ApplicationModel.IResourceBuilder`1.
This version of the package defaults to the Tag tag of the Image container image.

Use in application host with a Elasticsearch resource

var builder = DistributedApplication.CreateBuilder(args);
var elasticsearch = builder.AddElasticsearch("elasticsearch")
.WithElasticvue();
var api = builder.AddProject<Projects.Api>("api")
.WithReference(elasticsearch);
builder.Build().Run();
WithHostPort(IResourceBuilder<ElasticvueContainerResource>, int?) Section titled WithHostPort(IResourceBuilder<ElasticvueContainerResource>, int?) extension IResourceBuilder<ElasticvueContainerResource>
Configures the host port that the Elasticvue resource is exposed on instead of using randomly assigned port.
public static class ElasticvueBuilderExtensions
{
public static IResourceBuilder<ElasticvueContainerResource> WithHostPort(
this IResourceBuilder<ElasticvueContainerResource> builder,
int? port)
{
// ...
}
}
builder IResourceBuilder<ElasticvueContainerResource> The resource builder for Elasticvue.
port int? The port to bind on the host. If null is used random port will be assigned.
IResourceBuilder<ElasticvueContainerResource> The resource builder for Elasticvue.