awscdk-resources-mongodbatlas
Version:
MongoDB Atlas CDK Construct Library for AWS CloudFormation Resources
237 lines (236 loc) • 10 kB
TypeScript
import * as cdk from "aws-cdk-lib";
import * as constructs from "constructs";
/**
* **WARNING:** This resource is deprecated and will be removed in January 2026. For more details, see [Migrate your programmatic tools from M2, M5, or Serverless Instances to Flex Clusters](https://www.mongodb.com/docs/atlas/flex-migration/). Returns, adds, edits, and removes serverless instances.
*
* @schema CfnServerlessInstanceProps
*/
export interface CfnServerlessInstanceProps {
/**
* Collection of Uniform Resource Locators that point to the MongoDB database.
*
* @schema CfnServerlessInstanceProps#ConnectionStrings
*/
readonly connectionStrings?: ServerlessInstanceConnectionStrings;
/**
* Flag that indicates whether the serverless instances uses Serverless Continuous Backup. If this parameter is false, the serverless instance uses Basic Backup. | Option | Description | |---|---| | Serverless Continuous Backup | Atlas takes incremental snapshots of the data in your serverless instance every six hours and lets you restore the data from a selected point in time within the last 72 hours. Atlas also takes daily snapshots and retains these daily snapshots for 35 days. To learn more, see Serverless Instance Costs. | | Basic Backup | Atlas takes incremental snapshots of the data in your serverless instance every six hours and retains only the two most recent snapshots. You can use this option for free.
*
* @schema CfnServerlessInstanceProps#ContinuousBackupEnabled
*/
readonly continuousBackupEnabled?: boolean;
/**
* Flag that indicates whether the response returns the total number of items (**totalCount**) in the response.
*
* @schema CfnServerlessInstanceProps#IncludeCount
*/
readonly includeCount?: boolean;
/**
* Number of items that the response returns per page.
*
* @schema CfnServerlessInstanceProps#ItemsPerPage
*/
readonly itemsPerPage?: number;
/**
* Human-readable label that identifies the serverless instance.
*
* @schema CfnServerlessInstanceProps#Name
*/
readonly name?: string;
/**
* Number of the page that displays the current set of the total objects that the response returns.
*
* @schema CfnServerlessInstanceProps#PageNum
*/
readonly pageNum?: number;
/**
* Unique 24-hexadecimal digit string that identifies your project.
*
* @schema CfnServerlessInstanceProps#ProjectID
*/
readonly projectId?: string;
/**
* Group of settings that configure the provisioned MongoDB serverless instance. The options available relate to the cloud service provider.
*
* @schema CfnServerlessInstanceProps#ProviderSettings
*/
readonly providerSettings?: ServerlessInstanceProviderSettings;
/**
* Flag that indicates whether termination protection is enabled on the serverless instance. If set to true, MongoDB Cloud won't delete the serverless instance. If set to false, MongoDB cloud will delete the serverless instance."
*
* @schema CfnServerlessInstanceProps#TerminationProtectionEnabled
*/
readonly terminationProtectionEnabled?: boolean;
/**
* Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used
*
* @schema CfnServerlessInstanceProps#Profile
*/
readonly profile?: string;
}
/**
* Converts an object of type 'CfnServerlessInstanceProps' to JSON representation.
*/
export declare function toJson_CfnServerlessInstanceProps(obj: CfnServerlessInstanceProps | undefined): Record<string, any> | undefined;
/**
* @schema ServerlessInstanceConnectionStrings
*/
export interface ServerlessInstanceConnectionStrings {
/**
* List of private endpoint connection strings that you can use to connect to this serverless instance through a private endpoint. This parameter returns only if you created a private endpoint for this serverless instance and it is AVAILABLE.
*
* @schema ServerlessInstanceConnectionStrings#PrivateEndpoint
*/
readonly privateEndpoint?: ServerlessInstancePrivateEndpoint[];
/**
* Public connection string that you can use to connect to this serverless instance. This connection string uses the `mongodb+srv://` protocol.
*
* @schema ServerlessInstanceConnectionStrings#StandardSrv
*/
readonly standardSrv?: string;
}
/**
* Converts an object of type 'ServerlessInstanceConnectionStrings' to JSON representation.
*/
export declare function toJson_ServerlessInstanceConnectionStrings(obj: ServerlessInstanceConnectionStrings | undefined): Record<string, any> | undefined;
/**
* @schema ServerlessInstanceProviderSettings
*/
export interface ServerlessInstanceProviderSettings {
/**
* Human-readable label that identifies the cloud service provider.
*
* @schema ServerlessInstanceProviderSettings#ProviderName
*/
readonly providerName?: ServerlessInstanceProviderSettingsProviderName;
/**
* Human-readable label that identifies the geographic location of your MongoDB serverless instance. The region you choose can affect network latency for clients accessing your databases. For a complete list of region names, see [AWS](https://docs.atlas.mongodb.com/reference/amazon-aws/#std-label-amazon-aws), [GCP](https://docs.atlas.mongodb.com/reference/google-gcp/), and [Azure](https://docs.atlas.mongodb.com/reference/microsoft-azure/).
*
* @schema ServerlessInstanceProviderSettings#RegionName
*/
readonly regionName?: string;
}
/**
* Converts an object of type 'ServerlessInstanceProviderSettings' to JSON representation.
*/
export declare function toJson_ServerlessInstanceProviderSettings(obj: ServerlessInstanceProviderSettings | undefined): Record<string, any> | undefined;
/**
* @schema ServerlessInstancePrivateEndpoint
*/
export interface ServerlessInstancePrivateEndpoint {
/**
* List that contains the private endpoints through which you connect to MongoDB Cloud when you use **connectionStrings.privateEndpoint[n].srvConnectionString**.
*
* @schema ServerlessInstancePrivateEndpoint#Endpoints
*/
readonly endpoints?: ServerlessInstancePrivateEndpointEndpoint[];
/**
* Private endpoint-aware connection string that uses the `mongodb+srv://` protocol to connect to MongoDB Cloud through a private endpoint. The `mongodb+srv` protocol tells the driver to look up the seed list of hosts in the Domain Name System (DNS).
*
* @schema ServerlessInstancePrivateEndpoint#SrvConnectionString
*/
readonly srvConnectionString?: string;
/**
* MongoDB process type to which your application connects.
*
*
* @schema ServerlessInstancePrivateEndpoint#Type
*/
readonly type?: ServerlessInstancePrivateEndpointType;
}
/**
* Converts an object of type 'ServerlessInstancePrivateEndpoint' to JSON representation.
*/
export declare function toJson_ServerlessInstancePrivateEndpoint(obj: ServerlessInstancePrivateEndpoint | undefined): Record<string, any> | undefined;
/**
* Human-readable label that identifies the cloud service provider.
*
* @schema ServerlessInstanceProviderSettingsProviderName
*/
export declare enum ServerlessInstanceProviderSettingsProviderName {
/** SERVERLESS */
SERVERLESS = "SERVERLESS"
}
/**
* @schema ServerlessInstancePrivateEndpointEndpoint
*/
export interface ServerlessInstancePrivateEndpointEndpoint {
/**
* Unique provider identifier of the private endpoint.
*
*
* @schema ServerlessInstancePrivateEndpointEndpoint#EndpointId
*/
readonly endpointId?: string;
/**
* Cloud provider where the private endpoint is deployed.
*
*
* @schema ServerlessInstancePrivateEndpointEndpoint#ProviderName
*/
readonly providerName?: string;
/**
* Region where the private endpoint is deployed.
*
*
* @schema ServerlessInstancePrivateEndpointEndpoint#Region
*/
readonly region?: string;
}
/**
* Converts an object of type 'ServerlessInstancePrivateEndpointEndpoint' to JSON representation.
*/
export declare function toJson_ServerlessInstancePrivateEndpointEndpoint(obj: ServerlessInstancePrivateEndpointEndpoint | undefined): Record<string, any> | undefined;
/**
* MongoDB process type to which your application connects.
*
*
* @schema ServerlessInstancePrivateEndpointType
*/
export declare enum ServerlessInstancePrivateEndpointType {
/** MONGOS */
MONGOS = "MONGOS"
}
/**
* A CloudFormation `MongoDB::Atlas::ServerlessInstance`
*
* @cloudformationResource MongoDB::Atlas::ServerlessInstance
* @stability external
*/
export declare class CfnServerlessInstance extends cdk.CfnResource {
/**
* The CloudFormation resource type name for this resource class.
*/
static readonly CFN_RESOURCE_TYPE_NAME = "MongoDB::Atlas::ServerlessInstance";
/**
* Resource props.
*/
readonly props: CfnServerlessInstanceProps;
/**
* Attribute `MongoDB::Atlas::ServerlessInstance.CreateDate`
*/
readonly attrCreateDate: string;
/**
* Attribute `MongoDB::Atlas::ServerlessInstance.Id`
*/
readonly attrId: string;
/**
* Attribute `MongoDB::Atlas::ServerlessInstance.TotalCount`
*/
readonly attrTotalCount: number;
/**
* Attribute `MongoDB::Atlas::ServerlessInstance.StateName`
*/
readonly attrStateName: string;
/**
* Attribute `MongoDB::Atlas::ServerlessInstance.MongoDBVersion`
*/
readonly attrMongoDBVersion: string;
/**
* Create a new `MongoDB::Atlas::ServerlessInstance`.
*
* @param scope - scope in which this resource is defined
* @param id - scoped id of the resource
* @param props - resource properties
*/
constructor(scope: constructs.Construct, id: string, props: CfnServerlessInstanceProps);
}