:doc:`WorkSpacesThinClient <../../workspaces-thin-client>` / Client / update_environment

******************
update_environment
******************



.. py:method:: WorkSpacesThinClient.Client.update_environment(**kwargs)

  

  Updates an environment.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/workspaces-thin-client-2023-08-22/UpdateEnvironment>`_  


  **Request Syntax**
  ::

    response = client.update_environment(
        id='string',
        name='string',
        desktopArn='string',
        desktopEndpoint='string',
        softwareSetUpdateSchedule='USE_MAINTENANCE_WINDOW'|'APPLY_IMMEDIATELY',
        maintenanceWindow={
            'type': 'SYSTEM'|'CUSTOM',
            'startTimeHour': 123,
            'startTimeMinute': 123,
            'endTimeHour': 123,
            'endTimeMinute': 123,
            'daysOfTheWeek': [
                'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
            ],
            'applyTimeOf': 'UTC'|'DEVICE'
        },
        softwareSetUpdateMode='USE_LATEST'|'USE_DESIRED',
        desiredSoftwareSetId='string',
        deviceCreationTags={
            'string': 'string'
        }
    )
    
  :type id: string
  :param id: **[REQUIRED]** 

    The ID of the environment to update.

    

  
  :type name: string
  :param name: 

    The name of the environment to update.

    

  
  :type desktopArn: string
  :param desktopArn: 

    The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or AppStream 2.0.

    

  
  :type desktopEndpoint: string
  :param desktopEndpoint: 

    The URL for the identity provider login (only for environments that use AppStream 2.0).

    

  
  :type softwareSetUpdateSchedule: string
  :param softwareSetUpdateSchedule: 

    An option to define if software updates should be applied within a maintenance window.

    

  
  :type maintenanceWindow: dict
  :param maintenanceWindow: 

    A specification for a time window to apply software updates.

    

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

      An option to select the default or custom maintenance window.

      

    
    - **startTimeHour** *(integer) --* 

      The hour for the maintenance window start ( ``00``- ``23``).

      

    
    - **startTimeMinute** *(integer) --* 

      The minutes past the hour for the maintenance window start ( ``00``- ``59``).

      

    
    - **endTimeHour** *(integer) --* 

      The hour for the maintenance window end ( ``00``- ``23``).

      

    
    - **endTimeMinute** *(integer) --* 

      The minutes for the maintenance window end ( ``00``- ``59``).

      

    
    - **daysOfTheWeek** *(list) --* 

      The days of the week during which the maintenance window is open.

      

    
      - *(string) --* 

      
  
    - **applyTimeOf** *(string) --* 

      The option to set the maintenance window during the device local time or Universal Coordinated Time (UTC).

      

    
  
  :type softwareSetUpdateMode: string
  :param softwareSetUpdateMode: 

    An option to define which software updates to apply.

    

  
  :type desiredSoftwareSetId: string
  :param desiredSoftwareSetId: 

    The ID of the software set to apply.

    

  
  :type deviceCreationTags: dict
  :param deviceCreationTags: 

    A map of the key-value pairs of the tag or tags to assign to the newly created devices for this environment.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {
          'environment': {
              'id': 'string',
              'name': 'string',
              'desktopArn': 'string',
              'desktopEndpoint': 'string',
              'desktopType': 'workspaces'|'appstream'|'workspaces-web',
              'activationCode': 'string',
              'softwareSetUpdateSchedule': 'USE_MAINTENANCE_WINDOW'|'APPLY_IMMEDIATELY',
              'maintenanceWindow': {
                  'type': 'SYSTEM'|'CUSTOM',
                  'startTimeHour': 123,
                  'startTimeMinute': 123,
                  'endTimeHour': 123,
                  'endTimeMinute': 123,
                  'daysOfTheWeek': [
                      'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
                  ],
                  'applyTimeOf': 'UTC'|'DEVICE'
              },
              'softwareSetUpdateMode': 'USE_LATEST'|'USE_DESIRED',
              'desiredSoftwareSetId': 'string',
              'pendingSoftwareSetId': 'string',
              'createdAt': datetime(2015, 1, 1),
              'updatedAt': datetime(2015, 1, 1),
              'arn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **environment** *(dict) --* 

        Describes an environment.

        
        

        - **id** *(string) --* 

          The ID of the environment.

          
        

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

          The name of the environment.

          
        

        - **desktopArn** *(string) --* 

          The Amazon Resource Name (ARN) of the desktop to stream from Amazon WorkSpaces, WorkSpaces Secure Browser, or AppStream 2.0.

          
        

        - **desktopEndpoint** *(string) --* 

          The URL for the identity provider login (only for environments that use AppStream 2.0).

          
        

        - **desktopType** *(string) --* 

          The type of streaming desktop for the environment.

          
        

        - **activationCode** *(string) --* 

          The activation code to register a device to the environment.

          
        

        - **softwareSetUpdateSchedule** *(string) --* 

          An option to define if software updates should be applied within a maintenance window.

          
        

        - **maintenanceWindow** *(dict) --* 

          A specification for a time window to apply software updates.

          
          

          - **type** *(string) --* 

            An option to select the default or custom maintenance window.

            
          

          - **startTimeHour** *(integer) --* 

            The hour for the maintenance window start ( ``00``- ``23``).

            
          

          - **startTimeMinute** *(integer) --* 

            The minutes past the hour for the maintenance window start ( ``00``- ``59``).

            
          

          - **endTimeHour** *(integer) --* 

            The hour for the maintenance window end ( ``00``- ``23``).

            
          

          - **endTimeMinute** *(integer) --* 

            The minutes for the maintenance window end ( ``00``- ``59``).

            
          

          - **daysOfTheWeek** *(list) --* 

            The days of the week during which the maintenance window is open.

            
            

            - *(string) --* 
        
          

          - **applyTimeOf** *(string) --* 

            The option to set the maintenance window during the device local time or Universal Coordinated Time (UTC).

            
      
        

        - **softwareSetUpdateMode** *(string) --* 

          An option to define which software updates to apply.

          
        

        - **desiredSoftwareSetId** *(string) --* 

          The ID of the software set to apply.

          
        

        - **pendingSoftwareSetId** *(string) --* 

          The ID of the software set that is pending to be installed.

          
        

        - **createdAt** *(datetime) --* 

          The timestamp of when the environment was created.

          
        

        - **updatedAt** *(datetime) --* 

          The timestamp of when the device was updated.

          
        

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

          The Amazon Resource Name (ARN) of the environment.

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

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

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

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

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

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

  