DocumentDBBuilderExtensions
Classstaticnet10.0
Provides extension methods for adding DocumentDB resources to an
Hosting.IDistributedApplicationBuilder . namespace Aspire.Hosting;
public static class DocumentDBBuilderExtensions{ // ...}20 members
Methods20
Section titled MethodsIResourceBuilder<DocumentDBDatabaseResource> Adds a DocumentDB database to the application model.
IResourceBuilder<DocumentDBServerResource> Adds a DocumentDB resource to the application model. A container is used for local development.
IResourceBuilder<DocumentDBServerResource> IResourceBuilder<DocumentDBServerResource> Allows insecure TLS connections by adding
tlsInsecure=true to the connection string. This is enabled by default so the .NET MongoDB driver can connect to the self-signed certificate used by the DocumentDB Local container. Call AllowInsecureTls(false) to require valid certificates. IResourceBuilder<DocumentDBServerResource> Enables TLS for the DocumentDB connection string. TLS is enabled by default because the DocumentDB Local container serves TLS on its gateway port using a self-signed certificate. Call
UseTls(false) to disable TLS if connecting to a non-TLS endpoint. IResourceBuilder<DocumentDBServerResource> Adds a bind mount for the data folder to a DocumentDB container resource.
IResourceBuilder<DocumentDBServerResource> Adds a named volume for the data folder to a DocumentDB container resource.
IResourceBuilder<DocumentDBServerResource> Pins the DocumentDB version to a specific release known to this build of the package.
IResourceBuilder<DocumentDBServerResource> Configures the host port that the DocumentDB resource is exposed on instead of using randomly assigned port.
IResourceBuilder<DocumentDBServerResource> Mounts custom initialization scripts into the DocumentDB Local container.
IResourceBuilder<DocumentDBServerResource> Configures the DocumentDB Local container log level.
IResourceBuilder<DocumentDBServerResource> Enables OpenTelemetry metrics export from the DocumentDB gateway via OTLP/gRPC.
IResourceBuilder<DocumentDBServerResource> Disables the
extended_rum index access method in the DocumentDB Local container by setting DISABLE_EXTENDED_RUM=true . IResourceBuilder<DocumentDBServerResource> Disables the built-in sample data initialization performed by the DocumentDB Local container.
IResourceBuilder<DocumentDBServerResource> Disables the DocumentDB Local container's automatic user creation by setting the upstream
CREATE_USER=false environment variable. IResourceBuilder<DocumentDBServerResource> Configures the PostgreSQL owner role used by the DocumentDB Local container.
IResourceBuilder<DocumentDBServerResource> Exposes the PostgreSQL backend coordinator port of the DocumentDB Local container (default container port
9712) as a second endpoint on the resource. IResourceBuilder<DocumentDBServerResource> Selects the PostgreSQL backend variant of the
documentdb-local container image. IResourceBuilder<DocumentDBServerResource> Enables or disables DocumentDB Local telemetry by setting the
ENABLE_TELEMETRY environment variable. IResourceBuilder<DocumentDBServerResource> Mounts a custom TLS certificate and key into the DocumentDB Local container.