createDBShardGroup method
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
May throw DBClusterNotFoundFault.
May throw DBShardGroupAlreadyExistsFault.
May throw InvalidDBClusterStateFault.
May throw InvalidVPCNetworkStateFault.
May throw MaxDBShardGroupLimitReached.
May throw NetworkTypeNotSupported.
May throw UnsupportedDBEngineVersionFault.
Parameter dBClusterIdentifier :
The name of the primary DB cluster for the DB shard group.
Parameter dBShardGroupIdentifier :
The name of the DB shard group.
Parameter maxACU :
The maximum capacity of the DB shard group in Aurora capacity units
(ACUs).
Parameter computeRedundancy :
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.
Parameter minACU :
The minimum capacity of the DB shard group in Aurora capacity units
(ACUs).
Parameter publiclyAccessible :
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.
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.
Implementation
Future<DBShardGroup> createDBShardGroup({
required String dBClusterIdentifier,
required String dBShardGroupIdentifier,
required double maxACU,
int? computeRedundancy,
double? minACU,
bool? publiclyAccessible,
List<Tag>? tags,
}) async {
final $request = <String, String>{
'DBClusterIdentifier': dBClusterIdentifier,
'DBShardGroupIdentifier': dBShardGroupIdentifier,
'MaxACU': maxACU.toString(),
if (computeRedundancy != null)
'ComputeRedundancy': computeRedundancy.toString(),
if (minACU != null) 'MinACU': minACU.toString(),
if (publiclyAccessible != null)
'PubliclyAccessible': publiclyAccessible.toString(),
if (tags != null)
if (tags.isEmpty)
'Tags': ''
else
for (var i1 = 0; i1 < tags.length; i1++)
for (var e3 in tags[i1].toQueryMap().entries)
'Tags.Tag.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'CreateDBShardGroup',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateDBShardGroupResult',
);
return DBShardGroup.fromXml($result);
}