Package org.jclouds.cloudwatch.domain

Examples of org.jclouds.cloudwatch.domain.Dimension


   }

   public void testMetricWithMultipleDimensions() throws Exception {
      MetricDatum metricDatum = MetricDatum.builder()
                                           .metricName("TestMetricName")
                                           .dimension(new Dimension("TestDimension", "FAKE"))
                                           .dimension(new Dimension("TestDimension2", "FAKE2"))
                                           .unit(Unit.COUNT)
                                           .timestamp(new Date(10000000l))
                                           .value(5.0)
                                           .build();
View Full Code Here


                                    .sum(10.0)
                                    .build();
      MetricDatum metricDatum = MetricDatum.builder()
                                           .metricName("TestMetricName")
                                           .statisticValues(ss)
                                           .dimension(new Dimension("TestDimension", "FAKE"))
                                           .dimension(new Dimension("TestDimension2", "FAKE2"))
                                           .unit(Unit.COUNT)
                                           .timestamp(new Date(10000000l))
                                           .value(2.0)
                                           .build();
      MetricDatum metricDatum2 = MetricDatum.builder()
                                           .metricName("TestMetricName")
                                           .dimension(new Dimension("TestDimension", "FAKE"))
                                           .unit(Unit.COUNT)
                                           .timestamp(new Date(10000000l))
                                           .value(5.0)
                                           .build();
View Full Code Here

               "TestAlarmName" + i,
               i == 1 ?
                     ComparisonOperator.GREATER_THAN_THRESHOLD :
                     ComparisonOperator.LESS_THAN_THRESHOLD,
               ImmutableSet.of(
                     new Dimension("TestDimensionName1", "TestDimensionValue1"),
                     new Dimension("TestDimensionName2", "TestDimensionValue2")
               ),
               60 * i,
               ImmutableSet.of("TestAction1", "TestAction2"),
               "TestMetricName" + i,
               i == 1 ?
View Full Code Here

      assertFalse(formParameters.containsKey("Unit"));
   }

   public void testPopulatedOptions() throws Exception {
      Set<Dimension> dimensions = ImmutableSet.of(
         new Dimension("TestDimension1", "TestValue1"),
         new Dimension("TestDimension2", "TestValue2")
      );
      String metricName = "TestMetricName";
      String namespace = Namespaces.EC2;
      int period = 60;
      Statistics statistic = Statistics.AVERAGE;
View Full Code Here

               "TestAlarmName" + i,
               i == 1 ?
                     ComparisonOperator.GREATER_THAN_THRESHOLD :
                     ComparisonOperator.LESS_THAN_THRESHOLD,
               ImmutableSet.of(
                     new Dimension("TestDimensionName1", "TestDimensionValue1"),
                     new Dimension("TestDimensionName2", "TestDimensionValue2")
               ),
               60 * i,
               ImmutableSet.of("TestAction1", "TestAction2"),
               "TestMetricName" + i,
               Namespaces.EC2,
View Full Code Here

      );
      String alarmDescription = "TestAlarmDescription";
      String alarmName = "TestAlarmName";
      ComparisonOperator comparisonOperator = ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD;
      Set<Dimension> dimensions = ImmutableSet.of(
            new Dimension("TestDimension1", "TestValue1"),
            new Dimension("TestDimension2", "TestValue2")
      );
      int evaluationPeriods = 360;
      Set<String> insufficientDataActions = ImmutableSet.of(
            "TestInsufficientDataAction1",
            "TestInsufficientDataAction2"
View Full Code Here

      assertEquals(new ListAlarmsForMetricResponseHandlerTest().expected().toString(),
                   cloudWatchApi.getAlarmApiForRegion(null)
                                .listForMetric(new ListAlarmsForMetric()
                                                     .dimensions(ImmutableSet.of(
                                                           new Dimension("TestDimensionName1",
                                                                         "TestDimensionValue1"),
                                                           new Dimension("TestDimensionName2",
                                                                         "TestDimensionValue2")
                                                     ))
                                                     .metricName(metricName)
                                                     .namespace(namespace)
                                                     .period(period)
View Full Code Here

                                                     .buildApi(CloudWatchApi.class);

         try {
            GetMetricStatisticsResponse datapoints = monitoringApi.getMetricApiForRegion(instance.getRegion())
                     .getMetricStatistics(GetMetricStatistics.builder()
                                                             .dimension(new Dimension(EC2Constants.Dimension.INSTANCE_ID, instance.getId()))
                                                             .unit(Unit.PERCENT)
                                                             .namespace("AWS/EC2")
                                                             .metricName("CPUUtilization")
                                                             .startTime(before)
                                                             .endTime(new Date())
View Full Code Here

TOP

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

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.