:doc:`AppStream <../../appstream>` / Client / create_application

******************
create_application
******************



.. py:method:: AppStream.Client.create_application(**kwargs)

  

  Creates an application.

   

  Applications are a WorkSpaces Applications resource that stores the details about how to launch applications on Elastic fleet streaming instances. An application consists of the launch details, icon, and display name. Applications are associated with an app block that contains the application binaries and other files. The applications assigned to an Elastic fleet are the applications users can launch.

   

  This is only supported for Elastic fleets.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/appstream-2016-12-01/CreateApplication>`_  


  **Request Syntax**
  ::

    response = client.create_application(
        Name='string',
        DisplayName='string',
        Description='string',
        IconS3Location={
            'S3Bucket': 'string',
            'S3Key': 'string'
        },
        LaunchPath='string',
        WorkingDirectory='string',
        LaunchParameters='string',
        Platforms=[
            'WINDOWS'|'WINDOWS_SERVER_2016'|'WINDOWS_SERVER_2019'|'WINDOWS_SERVER_2022'|'WINDOWS_SERVER_2025'|'AMAZON_LINUX2'|'RHEL8'|'ROCKY_LINUX8'|'UBUNTU_PRO_2404',
        ],
        InstanceFamilies=[
            'string',
        ],
        AppBlockArn='string',
        Tags={
            'string': 'string'
        }
    )
    
  :type Name: string
  :param Name: **[REQUIRED]** 

    The name of the application. This name is visible to users when display name is not specified.

    

  
  :type DisplayName: string
  :param DisplayName: 

    The display name of the application. This name is visible to users in the application catalog.

    

  
  :type Description: string
  :param Description: 

    The description of the application.

    

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

    The location in S3 of the application icon.

    

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

      The S3 bucket of the S3 object.

      

    
    - **S3Key** *(string) --* 

      The S3 key of the S3 object.

       

      This is required when used for the following:

       

      
      * IconS3Location (Actions: CreateApplication and UpdateApplication)
       
      * SessionScriptS3Location (Actions: CreateFleet and UpdateFleet)
       
      * ScriptDetails (Actions: CreateAppBlock)
       
      * SourceS3Location when creating an app block with ``CUSTOM`` PackagingType (Actions: CreateAppBlock)
       
      * SourceS3Location when creating an app block with ``APPSTREAM2`` PackagingType, and using an existing application package (VHD file). In this case, ``S3Key`` refers to the VHD file. If a new application package is required, then ``S3Key`` is not required. (Actions: CreateAppBlock)
      

      

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

    The launch path of the application.

    

  
  :type WorkingDirectory: string
  :param WorkingDirectory: 

    The working directory of the application.

    

  
  :type LaunchParameters: string
  :param LaunchParameters: 

    The launch parameters of the application.

    

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

    The platforms the application supports. WINDOWS_SERVER_2019, AMAZON_LINUX2 and UBUNTU_PRO_2404 are supported for Elastic fleets.

    

  
    - *(string) --* 

    

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

    The instance families the application supports. Valid values are GENERAL_PURPOSE and GRAPHICS_G4.

    

  
    - *(string) --* 

    

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

    The app block ARN to which the application should be associated

    

  
  :type Tags: dict
  :param Tags: 

    The tags assigned to the application.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'Application': {
              'Name': 'string',
              'DisplayName': 'string',
              'IconURL': 'string',
              'LaunchPath': 'string',
              'LaunchParameters': 'string',
              'Enabled': True|False,
              'Metadata': {
                  'string': 'string'
              },
              'WorkingDirectory': 'string',
              'Description': 'string',
              'Arn': 'string',
              'AppBlockArn': 'string',
              'IconS3Location': {
                  'S3Bucket': 'string',
                  'S3Key': 'string'
              },
              'Platforms': [
                  'WINDOWS'|'WINDOWS_SERVER_2016'|'WINDOWS_SERVER_2019'|'WINDOWS_SERVER_2022'|'WINDOWS_SERVER_2025'|'AMAZON_LINUX2'|'RHEL8'|'ROCKY_LINUX8'|'UBUNTU_PRO_2404',
              ],
              'InstanceFamilies': [
                  'string',
              ],
              'CreatedTime': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Application** *(dict) --* 

        Describes an application in the application catalog.

        
        

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

          The name of the application.

          
        

        - **DisplayName** *(string) --* 

          The application name to display.

          
        

        - **IconURL** *(string) --* 

          The URL for the application icon. This URL might be time-limited.

          
        

        - **LaunchPath** *(string) --* 

          The path to the application executable in the instance.

          
        

        - **LaunchParameters** *(string) --* 

          The arguments that are passed to the application at launch.

          
        

        - **Enabled** *(boolean) --* 

          If there is a problem, the application can be disabled after image creation.

          
        

        - **Metadata** *(dict) --* 

          Additional attributes that describe the application.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **WorkingDirectory** *(string) --* 

          The working directory for the application.

          
        

        - **Description** *(string) --* 

          The description of the application.

          
        

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

          The ARN of the application.

          
        

        - **AppBlockArn** *(string) --* 

          The app block ARN of the application.

          
        

        - **IconS3Location** *(dict) --* 

          The S3 location of the application icon.

          
          

          - **S3Bucket** *(string) --* 

            The S3 bucket of the S3 object.

            
          

          - **S3Key** *(string) --* 

            The S3 key of the S3 object.

             

            This is required when used for the following:

             

            
            * IconS3Location (Actions: CreateApplication and UpdateApplication)
             
            * SessionScriptS3Location (Actions: CreateFleet and UpdateFleet)
             
            * ScriptDetails (Actions: CreateAppBlock)
             
            * SourceS3Location when creating an app block with ``CUSTOM`` PackagingType (Actions: CreateAppBlock)
             
            * SourceS3Location when creating an app block with ``APPSTREAM2`` PackagingType, and using an existing application package (VHD file). In this case, ``S3Key`` refers to the VHD file. If a new application package is required, then ``S3Key`` is not required. (Actions: CreateAppBlock)
            

            
      
        

        - **Platforms** *(list) --* 

          The platforms on which the application can run.

          
          

          - *(string) --* 
      
        

        - **InstanceFamilies** *(list) --* 

          The instance families for the application.

          
          

          - *(string) --* 
      
        

        - **CreatedTime** *(datetime) --* 

          The time at which the application was created within the app block.

          
    
  
  **Exceptions**
  
  *   :py:class:`AppStream.Client.exceptions.OperationNotPermittedException`

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

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

  
  *   :py:class:`AppStream.Client.exceptions.ConcurrentModificationException`

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

  