CreateDBShardGroupCommand

Creates a new DB shard group for Aurora Limitless Database. You must enable Aurora Limitless Database to create a DB shard group.

Valid for: Aurora DB clusters only

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { RDSClient, CreateDBShardGroupCommand } from "@aws-sdk/client-rds"; // ES Modules import
// const { RDSClient, CreateDBShardGroupCommand } = require("@aws-sdk/client-rds"); // CommonJS import
const client = new RDSClient(config);
const input = { // CreateDBShardGroupMessage
  DBShardGroupIdentifier: "STRING_VALUE", // required
  DBClusterIdentifier: "STRING_VALUE", // required
  ComputeRedundancy: Number("int"),
  MaxACU: Number("double"), // required
  MinACU: Number("double"),
  PubliclyAccessible: true || false,
  Tags: [ // TagList
    { // Tag
      Key: "STRING_VALUE",
      Value: "STRING_VALUE",
    },
  ],
};
const command = new CreateDBShardGroupCommand(input);
const response = await client.send(command);
// { // DBShardGroup
//   DBShardGroupResourceId: "STRING_VALUE",
//   DBShardGroupIdentifier: "STRING_VALUE",
//   DBClusterIdentifier: "STRING_VALUE",
//   MaxACU: Number("double"),
//   MinACU: Number("double"),
//   ComputeRedundancy: Number("int"),
//   Status: "STRING_VALUE",
//   PubliclyAccessible: true || false,
//   Endpoint: "STRING_VALUE",
//   DBShardGroupArn: "STRING_VALUE",
//   TagList: [ // TagList
//     { // Tag
//       Key: "STRING_VALUE",
//       Value: "STRING_VALUE",
//     },
//   ],
// };

CreateDBShardGroupCommand Input

See CreateDBShardGroupCommandInput for more details

Parameter
Type
Description
DBClusterIdentifier
Required
string | undefined

The name of the primary DB cluster for the DB shard group.

DBShardGroupIdentifier
Required
string | undefined

The name of the DB shard group.

MaxACU
Required
number | undefined

The maximum capacity of the DB shard group in Aurora capacity units (ACUs).

ComputeRedundancy
number | undefined

Specifies whether to create standby standby DB data access shard for the DB shard group. Valid values are the following:

  • 0 - Creates a DB shard group without a standby DB data access shard. This is the default value.

  • 1 - Creates a DB shard group with a standby DB data access shard in a different Availability Zone (AZ).

  • 2 - Creates a DB shard group with two standby DB data access shard in two different AZs.

MinACU
number | undefined

The minimum capacity of the DB shard group in Aurora capacity units (ACUs).

PubliclyAccessible
boolean | undefined

Specifies whether the DB shard group is publicly accessible.

When the DB shard group is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB shard group's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB shard group's VPC. Access to the DB shard group is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB shard group doesn't permit it.

When the DB shard group isn't publicly accessible, it is an internal DB shard group with a DNS name that resolves to a private IP address.

Default: The default behavior varies depending on whether DBSubnetGroupName is specified.

If DBSubnetGroupName isn't specified, and PubliclyAccessible isn't specified, the following applies:

  • If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB shard group is private.

  • If the default VPC in the target Region has an internet gateway attached to it, the DB shard group is public.

If DBSubnetGroupName is specified, and PubliclyAccessible isn't specified, the following applies:

  • If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB shard group is private.

  • If the subnets are part of a VPC that has an internet gateway attached to it, the DB shard group is public.

Tags
Tag[] | undefined

A list of tags.

For more information, see Tagging Amazon RDS resources  in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources  in the Amazon Aurora User Guide.

CreateDBShardGroupCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
ComputeRedundancy
number | undefined

Specifies whether to create standby DB shard groups for the DB shard group. Valid values are the following:

  • 0 - Creates a DB shard group without a standby DB shard group. This is the default value.

  • 1 - Creates a DB shard group with a standby DB shard group in a different Availability Zone (AZ).

  • 2 - Creates a DB shard group with two standby DB shard groups in two different AZs.

DBClusterIdentifier
string | undefined

The name of the primary DB cluster for the DB shard group.

DBShardGroupArn
string | undefined

The Amazon Resource Name (ARN) for the DB shard group.

DBShardGroupIdentifier
string | undefined

The name of the DB shard group.

DBShardGroupResourceId
string | undefined

The Amazon Web Services Region-unique, immutable identifier for the DB shard group.

Endpoint
string | undefined

The connection endpoint for the DB shard group.

MaxACU
number | undefined

The maximum capacity of the DB shard group in Aurora capacity units (ACUs).

MinACU
number | undefined

The minimum capacity of the DB shard group in Aurora capacity units (ACUs).

PubliclyAccessible
boolean | undefined

Indicates whether the DB shard group is publicly accessible.

When the DB shard group is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB shard group's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB shard group's VPC. Access to the DB shard group is ultimately controlled by the security group it uses. That public access isn't permitted if the security group assigned to the DB shard group doesn't permit it.

When the DB shard group isn't publicly accessible, it is an internal DB shard group with a DNS name that resolves to a private IP address.

For more information, see CreateDBShardGroup.

This setting is only for Aurora Limitless Database.

Status
string | undefined

The status of the DB shard group.

TagList
Tag[] | undefined

A list of tags.

For more information, see Tagging Amazon RDS resources  in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources  in the Amazon Aurora User Guide.

Throws

Name
Fault
Details
DBClusterNotFoundFault
client

DBClusterIdentifier doesn't refer to an existing DB cluster.

DBShardGroupAlreadyExistsFault
client

The specified DB shard group name must be unique in your Amazon Web Services account in the specified Amazon Web Services Region.

InvalidDBClusterStateFault
client

The requested operation can't be performed while the cluster is in this state.

InvalidVPCNetworkStateFault
client

The DB subnet group doesn't cover all Availability Zones after it's created because of users' change.

MaxDBShardGroupLimitReached
client

The maximum number of DB shard groups for your Amazon Web Services account in the specified Amazon Web Services Region has been reached.

NetworkTypeNotSupported
client

The network type is invalid for the DB instance. Valid nework type values are IPV4 and DUAL.

UnsupportedDBEngineVersionFault
client

The specified DB engine version isn't supported for Aurora Limitless Database.

RDSServiceException
Base exception class for all service exceptions from RDS service.