AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates a new Amazon Neptune DB cluster.

You can use the ReplicationSourceIdentifier parameter to create the DB cluster as a Read Replica of another DB cluster or Amazon Neptune DB instance.

Note that when you create a new cluster using CreateDBCluster directly, deletion protection is disabled by default (when you create a new production cluster in the console, deletion protection is enabled by default). You can only delete a DB cluster if its DeletionProtection field is set to false.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to CreateDBClusterAsync.

Namespace: Amazon.Neptune
Assembly: AWSSDK.Neptune.dll
Version: 3.x.y.z

Syntax

C#
public abstract CreateDBClusterResponse CreateDBCluster(
         CreateDBClusterRequest request
)
Parameters
request
Type: Amazon.Neptune.Model.CreateDBClusterRequest

Container for the necessary parameters to execute the CreateDBCluster service method.

Return Value
The response from the CreateDBCluster service method, as returned by Neptune.

Exceptions

ExceptionCondition
DBClusterAlreadyExistsException User already has a DB cluster with the given identifier.
DBClusterNotFoundException DBClusterIdentifier does not refer to an existing DB cluster.
DBClusterParameterGroupNotFoundException DBClusterParameterGroupName does not refer to an existing DB Cluster parameter group.
DBClusterQuotaExceededException User attempted to create a new DB cluster and the user has already reached the maximum allowed DB cluster quota.
DBInstanceNotFoundException DBInstanceIdentifier does not refer to an existing DB instance.
DBSubnetGroupDoesNotCoverEnoughAZsException Subnets in the DB subnet group should cover at least two Availability Zones unless there is only one Availability Zone.
DBSubnetGroupNotFoundException DBSubnetGroupName does not refer to an existing DB subnet group.
InsufficientStorageClusterCapacityException There is insufficient storage available for the current action. You may be able to resolve this error by updating your subnet group to use different Availability Zones that have more storage available.
InvalidDBClusterStateException The DB cluster is not in a valid state.
InvalidDBInstanceStateException The specified DB instance is not in the available state.
InvalidDBSubnetGroupStateException The DB subnet group cannot be deleted because it is in use.
InvalidSubnetException The requested subnet is invalid, or multiple subnets were requested that are not all in a common VPC.
InvalidVPCNetworkStateException DB subnet group does not cover all Availability Zones after it is created because users' change.
KMSKeyNotAccessibleException Error accessing KMS key.
StorageQuotaExceededException Request would result in user exceeding the allowed amount of storage available across all DB instances.

Examples

This example creates a DB cluster.

To create a DB cluster


var response = client.CreateDBCluster(new CreateDBClusterRequest 
{
    AvailabilityZones = new List<string> {
        "us-east-1a"
    },
    BackupRetentionPeriod = 1,
    DBClusterIdentifier = "mydbcluster",
    DBClusterParameterGroupName = "mydbclusterparametergroup",
    DatabaseName = "myauroradb",
    Engine = "aurora",
    EngineVersion = "5.6.10a",
    MasterUserPassword = "mypassword",
    MasterUsername = "myuser",
    Port = 3306,
    StorageEncrypted = true
});

DBCluster dbCluster = response.DBCluster;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also