MongoDbApplicationProps

class aws_rfdk.MongoDbApplicationProps(*, dns_zone, hostname, server_certificate, version, admin_user=None, mongo_data_volume=None, user_sspl_acceptance=None)

Bases: object

Settings for the MongoDB application that will be running on a {@link MongoDbInstance}.

Parameters
  • dns_zone (IPrivateHostedZone) – Private DNS zone to register the MongoDB hostname within. An A Record will automatically be created within this DNS zone for the provided hostname to allow connection to MongoDB’s static private IP.

  • hostname (str) – The hostname to register the MongoDB’s listening interface as. The hostname must be from 1 to 63 characters long and may contain only the letters from a-z, digits from 0-9, and the hyphen character. The fully qualified domain name (FQDN) of this host will be this hostname dot the zoneName of the given dnsZone.

  • server_certificate (IX509CertificatePem) – A certificate that provides proof of identity for the MongoDB application. The DomainName, or CommonName, of the provided certificate must exactly match the fully qualified host name of this host. This certificate must not be self-signed; that is the given certificate must have a defined certChain property. This certificate will be used to secure encrypted network connections to the MongoDB application with the clients that connect to it.

  • version (MongoDbVersion) – What version of MongoDB to install on the instance.

  • admin_user (Optional[ISecret]) – A secret containing credentials for the admin user of the database. The contents of this secret must be a JSON document with the keys “username” and “password”. ex: { “username”: , “password”: , } If this user already exists in the database, then its credentials will not be modified in any way to match the credentials in this secret. Doing so automatically would be a security risk. If created, then the admin user will have the database role: [ { role: ‘userAdminAnyDatabase’, db: ‘admin’ }, ‘readWriteAnyDatabase’ ] Default: Credentials will be randomly generated for the admin user.

  • mongo_data_volume (Union[MongoDbInstanceVolumeProps, Dict[str, Any], None]) – Specification of the Amazon Elastic Block Storage (EBS) Volume that will be used by the instance to store the MongoDB database’s data. The Volume must not be partitioned. The volume will be mounted to /var/lib/mongo on this instance, and all files on it will be changed to be owned by the mongod user on the instance. Default: A new 20 GiB encrypted EBS volume is created to store the MongoDB database data.

  • user_sspl_acceptance (Optional[MongoDbSsplLicenseAcceptance]) – MongoDB Community edition is licensed under the terms of the SSPL (see: https://www.mongodb.com/licensing/server-side-public-license ). Users of MongoDbInstance must explicitly signify their acceptance of the terms of the SSPL through this property before the {@link MongoDbInstance} will be allowed to install MongoDB. Default: MongoDbSsplLicenseAcceptance.USER_REJECTS_SSPL

Attributes

admin_user

A secret containing credentials for the admin user of the database.

The contents of this secret must be a JSON document with the keys “username” and “password”. ex: { “username”: , “password”: , } If this user already exists in the database, then its credentials will not be modified in any way to match the credentials in this secret. Doing so automatically would be a security risk.

If created, then the admin user will have the database role: [ { role: ‘userAdminAnyDatabase’, db: ‘admin’ }, ‘readWriteAnyDatabase’ ]

Default

Credentials will be randomly generated for the admin user.

Return type

Optional[ISecret]

dns_zone

Private DNS zone to register the MongoDB hostname within.

An A Record will automatically be created within this DNS zone for the provided hostname to allow connection to MongoDB’s static private IP.

Return type

IPrivateHostedZone

hostname

The hostname to register the MongoDB’s listening interface as.

The hostname must be from 1 to 63 characters long and may contain only the letters from a-z, digits from 0-9, and the hyphen character.

The fully qualified domain name (FQDN) of this host will be this hostname dot the zoneName of the given dnsZone.

Return type

str

mongo_data_volume

Specification of the Amazon Elastic Block Storage (EBS) Volume that will be used by the instance to store the MongoDB database’s data.

The Volume must not be partitioned. The volume will be mounted to /var/lib/mongo on this instance, and all files on it will be changed to be owned by the mongod user on the instance.

Default

A new 20 GiB encrypted EBS volume is created to store the MongoDB database data.

Return type

Optional[MongoDbInstanceVolumeProps]

server_certificate

A certificate that provides proof of identity for the MongoDB application.

The DomainName, or CommonName, of the provided certificate must exactly match the fully qualified host name of this host. This certificate must not be self-signed; that is the given certificate must have a defined certChain property.

This certificate will be used to secure encrypted network connections to the MongoDB application with the clients that connect to it.

Return type

IX509CertificatePem

user_sspl_acceptance

//www.mongodb.com/licensing/server-side-public-license ). Users of MongoDbInstance must explicitly signify their acceptance of the terms of the SSPL through this property before the {@link MongoDbInstance} will be allowed to install MongoDB.

Default

MongoDbSsplLicenseAcceptance.USER_REJECTS_SSPL

Type

MongoDB Community edition is licensed under the terms of the SSPL (see

Type

https

Return type

Optional[MongoDbSsplLicenseAcceptance]

version

What version of MongoDB to install on the instance.

Return type

MongoDbVersion