put_notification_configuration ( $auto_scaling_group_name, $topic_arn, $notification_types, $opt )

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

A new PutNotificationConfiguration overwrites an existing configuration.

Access

public

Parameters

Parameter

Type

Required

Description

$auto_scaling_group_name

string

Required

The name of the Auto Scaling group. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*]

$topic_arn

string

Required

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) topic. [Constraints: The value must be between 1 and 1600 characters, and must match the following regular expression pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*]

$notification_types

string
array

Required

The type of events that will trigger the notification. For more information, go to DescribeAutoScalingNotificationTypes. Pass a string for a single value, or an indexed array for multiple values.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/as.class.php | Toggle source view (13 lines) | View on GitHub

public function put_notification_configuration($auto_scaling_group_name, $topic_arn, $notification_types, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['AutoScalingGroupName'] = $auto_scaling_group_name;
    $opt['TopicARN'] = $topic_arn;
    
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'NotificationTypes' => (is_array($notification_types) ? $notification_types : array($notification_types))
    ), 'member'));

    return $this->authenticate('PutNotificationConfiguration', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback