updateCustomRoutingListener method
Update a listener for a custom routing accelerator.
May throw InvalidArgumentException. May throw InvalidPortRangeException. May throw ListenerNotFoundException. May throw InternalServiceErrorException. May throw LimitExceededException.
Parameter listenerArn
:
The Amazon Resource Name (ARN) of the listener to update.
Parameter portRanges
:
The updated port range to support for connections from clients to your
accelerator. If you remove ports that are currently being used by a subnet
endpoint, the call fails.
Separately, you set port ranges for endpoints. For more information, see About endpoints for custom routing accelerators.
Implementation
Future<UpdateCustomRoutingListenerResponse> updateCustomRoutingListener({
required String listenerArn,
required List<PortRange> portRanges,
}) async {
ArgumentError.checkNotNull(listenerArn, 'listenerArn');
_s.validateStringLength(
'listenerArn',
listenerArn,
0,
255,
isRequired: true,
);
ArgumentError.checkNotNull(portRanges, 'portRanges');
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'GlobalAccelerator_V20180706.UpdateCustomRoutingListener'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ListenerArn': listenerArn,
'PortRanges': portRanges,
},
);
return UpdateCustomRoutingListenerResponse.fromJson(jsonResponse.body);
}