Deletes the specified notification.
Parameters:
Raises:
-
ResourceContentionFault
–
You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To delete an Auto Scaling notification
This example deletes the specified notification from the specified Auto Scaling group.
>>> client.delete_notification_configuration(auto_scaling_group_name='my-auto-scaling-group', topic_arn='arn:aws:sns:us-west-2:123456789012:my-sns-topic')
Source code in docs_src/capo_auto_scaling/_services/auto_scaling.py
| def delete_notification_configuration(
self,
*,
config_overrides: Optional[AutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[
"capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
] = None,
topic_arn: Optional[
"capo_auto_scaling.types.xml_string_max_len255.XmlStringMaxLen255"
] = None,
) -> None:
"""<p>Deletes the specified notification.</p>
Args:
auto_scaling_group_name: <p>The name of the Auto Scaling group.</p>
topic_arn: <p>The Amazon Resource Name (ARN) of the Amazon SNS topic.</p>
Raises:
capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete an Auto Scaling notification
This example deletes the specified notification from the specified Auto Scaling group.
>>> client.delete_notification_configuration(auto_scaling_group_name='my-auto-scaling-group', topic_arn='arn:aws:sns:us-west-2:123456789012:my-sns-topic')
"""
def _handler(
req: "OperationRequest[capo_auto_scaling.types.delete_notification_configuration_type.DeleteNotificationConfigurationType]",
) -> OperationResponse[None]:
import capo_auto_scaling._operations.auto_scaling_2011_01_01.delete_notification_configuration
output, http_response = (
capo_auto_scaling._operations.auto_scaling_2011_01_01.delete_notification_configuration.delete_notification_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteNotificationConfiguration")
)
input_: capo_auto_scaling.types.delete_notification_configuration_type.DeleteNotificationConfigurationType = {}
if auto_scaling_group_name is not None:
input_["auto_scaling_group_name"] = auto_scaling_group_name
if topic_arn is not None:
input_["topic_arn"] = topic_arn
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|