interface RequestBasedSliMetricProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ApplicationSignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapplicationsignals#CfnServiceLevelObjective_RequestBasedSliMetricProperty |
Java | software.amazon.awscdk.services.applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty |
Python | aws_cdk.aws_applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty |
TypeScript | aws-cdk-lib » aws_applicationsignals » CfnServiceLevelObjective » RequestBasedSliMetricProperty |
This structure contains the information about the metric that is used for a request-based SLO.
Example
// 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 requestBasedSliMetricProperty: applicationsignals.CfnServiceLevelObjective.RequestBasedSliMetricProperty = {
dependencyConfig: {
dependencyKeyAttributes: {
dependencyKeyAttributesKey: 'dependencyKeyAttributes',
},
dependencyOperationName: 'dependencyOperationName',
},
keyAttributes: {
keyAttributesKey: 'keyAttributes',
},
metricType: 'metricType',
monitoredRequestCountMetric: {
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,
}],
},
operationName: 'operationName',
totalRequestCountMetric: [{
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,
}],
};
Properties
| Name | Type | Description |
|---|---|---|
| dependency | IResolvable | Dependency | Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName . |
| key | { [string]: string } | IResolvable | This is a string-to-string map that contains information about the type of object that this SLO is related to. |
| metric | string | If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used. |
| monitored | IResolvable | Monitored | Use this structure to define the metric that you want to use as the "good request" or "bad request" value for a request-based SLO. |
| operation | string | If the SLO monitors a specific operation of the service, this field displays that operation name. |
| total | IResolvable | (IResolvable | Metric)[] | This structure defines the metric that is used as the "total requests" number for a request-based SLO. |
dependencyConfig?
Type:
IResolvable | Dependency
(optional)
Identifies the dependency using the DependencyKeyAttributes and DependencyOperationName .
keyAttributes?
Type:
{ [string]: string } | IResolvable
(optional)
This is a string-to-string map that contains information about the type of object that this SLO is related to.
It can include the following fields.
Typedesignates the type of object that this SLO is related to.ResourceTypespecifies the type of the resource. This field is used only when the value of theTypefield isResourceorAWS::Resource.Namespecifies the name of the object. This is used only if the value of theTypefield isService,RemoteService, orAWS::Service.Identifieridentifies the resource objects of this resource. This is used only if the value of theTypefield isResourceorAWS::Resource.Environmentspecifies the location where this object is hosted, or what it belongs to.AwsAccountIdallows you to create an SLO for an object that exists in another account.
metricType?
Type:
string
(optional)
If the SLO monitors either the LATENCY or AVAILABILITY metric that Application Signals collects, this field displays which of those metrics is used.
monitoredRequestCountMetric?
Type:
IResolvable | Monitored
(optional)
Use this structure to define the metric that you want to use as the "good request" or "bad request" value for a request-based SLO.
This value observed for the metric defined in TotalRequestCountMetric will be divided by the number found for MonitoredRequestCountMetric to determine the percentage of successful requests that this SLO tracks.
operationName?
Type:
string
(optional)
If the SLO monitors a specific operation of the service, this field displays that operation name.
totalRequestCountMetric?
Type:
IResolvable | (IResolvable | Metric)[]
(optional)
This structure defines the metric that is used as the "total requests" number for a request-based SLO.
The number observed for this metric is divided by the number of "good requests" or "bad requests" that is observed for the metric defined in MonitoredRequestCountMetric .

.NET
Go
Java
Python
TypeScript