Show / Hide Table of Contents

Class ServerlessCluster

Create an Aurora Serverless Cluster.

Inheritance
System.Object
Construct
Resource
ServerlessCluster
Implements
IServerlessCluster
IResource
IConstruct
Constructs.IConstruct
IDependable
IConnectable
ISecretAttachmentTarget
Inherited Members
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(String, IArnComponents)
Resource.GetResourceNameAttribute(String)
Resource.Env
Resource.PhysicalName
Resource.Stack
Construct.IsConstruct(Object)
Construct.OnPrepare()
Construct.OnSynthesize(ISynthesisSession)
Construct.OnValidate()
Construct.Prepare()
Construct.Synthesize(ISynthesisSession)
Construct.Validate()
Construct.Node
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.AWS.RDS.dll
Syntax (csharp)
public class ServerlessCluster : Resource, IServerlessCluster, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Syntax (vb)
Public Class ServerlessCluster
    Inherits Resource
    Implements IServerlessCluster, IResource, IConstruct, IDependable, IConnectable, ISecretAttachmentTarget
Remarks

Resource: AWS::RDS::DBCluster

ExampleMetadata: infused

Examples
Vpc vpc;

Code code;


var cluster = new ServerlessCluster(this, "AnotherCluster", new ServerlessClusterProps {
    Engine = DatabaseClusterEngine.AURORA_MYSQL,
    Vpc = vpc,  // this parameter is optional for serverless Clusters
    EnableDataApi = true
});
var fn = new Function(this, "MyFunction", new FunctionProps {
    Runtime = Runtime.NODEJS_14_X,
    Handler = "index.handler",
    Code = code,
    Environment = new Dictionary<string, string> {
        { "CLUSTER_ARN", cluster.ClusterArn },
        { "SECRET_ARN", cluster.Secret.SecretArn }
    }
});
cluster.GrantDataApiAccess(fn);

Synopsis

Constructors

ServerlessCluster(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

ServerlessCluster(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

ServerlessCluster(Construct, String, IServerlessClusterProps)

Properties

ClusterArn

The ARN of the cluster.

ClusterEndpoint

The endpoint to use for read/write operations.

ClusterIdentifier

Identifier of the cluster.

ClusterReadEndpoint

The endpoint to use for read/write operations.

Connections

Access to the network connections.

EnableDataApi
NewCfnProps
Secret

The secret attached to this cluster.

SecurityGroups

Methods

AddRotationMultiUser(String, IRotationMultiUserOptions)

Adds the multi user rotation to this cluster.

AddRotationSingleUser(IRotationSingleUserOptions)

Adds the single user rotation of the master password to this cluster.

AsSecretAttachmentTarget()

Renders the secret attachment target specifications.

FromServerlessClusterAttributes(Construct, String, IServerlessClusterAttributes)

Import an existing DatabaseCluster from properties.

GrantDataApiAccess(IGrantable)

Grant the given identity to access to the Data API, including read access to the secret attached to the cluster if present.

Constructors

ServerlessCluster(ByRefValue)

Used by jsii to construct an instance of this class from a Javascript-owned object reference

protected ServerlessCluster(ByRefValue reference)
Parameters
reference Amazon.JSII.Runtime.Deputy.ByRefValue

The Javascript-owned object reference

ServerlessCluster(DeputyBase.DeputyProps)

Used by jsii to construct an instance of this class from DeputyProps

protected ServerlessCluster(DeputyBase.DeputyProps props)
Parameters
props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps

The deputy props

ServerlessCluster(Construct, String, IServerlessClusterProps)

public ServerlessCluster(Construct scope, string id, IServerlessClusterProps props)
Parameters
scope Constructs.Construct
id System.String
props IServerlessClusterProps

Properties

ClusterArn

The ARN of the cluster.

public virtual string ClusterArn { get; }
Property Value

System.String

ClusterEndpoint

The endpoint to use for read/write operations.

public virtual Endpoint ClusterEndpoint { get; }
Property Value

Endpoint

ClusterIdentifier

Identifier of the cluster.

public virtual string ClusterIdentifier { get; }
Property Value

System.String

ClusterReadEndpoint

The endpoint to use for read/write operations.

public virtual Endpoint ClusterReadEndpoint { get; }
Property Value

Endpoint

Connections

Access to the network connections.

public virtual Connections_ Connections { get; }
Property Value

Connections_

EnableDataApi

protected virtual Nullable<bool> EnableDataApi { get; set; }
Property Value

System.Nullable<System.Boolean>

NewCfnProps

protected virtual ICfnDBClusterProps NewCfnProps { get; }
Property Value

ICfnDBClusterProps

Secret

The secret attached to this cluster.

public virtual ISecret Secret { get; }
Property Value

ISecret

SecurityGroups

protected virtual ISecurityGroup[] SecurityGroups { get; }
Property Value

ISecurityGroup[]

Methods

AddRotationMultiUser(String, IRotationMultiUserOptions)

Adds the multi user rotation to this cluster.

public virtual SecretRotation AddRotationMultiUser(string id, IRotationMultiUserOptions options)
Parameters
id System.String
options IRotationMultiUserOptions
Returns

SecretRotation

AddRotationSingleUser(IRotationSingleUserOptions)

Adds the single user rotation of the master password to this cluster.

public virtual SecretRotation AddRotationSingleUser(IRotationSingleUserOptions options = null)
Parameters
options IRotationSingleUserOptions
Returns

SecretRotation

AsSecretAttachmentTarget()

Renders the secret attachment target specifications.

public virtual ISecretAttachmentTargetProps AsSecretAttachmentTarget()
Returns

ISecretAttachmentTargetProps

FromServerlessClusterAttributes(Construct, String, IServerlessClusterAttributes)

Import an existing DatabaseCluster from properties.

public static IServerlessCluster FromServerlessClusterAttributes(Construct scope, string id, IServerlessClusterAttributes attrs)
Parameters
scope Constructs.Construct
id System.String
attrs IServerlessClusterAttributes
Returns

IServerlessCluster

GrantDataApiAccess(IGrantable)

Grant the given identity to access to the Data API, including read access to the secret attached to the cluster if present.

public virtual Grant GrantDataApiAccess(IGrantable grantee)
Parameters
grantee IGrantable

The principal to grant access to.

Returns

Grant

Implements

IServerlessCluster
IResource
IConstruct
Constructs.IConstruct
IDependable
IConnectable
ISecretAttachmentTarget
Back to top Generated by DocFX