:doc:`IoTSiteWise <../../iotsitewise>` / Client / create_gateway

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



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

  

  Creates a gateway, which is a virtual or edge device that delivers industrial data streams from local servers to IoT SiteWise. For more information, see `Ingesting data using a gateway <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/gateway-connector.html>`__ in the *IoT SiteWise User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotsitewise-2019-12-02/CreateGateway>`_  


  **Request Syntax**
  ::

    response = client.create_gateway(
        gatewayName='string',
        gatewayPlatform={
            'greengrass': {
                'groupArn': 'string'
            },
            'greengrassV2': {
                'coreDeviceThingName': 'string',
                'coreDeviceOperatingSystem': 'LINUX_AARCH64'|'LINUX_AMD64'|'WINDOWS_AMD64'
            },
            'siemensIE': {
                'iotCoreThingName': 'string'
            }
        },
        gatewayVersion='string',
        tags={
            'string': 'string'
        }
    )
    
  :type gatewayName: string
  :param gatewayName: **[REQUIRED]** 

    A unique name for the gateway.

    

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

    The gateway's platform. You can only specify one platform in a gateway.

    

  
    - **greengrass** *(dict) --* 

      A gateway that runs on IoT Greengrass.

      

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

        The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the Greengrass group. For more information about how to find a group's ARN, see `ListGroups <https://docs.aws.amazon.com/greengrass/v1/apireference/listgroups-get.html>`__ and `GetGroup <https://docs.aws.amazon.com/greengrass/v1/apireference/getgroup-get.html>`__ in the *IoT Greengrass V1 API Reference*.

        

      
    
    - **greengrassV2** *(dict) --* 

      A gateway that runs on IoT Greengrass V2.

      

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

        The name of the IoT thing for your IoT Greengrass V2 core device.

        

      
      - **coreDeviceOperatingSystem** *(string) --* 

        The operating system of the core device in IoT Greengrass V2. Specifying the operating system is required for MQTT-enabled, V3 gateways ( ``gatewayVersion`` ``3``) and not applicable for Classic stream, V2 gateways ( ``gatewayVersion`` ``2``).

        

      
    
    - **siemensIE** *(dict) --* 

      A SiteWise Edge gateway that runs on a Siemens Industrial Edge Device.

      

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

        The name of the IoT Thing for your SiteWise Edge gateway.

        

      
    
  
  :type gatewayVersion: string
  :param gatewayVersion: 

    The version of the gateway to create. Specify ``3`` to create an MQTT-enabled, V3 gateway and ``2`` to create a Classic streams, V2 gateway. If not specified, the default is ``2`` (Classic streams, V2 gateway).

     

    .. note::

      

      When creating a V3 gateway ( ``gatewayVersion=3``) with the ``GreengrassV2`` platform, you must also specify the ``coreDeviceOperatingSystem`` parameter.

      

     

    We recommend creating an MQTT-enabled gateway for self-hosted gateways and Siemens Industrial Edge gateways. For more information on gateway versions, see `Use Amazon Web Services IoT SiteWise Edge Edge gateways <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/gateways.html>`__.

    

  
  :type tags: dict
  :param tags: 

    A list of key-value pairs that contain metadata for the gateway. For more information, see `Tagging your IoT SiteWise resources <https://docs.aws.amazon.com/iot-sitewise/latest/userguide/tag-resources.html>`__ in the *IoT SiteWise User Guide*.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'gatewayId': 'string',
          'gatewayArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **gatewayId** *(string) --* 

        The ID of the gateway device. You can use this ID when you call other IoT SiteWise API operations.

        
      

      - **gatewayArn** *(string) --* 

        The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the gateway, which has the following format.

         

        ``arn:${Partition}:iotsitewise:${Region}:${Account}:gateway/${GatewayId}``

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

  
  *   :py:class:`IoTSiteWise.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`IoTSiteWise.Client.exceptions.InternalFailureException`

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

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

  