createProxy method

Future<CreateProxyResponse> createProxy({
  1. required String natGatewayId,
  2. required String proxyName,
  3. required TlsInterceptPropertiesRequest tlsInterceptProperties,
  4. List<ListenerPropertyRequest>? listenerProperties,
  5. String? proxyConfigurationArn,
  6. String? proxyConfigurationName,
  7. List<Tag>? tags,
})

Creates an Network Firewall Proxy

Attaches a Proxy configuration to a NAT Gateway.

To manage a proxy's tags, use the standard Amazon Web Services resource tagging operations, ListTagsForResource, TagResource, and UntagResource.

To retrieve information about proxies, use ListProxies and DescribeProxy.

May throw InternalServerError. May throw InvalidRequestException. May throw LimitExceededException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw UnsupportedOperationException.

Parameter natGatewayId : A unique identifier for the NAT gateway to use with proxy resources.

Parameter proxyName : The descriptive name of the proxy. You can't change the name of a proxy after you create it.

Parameter tlsInterceptProperties : TLS decryption on traffic to filter on attributes in the HTTP header.

Parameter listenerProperties : Listener properties for HTTP and HTTPS traffic.

Parameter proxyConfigurationArn : The Amazon Resource Name (ARN) of a proxy configuration.

You must specify the ARN or the name, and you can specify both.

Parameter proxyConfigurationName : The descriptive name of the proxy configuration. You can't change the name of a proxy configuration after you create it.

You must specify the ARN or the name, and you can specify both.

Parameter tags : The key:value pairs to associate with the resource.

Implementation

Future<CreateProxyResponse> createProxy({
  required String natGatewayId,
  required String proxyName,
  required TlsInterceptPropertiesRequest tlsInterceptProperties,
  List<ListenerPropertyRequest>? listenerProperties,
  String? proxyConfigurationArn,
  String? proxyConfigurationName,
  List<Tag>? tags,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'NetworkFirewall_20201112.CreateProxy'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'NatGatewayId': natGatewayId,
      'ProxyName': proxyName,
      'TlsInterceptProperties': tlsInterceptProperties,
      if (listenerProperties != null)
        'ListenerProperties': listenerProperties,
      if (proxyConfigurationArn != null)
        'ProxyConfigurationArn': proxyConfigurationArn,
      if (proxyConfigurationName != null)
        'ProxyConfigurationName': proxyConfigurationName,
      if (tags != null) 'Tags': tags,
    },
  );

  return CreateProxyResponse.fromJson(jsonResponse.body);
}