SliMetricProperty
Struct External
Use this structure to specify the metric to be used for the SLO.
| 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 sliMetricProperty: applicationsignals.CfnServiceLevelObjective.SliMetricProperty = {
compositeSliConfig: {
selectionConfig: {
type: 'type',
// the properties below are optional
pattern: 'pattern',
},
// the properties below are optional
compositeSliComponents: [{
operationName: 'operationName',
}],
},
dependencyConfig: {
dependencyKeyAttributes: {
dependencyKeyAttributesKey: 'dependencyKeyAttributes',
},
dependencyOperationName: 'dependencyOperationName',
},
keyAttributes: {
keyAttributesKey: 'keyAttributes',
},
metricDataQueries: [{
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,
}],
metricName: 'metricName',
metricSource: {
metricSourceKeyAttributes: {
metricSourceKeyAttributesKey: 'metricSourceKeyAttributes',
},
// the properties below are optional
metricSourceAttributes: {
metricSourceAttributesKey: 'metricSourceAttributes',
},
},
metricType: 'metricType',
operationName: 'operationName',
periodSeconds: 123,
statistic: 'statistic',
};
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
sli_metric_property = applicationsignals.CfnServiceLevelObjective.SliMetricProperty(
composite_sli_config=applicationsignals.CfnServiceLevelObjective.CompositeSliConfigProperty(
selection_config=applicationsignals.CfnServiceLevelObjective.SelectionConfigProperty(
type="type",
# the properties below are optional
pattern="pattern"
),
# the properties below are optional
composite_sli_components=[applicationsignals.CfnServiceLevelObjective.CompositeSliComponentProperty(
operation_name="operationName"
)]
),
dependency_config=applicationsignals.CfnServiceLevelObjective.DependencyConfigProperty(
dependency_key_attributes={
"dependency_key_attributes_key": "dependencyKeyAttributes"
},
dependency_operation_name="dependencyOperationName"
),
key_attributes={
"key_attributes_key": "keyAttributes"
},
metric_data_queries=[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
)],
metric_name="metricName",
metric_source=applicationsignals.CfnServiceLevelObjective.MetricSourceProperty(
metric_source_key_attributes={
"metric_source_key_attributes_key": "metricSourceKeyAttributes"
},
# the properties below are optional
metric_source_attributes={
"metric_source_attributes_key": "metricSourceAttributes"
}
),
metric_type="metricType",
operation_name="operationName",
period_seconds=123,
statistic="statistic"
)
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.*;
SliMetricProperty sliMetricProperty = SliMetricProperty.builder()
.compositeSliConfig(CompositeSliConfigProperty.builder()
.selectionConfig(SelectionConfigProperty.builder()
.type("type")
// the properties below are optional
.pattern("pattern")
.build())
// the properties below are optional
.compositeSliComponents(List.of(CompositeSliComponentProperty.builder()
.operationName("operationName")
.build()))
.build())
.dependencyConfig(DependencyConfigProperty.builder()
.dependencyKeyAttributes(Map.of(
"dependencyKeyAttributesKey", "dependencyKeyAttributes"))
.dependencyOperationName("dependencyOperationName")
.build())
.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()))
.metricName("metricName")
.metricSource(MetricSourceProperty.builder()
.metricSourceKeyAttributes(Map.of(
"metricSourceKeyAttributesKey", "metricSourceKeyAttributes"))
// the properties below are optional
.metricSourceAttributes(Map.of(
"metricSourceAttributesKey", "metricSourceAttributes"))
.build())
.metricType("metricType")
.operationName("operationName")
.periodSeconds(123)
.statistic("statistic")
.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 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"
};
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"
sliMetricProperty := &SliMetricProperty{
CompositeSliConfig: &CompositeSliConfigProperty{
SelectionConfig: &SelectionConfigProperty{
Type: jsii.String("type"),
// the properties below are optional
Pattern: jsii.String("pattern"),
},
// the properties below are optional
CompositeSliComponents: []interface{}{
&CompositeSliComponentProperty{
OperationName: jsii.String("operationName"),
},
},
},
DependencyConfig: &DependencyConfigProperty{
DependencyKeyAttributes: map[string]*string{
"dependencyKeyAttributesKey": jsii.String("dependencyKeyAttributes"),
},
DependencyOperationName: jsii.String("dependencyOperationName"),
},
KeyAttributes: map[string]*string{
"keyAttributesKey": jsii.String("keyAttributes"),
},
MetricDataQueries: []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),
},
},
MetricName: jsii.String("metricName"),
MetricSource: &MetricSourceProperty{
MetricSourceKeyAttributes: map[string]*string{
"metricSourceKeyAttributesKey": jsii.String("metricSourceKeyAttributes"),
},
// the properties below are optional
MetricSourceAttributes: map[string]*string{
"metricSourceAttributesKey": jsii.String("metricSourceAttributes"),
},
},
MetricType: jsii.String("metricType"),
OperationName: jsii.String("operationName"),
PeriodSeconds: jsii.Number(123),
Statistic: jsii.String("statistic"),
}
Properties
compositeSliConfigoptionalIResolvable | CfnServiceLevelObjective.composite_sli_configoptionaltyping.Union[IResolvable, CompositeSliConfigProperty]compositeSliConfigoptionalIResolvableCompositeSliConfigoptionalIResolvableCompositeSliConfigoptionalinterface{} #dependencyConfigoptionalIResolvable | CfnServiceLevelObjective.dependency_configoptionaltyping.Union[IResolvable, DependencyConfigProperty]dependencyConfigoptionalIResolvableDependencyConfigoptionalIResolvableDependencyConfigoptionalinterface{} #Identifies the dependency using the `DependencyKeyAttributes` and `DependencyOperationName` .
keyAttributesoptionalIResolvable | { [key: string]: string }key_attributesoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]keyAttributesoptionalIResolvableKeyAttributesoptionalIResolvableKeyAttributesoptionalinterface{} #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.
notes
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.
Typedesignates the type of object this is.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.
metricDataQueriesoptionalIResolvable | IResolvable | CfnServiceLevelObjective.metric_data_queriesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, MetricDataQueryProperty]]]metricDataQueriesoptionalIResolvableMetricDataQueriesoptionalIResolvableMetricDataQueriesoptionalinterface{} #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.
metricNameoptionalstringmetric_nameoptionalstrmetricNameoptionalStringMetricNameoptionalstringMetricNameoptional*string #The name of the metric for non-Application Signals services.
metricSourceoptionalIResolvable | CfnServiceLevelObjective.metric_sourceoptionaltyping.Union[IResolvable, MetricSourceProperty]metricSourceoptionalIResolvableMetricSourceoptionalIResolvableMetricSourceoptionalinterface{} #Configuration for identifying the source of metrics for non-Application Signals services.
metricTypeoptionalstringmetric_typeoptionalstrmetricTypeoptionalStringMetricTypeoptionalstringMetricTypeoptional*string #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.
operationNameoptionalstringoperation_nameoptionalstroperationNameoptionalStringOperationNameoptionalstringOperationNameoptional*string #If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
periodSecondsoptionalnumberperiod_secondsoptionalint | floatperiodSecondsoptionalNumberPeriodSecondsoptionaldoublePeriodSecondsoptional*float64 #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.
statisticoptionalstringstatisticoptionalstrstatisticoptionalStringStatisticoptionalstringStatisticoptional*string #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 .