Package org.jclouds.cloudwatch.domain

Examples of org.jclouds.cloudwatch.domain.HistoryItemType


                                ).get(0).toString());
   }

   public void testDescribeAlarmHistory() throws Exception {
      String alarmName = "TestAlarmName";
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 10;
      String endDateStr = "2013-01-02T00:00:00.000Z";
      String startDateStr = "2013-01-01T00:00:00.000Z";
      CloudWatchApi cloudWatchApi = requestSendsResponse(
            alarmRequest(ImmutableMap.<String, String> builder()
                                     .put("Action", "DescribeAlarmHistory")
                                     .put("AlarmName", alarmName)
                                     .put("EndDate", "2013-01-02T00%3A00%3A00.000Z")
                                     .put("HistoryItemType", historyItemType.toString())
                                     .put("MaxRecords", Integer.toString(maxRecords))
                                     .put("StartDate", "2013-01-01T00%3A00%3A00.000Z")
                                     .put("Signature", "O2u9yIQvCuVpKdUeUDJcswri0YD0sD4%2B/SR5TtYbPeQ%3D")
                                     .build()),
            HttpResponse.builder()
View Full Code Here


   }

   public void testPopulatedOptions() throws Exception {
      String alarmName = "TestAlarmName";
      Date endDate = new Date(new Date().getTime() + 5000);
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 5;
      Date startDate = new Date();
      Multimap<String, String> formParameters = new ListAlarmHistoryOptions()
            .alarmName(alarmName)
            .endDate(endDate)
            .historyItemType(historyItemType)
            .maxRecords(maxRecords)
            .startDate(startDate)
            .buildFormParameters();

      assertEquals(formParameters.get("AlarmName"), ImmutableSet.of(alarmName));
      assertEquals(formParameters.get("EndDate"), ImmutableSet.of(dateService.iso8601DateFormat(endDate)));
      assertEquals(formParameters.get("HistoryItemType"), ImmutableSet.of(historyItemType.toString()));
      assertEquals(formParameters.get("MaxRecords"), ImmutableSet.of(Integer.toString(maxRecords)));
      assertEquals(formParameters.get("StartDate"), ImmutableSet.of(dateService.iso8601DateFormat(startDate)));
   }
View Full Code Here

   }

   public void testPopulatedOptions() throws Exception {
      String alarmName = "TestAlarmName";
      Date endDate = new Date(new Date().getTime() + 5000);
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 5;
      Date startDate = new Date();
      Multimap<String, String> formParameters = new ListAlarmHistoryOptions()
            .alarmName(alarmName)
            .endDate(endDate)
            .historyItemType(historyItemType)
            .maxRecords(maxRecords)
            .startDate(startDate)
            .buildFormParameters();

      assertEquals(formParameters.get("AlarmName"), ImmutableSet.of(alarmName));
      assertEquals(formParameters.get("EndDate"), ImmutableSet.of(dateService.iso8601DateFormat(endDate)));
      assertEquals(formParameters.get("HistoryItemType"), ImmutableSet.of(historyItemType.toString()));
      assertEquals(formParameters.get("MaxRecords"), ImmutableSet.of(Integer.toString(maxRecords)));
      assertEquals(formParameters.get("StartDate"), ImmutableSet.of(dateService.iso8601DateFormat(startDate)));
   }
View Full Code Here

                                ).get(0).toString());
   }

   public void testDescribeAlarmHistory() throws Exception {
      String alarmName = "TestAlarmName";
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 10;
      String endDateStr = "2013-01-02T00:00:00.000Z";
      String startDateStr = "2013-01-01T00:00:00.000Z";
      CloudWatchApi cloudWatchApi = requestSendsResponse(
            alarmRequest(ImmutableMap.<String, String> builder()
                                     .put("Action", "DescribeAlarmHistory")
                                     .put("AlarmName", alarmName)
                                     .put("EndDate", "2013-01-02T00%3A00%3A00.000Z")
                                     .put("HistoryItemType", historyItemType.toString())
                                     .put("MaxRecords", Integer.toString(maxRecords))
                                     .put("StartDate", "2013-01-01T00%3A00%3A00.000Z")
                                     .put("Signature", "O2u9yIQvCuVpKdUeUDJcswri0YD0sD4%2B/SR5TtYbPeQ%3D")
                                     .build()),
            HttpResponse.builder()
View Full Code Here

   }

   public void testPopulatedOptions() throws Exception {
      String alarmName = "TestAlarmName";
      Date endDate = new Date(new Date().getTime() + 5000);
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 5;
      Date startDate = new Date();
      Multimap<String, String> formParameters = new ListAlarmHistoryOptions()
            .alarmName(alarmName)
            .endDate(endDate)
            .historyItemType(historyItemType)
            .maxRecords(maxRecords)
            .startDate(startDate)
            .buildFormParameters();

      assertEquals(formParameters.get("AlarmName"), ImmutableSet.of(alarmName));
      assertEquals(formParameters.get("EndDate"), ImmutableSet.of(dateService.iso8601DateFormat(endDate)));
      assertEquals(formParameters.get("HistoryItemType"), ImmutableSet.of(historyItemType.toString()));
      assertEquals(formParameters.get("MaxRecords"), ImmutableSet.of(Integer.toString(maxRecords)));
      assertEquals(formParameters.get("StartDate"), ImmutableSet.of(dateService.iso8601DateFormat(startDate)));
   }
View Full Code Here

                                ).get(0).toString());
   }

   public void testDescribeAlarmHistory() throws Exception {
      String alarmName = "TestAlarmName";
      HistoryItemType historyItemType = HistoryItemType.ACTION;
      int maxRecords = 10;
      String endDateStr = "2013-01-02T00:00:00.000Z";
      String startDateStr = "2013-01-01T00:00:00.000Z";
      CloudWatchApi cloudWatchApi = requestSendsResponse(
            alarmRequest(ImmutableMap.<String, String> builder()
                                     .put("Action", "DescribeAlarmHistory")
                                     .put("AlarmName", alarmName)
                                     .put("EndDate", "2013-01-02T00%3A00%3A00.000Z")
                                     .put("HistoryItemType", historyItemType.toString())
                                     .put("MaxRecords", Integer.toString(maxRecords))
                                     .put("StartDate", "2013-01-01T00%3A00%3A00.000Z")
                                     .put("Signature", "O2u9yIQvCuVpKdUeUDJcswri0YD0sD4%2B/SR5TtYbPeQ%3D")
                                     .build()),
            HttpResponse.builder()
View Full Code Here

TOP

Related Classes of org.jclouds.cloudwatch.domain.HistoryItemType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.