Interface CfnServiceLevelObjective.SliMetricProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnServiceLevelObjective.SliMetricProperty.Jsii$Proxy
- Enclosing class:
CfnServiceLevelObjective
@Stability(Stable)
public static interface CfnServiceLevelObjective.SliMetricProperty
extends software.amazon.jsii.JsiiSerializable
Use this structure to specify the metric to be used for the SLO.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.applicationsignals.*; SliMetricProperty sliMetricProperty = SliMetricProperty.builder() .keyAttributes(Map.of( "keyAttributesKey", "keyAttributes")) .metricDataQueries(List.of(MetricDataQueryProperty.builder() .id("id") // the properties below are optional .accountId("accountId") .expression("expression") .metricStat(MetricStatProperty.builder() .metric(MetricProperty.builder() .dimensions(List.of(DimensionProperty.builder() .name("name") .value("value") .build())) .metricName("metricName") .namespace("namespace") .build()) .period(123) .stat("stat") // the properties below are optional .unit("unit") .build()) .returnData(false) .build())) .metricType("metricType") .operationName("operationName") .periodSeconds(123) .statistic("statistic") .build();
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forCfnServiceLevelObjective.SliMetricProperty
static final class
An implementation forCfnServiceLevelObjective.SliMetricProperty
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
default Object
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.default Object
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.default String
If the SLO is to monitor either theLATENCY
orAVAILABILITY
metric that Application Signals collects, use this field to specify which of those metrics is used.default String
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.default Number
The number of seconds to use as the period for SLO evaluation.default String
The statistic to use for comparison to the threshold.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getKeyAttributes
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.To do so, you must specify at least the
Type
,Name
, andEnvironment
attributes.This is a string-to-string map. It can include the following fields.
Type
designates the type of object this is.ResourceType
specifies the type of the resource. This field is used only when the value of theType
field isResource
orAWS::Resource
.Name
specifies the name of the object. This is used only if the value of theType
field isService
,RemoteService
, orAWS::Service
.Identifier
identifies the resource objects of this resource. This is used only if the value of theType
field isResource
orAWS::Resource
.Environment
specifies the location where this object is hosted, or what it belongs to.
- See Also:
-
getMetricDataQueries
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.- See Also:
-
getMetricType
If the SLO is to monitor either theLATENCY
orAVAILABILITY
metric that Application Signals collects, use this field to specify which of those metrics is used.- See Also:
-
getOperationName
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.- See Also:
-
getPeriodSeconds
The number of seconds to use as the period for SLO evaluation.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.
- See Also:
-
getStatistic
The statistic to use for comparison to the threshold.It can be any CloudWatch statistic or extended statistic. For more information about statistics, see CloudWatch statistics definitions .
- See Also:
-
builder
-