:doc:`GreengrassV2 <../../greengrassv2>` / Client / get_component

*************
get_component
*************



.. py:method:: GreengrassV2.Client.get_component(**kwargs)

  

  Gets the recipe for a version of a component.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/greengrassv2-2020-11-30/GetComponent>`_  


  **Request Syntax**
  ::

    response = client.get_component(
        recipeOutputFormat='JSON'|'YAML',
        arn='string'
    )
    
  :type recipeOutputFormat: string
  :param recipeOutputFormat: 

    The format of the recipe.

    

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

    The `ARN <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html>`__ of the component version.

    

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

    
    ::

      {
          'recipeOutputFormat': 'JSON'|'YAML',
          'recipe': b'bytes',
          'tags': {
              'string': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **recipeOutputFormat** *(string) --* 

        The format of the recipe.

        
      

      - **recipe** *(bytes) --* 

        The recipe of the component version.

        
      

      - **tags** *(dict) --* 

        A list of key-value pairs that contain metadata for the resource. For more information, see `Tag your resources <https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html>`__ in the *IoT Greengrass V2 Developer Guide*.

        
        

        - *(string) --* 
          

          - *(string) --* 
    
  
  
  **Exceptions**
  
  *   :py:class:`GreengrassV2.Client.exceptions.ValidationException`

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

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

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

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

  