:doc:`NetworkFirewall <../../network-firewall>` / Client / create_proxy

************
create_proxy
************



.. py:method:: NetworkFirewall.Client.create_proxy(**kwargs)

  

  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.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/network-firewall-2020-11-12/CreateProxy>`_  


  **Request Syntax**
  ::

    response = client.create_proxy(
        ProxyName='string',
        NatGatewayId='string',
        ProxyConfigurationName='string',
        ProxyConfigurationArn='string',
        ListenerProperties=[
            {
                'Port': 123,
                'Type': 'HTTP'|'HTTPS'
            },
        ],
        TlsInterceptProperties={
            'PcaArn': 'string',
            'TlsInterceptMode': 'ENABLED'|'DISABLED'
        },
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type ProxyName: string
  :param ProxyName: **[REQUIRED]** 

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

    

  
  :type NatGatewayId: string
  :param NatGatewayId: **[REQUIRED]** 

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

    

  
  :type ProxyConfigurationName: string
  :param 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.

    

  
  :type ProxyConfigurationArn: string
  :param ProxyConfigurationArn: 

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

     

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

    

  
  :type ListenerProperties: list
  :param ListenerProperties: 

    Listener properties for HTTP and HTTPS traffic.

    

  
    - *(dict) --* 

      This data type is used specifically for the  CreateProxy and  UpdateProxy APIs.

       

      Open port for taking HTTP or HTTPS traffic.

      

    
      - **Port** *(integer) --* **[REQUIRED]** 

        Port for processing traffic.

        

      
      - **Type** *(string) --* **[REQUIRED]** 

        Selection of HTTP or HTTPS traffic.

        

      
    

  :type TlsInterceptProperties: dict
  :param TlsInterceptProperties: **[REQUIRED]** 

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

    

  
    - **PcaArn** *(string) --* 

      Private Certificate Authority (PCA) used to issue private TLS certificates so that the proxy can present PCA-signed certificates which applications trust through the same root, establishing a secure and consistent trust model for encrypted communication.

      

    
    - **TlsInterceptMode** *(string) --* 

      Specifies whether to enable or disable TLS Intercept Mode.

      

    
  
  :type Tags: list
  :param Tags: 

    The key:value pairs to associate with the resource.

    

  
    - *(dict) --* 

      A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each Amazon Web Services resource.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

        

      
    

  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Proxy': {
              'CreateTime': datetime(2015, 1, 1),
              'DeleteTime': datetime(2015, 1, 1),
              'UpdateTime': datetime(2015, 1, 1),
              'FailureCode': 'string',
              'FailureMessage': 'string',
              'ProxyState': 'ATTACHING'|'ATTACHED'|'DETACHING'|'DETACHED'|'ATTACH_FAILED'|'DETACH_FAILED',
              'ProxyModifyState': 'MODIFYING'|'COMPLETED'|'FAILED',
              'NatGatewayId': 'string',
              'ProxyConfigurationName': 'string',
              'ProxyConfigurationArn': 'string',
              'ProxyName': 'string',
              'ProxyArn': 'string',
              'ListenerProperties': [
                  {
                      'Port': 123,
                      'Type': 'HTTP'|'HTTPS'
                  },
              ],
              'TlsInterceptProperties': {
                  'PcaArn': 'string',
                  'TlsInterceptMode': 'ENABLED'|'DISABLED'
              },
              'Tags': [
                  {
                      'Key': 'string',
                      'Value': 'string'
                  },
              ]
          },
          'UpdateToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Proxy** *(dict) --* 

        Proxy attached to a NAT gateway.

        
        

        - **CreateTime** *(datetime) --* 

          Time the Proxy was created.

          
        

        - **DeleteTime** *(datetime) --* 

          Time the Proxy was deleted.

          
        

        - **UpdateTime** *(datetime) --* 

          Time the Proxy was updated.

          
        

        - **FailureCode** *(string) --* 

          Failure code for cases when the Proxy fails to attach or update.

          
        

        - **FailureMessage** *(string) --* 

          Failure message for cases when the Proxy fails to attach or update.

          
        

        - **ProxyState** *(string) --* 

          Current attachment/detachment status of the Proxy.

          
        

        - **ProxyModifyState** *(string) --* 

          Current modification status of the Proxy.

          
        

        - **NatGatewayId** *(string) --* 

          The NAT Gateway for the proxy.

          
        

        - **ProxyConfigurationName** *(string) --* 

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

          
        

        - **ProxyConfigurationArn** *(string) --* 

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

          
        

        - **ProxyName** *(string) --* 

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

          
        

        - **ProxyArn** *(string) --* 

          The Amazon Resource Name (ARN) of a proxy.

          
        

        - **ListenerProperties** *(list) --* 

          Listener properties for HTTP and HTTPS traffic.

          
          

          - *(dict) --* 

            Open port for taking HTTP or HTTPS traffic.

            
            

            - **Port** *(integer) --* 

              Port for processing traffic.

              
            

            - **Type** *(string) --* 

              Selection of HTTP or HTTPS traffic.

              
        
      
        

        - **TlsInterceptProperties** *(dict) --* 

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

          
          

          - **PcaArn** *(string) --* 

            Private Certificate Authority (PCA) used to issue private TLS certificates so that the proxy can present PCA-signed certificates which applications trust through the same root, establishing a secure and consistent trust model for encrypted communication.

            
          

          - **TlsInterceptMode** *(string) --* 

            Specifies whether to enable or disable TLS Intercept Mode.

            
      
        

        - **Tags** *(list) --* 

          The key:value pairs to associate with the resource.

          
          

          - *(dict) --* 

            A key:value pair associated with an Amazon Web Services resource. The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each Amazon Web Services resource.

            
            

            - **Key** *(string) --* 

              The part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.

              
            

            - **Value** *(string) --* 

              The part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.

              
        
      
    
      

      - **UpdateToken** *(string) --* 

        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.

        
  
  **Exceptions**
  
  *   :py:class:`NetworkFirewall.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.InternalServerError`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.LimitExceededException`

  
  *   :py:class:`NetworkFirewall.Client.exceptions.ThrottlingException`

  