:doc:`AutoScaling <../../autoscaling>` / Client / put_notification_configuration

******************************
put_notification_configuration
******************************



.. py:method:: AutoScaling.Client.put_notification_configuration(**kwargs)

  

  Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to the specified topic can have messages delivered to an endpoint such as a web server or an email address.

   

  This configuration overwrites any existing configuration.

   

  For more information, see `Amazon SNS notification options for Amazon EC2 Auto Scaling <https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-sns-notifications.html>`__ in the *Amazon EC2 Auto Scaling User Guide*.

   

  If you exceed your maximum limit of SNS topics, which is 10 per Auto Scaling group, the call fails.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutNotificationConfiguration>`_  


  **Request Syntax**
  ::

    response = client.put_notification_configuration(
        AutoScalingGroupName='string',
        TopicARN='string',
        NotificationTypes=[
            'string',
        ]
    )
    
  :type AutoScalingGroupName: string
  :param AutoScalingGroupName: **[REQUIRED]** 

    The name of the Auto Scaling group.

    

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

    The Amazon Resource Name (ARN) of the Amazon SNS topic.

    

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

    The type of event that causes the notification to be sent. To query the notification types supported by Amazon EC2 Auto Scaling, call the `DescribeAutoScalingNotificationTypes <https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAutoScalingNotificationTypes.html>`__ API.

    

  
    - *(string) --* 

    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`AutoScaling.Client.exceptions.LimitExceededFault`

  
  *   :py:class:`AutoScaling.Client.exceptions.ResourceContentionFault`

  
  *   :py:class:`AutoScaling.Client.exceptions.ServiceLinkedRoleFailure`

  

  **Examples**

  This example adds the specified notification to the specified Auto Scaling group.
  ::

    response = client.put_notification_configuration(
        AutoScalingGroupName='my-auto-scaling-group',
        NotificationTypes=[
            'autoscaling:TEST_NOTIFICATION',
        ],
        TopicARN='arn:aws:sns:us-west-2:123456789012:my-sns-topic',
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  