put_notification_configuration
async
¶
put_notification_configuration(
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
topic_arn: Optional[XmlStringMaxLen255] = None,
notification_types: Optional[AutoScalingNotificationTypes] = None,
) -> None
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 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.
Parameters:
-
auto_scaling_group_name(Optional[XmlStringMaxLen255], default:None) –The name of the Auto Scaling group.
-
topic_arn(Optional[XmlStringMaxLen255], default:None) –The Amazon Resource Name (ARN) of the Amazon SNS topic.
-
notification_types(Optional[AutoScalingNotificationTypes], default:None) –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 API.
Raises:
-
LimitExceededFault–You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits in the Amazon EC2 Auto Scaling API Reference.
-
ResourceContentionFault–You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
ServiceLinkedRoleFailure–The service-linked role is not yet ready for use.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To add an Auto Scaling notification This example adds the specified notification to the specified Auto Scaling group.
>>> await client.put_notification_configuration(auto_scaling_group_name='my-auto-scaling-group', topic_arn='arn:aws:sns:us-west-2:123456789012:my-sns-topic', notification_types=['autoscaling:TEST_NOTIFICATION'])
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 | |