Metadata-Version: 2.1
Name: aws-cdk.aws-dsql-alpha
Version: 2.253.0a0
Summary: The CDK Construct Library for AWS::DSQL
Home-page: https://github.com/aws/aws-cdk
Author: Amazon Web Services
License: Apache-2.0
Project-URL: Source, https://github.com/aws/aws-cdk.git
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Classifier: Framework :: AWS CDK
Classifier: Framework :: AWS CDK :: 2
Requires-Python: ~=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: aws-cdk-lib <3.0.0,>=2.253.0
Requires-Dist: constructs <11.0.0,>=10.5.0
Requires-Dist: jsii <2.0.0,>=1.128.0
Requires-Dist: publication >=0.0.3
Requires-Dist: typeguard ==2.13.3

# Amazon Aurora DSQL Construct Library

<!--BEGIN STABILITY BANNER-->---


![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)

> The APIs of higher level constructs in this module are experimental and under active development.
> They are subject to non-backward compatible changes or removal in any future version. These are
> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be
> announced in the release notes. This means that while you may use them, you may need to update
> your source code when upgrading to a newer version of this package.

---
<!--END STABILITY BANNER-->

Amazon Aurora DSQL is a serverless, distributed relational database service optimized for transactional workloads. Aurora DSQL offers virtually unlimited scale and doesn't require you to manage infrastructure. The active-active highly available architecture provides 99.99% single-Region and 99.999% multi-Region availability.

The `@aws-cdk/aws-dsql-alpha` package contains primitives for setting up Aurora DSQL clusters.

```python
import aws_cdk.aws_dsql_alpha as dsql
```

## Creating an Aurora DSQL Cluster

To create an Aurora DSQL cluster, define a `Cluster`:

```python
cluster = dsql.Cluster(self, "Cluster",
    cluster_name="my-dsql-cluster",
    deletion_protection=True
)
```

## Granting Connect Access

You can grant IAM principals the ability to connect to the cluster:

```python
role = iam.Role(self, "DBRole", assumed_by=iam.AccountPrincipal(self.account))
cluster = dsql.Cluster(self, "Cluster")

# Use one of the following statements to grant the role the necessary permissions
cluster.grant_connect(role) # Grant the role dsql:DbConnect
cluster.grant_connect_admin(role) # Grant the role dsql:DbConnectAdmin
cluster.grant(role, "dsql:DbConnect")
```
