MonitoredRequestCountMetricProperty Struct
This structure defines the metric that is used as the "good request" or "bad request" value for a request-based SLO.
This value observed for the metric defined in TotalRequestCountMetric is divided by the number found for MonitoredRequestCountMetric to determine the percentage of successful requests that this SLO tracks.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_applicationsignals as applicationsignals } from 'aws-cdk-lib';
const monitoredRequestCountMetricProperty: applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty = {
badCountMetric: [{
id: 'id',
// the properties below are optional
accountId: 'accountId',
expression: 'expression',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
period: 123,
stat: 'stat',
// the properties below are optional
unit: 'unit',
},
returnData: false,
}],
goodCountMetric: [{
id: 'id',
// the properties below are optional
accountId: 'accountId',
expression: 'expression',
metricStat: {
metric: {
dimensions: [{
name: 'name',
value: 'value',
}],
metricName: 'metricName',
namespace: 'namespace',
},
period: 123,
stat: 'stat',
// the properties below are optional
unit: 'unit',
},
returnData: false,
}],
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_applicationsignals as applicationsignals
monitored_request_count_metric_property = applicationsignals.CfnServiceLevelObjective.MonitoredRequestCountMetricProperty(
bad_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
id="id",
# the properties below are optional
account_id="accountId",
expression="expression",
metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
name="name",
value="value"
)],
metric_name="metricName",
namespace="namespace"
),
period=123,
stat="stat",
# the properties below are optional
unit="unit"
),
return_data=False
)],
good_count_metric=[applicationsignals.CfnServiceLevelObjective.MetricDataQueryProperty(
id="id",
# the properties below are optional
account_id="accountId",
expression="expression",
metric_stat=applicationsignals.CfnServiceLevelObjective.MetricStatProperty(
metric=applicationsignals.CfnServiceLevelObjective.MetricProperty(
dimensions=[applicationsignals.CfnServiceLevelObjective.DimensionProperty(
name="name",
value="value"
)],
metric_name="metricName",
namespace="namespace"
),
period=123,
stat="stat",
# the properties below are optional
unit="unit"
),
return_data=False
)]
)
java
// 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.*;
MonitoredRequestCountMetricProperty monitoredRequestCountMetricProperty = MonitoredRequestCountMetricProperty.builder()
.badCountMetric(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()))
.goodCountMetric(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()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 monitoredRequestCountMetricProperty = new MonitoredRequestCountMetricProperty {
BadCountMetric = 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
} },
GoodCountMetric = 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
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
monitoredRequestCountMetricProperty := &MonitoredRequestCountMetricProperty{
BadCountMetric: []interface{}{
&MetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
AccountId: jsii.String("accountId"),
Expression: jsii.String("expression"),
MetricStat: &MetricStatProperty{
Metric: &MetricProperty{
Dimensions: []interface{}{
&DimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
},
Period: jsii.Number(123),
Stat: jsii.String("stat"),
// the properties below are optional
Unit: jsii.String("unit"),
},
ReturnData: jsii.Boolean(false),
},
},
GoodCountMetric: []interface{}{
&MetricDataQueryProperty{
Id: jsii.String("id"),
// the properties below are optional
AccountId: jsii.String("accountId"),
Expression: jsii.String("expression"),
MetricStat: &MetricStatProperty{
Metric: &MetricProperty{
Dimensions: []interface{}{
&DimensionProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
MetricName: jsii.String("metricName"),
Namespace: jsii.String("namespace"),
},
Period: jsii.Number(123),
Stat: jsii.String("stat"),
// the properties below are optional
Unit: jsii.String("unit"),
},
ReturnData: jsii.Boolean(false),
},
},
}
Properties
badCountMetricoptionalIResolvable | IResolvable | CfnServiceLevelObjective.bad_count_metricoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDataQueryProperty]]]badCountMetricoptionalIResolvableBadCountMetricoptionalIResolvableBadCountMetricoptionalinterface{} #If you want to count "bad requests" to determine the percentage of successful requests for this request-based SLO, specify the metric to use as "bad requests" in this structure.
goodCountMetricoptionalIResolvable | IResolvable | CfnServiceLevelObjective.good_count_metricoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDataQueryProperty]]]goodCountMetricoptionalIResolvableGoodCountMetricoptionalIResolvableGoodCountMetricoptionalinterface{} #If you want to count "good requests" to determine the percentage of successful requests for this request-based SLO, specify the metric to use as "good requests" in this structure.