createDBClusterEndpoint method
Creates a new custom endpoint and associates it with an Amazon Aurora DB cluster.
May throw DBClusterEndpointQuotaExceededFault. May throw DBClusterEndpointAlreadyExistsFault. May throw DBClusterNotFoundFault. May throw InvalidDBClusterStateFault. May throw DBInstanceNotFoundFault. 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. Only relevant 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 {
ArgumentError.checkNotNull(
dBClusterEndpointIdentifier, 'dBClusterEndpointIdentifier');
ArgumentError.checkNotNull(dBClusterIdentifier, 'dBClusterIdentifier');
ArgumentError.checkNotNull(endpointType, 'endpointType');
final $request = <String, dynamic>{};
$request['DBClusterEndpointIdentifier'] = dBClusterEndpointIdentifier;
$request['DBClusterIdentifier'] = dBClusterIdentifier;
$request['EndpointType'] = endpointType;
excludedMembers?.also((arg) => $request['ExcludedMembers'] = arg);
staticMembers?.also((arg) => $request['StaticMembers'] = arg);
tags?.also((arg) => $request['Tags'] = arg);
final $result = await _protocol.send(
$request,
action: 'CreateDBClusterEndpoint',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['CreateDBClusterEndpointMessage'],
shapes: shapes,
resultWrapper: 'CreateDBClusterEndpointResult',
);
return DBClusterEndpoint.fromXml($result);
}