:doc:`IoTWireless <../../iotwireless>` / Client / create_destination

******************
create_destination
******************



.. py:method:: IoTWireless.Client.create_destination(**kwargs)

  

  Creates a new destination that maps a device message to an AWS IoT rule.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iotwireless-2020-11-22/CreateDestination>`_  


  **Request Syntax**
  ::

    response = client.create_destination(
        Name='string',
        ExpressionType='RuleName'|'MqttTopic',
        Expression='string',
        Description='string',
        RoleArn='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        ClientRequestToken='string'
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the new resource.

    

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

    The type of value in ``Expression``.

    

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

    The rule name or topic rule to send messages to.

    

  
  :type Description: string
  :param Description: 

    The description of the new resource.

    

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

    The ARN of the IAM Role that authorizes the destination.

    

  
  :type Tags: list
  :param Tags: 

    The tags to attach to the new destination. Tags are metadata that you can use to manage a resource.

    

  
    - *(dict) --* 

      A simple label consisting of a customer-defined key-value pair

      

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

        The tag's key value.

        

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

        The tag's value.

        

      
    

  :type ClientRequestToken: string
  :param ClientRequestToken: 

    Each resource must have a unique client request token. The client token is used to implement idempotency. It ensures that the request completes no more than one time. If you retry a request with the same token and the same parameters, the request will complete successfully. However, if you try to create a new resource using the same token but different parameters, an HTTP 409 conflict occurs. If you omit this value, AWS SDKs will automatically generate a unique client request. For more information about idempotency, see `Ensuring idempotency in Amazon EC2 API requests <https://docs.aws.amazon.com/ec2/latest/devguide/ec2-api-idempotency.html>`__.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'Arn': 'string',
          'Name': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Arn** *(string) --* 

        The Amazon Resource Name of the new resource.

        
      

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

        The name of the new resource.

        
  
  **Exceptions**
  
  *   :py:class:`IoTWireless.Client.exceptions.ValidationException`

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

  
  *   :py:class:`IoTWireless.Client.exceptions.AccessDeniedException`

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

  
  *   :py:class:`IoTWireless.Client.exceptions.InternalServerException`

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

  