createDBProxyEndpoint method
Creates a DBProxyEndpoint. Only applies to proxies that are
associated with Aurora DB clusters. You can use DB proxy endpoints to
specify read/write or read-only access to the DB cluster. You can also use
DB proxy endpoints to access a DB proxy through a different VPC than the
proxy's default VPC.
May throw DBProxyEndpointAlreadyExistsFault.
May throw DBProxyEndpointQuotaExceededFault.
May throw DBProxyNotFoundFault.
May throw InvalidDBProxyStateFault.
May throw InvalidSubnet.
Parameter dBProxyEndpointName :
The name of the DB proxy endpoint to create.
Parameter dBProxyName :
The name of the DB proxy associated with the DB proxy endpoint that you
create.
Parameter vpcSubnetIds :
The VPC subnet IDs for the DB proxy endpoint that you create. You can
specify a different set of subnet IDs than for the original DB proxy.
Parameter endpointNetworkType :
The network type of the DB proxy endpoint. The network type determines the
IP version that the proxy endpoint supports.
Valid values:
-
IPV4- The proxy endpoint supports IPv4 only. -
IPV6- The proxy endpoint supports IPv6 only. -
DUAL- The proxy endpoint supports both IPv4 and IPv6.
IPV4
Constraints:
-
If you specify
IPV6orDUAL, the VPC and all subnets must have an IPv6 CIDR block. -
If you specify
IPV6orDUAL, the VPC tenancy cannot bededicated.
Parameter targetRole :
The role of the DB proxy endpoint. The role determines whether the
endpoint can be used for read/write or only read operations. The default
is READ_WRITE. The only role that proxies for RDS for
Microsoft SQL Server support is READ_WRITE.
Parameter vpcSecurityGroupIds :
The VPC security group IDs for the DB proxy endpoint that you create. You
can specify a different set of security group IDs than for the original DB
proxy. The default is the default security group for the VPC.
Implementation
Future<CreateDBProxyEndpointResponse> createDBProxyEndpoint({
required String dBProxyEndpointName,
required String dBProxyName,
required List<String> vpcSubnetIds,
EndpointNetworkType? endpointNetworkType,
List<Tag>? tags,
DBProxyEndpointTargetRole? targetRole,
List<String>? vpcSecurityGroupIds,
}) async {
final $request = <String, String>{
'DBProxyEndpointName': dBProxyEndpointName,
'DBProxyName': dBProxyName,
if (vpcSubnetIds.isEmpty)
'VpcSubnetIds': ''
else
for (var i1 = 0; i1 < vpcSubnetIds.length; i1++)
'VpcSubnetIds.member.${i1 + 1}': vpcSubnetIds[i1],
if (endpointNetworkType != null)
'EndpointNetworkType': endpointNetworkType.value,
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,
if (targetRole != null) 'TargetRole': targetRole.value,
if (vpcSecurityGroupIds != null)
if (vpcSecurityGroupIds.isEmpty)
'VpcSecurityGroupIds': ''
else
for (var i1 = 0; i1 < vpcSecurityGroupIds.length; i1++)
'VpcSecurityGroupIds.member.${i1 + 1}': vpcSecurityGroupIds[i1],
};
final $result = await _protocol.send(
$request,
action: 'CreateDBProxyEndpoint',
version: '2014-10-31',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'CreateDBProxyEndpointResult',
);
return CreateDBProxyEndpointResponse.fromXml($result);
}