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 = {
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 |
---|---|---|
key | IResolvable | { [string]: string } | 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. |
keyAttributes?
Type:
IResolvable
| { [string]: string }
(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.
Type
designates the type of object that this SLO is related to.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.
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
.