public EndpointReference PrimaryEndpoint { get; }DocumentDBServerResource Properties
public ReferenceExpression ConnectionStringExpression { get; }Remarks
Uri.EscapeDataString) when it resolves this reference, so MongoDB clients decode the original values back. In a published manifest the escaping is instead performed by the downstream publisher, which does not necessarily match RFC 3986; see Credential
encoding for publisher-specific behavior, including the azd limitation for credentials containing spaces. public IReadOnlyList<DocumentDBDatabaseResource> Databases { get; }public ParameterResource? PasswordParameter { get; }PostgresConnectionStringExpressionSection titled PostgresConnectionStringExpressionReferenceExpressionpostgresql://user:password@host:port/postgres URI form. public ReferenceExpression PostgresConnectionStringExpression { get; }Remarks
The PostgreSQL backend port ( 9712) must be exposed via DocumentDBBuilderExtensions.WithPostgresEndpoint before this property is accessed; otherwise an InvalidOperationException is thrown.
The default database in the URI is postgres, matching the upstream documentdb-local entrypoint, which connects with -d postgres. Credentials come from the same DocumentDBServerResource.UserNameParameter / DocumentDBServerResource.PasswordParameter used by the MongoDB gateway because the container creates a single admin user shared by both surfaces, and they are percent-encoded exactly as they are in DocumentDBServerResource.ConnectionStringExpression, with the same publisher-specific behavior when the model is published.
No sslmode query parameter is added, because the bundled PostgreSQL server is started with ssl = off; the DocumentDBServerResource.TLS field of this resource only controls the MongoDB gateway. Consumers needing TLS on the PostgreSQL side should append ?sslmode=... themselves.
public EndpointReference PostgresEndpoint { get; }Remarks
DocumentDBBuilderExtensions.WithPostgresEndpoint has been called on the resource builder. Accessing DocumentDBServerResource.PostgresConnectionStringExpression without first opting in throws an InvalidOperationException. public ParameterResource? UserNameParameter { get; }