:doc:`PrometheusService <../../amp>` / Client / put_alert_manager_definition

****************************
put_alert_manager_definition
****************************



.. py:method:: PrometheusService.Client.put_alert_manager_definition(**kwargs)

  

  Updates an existing alert manager definition in a workspace. If the workspace does not already have an alert manager definition, don't use this operation to create it. Instead, use ``CreateAlertManagerDefinition``.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/amp-2020-08-01/PutAlertManagerDefinition>`_  


  **Request Syntax**
  ::

    response = client.put_alert_manager_definition(
        workspaceId='string',
        data=b'bytes',
        clientToken='string'
    )
    
  :type workspaceId: string
  :param workspaceId: **[REQUIRED]** 

    The ID of the workspace to update the alert manager definition in.

    

  
  :type data: bytes
  :param data: **[REQUIRED]** 

    The alert manager definition to use. A base64-encoded version of the YAML alert manager definition file.

     

    For details about the alert manager definition, see `AlertManagedDefinitionData <https://docs.aws.amazon.com/prometheus/latest/APIReference/yaml-AlertManagerDefinitionData.html>`__.

    

  
  :type clientToken: string
  :param clientToken: 

    A unique identifier that you can provide to ensure the idempotency of the request. Case-sensitive.

    This field is autopopulated if not provided.

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

    
    ::

      {
          'status': {
              'statusCode': 'CREATING'|'ACTIVE'|'UPDATING'|'DELETING'|'CREATION_FAILED'|'UPDATE_FAILED',
              'statusReason': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Represents the output of a ``PutAlertManagerDefinition`` operation.

      
      

      - **status** *(dict) --* 

        A structure that returns the current status of the alert manager definition.

        
        

        - **statusCode** *(string) --* 

          The current status of the alert manager.

          
        

        - **statusReason** *(string) --* 

          If there is a failure, the reason for the failure.

          
    
  
  **Exceptions**
  
  *   :py:class:`PrometheusService.Client.exceptions.ThrottlingException`

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

  
  *   :py:class:`PrometheusService.Client.exceptions.ValidationException`

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

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

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

  
  *   :py:class:`PrometheusService.Client.exceptions.ServiceQuotaExceededException`

  