PrimaryEndpoint EndpointReference getPrimaryEndpoint() EndpointReferenceAPI references are intentionally omitted from this search. To find API references, please search these dedicated API pages instead:
A resource that represents a MongoDB container.
type MongoDBServerResource interface { ExpressionValue IComputeResource Resource ResourceWithArgs ResourceWithConnectionString ResourceWithEndpoints ResourceWithEnvironment ResourceWithWaitSupport}ConnectionStringExpression *ReferenceExpression getConnectionStringExpression() *ReferenceExpressionDatabasesmap[string]string getDatabases() (map[string]string, error)HostEndpointReferenceExpression getHost() EndpointReferenceExpressionPasswordParameter ParameterResource get · setPasswordParameter() ParameterResourceSetPasswordParameter(value ParameterResource) MongoDBServerResourcePortEndpointReferenceExpression getPort() EndpointReferenceExpressionPrimaryEndpoint EndpointReference getPrimaryEndpoint() EndpointReferenceReplicaSetName *stringget · setnull if it is not part of a replica set.ReplicaSetName() (*string, error)SetReplicaSetName(value *string) MongoDBServerResourceResourceTypeDisplayName stringgetResourceTypeDisplayName() (string, error)TlsEnabled boolgetTlsEnabled() (bool, error)UriExpression *ReferenceExpression getUriExpression() *ReferenceExpressionUserNameParameter ParameterResource get · setUserNameParameter() ParameterResourceSetUserNameParameter(value ParameterResource) MongoDBServerResourceUserNameReference *ReferenceExpression getUserNameReference() *ReferenceExpressionAddDatabase( name string, options ...*AddDatabaseOptions,) MongoDBDatabaseResourceParameters
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.options...*AddDatabaseOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddDatabaseOptions argument.
DatabaseName *stringThe name of the database. If not provided, this defaults to the same value as name.Returns
MongoDBDatabaseResource The resource builder.
Returns a handle; failures surface later via Err().
WithBindIpAll() MongoDBServerResourceReturns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
WithDataBindMount( source string, options ...*WithDataBindMountOptions,) MongoDBServerResourceParameters
sourcestringThe source directory on the host to mount into the container.options...*WithDataBindMountOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithDataBindMountOptions argument.
IsReadOnly *boolA flag that indicates if this is a read-only mount.Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
WithDataVolume(options ...*WithDataVolumeOptions) MongoDBServerResourceParameters
options...*WithDataVolumeOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithDataVolumeOptions argument.
Name*stringThe name of the volume. Defaults to an auto-generated name based on the application and resource names.IsReadOnly *boolA flag that indicates if this is a read-only volume.Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
WithInitFiles(source string) MongoDBServerResourceParameters
sourcestringThe source file or directory on the host to copy into the container.Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
keyValue as the content of the file.WithKeyFile( keyValue ExpressionValue, options ...*WithKeyFileOptions,) MongoDBServerResourceParameters
keyValue ExpressionValue The content of the keyfile. This is a shared secret: every member of the replica set has to be given the same value, and anything holding it can authenticate as a member of the cluster.options...*WithKeyFileOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithKeyFileOptions argument.
KeyFilePath *stringThe absolute path the keyfile is mounted at inside the container, which has to include a file name. Defaults to /etc/rs.key .Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
WithMongoExpress(options ...*WithMongoExpressOptions) MongoDBServerResourceParameters
options...*WithMongoExpressOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithMongoExpressOptions argument.
ConfigureContainer func(obj MongoExpressContainerResource) callbackConfiguration callback for Mongo Express container resource.ContainerName *stringThe name of the container (Optional).Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
WithRepl() MongoDBServerResourceReturns
MongoDBServerResource The resource builder for chaining.
Returns a handle; failures surface later via Err().
WithReplicaSet(options ...*WithReplicaSetOptions) MongoDBServerResourceParameters
options...*WithReplicaSetOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithReplicaSetOptions argument.
Name*stringThe replica set name. Defaults to the resource name, or the name previously configured by this method.Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
--tlsAllowInvalidCertificates to mongod.WithTlsAllowInvalidCertificates() MongoDBServerResourceReturns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().
--tlsMode the MongoDB server is started with when TLS is active.WithTlsMode(options ...*WithTlsModeOptions) MongoDBServerResourceParameters
options...*WithTlsModeOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithTlsModeOptions argument.
Mode*MongoDBTlsMode The TLS mode to run the MongoDB server in.Returns
MongoDBServerResource The resource builder.
Returns a handle; failures surface later via Err().