:doc:`MediaConnect <../../mediaconnect>` / Client / create_gateway

**************
create_gateway
**************



.. py:method:: MediaConnect.Client.create_gateway(**kwargs)

  

  Creates a new gateway. The request must include at least one network (up to four).

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/CreateGateway>`_  


  **Request Syntax**
  ::

    response = client.create_gateway(
        EgressCidrBlocks=[
            'string',
        ],
        Name='string',
        Networks=[
            {
                'CidrBlock': 'string',
                'Name': 'string'
            },
        ]
    )
    
  :type EgressCidrBlocks: list
  :param EgressCidrBlocks: **[REQUIRED]** 

    The range of IP addresses that are allowed to contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

    

  
    - *(string) --* 

    

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

    The name of the gateway. This name can not be modified after the gateway is created.

    

  
  :type Networks: list
  :param Networks: **[REQUIRED]** 

    The list of networks that you want to add to the gateway.

    

  
    - *(dict) --* 

      The network settings for a gateway.

      

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

        A unique IP address range to use for this network. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

        

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

        The name of the network. This name is used to reference the network and must be unique among networks in this gateway.

        

      
    

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

    
    ::

      {
          'Gateway': {
              'EgressCidrBlocks': [
                  'string',
              ],
              'GatewayArn': 'string',
              'GatewayMessages': [
                  {
                      'Code': 'string',
                      'Message': 'string',
                      'ResourceName': 'string'
                  },
              ],
              'GatewayState': 'CREATING'|'ACTIVE'|'UPDATING'|'ERROR'|'DELETING'|'DELETED',
              'Name': 'string',
              'Networks': [
                  {
                      'CidrBlock': 'string',
                      'Name': 'string'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Gateway** *(dict) --* 

        The gateway that you created.

        
        

        - **EgressCidrBlocks** *(list) --* 

          The range of IP addresses that contribute content or initiate output requests for flows communicating with this gateway. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

          
          

          - *(string) --* 
      
        

        - **GatewayArn** *(string) --* 

          The Amazon Resource Name (ARN) of the gateway.

          
        

        - **GatewayMessages** *(list) --* 

          Messages with information about the gateway.

          
          

          - *(dict) --* 

            The details of an error message.

            
            

            - **Code** *(string) --* 

              The error code.

              
            

            - **Message** *(string) --* 

              The specific error message that MediaConnect returns to help you understand the reason that the request did not succeed.

              
            

            - **ResourceName** *(string) --* 

              The name of the resource.

              
        
      
        

        - **GatewayState** *(string) --* 

          The current status of the gateway.

          
        

        - **Name** *(string) --* 

          The name of the gateway. This name can not be modified after the gateway is created.

          
        

        - **Networks** *(list) --* 

          The list of networks in the gateway.

          
          

          - *(dict) --* 

            The network settings for a gateway.

            
            

            - **CidrBlock** *(string) --* 

              A unique IP address range to use for this network. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.

              
            

            - **Name** *(string) --* 

              The name of the network. This name is used to reference the network and must be unique among networks in this gateway.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`MediaConnect.Client.exceptions.BadRequestException`

  
  *   :py:class:`MediaConnect.Client.exceptions.TooManyRequestsException`

  
  *   :py:class:`MediaConnect.Client.exceptions.ConflictException`

  
  *   :py:class:`MediaConnect.Client.exceptions.CreateGateway420Exception`

  
  *   :py:class:`MediaConnect.Client.exceptions.ForbiddenException`

  
  *   :py:class:`MediaConnect.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`MediaConnect.Client.exceptions.ServiceUnavailableException`

  