コード例 #1
0
    def test_subscribe_resource_to_alarm(self, patched_env, patched_resource,
                                         patched_client):
        """
        Test the subscribe_resource_to_alarm function
        """
        from chalicelib import cloudwatch

        class alarm_dict(dict):
            """
            Testing class of dictionary with attributes
            """

        d = alarm_dict()
        d.json_body = []
        cloudwatch.subscribe_resource_to_alarm(d, "alarm", REGION)
コード例 #2
0
def subscribe_resource_to_alarm(alarm_name, region):
    """
    API entry point to subscribe one or more nodes to a CloudWatch alarm in a region.
    """
    return cloudwatch_data.subscribe_resource_to_alarm(app.current_request,
                                                       alarm_name, region)
コード例 #3
0
def subscribe_resource_to_alarm(alarm_name, region):
    """
    API entry point to subscribe one or more nodes to a CloudWatch alarm in a region.
    """
    return cloudwatch_data.subscribe_resource_to_alarm(app.current_request, alarm_name, region)