Class OperationsMetricOptions
Options for configuring metrics that considers multiple operations.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.DynamoDB
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class OperationsMetricOptions : IOperationsMetricOptions, ISystemErrorsForOperationsMetricOptions, IMetricOptions, ICommonMetricOptions
Syntax (vb)
Public Class OperationsMetricOptions Implements IOperationsMetricOptions, ISystemErrorsForOperationsMetricOptions, IMetricOptions, ICommonMetricOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK.AWS.DynamoDB;
var operationsMetricOptions = new OperationsMetricOptions {
Account = "account",
Color = "color",
DimensionsMap = new Dictionary<string, string> {
{ "dimensionsMapKey", "dimensionsMap" }
},
Id = "id",
Label = "label",
Operations = new [] { Operation.GET_ITEM },
Period = Duration.Minutes(30),
Region = "region",
StackAccount = "stackAccount",
StackRegion = "stackRegion",
Statistic = "statistic",
Unit = Unit.SECONDS,
Visible = false
};
Synopsis
Constructors
OperationsMetricOptions() | Options for configuring metrics that considers multiple operations. |
Properties
Account | Account which this metric comes from. |
Color | The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The |
DimensionsMap | Dimensions of the metric. |
Id | Unique identifier for this metric when used in dashboard widgets. |
Label | Label for this metric when added to a Graph in a Dashboard. |
Operations | The operations to apply the metric to. |
Period | The period over which the specified statistic is applied. |
Region | Region which this metric comes from. |
StackAccount | Account of the stack this metric is attached to. |
StackRegion | Region of the stack this metric is attached to. |
Statistic | What function to use for aggregating. |
Unit | Unit used to filter the metric stream. |
Visible | Whether this metric should be visible in dashboard graphs. |
Constructors
OperationsMetricOptions()
Options for configuring metrics that considers multiple operations.
public OperationsMetricOptions()
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.CloudWatch;
using Amazon.CDK.AWS.DynamoDB;
var operationsMetricOptions = new OperationsMetricOptions {
Account = "account",
Color = "color",
DimensionsMap = new Dictionary<string, string> {
{ "dimensionsMapKey", "dimensionsMap" }
},
Id = "id",
Label = "label",
Operations = new [] { Operation.GET_ITEM },
Period = Duration.Minutes(30),
Region = "region",
StackAccount = "stackAccount",
StackRegion = "stackRegion",
Statistic = "statistic",
Unit = Unit.SECONDS,
Visible = false
};
Properties
Account
Account which this metric comes from.
public string? Account { get; set; }
Property Value
Remarks
Default: - Deployment account.
Color
The hex color code, prefixed with '#' (e.g. '#00ff00'), to use when this metric is rendered on a graph. The Color
class has a set of standard colors that can be used here.
public string? Color { get; set; }
Property Value
Remarks
Default: - Automatic color
DimensionsMap
Dimensions of the metric.
public IDictionary<string, string>? DimensionsMap { get; set; }
Property Value
Remarks
Default: - No dimensions.
Id
Unique identifier for this metric when used in dashboard widgets.
public string? Id { get; set; }
Property Value
Remarks
The id can be used as a variable to represent this metric in math expressions. Valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.
Default: - No ID
Label
Label for this metric when added to a Graph in a Dashboard.
public string? Label { get; set; }
Property Value
Remarks
You can use dynamic labels to show summary information about the entire displayed time series in the legend. For example, if you use:
[max: ${MAX}] MyMetric
As the metric label, the maximum value in the visible range will be shown next to the time series name in the graph's legend.
Default: - No label
Operations
The operations to apply the metric to.
public Operation[]? Operations { get; set; }
Property Value
Remarks
Default: - All operations available by DynamoDB tables will be considered.
Period
The period over which the specified statistic is applied.
public Duration? Period { get; set; }
Property Value
Remarks
Default: Duration.minutes(5)
Region
Region which this metric comes from.
public string? Region { get; set; }
Property Value
Remarks
Default: - Deployment region.
StackAccount
Account of the stack this metric is attached to.
public string? StackAccount { get; set; }
Property Value
Remarks
Default: - Deployment account.
StackRegion
Region of the stack this metric is attached to.
public string? StackRegion { get; set; }
Property Value
Remarks
Default: - Deployment region.
Statistic
What function to use for aggregating.
public string? Statistic { get; set; }
Property Value
Remarks
Use the aws_cloudwatch.Stats
helper class to construct valid input strings.
Can be one of the following:
Default: Average
Unit
Unit used to filter the metric stream.
public Unit? Unit { get; set; }
Property Value
Unit?
Remarks
Only refer to datums emitted to the metric stream with the given unit and ignore all others. Only useful when datums are being emitted to the same metric stream under different units.
The default is to use all matric datums in the stream, regardless of unit, which is recommended in nearly all cases.
CloudWatch does not honor this property for graphs.
Default: - All metric datums in the given metric stream
Visible
Whether this metric should be visible in dashboard graphs.
public bool? Visible { get; set; }
Property Value
bool?
Remarks
Setting this to false is useful when you want to hide raw metrics that are used in math expressions, and show only the expression results.
Default: true