Interface IMetricProps
Properties for a metric.
Inherited Members
Namespace: Amazon.CDK.AWS.CloudWatch
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IMetricProps : ICommonMetricOptions
Syntax (vb)
Public Interface IMetricProps
Inherits ICommonMetricOptions
Remarks
ExampleMetadata: infused
Examples
AutoScalingGroup autoScalingGroup;
var workerUtilizationMetric = new Metric(new MetricProps {
Namespace = "MyService",
MetricName = "WorkerUtilization"
});
autoScalingGroup.ScaleOnMetric("ScaleToCPU", new BasicStepScalingPolicyProps {
Metric = workerUtilizationMetric,
ScalingSteps = new [] { new ScalingInterval { Upper = 10, Change = -1 }, new ScalingInterval { Lower = 50, Change = +1 }, new ScalingInterval { Lower = 70, Change = +3 } },
// Change this to AdjustmentType.PERCENT_CHANGE_IN_CAPACITY to interpret the
// 'change' numbers before as percentages instead of capacity counts.
AdjustmentType = AdjustmentType.CHANGE_IN_CAPACITY
});
Synopsis
Properties
MetricName | Name of the metric. |
Namespace | Namespace of the metric. |
Properties
MetricName
Name of the metric.
string MetricName { get; }
Property Value
System.String
Namespace
Namespace of the metric.
string Namespace { get; }
Property Value
System.String