Class CfnServiceLevelObjective.SliMetricProperty
Use this structure to specify the metric to be used for the SLO.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.ApplicationSignals
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnServiceLevelObjective.SliMetricProperty : CfnServiceLevelObjective.ISliMetricProperty
Syntax (vb)
Public Class CfnServiceLevelObjective.SliMetricProperty Implements CfnServiceLevelObjective.ISliMetricProperty
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.AWS.ApplicationSignals;
var sliMetricProperty = new SliMetricProperty {
CompositeSliConfig = new CompositeSliConfigProperty {
SelectionConfig = new SelectionConfigProperty {
Type = "type",
// the properties below are optional
Pattern = "pattern"
},
// the properties below are optional
CompositeSliComponents = new [] { new CompositeSliComponentProperty {
OperationName = "operationName"
} }
},
DependencyConfig = new DependencyConfigProperty {
DependencyKeyAttributes = new Dictionary<string, string> {
{ "dependencyKeyAttributesKey", "dependencyKeyAttributes" }
},
DependencyOperationName = "dependencyOperationName"
},
KeyAttributes = new Dictionary<string, string> {
{ "keyAttributesKey", "keyAttributes" }
},
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
AccountId = "accountId",
Expression = "expression",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
Dimensions = new [] { new DimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Namespace = "namespace"
},
Period = 123,
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
ReturnData = false
} },
MetricName = "metricName",
MetricSource = new MetricSourceProperty {
MetricSourceKeyAttributes = new Dictionary<string, string> {
{ "metricSourceKeyAttributesKey", "metricSourceKeyAttributes" }
},
// the properties below are optional
MetricSourceAttributes = new Dictionary<string, string> {
{ "metricSourceAttributesKey", "metricSourceAttributes" }
}
},
MetricType = "metricType",
OperationName = "operationName",
PeriodSeconds = 123,
Statistic = "statistic"
};
Synopsis
Constructors
| SliMetricProperty() | Use this structure to specify the metric to be used for the SLO. |
Properties
| CompositeSliConfig | Use this structure to specify the metric to be used for the SLO. |
| DependencyConfig | Identifies the dependency using the |
| KeyAttributes | If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to. |
| MetricDataQueries | If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression. |
| MetricName | The name of the metric for non-Application Signals services. |
| MetricSource | Configuration for identifying the source of metrics for non-Application Signals services. |
| MetricType | If the SLO is to monitor either the |
| OperationName | If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation. |
| PeriodSeconds | The number of seconds to use as the period for SLO evaluation. |
| Statistic | The statistic to use for comparison to the threshold. |
Constructors
SliMetricProperty()
Use this structure to specify the metric to be used for the SLO.
public SliMetricProperty()
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.AWS.ApplicationSignals;
var sliMetricProperty = new SliMetricProperty {
CompositeSliConfig = new CompositeSliConfigProperty {
SelectionConfig = new SelectionConfigProperty {
Type = "type",
// the properties below are optional
Pattern = "pattern"
},
// the properties below are optional
CompositeSliComponents = new [] { new CompositeSliComponentProperty {
OperationName = "operationName"
} }
},
DependencyConfig = new DependencyConfigProperty {
DependencyKeyAttributes = new Dictionary<string, string> {
{ "dependencyKeyAttributesKey", "dependencyKeyAttributes" }
},
DependencyOperationName = "dependencyOperationName"
},
KeyAttributes = new Dictionary<string, string> {
{ "keyAttributesKey", "keyAttributes" }
},
MetricDataQueries = new [] { new MetricDataQueryProperty {
Id = "id",
// the properties below are optional
AccountId = "accountId",
Expression = "expression",
MetricStat = new MetricStatProperty {
Metric = new MetricProperty {
Dimensions = new [] { new DimensionProperty {
Name = "name",
Value = "value"
} },
MetricName = "metricName",
Namespace = "namespace"
},
Period = 123,
Stat = "stat",
// the properties below are optional
Unit = "unit"
},
ReturnData = false
} },
MetricName = "metricName",
MetricSource = new MetricSourceProperty {
MetricSourceKeyAttributes = new Dictionary<string, string> {
{ "metricSourceKeyAttributesKey", "metricSourceKeyAttributes" }
},
// the properties below are optional
MetricSourceAttributes = new Dictionary<string, string> {
{ "metricSourceAttributesKey", "metricSourceAttributes" }
}
},
MetricType = "metricType",
OperationName = "operationName",
PeriodSeconds = 123,
Statistic = "statistic"
};
Properties
CompositeSliConfig
Use this structure to specify the metric to be used for the SLO.
public object? CompositeSliConfig { get; set; }
Property Value
Remarks
DependencyConfig
Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName .
public object? DependencyConfig { get; set; }
Property Value
Remarks
KeyAttributes
If this SLO is related to a metric collected by Application Signals, you must use this field to specify which service the SLO metric is related to.
public object? KeyAttributes { get; set; }
Property Value
Remarks
To do so, you must specify at least the Type , Name , and Environment attributes.
This is a string-to-string map. It can include the following fields.
Type union: either IResolvable or Dictionary<string, string>
MetricDataQueries
If this SLO monitors a CloudWatch metric or the result of a CloudWatch metric math expression, use this structure to specify that metric or expression.
public object? MetricDataQueries { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnServiceLevelObjective.IMetricDataQueryProperty)[]
MetricName
The name of the metric for non-Application Signals services.
public string? MetricName { get; set; }
Property Value
Remarks
MetricSource
Configuration for identifying the source of metrics for non-Application Signals services.
public object? MetricSource { get; set; }
Property Value
Remarks
MetricType
If the SLO is to monitor either the LATENCY or AVAILABILITY metric that Application Signals collects, use this field to specify which of those metrics is used.
public string? MetricType { get; set; }
Property Value
Remarks
OperationName
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
public string? OperationName { get; set; }
Property Value
Remarks
PeriodSeconds
The number of seconds to use as the period for SLO evaluation.
public double? PeriodSeconds { get; set; }
Property Value
Remarks
Your application's performance is compared to the SLI during each period. For each period, the application is determined to have either achieved or not achieved the necessary performance.
Statistic
The statistic to use for comparison to the threshold.
public string? Statistic { get; set; }
Property Value
Remarks
It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions .