diff --git a/.gitignore b/.gitignore
index bcb9051d..7e5ceaf9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,5 +54,9 @@ yarn-error.log
*.DS_Store
examples-bin
.idea/
-*.iml
+*.secrets
+.vscode
+.windsurf
+CLAUDE.md
+.claude
!/.projenrc.js
diff --git a/.npmignore b/.npmignore
index 32b26f72..5483f7dc 100644
--- a/.npmignore
+++ b/.npmignore
@@ -29,7 +29,11 @@ yarn-error.log
*.DS_Store
examples-bin
.idea/
-*.iml
+*.secrets
+.vscode
+.windsurf
+CLAUDE.md
+.claude
/src/
CONTRIBUTING.md
TESTING.md
diff --git a/.projenrc.js b/.projenrc.js
index e8a6c9a7..0613a00f 100644
--- a/.projenrc.js
+++ b/.projenrc.js
@@ -113,7 +113,11 @@ const common_exclude = [
"*.DS_Store",
"examples-bin",
".idea/",
- "*.iml",
+ "*.secrets",
+ ".vscode",
+ ".windsurf",
+ "CLAUDE.md",
+ ".claude",
];
project.gitignore.exclude(...common_exclude);
project.npmignore.exclude(
diff --git a/API.md b/API.md
index 22adc7bf..eba46541 100644
--- a/API.md
+++ b/API.md
@@ -13408,6 +13408,709 @@ The CloudFormation resource type name for this resource class.
---
+### CfnFlexCluster
+
+A CloudFormation `MongoDB::Atlas::FlexCluster`.
+
+#### Initializers
+
+```typescript
+import { CfnFlexCluster } from 'awscdk-resources-mongodbatlas'
+
+new CfnFlexCluster(scope: Construct, id: string, props: CfnFlexClusterProps)
+```
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| scope | constructs.Construct | - scope in which this resource is defined. |
+| id | string | - scoped id of the resource. |
+| props | CfnFlexClusterProps | - resource properties. |
+
+---
+
+##### `scope`Required
+
+- *Type:* constructs.Construct
+
+scope in which this resource is defined.
+
+---
+
+##### `id`Required
+
+- *Type:* string
+
+scoped id of the resource.
+
+---
+
+##### `props`Required
+
+- *Type:* CfnFlexClusterProps
+
+resource properties.
+
+---
+
+#### Methods
+
+| **Name** | **Description** |
+| --- | --- |
+| toString | Returns a string representation of this construct. |
+| overrideLogicalId | Overrides the auto-generated logical ID with a specific ID. |
+| addDeletionOverride | Syntactic sugar for `addOverride(path, undefined)`. |
+| addDependency | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. |
+| addDependsOn | Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. |
+| addMetadata | Add a value to the CloudFormation Resource Metadata. |
+| addOverride | Adds an override to the synthesized CloudFormation resource. |
+| addPropertyDeletionOverride | Adds an override that deletes the value of a property from the resource definition. |
+| addPropertyOverride | Adds an override to a resource property. |
+| applyRemovalPolicy | Sets the deletion policy of the resource based on the removal policy specified. |
+| getAtt | Returns a token for an runtime attribute of this resource. |
+| getMetadata | Retrieve a value value from the CloudFormation Resource Metadata. |
+| obtainDependencies | Retrieves an array of resources this resource depends on. |
+| obtainResourceDependencies | Get a shallow copy of dependencies between this resource and other resources in the same stack. |
+| removeDependency | Indicates that this resource no longer depends on another resource. |
+| replaceDependency | Replaces one dependency with another. |
+
+---
+
+##### `toString`
+
+```typescript
+public toString(): string
+```
+
+Returns a string representation of this construct.
+
+##### `overrideLogicalId`
+
+```typescript
+public overrideLogicalId(newLogicalId: string): void
+```
+
+Overrides the auto-generated logical ID with a specific ID.
+
+###### `newLogicalId`Required
+
+- *Type:* string
+
+The new logical ID to use for this stack element.
+
+---
+
+##### `addDeletionOverride`
+
+```typescript
+public addDeletionOverride(path: string): void
+```
+
+Syntactic sugar for `addOverride(path, undefined)`.
+
+###### `path`Required
+
+- *Type:* string
+
+The path of the value to delete.
+
+---
+
+##### `addDependency`
+
+```typescript
+public addDependency(target: CfnResource): void
+```
+
+Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
+
+This can be used for resources across stacks (or nested stack) boundaries
+and the dependency will automatically be transferred to the relevant scope.
+
+###### `target`Required
+
+- *Type:* aws-cdk-lib.CfnResource
+
+---
+
+##### ~~`addDependsOn`~~
+
+```typescript
+public addDependsOn(target: CfnResource): void
+```
+
+Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
+
+###### `target`Required
+
+- *Type:* aws-cdk-lib.CfnResource
+
+---
+
+##### `addMetadata`
+
+```typescript
+public addMetadata(key: string, value: any): void
+```
+
+Add a value to the CloudFormation Resource Metadata.
+
+> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
+
+Note that this is a different set of metadata from CDK node metadata; this
+metadata ends up in the stack template under the resource, whereas CDK
+node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
+
+Note that this is a different set of metadata from CDK node metadata; this
+metadata ends up in the stack template under the resource, whereas CDK
+node metadata ends up in the Cloud Assembly.)
+
+###### `key`Required
+
+- *Type:* string
+
+---
+
+###### `value`Required
+
+- *Type:* any
+
+---
+
+##### `addOverride`
+
+```typescript
+public addOverride(path: string, value: any): void
+```
+
+Adds an override to the synthesized CloudFormation resource.
+
+To add a
+property override, either use `addPropertyOverride` or prefix `path` with
+"Properties." (i.e. `Properties.TopicName`).
+
+If the override is nested, separate each nested level using a dot (.) in the path parameter.
+If there is an array as part of the nesting, specify the index in the path.
+
+To include a literal `.` in the property name, prefix with a `\`. In most
+programming languages you will need to write this as `"\\."` because the
+`\` itself will need to be escaped.
+
+For example,
+```typescript
+cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']);
+cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE');
+```
+would add the overrides
+```json
+"Properties": {
+ "GlobalSecondaryIndexes": [
+ {
+ "Projection": {
+ "NonKeyAttributes": [ "myattribute" ]
+ ...
+ }
+ ...
+ },
+ {
+ "ProjectionType": "INCLUDE"
+ ...
+ },
+ ]
+ ...
+}
+```
+
+The `value` argument to `addOverride` will not be processed or translated
+in any way. Pass raw JSON values in here with the correct capitalization
+for CloudFormation. If you pass CDK classes or structs, they will be
+rendered with lowercased key names, and CloudFormation will reject the
+template.
+
+###### `path`Required
+
+- *Type:* string
+
+The path of the property, you can use dot notation to override values in complex types.
+
+Any intermediate keys
+will be created as needed.
+
+---
+
+###### `value`Required
+
+- *Type:* any
+
+The value.
+
+Could be primitive or complex.
+
+---
+
+##### `addPropertyDeletionOverride`
+
+```typescript
+public addPropertyDeletionOverride(propertyPath: string): void
+```
+
+Adds an override that deletes the value of a property from the resource definition.
+
+###### `propertyPath`Required
+
+- *Type:* string
+
+The path to the property.
+
+---
+
+##### `addPropertyOverride`
+
+```typescript
+public addPropertyOverride(propertyPath: string, value: any): void
+```
+
+Adds an override to a resource property.
+
+Syntactic sugar for `addOverride("Properties.<...>", value)`.
+
+###### `propertyPath`Required
+
+- *Type:* string
+
+The path of the property.
+
+---
+
+###### `value`Required
+
+- *Type:* any
+
+The value.
+
+---
+
+##### `applyRemovalPolicy`
+
+```typescript
+public applyRemovalPolicy(policy?: RemovalPolicy, options?: RemovalPolicyOptions): void
+```
+
+Sets the deletion policy of the resource based on the removal policy specified.
+
+The Removal Policy controls what happens to this resource when it stops
+being managed by CloudFormation, either because you've removed it from the
+CDK application or because you've made a change that requires the resource
+to be replaced.
+
+The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
+account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some
+cases, a snapshot can be taken of the resource prior to deletion
+(`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy
+can be found in the following link:
+
+> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options)
+
+###### `policy`Optional
+
+- *Type:* aws-cdk-lib.RemovalPolicy
+
+---
+
+###### `options`Optional
+
+- *Type:* aws-cdk-lib.RemovalPolicyOptions
+
+---
+
+##### `getAtt`
+
+```typescript
+public getAtt(attributeName: string, typeHint?: ResolutionTypeHint): Reference
+```
+
+Returns a token for an runtime attribute of this resource.
+
+Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility
+in case there is no generated attribute.
+
+###### `attributeName`Required
+
+- *Type:* string
+
+The name of the attribute.
+
+---
+
+###### `typeHint`Optional
+
+- *Type:* aws-cdk-lib.ResolutionTypeHint
+
+---
+
+##### `getMetadata`
+
+```typescript
+public getMetadata(key: string): any
+```
+
+Retrieve a value value from the CloudFormation Resource Metadata.
+
+> [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
+
+Note that this is a different set of metadata from CDK node metadata; this
+metadata ends up in the stack template under the resource, whereas CDK
+node metadata ends up in the Cloud Assembly.](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
+
+Note that this is a different set of metadata from CDK node metadata; this
+metadata ends up in the stack template under the resource, whereas CDK
+node metadata ends up in the Cloud Assembly.)
+
+###### `key`Required
+
+- *Type:* string
+
+---
+
+##### `obtainDependencies`
+
+```typescript
+public obtainDependencies(): Stack | CfnResource[]
+```
+
+Retrieves an array of resources this resource depends on.
+
+This assembles dependencies on resources across stacks (including nested stacks)
+automatically.
+
+##### `obtainResourceDependencies`
+
+```typescript
+public obtainResourceDependencies(): CfnResource[]
+```
+
+Get a shallow copy of dependencies between this resource and other resources in the same stack.
+
+##### `removeDependency`
+
+```typescript
+public removeDependency(target: CfnResource): void
+```
+
+Indicates that this resource no longer depends on another resource.
+
+This can be used for resources across stacks (including nested stacks)
+and the dependency will automatically be removed from the relevant scope.
+
+###### `target`Required
+
+- *Type:* aws-cdk-lib.CfnResource
+
+---
+
+##### `replaceDependency`
+
+```typescript
+public replaceDependency(target: CfnResource, newTarget: CfnResource): void
+```
+
+Replaces one dependency with another.
+
+###### `target`Required
+
+- *Type:* aws-cdk-lib.CfnResource
+
+The dependency to replace.
+
+---
+
+###### `newTarget`Required
+
+- *Type:* aws-cdk-lib.CfnResource
+
+The new dependency to add.
+
+---
+
+#### Static Functions
+
+| **Name** | **Description** |
+| --- | --- |
+| isConstruct | Checks if `x` is a construct. |
+| isCfnElement | Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template). |
+| isCfnResource | Check whether the given object is a CfnResource. |
+
+---
+
+##### ~~`isConstruct`~~
+
+```typescript
+import { CfnFlexCluster } from 'awscdk-resources-mongodbatlas'
+
+CfnFlexCluster.isConstruct(x: any)
+```
+
+Checks if `x` is a construct.
+
+###### `x`Required
+
+- *Type:* any
+
+Any object.
+
+---
+
+##### `isCfnElement`
+
+```typescript
+import { CfnFlexCluster } from 'awscdk-resources-mongodbatlas'
+
+CfnFlexCluster.isCfnElement(x: any)
+```
+
+Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
+
+Uses duck-typing instead of `instanceof` to allow stack elements from different
+versions of this library to be included in the same stack.
+
+###### `x`Required
+
+- *Type:* any
+
+---
+
+##### `isCfnResource`
+
+```typescript
+import { CfnFlexCluster } from 'awscdk-resources-mongodbatlas'
+
+CfnFlexCluster.isCfnResource(x: any)
+```
+
+Check whether the given object is a CfnResource.
+
+###### `x`Required
+
+- *Type:* any
+
+---
+
+#### Properties
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| node | constructs.Node | The tree node. |
+| creationStack | string[] | *No description.* |
+| logicalId | string | The logical ID for this CloudFormation stack element. |
+| stack | aws-cdk-lib.Stack | The stack in which this element is defined. |
+| ref | string | Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. |
+| cfnOptions | aws-cdk-lib.ICfnResourceOptions | Options for this resource, such as condition, update policy etc. |
+| cfnResourceType | string | AWS resource type. |
+| attrClusterType | string | Attribute `MongoDB::Atlas::FlexCluster.ClusterType`. |
+| attrCreateDate | string | Attribute `MongoDB::Atlas::FlexCluster.CreateDate`. |
+| attrId | string | Attribute `MongoDB::Atlas::FlexCluster.Id`. |
+| attrMongoDBVersion | string | Attribute `MongoDB::Atlas::FlexCluster.MongoDBVersion`. |
+| attrStateName | string | Attribute `MongoDB::Atlas::FlexCluster.StateName`. |
+| attrVersionReleaseSystem | string | Attribute `MongoDB::Atlas::FlexCluster.VersionReleaseSystem`. |
+| props | CfnFlexClusterProps | Resource props. |
+
+---
+
+##### `node`Required
+
+```typescript
+public readonly node: Node;
+```
+
+- *Type:* constructs.Node
+
+The tree node.
+
+---
+
+##### `creationStack`Required
+
+```typescript
+public readonly creationStack: string[];
+```
+
+- *Type:* string[]
+
+---
+
+##### `logicalId`Required
+
+```typescript
+public readonly logicalId: string;
+```
+
+- *Type:* string
+
+The logical ID for this CloudFormation stack element.
+
+The logical ID of the element
+is calculated from the path of the resource node in the construct tree.
+
+To override this value, use `overrideLogicalId(newLogicalId)`.
+
+---
+
+##### `stack`Required
+
+```typescript
+public readonly stack: Stack;
+```
+
+- *Type:* aws-cdk-lib.Stack
+
+The stack in which this element is defined.
+
+CfnElements must be defined within a stack scope (directly or indirectly).
+
+---
+
+##### `ref`Required
+
+```typescript
+public readonly ref: string;
+```
+
+- *Type:* string
+
+Return a string that will be resolved to a CloudFormation `{ Ref }` for this element.
+
+If, by any chance, the intrinsic reference of a resource is not a string, you could
+coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`.
+
+---
+
+##### `cfnOptions`Required
+
+```typescript
+public readonly cfnOptions: ICfnResourceOptions;
+```
+
+- *Type:* aws-cdk-lib.ICfnResourceOptions
+
+Options for this resource, such as condition, update policy etc.
+
+---
+
+##### `cfnResourceType`Required
+
+```typescript
+public readonly cfnResourceType: string;
+```
+
+- *Type:* string
+
+AWS resource type.
+
+---
+
+##### `attrClusterType`Required
+
+```typescript
+public readonly attrClusterType: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.ClusterType`.
+
+---
+
+##### `attrCreateDate`Required
+
+```typescript
+public readonly attrCreateDate: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.CreateDate`.
+
+---
+
+##### `attrId`Required
+
+```typescript
+public readonly attrId: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.Id`.
+
+---
+
+##### `attrMongoDBVersion`Required
+
+```typescript
+public readonly attrMongoDBVersion: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.MongoDBVersion`.
+
+---
+
+##### `attrStateName`Required
+
+```typescript
+public readonly attrStateName: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.StateName`.
+
+---
+
+##### `attrVersionReleaseSystem`Required
+
+```typescript
+public readonly attrVersionReleaseSystem: string;
+```
+
+- *Type:* string
+
+Attribute `MongoDB::Atlas::FlexCluster.VersionReleaseSystem`.
+
+---
+
+##### `props`Required
+
+```typescript
+public readonly props: CfnFlexClusterProps;
+```
+
+- *Type:* CfnFlexClusterProps
+
+Resource props.
+
+---
+
+#### Constants
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| CFN_RESOURCE_TYPE_NAME | string | The CloudFormation resource type name for this resource class. |
+
+---
+
+##### `CFN_RESOURCE_TYPE_NAME`Required
+
+```typescript
+public readonly CFN_RESOURCE_TYPE_NAME: string;
+```
+
+- *Type:* string
+
+The CloudFormation resource type name for this resource class.
+
+---
+
### CfnGlobalClusterConfig
A CloudFormation `MongoDB::Atlas::GlobalClusterConfig`.
@@ -35104,6 +35807,40 @@ String Representing the AWS VPC ID (like: vpc-xxxxxxxxxxxxxxxx) (Used For Creati
---
+### BackupSettings
+
+Flex backup configuration.
+
+#### Initializer
+
+```typescript
+import { BackupSettings } from 'awscdk-resources-mongodbatlas'
+
+const backupSettings: BackupSettings = { ... }
+```
+
+#### Properties
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| enabled | boolean | Flag that indicates whether backups are performed for this flex cluster. |
+
+---
+
+##### `enabled`Optional
+
+```typescript
+public readonly enabled: boolean;
+```
+
+- *Type:* boolean
+
+Flag that indicates whether backups are performed for this flex cluster.
+
+Backup uses flex cluster backups.
+
+---
+
### CfnAccessListApiKeyProps
Creates the access list entries for the specified organization API key.
@@ -37682,6 +38419,127 @@ Atlas roles and the unique identifiers of the groups and organizations associate
---
+### CfnFlexClusterProps
+
+The flex cluster resource provides access to your flex cluster configurations.
+
+The resource lets you create, edit and delete flex clusters. The resource requires your Project ID.
+
+#### Initializer
+
+```typescript
+import { CfnFlexClusterProps } from 'awscdk-resources-mongodbatlas'
+
+const cfnFlexClusterProps: CfnFlexClusterProps = { ... }
+```
+
+#### Properties
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| name | string | Human-readable label that identifies the flex cluster. |
+| projectId | string | Unique identifier of the project the cluster belongs to. |
+| providerSettings | ProviderSettings | *No description.* |
+| backupSettings | BackupSettings | *No description.* |
+| connectionStrings | ConnectionStrings | *No description.* |
+| profile | string | Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used. |
+| tags | Tag[] | Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the flex cluster. |
+| terminationProtectionEnabled | boolean | Flag that indicates whether termination protection is enabled on the cluster. |
+
+---
+
+##### `name`Required
+
+```typescript
+public readonly name: string;
+```
+
+- *Type:* string
+
+Human-readable label that identifies the flex cluster.
+
+---
+
+##### `projectId`Required
+
+```typescript
+public readonly projectId: string;
+```
+
+- *Type:* string
+
+Unique identifier of the project the cluster belongs to.
+
+---
+
+##### `providerSettings`Required
+
+```typescript
+public readonly providerSettings: ProviderSettings;
+```
+
+- *Type:* ProviderSettings
+
+---
+
+##### `backupSettings`Optional
+
+```typescript
+public readonly backupSettings: BackupSettings;
+```
+
+- *Type:* BackupSettings
+
+---
+
+##### `connectionStrings`Optional
+
+```typescript
+public readonly connectionStrings: ConnectionStrings;
+```
+
+- *Type:* ConnectionStrings
+
+---
+
+##### `profile`Optional
+
+```typescript
+public readonly profile: string;
+```
+
+- *Type:* string
+
+Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used.
+
+---
+
+##### `tags`Optional
+
+```typescript
+public readonly tags: Tag[];
+```
+
+- *Type:* Tag[]
+
+Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the flex cluster.
+
+---
+
+##### `terminationProtectionEnabled`Optional
+
+```typescript
+public readonly terminationProtectionEnabled: boolean;
+```
+
+- *Type:* boolean
+
+Flag that indicates whether termination protection is enabled on the cluster.
+
+If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
+
+---
+
### CfnGlobalClusterConfigProps
Returns, adds, and removes Global Cluster managed namespaces and custom zone mappings.
@@ -41870,83 +42728,8 @@ const connectionStrings: ConnectionStrings = { ... }
| **Name** | **Type** | **Description** |
| --- | --- | --- |
-| private | string | Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. |
-| privateEndpoints | string[] | Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. |
-| privateEndpointsSrv | string[] | Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink. |
-| privateSrv | string | Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster. |
-| srvShardOptimizedConnectionString | string[] | Private endpoint-aware connection string optimized for sharded clusters that uses the `mongodb+srv://` protocol to connect to MongoDB Cloud through a private endpoint. |
| standard | string | Public connection string that you can use to connect to this cluster. |
-| standardSrv | string | Public connection string that you can use to connect to this cluster. |
-
----
-
-##### `private`Optional
-
-```typescript
-public readonly private: string;
-```
-
-- *Type:* string
-
-Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster.
-
-This connection string uses the mongodb+srv:// protocol. The resource returns this parameter once someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the URI if the nodes change. Use this URI format if your driver supports it. If it doesn't, use connectionStrings.private. For Amazon Web Services (AWS) clusters, this resource returns this parameter only if you enable custom DNS.
-
----
-
-##### `privateEndpoints`Optional
-
-```typescript
-public readonly privateEndpoints: string[];
-```
-
-- *Type:* string[]
-
-Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink.
-
-Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related mongodb:// connection string that you use to connect to MongoDB Cloud through the interface endpoint that the key names.
-
----
-
-##### `privateEndpointsSrv`Optional
-
-```typescript
-public readonly privateEndpointsSrv: string[];
-```
-
-- *Type:* string[]
-
-Private endpoint-aware connection strings that use AWS-hosted clusters with Amazon Web Services (AWS) PrivateLink.
-
-Each key identifies an Amazon Web Services (AWS) interface endpoint. Each value identifies the related mongodb:// connection string that you use to connect to Atlas through the interface endpoint that the key names.
-
----
-
-##### `privateSrv`Optional
-
-```typescript
-public readonly privateSrv: string;
-```
-
-- *Type:* string
-
-Network peering connection strings for each interface Virtual Private Cloud (VPC) endpoint that you configured to connect to this cluster.
-
-This connection string uses the mongodb+srv:// protocol. The resource returns this parameter when someone creates a network peering connection to this cluster. This protocol tells the application to look up the host seed list in the Domain Name System (DNS). This list synchronizes with the nodes in a cluster. If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to append the seed list or change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your driver supports it. If it doesn't, use connectionStrings.private. For Amazon Web Services (AWS) clusters, this parameter returns only if you enable custom DNS.
-
----
-
-##### `srvShardOptimizedConnectionString`Optional
-
-```typescript
-public readonly srvShardOptimizedConnectionString: string[];
-```
-
-- *Type:* string[]
-
-Private endpoint-aware connection string optimized for sharded clusters that uses the `mongodb+srv://` protocol to connect to MongoDB Cloud through a private endpoint.
-
-If the connection string uses this Uniform Resource Identifier (URI) format, you don't need to change the Uniform Resource Identifier (URI) if the nodes change. Use this Uniform Resource Identifier (URI) format if your application and Atlas cluster supports it. If it doesn't, use and consult the documentation for connectionStrings.privateEndpoint[n].srvConnectionString.
+| standardSrv | string | Public connection string that you can use to connect to this flex cluster. |
---
@@ -41972,7 +42755,7 @@ public readonly standardSrv: string;
- *Type:* string
-Public connection string that you can use to connect to this cluster.
+Public connection string that you can use to connect to this flex cluster.
This connection string uses the mongodb+srv:// protocol.
@@ -45567,6 +46350,79 @@ string = 24 characters ^([a-f0-9]{24})$
---
+### ProviderSettings
+
+Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
+
+#### Initializer
+
+```typescript
+import { ProviderSettings } from 'awscdk-resources-mongodbatlas'
+
+const providerSettings: ProviderSettings = { ... }
+```
+
+#### Properties
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| backingProviderName | string | Cloud service provider on which MongoDB Cloud provisioned the flex cluster. |
+| regionName | string | Human-readable label that identifies the geographic location of your MongoDB flex cluster. |
+| diskSizeGb | number | Storage capacity available to the flex cluster expressed in gigabytes. |
+| providerName | string | Human-readable label that identifies the cloud service provider. |
+
+---
+
+##### `backingProviderName`Required
+
+```typescript
+public readonly backingProviderName: string;
+```
+
+- *Type:* string
+
+Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
+
+---
+
+##### `regionName`Required
+
+```typescript
+public readonly regionName: string;
+```
+
+- *Type:* string
+
+Human-readable label that identifies the geographic location of your MongoDB flex cluster.
+
+The region you choose can affect network latency for clients accessing your databases.
+
+---
+
+##### `diskSizeGb`Optional
+
+```typescript
+public readonly diskSizeGb: number;
+```
+
+- *Type:* number
+
+Storage capacity available to the flex cluster expressed in gigabytes.
+
+---
+
+##### `providerName`Optional
+
+```typescript
+public readonly providerName: string;
+```
+
+- *Type:* string
+
+Human-readable label that identifies the cloud service provider.
+
+---
+
### ReadPreference
#### Initializer
@@ -47097,7 +47953,7 @@ const tag: Tag = { ... }
---
-##### `key`Optional
+##### `key`Required
```typescript
public readonly key: string;
@@ -47111,7 +47967,7 @@ For example, environment in the environment : production tag.
---
-##### `value`Optional
+##### `value`Required
```typescript
public readonly value: string;
diff --git a/examples/l1-resources/flex-cluster.ts b/examples/l1-resources/flex-cluster.ts
new file mode 100644
index 00000000..4ac052d7
--- /dev/null
+++ b/examples/l1-resources/flex-cluster.ts
@@ -0,0 +1,64 @@
+// This example creates a project and a flex cluster in Atlas using the L1 resources.
+import * as cdk from 'aws-cdk-lib';
+import { Construct } from 'constructs';
+import { CfnProject, CfnFlexCluster } from 'awscdk-resources-mongodbatlas';
+
+interface AtlasStackProps {
+ readonly orgId: string;
+ readonly profile: string;
+ readonly projName: string;
+ readonly clusterName: string;
+ readonly region: string;
+ readonly backingProvider: string;
+}
+
+export class CdkFlexClusterStack extends cdk.Stack {
+ constructor(scope: Construct, id: string, props?: cdk.StackProps) {
+ super(scope, id, props);
+
+ const atlasProps = this.getContextProps();
+
+ const projectRes = new CfnProject(this, 'ProjectResource', {
+ name: atlasProps.projName,
+ orgId: atlasProps.orgId,
+ profile: atlasProps.profile
+ });
+
+ const flexClusterRes = new CfnFlexCluster(this, 'FlexClusterResource', {
+ name: atlasProps.clusterName,
+ projectId: projectRes.attrId,
+ profile: atlasProps.profile,
+ providerSettings: {
+ backingProviderName: atlasProps.backingProvider,
+ regionName: atlasProps.region,
+ },
+ tags: [
+ {
+ key: "env",
+ value: "development",
+ },
+ ],
+ });
+ }
+
+ getContextProps(): AtlasStackProps {
+ const orgId = this.node.tryGetContext('orgId');
+ if (!orgId) {
+ throw "No context value specified for orgId. Please specify via the cdk context."
+ }
+ const projName = this.node.tryGetContext('projName') ?? 'test-flex-proj';
+ const profile = this.node.tryGetContext('profile') ?? 'default';
+ const clusterName = this.node.tryGetContext('clusterName') ?? 'test-flex-cluster';
+ const region = this.node.tryGetContext('region') ?? "US_EAST_1";
+ const backingProvider = this.node.tryGetContext('backingProvider') ?? "AWS";
+
+ return {
+ projName,
+ orgId,
+ profile,
+ clusterName,
+ region,
+ backingProvider,
+ }
+ }
+}
diff --git a/src/index.ts b/src/index.ts
index b2f56752..043734c8 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -197,6 +197,15 @@ export {
RoleAssignment,
} from "./l1-resources/federated-settings-org-role-mapping";
+export {
+ CfnFlexCluster,
+ CfnFlexClusterProps,
+ ProviderSettings,
+ BackupSettings,
+ ConnectionStrings as FlexConnectionStrings, // Conflicts with cluster
+ Tag as FlexTag, // Conflicts with cluster
+} from "./l1-resources/flex-cluster";
+
export {
CfnGlobalClusterConfig,
CfnGlobalClusterConfigProps,
diff --git a/src/l1-resources/flex-cluster/README.md b/src/l1-resources/flex-cluster/README.md
new file mode 100644
index 00000000..84a64fb2
--- /dev/null
+++ b/src/l1-resources/flex-cluster/README.md
@@ -0,0 +1,74 @@
+# flex-cluster
+
+The official [MongoDB Atlas](https://www.mongodb.com/) AWS CDK resource for Node.js.
+
+> AWS CDK [L1 construct] and data structures for the [AWS CloudFormation Registry] type `MongoDB::Atlas::FlexCluster`.
+
+[L1 construct]: https://docs.aws.amazon.com/cdk/latest/guide/constructs.html
+[AWS CloudFormation Registry]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry.html
+
+## Description
+
+The flex cluster resource provides access to your flex cluster configurations. The resource lets you create, edit and delete flex clusters. For more information, see [The MongoDB Atlas Flex Tier](https://www.mongodb.com/company/blog/product-release-announcements/dynamic-workloads-predictable-costs-mongodb-atlas-flex-tier).
+
+## MongoDB Atlas API Docs
+
+For more information about the API refer to: [API Endpoints](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Flex-Clusters)
+
+## Usage
+
+In order to use this library, you will need to activate this AWS CloudFormation Registry type in your account. You can do this via the AWS Management Console or using the [AWS CLI](https://aws.amazon.com/cli/) using the following command:
+
+```sh
+aws cloudformation activate-type \
+ --type-name MongoDB::Atlas::FlexCluster \
+ --publisher-id \
+ --type RESOURCE \
+ --execution-role-arn ROLE-ARN
+```
+
+Alternatively:
+
+```sh
+aws cloudformation activate-type \
+ --public-type-arn arn:aws:cloudformation:us-east-1::type/resource//MongoDB-Atlas-FlexCluster \
+ --execution-role-arn ROLE-ARN
+```
+
+You can find more information about activating this type in the [AWS CloudFormation documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/registry-public.html).
+
+## Example: [flex-cluster.ts](../../../examples/l1-resources/flex-cluster.ts)
+
+```ts
+import { CfnFlexCluster } from 'awscdk-resources-mongodbatlas';
+
+const flexClusterRes = new CfnFlexCluster(this, 'FlexClusterResource', {
+ name: atlasProps.clusterName,
+ projectId: projectRes.attrId,
+ profile: atlasProps.profile,
+ providerSettings: {
+ backingProviderName: atlasProps.backingProvider,
+ regionName: atlasProps.region,
+ },
+ tags: [
+ {
+ key: "env",
+ value: "development",
+ },
+ ],
+});
+```
+
+## Feedback
+
+This library is auto-generated and published to all supported programming languages by the [cdklabs/cdk-cloudformation] project based on the API schema published for `MongoDB::Atlas::FlexCluster`.
+
+* Issues related to this generated library should be [reported here](https://github.com/cdklabs/cdk-cloudformation/issues/new?title=Issue+with+%40cdk-cloudformation%2Fmongodb-atlas-flexcluster+v1.0.0).
+* Issues related to `MongoDB::Atlas::FlexCluster` should be reported to the [publisher](https://github.com/mongodb/mongodbatlas-cloudformation-resources/issues).
+* Feature requests should be [reported here](https://feedback.mongodb.com/forums/924145-atlas?category_id=392596)
+
+[cdklabs/cdk-cloudformation]: https://github.com/cdklabs/cdk-cloudformation
+
+## License
+
+Distributed under the Apache-2.0 License.
diff --git a/src/l1-resources/flex-cluster/index.ts b/src/l1-resources/flex-cluster/index.ts
new file mode 100644
index 00000000..99b20b6a
--- /dev/null
+++ b/src/l1-resources/flex-cluster/index.ts
@@ -0,0 +1,340 @@
+// Generated by cdk-import
+import * as cdk from "aws-cdk-lib";
+import * as constructs from "constructs";
+
+/**
+ * The flex cluster resource provides access to your flex cluster configurations. The resource lets you create, edit and delete flex clusters. The resource requires your Project ID.
+ *
+ * @schema CfnFlexClusterProps
+ */
+export interface CfnFlexClusterProps {
+ /**
+ * Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used
+ *
+ * @schema CfnFlexClusterProps#Profile
+ */
+ readonly profile?: string;
+
+ /**
+ * Unique identifier of the project the cluster belongs to.
+ *
+ * @schema CfnFlexClusterProps#ProjectId
+ */
+ readonly projectId: string;
+
+ /**
+ * Human-readable label that identifies the flex cluster.
+ *
+ * @schema CfnFlexClusterProps#Name
+ */
+ readonly name: string;
+
+ /**
+ * @schema CfnFlexClusterProps#ProviderSettings
+ */
+ readonly providerSettings: ProviderSettings;
+
+ /**
+ * @schema CfnFlexClusterProps#BackupSettings
+ */
+ readonly backupSettings?: BackupSettings;
+
+ /**
+ * @schema CfnFlexClusterProps#ConnectionStrings
+ */
+ readonly connectionStrings?: ConnectionStrings;
+
+ /**
+ * Flag that indicates whether termination protection is enabled on the cluster. If set to true, MongoDB Cloud won't delete the cluster. If set to false, MongoDB Cloud will delete the cluster.
+ *
+ * @schema CfnFlexClusterProps#TerminationProtectionEnabled
+ */
+ readonly terminationProtectionEnabled?: boolean;
+
+ /**
+ * Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the flex cluster.
+ *
+ * @schema CfnFlexClusterProps#Tags
+ */
+ readonly tags?: Tag[];
+}
+
+/**
+ * Converts an object of type 'CfnFlexClusterProps' to JSON representation.
+ */
+/* eslint-disable max-len, quote-props */
+export function toJson_CfnFlexClusterProps(
+ obj: CfnFlexClusterProps | undefined
+): Record | undefined {
+ if (obj === undefined) {
+ return undefined;
+ }
+ const result = {
+ Profile: obj.profile,
+ ProjectId: obj.projectId,
+ Name: obj.name,
+ ProviderSettings: toJson_ProviderSettings(obj.providerSettings),
+ BackupSettings: toJson_BackupSettings(obj.backupSettings),
+ ConnectionStrings: toJson_ConnectionStrings(obj.connectionStrings),
+ TerminationProtectionEnabled: obj.terminationProtectionEnabled,
+ Tags: obj.tags?.map((y) => toJson_Tag(y)),
+ };
+ // filter undefined values
+ return Object.entries(result).reduce(
+ (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }),
+ {}
+ );
+}
+/* eslint-enable max-len, quote-props */
+
+/**
+ * Group of cloud provider settings that configure the provisioned MongoDB flex cluster.
+ *
+ * @schema ProviderSettings
+ */
+export interface ProviderSettings {
+ /**
+ * Cloud service provider on which MongoDB Cloud provisioned the flex cluster.
+ *
+ * @schema ProviderSettings#BackingProviderName
+ */
+ readonly backingProviderName: string;
+
+ /**
+ * Human-readable label that identifies the geographic location of your MongoDB flex cluster. The region you choose can affect network latency for clients accessing your databases.
+ *
+ * @schema ProviderSettings#RegionName
+ */
+ readonly regionName: string;
+
+ /**
+ * Storage capacity available to the flex cluster expressed in gigabytes.
+ *
+ * @schema ProviderSettings#DiskSizeGB
+ */
+ readonly diskSizeGb?: number;
+
+ /**
+ * Human-readable label that identifies the cloud service provider.
+ *
+ * @schema ProviderSettings#ProviderName
+ */
+ readonly providerName?: string;
+}
+
+/**
+ * Converts an object of type 'ProviderSettings' to JSON representation.
+ */
+/* eslint-disable max-len, quote-props */
+export function toJson_ProviderSettings(
+ obj: ProviderSettings | undefined
+): Record | undefined {
+ if (obj === undefined) {
+ return undefined;
+ }
+ const result = {
+ BackingProviderName: obj.backingProviderName,
+ RegionName: obj.regionName,
+ DiskSizeGB: obj.diskSizeGb,
+ ProviderName: obj.providerName,
+ };
+ // filter undefined values
+ return Object.entries(result).reduce(
+ (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }),
+ {}
+ );
+}
+/* eslint-enable max-len, quote-props */
+
+/**
+ * Flex backup configuration
+ *
+ * @schema BackupSettings
+ */
+export interface BackupSettings {
+ /**
+ * Flag that indicates whether backups are performed for this flex cluster. Backup uses flex cluster backups.
+ *
+ * @schema BackupSettings#Enabled
+ */
+ readonly enabled?: boolean;
+}
+
+/**
+ * Converts an object of type 'BackupSettings' to JSON representation.
+ */
+/* eslint-disable max-len, quote-props */
+export function toJson_BackupSettings(
+ obj: BackupSettings | undefined
+): Record | undefined {
+ if (obj === undefined) {
+ return undefined;
+ }
+ const result = {
+ Enabled: obj.enabled,
+ };
+ // filter undefined values
+ return Object.entries(result).reduce(
+ (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }),
+ {}
+ );
+}
+/* eslint-enable max-len, quote-props */
+
+/**
+ * Collection of Uniform Resource Locators that point to the MongoDB database.
+ *
+ * @schema ConnectionStrings
+ */
+export interface ConnectionStrings {
+ /**
+ * Public connection string that you can use to connect to this cluster. This connection string uses the mongodb:// protocol.
+ *
+ * @schema ConnectionStrings#Standard
+ */
+ readonly standard?: string;
+
+ /**
+ * Public connection string that you can use to connect to this flex cluster. This connection string uses the mongodb+srv:// protocol.
+ *
+ * @schema ConnectionStrings#StandardSrv
+ */
+ readonly standardSrv?: string;
+}
+
+/**
+ * Converts an object of type 'ConnectionStrings' to JSON representation.
+ */
+/* eslint-disable max-len, quote-props */
+export function toJson_ConnectionStrings(
+ obj: ConnectionStrings | undefined
+): Record | undefined {
+ if (obj === undefined) {
+ return undefined;
+ }
+ const result = {
+ Standard: obj.standard,
+ StandardSrv: obj.standardSrv,
+ };
+ // filter undefined values
+ return Object.entries(result).reduce(
+ (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }),
+ {}
+ );
+}
+/* eslint-enable max-len, quote-props */
+
+/**
+ * List that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the cluster.
+ *
+ * @schema tag
+ */
+export interface Tag {
+ /**
+ * Constant that defines the set of the tag. For example, environment in the environment : production tag.
+ *
+ * @schema tag#Key
+ */
+ readonly key: string;
+
+ /**
+ * Variable that belongs to the set of the tag. For example, production in the environment : production tag.
+ *
+ * @schema tag#Value
+ */
+ readonly value: string;
+}
+
+/**
+ * Converts an object of type 'Tag' to JSON representation.
+ */
+/* eslint-disable max-len, quote-props */
+export function toJson_Tag(
+ obj: Tag | undefined
+): Record | undefined {
+ if (obj === undefined) {
+ return undefined;
+ }
+ const result = {
+ Key: obj.key,
+ Value: obj.value,
+ };
+ // filter undefined values
+ return Object.entries(result).reduce(
+ (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }),
+ {}
+ );
+}
+/* eslint-enable max-len, quote-props */
+
+/**
+ * A CloudFormation `MongoDB::Atlas::FlexCluster`
+ *
+ * @cloudformationResource MongoDB::Atlas::FlexCluster
+ * @stability external
+ */
+export class CfnFlexCluster extends cdk.CfnResource {
+ /**
+ * The CloudFormation resource type name for this resource class.
+ */
+ public static readonly CFN_RESOURCE_TYPE_NAME = "MongoDB::Atlas::FlexCluster";
+
+ /**
+ * Resource props.
+ */
+ public readonly props: CfnFlexClusterProps;
+
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.Id`
+ */
+ public readonly attrId: string;
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.StateName`
+ */
+ public readonly attrStateName: string;
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.ClusterType`
+ */
+ public readonly attrClusterType: string;
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.CreateDate`
+ */
+ public readonly attrCreateDate: string;
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.MongoDBVersion`
+ */
+ public readonly attrMongoDBVersion: string;
+ /**
+ * Attribute `MongoDB::Atlas::FlexCluster.VersionReleaseSystem`
+ */
+ public readonly attrVersionReleaseSystem: string;
+
+ /**
+ * Create a new `MongoDB::Atlas::FlexCluster`.
+ *
+ * @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: CfnFlexClusterProps
+ ) {
+ super(scope, id, {
+ type: CfnFlexCluster.CFN_RESOURCE_TYPE_NAME,
+ properties: toJson_CfnFlexClusterProps(props)!,
+ });
+
+ this.props = props;
+
+ this.attrId = cdk.Token.asString(this.getAtt("Id"));
+ this.attrStateName = cdk.Token.asString(this.getAtt("StateName"));
+ this.attrClusterType = cdk.Token.asString(this.getAtt("ClusterType"));
+ this.attrCreateDate = cdk.Token.asString(this.getAtt("CreateDate"));
+ this.attrMongoDBVersion = cdk.Token.asString(this.getAtt("MongoDBVersion"));
+ this.attrVersionReleaseSystem = cdk.Token.asString(
+ this.getAtt("VersionReleaseSystem")
+ );
+ }
+}
diff --git a/src/l1-resources/flex-cluster/integ.default.ts b/src/l1-resources/flex-cluster/integ.default.ts
new file mode 100644
index 00000000..e5e923e2
--- /dev/null
+++ b/src/l1-resources/flex-cluster/integ.default.ts
@@ -0,0 +1,27 @@
+import * as cdk from "aws-cdk-lib";
+import { CfnFlexCluster } from "./index";
+
+const app = new cdk.App();
+const stack = new cdk.Stack(app, "atlas-flex-cluster-test", {
+ env: {
+ region: process.env.CDK_DEFAULT_REGION,
+ account: process.env.CDK_DEFAULT_ACCOUNT,
+ },
+});
+
+const atlasProject = "";
+
+new CfnFlexCluster(stack, "AtlasFlexCluster", {
+ projectId: atlasProject,
+ name: "TestFlexCluster",
+ providerSettings: {
+ backingProviderName: "AWS",
+ regionName: "US_EAST_1",
+ },
+ tags: [
+ {
+ key: "env",
+ value: "development",
+ },
+ ],
+});