:doc:`DeviceFarm <../../devicefarm>` / Client / create_instance_profile

***********************
create_instance_profile
***********************



.. py:method:: DeviceFarm.Client.create_instance_profile(**kwargs)

  

  Creates a profile that can be applied to one or more private fleet device instances.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/devicefarm-2015-06-23/CreateInstanceProfile>`_  


  **Request Syntax**
  ::

    response = client.create_instance_profile(
        name='string',
        description='string',
        packageCleanup=True|False,
        excludeAppPackagesFromCleanup=[
            'string',
        ],
        rebootAfterUse=True|False
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of your instance profile.

    

  
  :type description: string
  :param description: 

    The description of your instance profile.

    

  
  :type packageCleanup: boolean
  :param packageCleanup: 

    When set to ``true``, Device Farm removes app packages after a test run. The default value is ``false`` for private devices.

    

  
  :type excludeAppPackagesFromCleanup: list
  :param excludeAppPackagesFromCleanup: 

    An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.

     

    The list of packages is considered only if you set ``packageCleanup`` to ``true``.

    

  
    - *(string) --* 

    

  :type rebootAfterUse: boolean
  :param rebootAfterUse: 

    When set to ``true``, Device Farm reboots the instance after a test run. The default value is ``true``.

    

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

    
    ::

      {
          'instanceProfile': {
              'arn': 'string',
              'packageCleanup': True|False,
              'excludeAppPackagesFromCleanup': [
                  'string',
              ],
              'rebootAfterUse': True|False,
              'name': 'string',
              'description': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **instanceProfile** *(dict) --* 

        An object that contains information about your instance profile.

        
        

        - **arn** *(string) --* 

          The Amazon Resource Name (ARN) of the instance profile.

          
        

        - **packageCleanup** *(boolean) --* 

          When set to ``true``, Device Farm removes app packages after a test run. The default value is ``false`` for private devices.

          
        

        - **excludeAppPackagesFromCleanup** *(list) --* 

          An array of strings containing the list of app packages that should not be cleaned up from the device after a test run completes.

           

          The list of packages is considered only if you set ``packageCleanup`` to ``true``.

          
          

          - *(string) --* 
      
        

        - **rebootAfterUse** *(boolean) --* 

          When set to ``true``, Device Farm reboots the instance after a test run. The default value is ``true``.

          
        

        - **name** *(string) --* 

          The name of the instance profile.

          
        

        - **description** *(string) --* 

          The description of the instance profile.

          
    
  
  **Exceptions**
  
  *   :py:class:`DeviceFarm.Client.exceptions.ArgumentException`

  
  *   :py:class:`DeviceFarm.Client.exceptions.NotFoundException`

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

  
  *   :py:class:`DeviceFarm.Client.exceptions.ServiceAccountException`

  