ServerlessClusterAttributes Struct
Properties that describe an existing cluster instance.
| Source | aws-rds/lib/serverless-cluster.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_rds as rds } from 'aws-cdk-lib';
import { aws_secretsmanager as secretsmanager } from 'aws-cdk-lib';
declare const secret: secretsmanager.Secret;
declare const securityGroup: ec2.SecurityGroup;
const serverlessClusterAttributes: rds.ServerlessClusterAttributes = {
clusterIdentifier: 'clusterIdentifier',
// the properties below are optional
clusterEndpointAddress: 'clusterEndpointAddress',
port: 123,
readerEndpointAddress: 'readerEndpointAddress',
secret: secret,
securityGroups: [securityGroup],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
from aws_cdk import aws_rds as rds
from aws_cdk import aws_secretsmanager as secretsmanager
# secret: secretsmanager.Secret
# security_group: ec2.SecurityGroup
serverless_cluster_attributes = rds.ServerlessClusterAttributes(
cluster_identifier="clusterIdentifier",
# the properties below are optional
cluster_endpoint_address="clusterEndpointAddress",
port=123,
reader_endpoint_address="readerEndpointAddress",
secret=secret,
security_groups=[security_group]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
import software.amazon.awscdk.services.rds.*;
import software.amazon.awscdk.services.secretsmanager.*;
Secret secret;
SecurityGroup securityGroup;
ServerlessClusterAttributes serverlessClusterAttributes = ServerlessClusterAttributes.builder()
.clusterIdentifier("clusterIdentifier")
// the properties below are optional
.clusterEndpointAddress("clusterEndpointAddress")
.port(123)
.readerEndpointAddress("readerEndpointAddress")
.secret(secret)
.securityGroups(List.of(securityGroup))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.RDS;
using Amazon.CDK.AWS.SecretsManager;
Secret secret;
SecurityGroup securityGroup;
var serverlessClusterAttributes = new ServerlessClusterAttributes {
ClusterIdentifier = "clusterIdentifier",
// the properties below are optional
ClusterEndpointAddress = "clusterEndpointAddress",
Port = 123,
ReaderEndpointAddress = "readerEndpointAddress",
Secret = secret,
SecurityGroups = new [] { securityGroup }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var secret Secret
var securityGroup SecurityGroup
serverlessClusterAttributes := &ServerlessClusterAttributes{
ClusterIdentifier: jsii.String("clusterIdentifier"),
// the properties below are optional
ClusterEndpointAddress: jsii.String("clusterEndpointAddress"),
Port: jsii.Number(123),
ReaderEndpointAddress: jsii.String("readerEndpointAddress"),
Secret: secret,
SecurityGroups: []ISecurityGroup{
securityGroup,
},
}
Properties
clusterEndpointAddressoptionalstringcluster_endpoint_addressoptionalstrclusterEndpointAddressoptionalStringClusterEndpointAddressoptionalstringClusterEndpointAddressoptional*string #Cluster endpoint address.
Default: no endpoint address
clusterIdentifierstringcluster_identifierstrclusterIdentifierStringClusterIdentifierstringClusterIdentifier*string required #Identifier for the cluster.
portoptionalnumberportoptionalint | floatportoptionalNumberPortoptionaldoublePortoptional*float64 = none #The database port.
readerEndpointAddressoptionalstringreader_endpoint_addressoptionalstrreaderEndpointAddressoptionalStringReaderEndpointAddressoptionalstringReaderEndpointAddressoptional*string #Reader endpoint address.
Default: no reader address
secretoptionalISecretsecretoptionalISecretsecretoptionalISecretSecretoptionalISecretSecretoptionalISecret #The secret attached to the database cluster.
Default: no secret
securityGroupsoptionalISecurityGroup[]security_groupsoptionaltyping.List[ISecurityGroup]securityGroupsoptionalList<ISecurityGroup>SecurityGroupsoptionalISecurityGroup[]SecurityGroupsoptional*[]ISecurityGroup #The security groups of the database cluster.
Default: no security groups