createDBClusterEndpoint method
Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
May throw DBClusterEndpointAlreadyExistsFault.
May throw DBClusterEndpointQuotaExceededFault.
May throw DBClusterNotFoundFault.
May throw DBInstanceNotFoundFault.
May throw InvalidDBClusterStateFault.
May throw InvalidDBInstanceStateFault.
Parameter dBClusterEndpointIdentifier :
The identifier to use for the new endpoint. This parameter is stored as a
lowercase string.
Parameter dBClusterIdentifier :
The DB cluster identifier of the DB cluster associated with the endpoint.
This parameter is stored as a lowercase string.
Parameter endpointType :
The type of the endpoint, one of: READER,
WRITER, ANY.
Parameter excludedMembers :
List of DB instance identifiers that aren't part of the custom endpoint
group. All other eligible instances are reachable through the custom
endpoint. This parameter is relevant only if the list of static members is
empty.
Parameter staticMembers :
List of DB instance identifiers that are part of the custom endpoint
group.
Parameter tags :
The tags to be assigned to the Amazon RDS resource.
Implementation
Future<DBClusterEndpoint> createDBClusterEndpoint({
required String dBClusterEndpointIdentifier,
required String dBClusterIdentifier,
required String endpointType,
List<String>? excludedMembers,
List<String>? staticMembers,
List<Tag>? tags,
}) async {
final $request = <String, String>{
'DBClusterEndpointIdentifier': dBClusterEndpointIdentifier,
'DBClusterIdentifier': dBClusterIdentifier,
'EndpointType': endpointType,
if (excludedMembers != null)
if (excludedMembers.isEmpty)
'ExcludedMembers': ''
else
for (var i1 = 0; i1 < excludedMembers.length; i1++)
'ExcludedMembers.member.${i1 + 1}': excludedMembers[i1],
if (staticMembers != null)
if (staticMembers.isEmpty)
'StaticMembers': ''
else
for (var i1 = 0; i1 < staticMembers.length; i1++)
'StaticMembers.member.${i1 + 1}': staticMembers[i1],
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: 'CreateDBClusterEndpoint',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateDBClusterEndpointResult',
);
return DBClusterEndpoint.fromXml($result);
}