updateProxy method
Updates the properties of the specified proxy.
May throw InternalServerError.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnsupportedOperationException.
Parameter natGatewayId :
The NAT Gateway the proxy is attached to.
Parameter updateToken :
A token used for optimistic locking. Network Firewall returns a token to
your requests that access the proxy. The token marks the state of the
proxy resource at the time of the request.
To make changes to the proxy, you provide the token in your request.
Network Firewall uses the token to ensure that the proxy hasn't changed
since you last retrieved it. If it has changed, the operation fails with
an InvalidTokenException. If this happens, retrieve the proxy
again to get a current copy of it with a current token. Reapply your
changes as needed, then try the operation again using the new token.
Parameter listenerPropertiesToAdd :
Listener properties for HTTP and HTTPS traffic to add.
Parameter listenerPropertiesToRemove :
Listener properties for HTTP and HTTPS traffic to remove.
Parameter proxyArn :
The Amazon Resource Name (ARN) of a proxy.
You must specify the ARN or the name, and you can specify both.
Parameter proxyName :
The descriptive name of the proxy. You can't change the name of a proxy
after you create it.
You must specify the ARN or the name, and you can specify both.
Parameter tlsInterceptProperties :
TLS decryption on traffic to filter on attributes in the HTTP header.
Implementation
Future<UpdateProxyResponse> updateProxy({
required String natGatewayId,
required String updateToken,
List<ListenerPropertyRequest>? listenerPropertiesToAdd,
List<ListenerPropertyRequest>? listenerPropertiesToRemove,
String? proxyArn,
String? proxyName,
TlsInterceptPropertiesRequest? tlsInterceptProperties,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'NetworkFirewall_20201112.UpdateProxy'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'NatGatewayId': natGatewayId,
'UpdateToken': updateToken,
if (listenerPropertiesToAdd != null)
'ListenerPropertiesToAdd': listenerPropertiesToAdd,
if (listenerPropertiesToRemove != null)
'ListenerPropertiesToRemove': listenerPropertiesToRemove,
if (proxyArn != null) 'ProxyArn': proxyArn,
if (proxyName != null) 'ProxyName': proxyName,
if (tlsInterceptProperties != null)
'TlsInterceptProperties': tlsInterceptProperties,
},
);
return UpdateProxyResponse.fromJson(jsonResponse.body);
}