namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
passwordIResourceBuilder<ParameterResource>optionalThe parameter used to provide the superuser password for the elasticsearch. If null a random password will be generated.
portint?optionalThe host port to bind the underlying container to.
Returns
IResourceBuilder<ElasticsearchResource> A reference to the ApplicationModel.IResourceBuilder`1.
Remarks
This version of the package defaults to the tag of the container image. Add an Elasticsearch container to the application model and reference it in a .NET project.
var builder =DistributedApplication.CreateBuilder(args);
var elasticsearch =builder.AddElasticsearch("elasticsearch");
sourcestringThe source directory on the host to mount into the container.
Returns
IResourceBuilder<ElasticsearchResource> The ApplicationModel.IResourceBuilder`1.
Remarks
Add an Elasticsearch container to the application model and reference it in a .NET project. Additionally, in this example a bind mount is added to the container to allow data to be persisted across container restarts.
var builder =DistributedApplication.CreateBuilder(args);
var elasticsearch =builder.AddElasticsearch("elasticsearch")
namestring?optionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.
Returns
IResourceBuilder<ElasticsearchResource> The ApplicationModel.IResourceBuilder`1.
Remarks
Add an Elasticsearch container to the application model and reference it in a .NET project. Additionally, in this example a data volume is added to the container to allow data to be persisted across container restarts.
var builder =DistributedApplication.CreateBuilder(args);
var elasticsearch =builder.AddElasticsearch("elasticsearch")