CfnServiceLevelObjectivePropsMixin
- class aws_cdk.mixins_preview.aws_applicationsignals.mixins.CfnServiceLevelObjectivePropsMixin(props, *, strategy=None)
Bases:
MixinCreates or updates a service level objective (SLO), which can help you ensure that your critical business operations are meeting customer expectations.
Use SLOs to set and track specific target levels for the reliability and availability of your applications and services. SLOs use service level indicators (SLIs) to calculate whether the application is performing at the level that you want.
Create an SLO to set a target for a service operation, or service dependency’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached.
The target performance quality that is defined for an SLO is the attainment goal . An attainment goal is the percentage of time or requests that the SLI is expected to meet the threshold over each time interval. For example, an attainment goal of 99.9% means that within your interval, you are targeting 99.9% of the periods to be in healthy state.
When you create an SLO, you specify whether it is a period-based SLO or a request-based SLO . Each type of SLO has a different way of evaluating your application’s performance against its attainment goal.
A period-based SLO uses defined periods of time within a specified total time interval. For each period of time, Application Signals determines whether the application met its goal. The attainment rate is calculated as the
number of good periods/number of total periods.
For example, for a period-based SLO, meeting an attainment goal of 99.9% means that within your interval, your application must meet its performance goal during at least 99.9% of the time periods.
A request-based SLO doesn’t use pre-defined periods of time. Instead, the SLO measures
number of good requests/number of total requestsduring the interval. At any time, you can find the ratio of good requests to total requests for the interval up to the time stamp that you specify, and measure that ratio against the goal set in your SLO.
After you have created an SLO, you can retrieve error budget reports for it. An error budget is the amount of time or amount of requests that your application can be non-compliant with the SLO’s goal, and still have your application meet the goal.
For a period-based SLO, the error budget starts at a number defined by the highest number of periods that can fail to meet the threshold, while still meeting the overall goal. The remaining error budget decreases with every failed period that is recorded. The error budget within one interval can never increase.
For example, an SLO with a threshold that 99.95% of requests must be completed under 2000ms every month translates to an error budget of 21.9 minutes of downtime per month.
For a request-based SLO, the remaining error budget is dynamic and can increase or decrease, depending on the ratio of good requests to total requests.
When you call this operation, Application Signals creates the AWSServiceRoleForCloudWatchApplicationSignals service-linked role, if it doesn’t already exist in your account. This service- linked role has the following permissions:
xray:GetServiceGraphlogs:StartQuerylogs:GetQueryResultscloudwatch:GetMetricDatacloudwatch:ListMetricstag:GetResourcesautoscaling:DescribeAutoScalingGroups
You can easily set SLO targets for your applications, and their dependencies, that are discovered by Application Signals, using critical metrics such as latency and availability. You can also set SLOs against any CloudWatch metric or math expression that produces a time series. .. epigraph:
You can't create an SLO for a service operation that was discovered by Application Signals until after that operation has reported standard metrics to Application Signals.
You cannot change from a period-based SLO to a request-based SLO, or change from a request-based SLO to a period-based SLO.
For more information about SLOs, see Service level objectives (SLOs) .
- See:
- CloudformationResource:
AWS::ApplicationSignals::ServiceLevelObjective
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins cfn_service_level_objective_props_mixin = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin(applicationsignals_mixins.CfnServiceLevelObjectiveMixinProps( burn_rate_configurations=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.BurnRateConfigurationProperty( look_back_window_minutes=123 )], description="description", exclusion_windows=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.ExclusionWindowProperty( reason="reason", recurrence_rule=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RecurrenceRuleProperty( expression="expression" ), start_time="startTime", window=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.WindowProperty( duration=123, duration_unit="durationUnit" ) )], goal=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.GoalProperty( attainment_goal=123, interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.IntervalProperty( calendar_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.CalendarIntervalProperty( duration=123, duration_unit="durationUnit", start_time=123 ), rolling_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RollingIntervalProperty( duration=123, duration_unit="durationUnit" ) ), warning_threshold=123 ), name="name", request_based_sli=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RequestBasedSliProperty( comparison_operator="comparisonOperator", metric_threshold=123, request_based_sli_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RequestBasedSliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_type="metricType", monitored_request_count_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MonitoredRequestCountMetricProperty( bad_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], good_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] ), operation_name="operationName", total_request_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] ) ), sli=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.SliProperty( comparison_operator="comparisonOperator", metric_threshold=123, sli_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.SliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_data_queries=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], metric_type="metricType", operation_name="operationName", period_seconds=123, statistic="statistic" ) ), tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::ApplicationSignals::ServiceLevelObjective.- Parameters:
props (
Union[CfnServiceLevelObjectiveMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['burnRateConfigurations', 'description', 'exclusionWindows', 'goal', 'name', 'requestBasedSli', 'sli', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
BurnRateConfigurationProperty
- class CfnServiceLevelObjectivePropsMixin.BurnRateConfigurationProperty(*, look_back_window_minutes=None)
Bases:
objectThis object defines the length of the look-back window used to calculate one burn rate metric for this SLO.
The burn rate measures how fast the service is consuming the error budget, relative to the attainment goal of the SLO. A burn rate of exactly 1 indicates that the SLO goal will be met exactly.
For example, if you specify 60 as the number of minutes in the look-back window, the burn rate is calculated as the following:
burn rate = error rate over the look-back window / (100% - attainment goal percentage)
For more information about burn rates, see Calculate burn rates .
- Parameters:
look_back_window_minutes (
Union[int,float,None]) – The number of minutes to use as the look-back window.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins burn_rate_configuration_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.BurnRateConfigurationProperty( look_back_window_minutes=123 )
Attributes
- look_back_window_minutes
The number of minutes to use as the look-back window.
CalendarIntervalProperty
- class CfnServiceLevelObjectivePropsMixin.CalendarIntervalProperty(*, duration=None, duration_unit=None, start_time=None)
Bases:
objectIf the interval for this service level objective is a calendar interval, this structure contains the interval specifications.
- Parameters:
duration (
Union[int,float,None]) – Specifies the duration of each calendar interval. For example, ifDurationis1andDurationUnitisMONTH, each interval is one month, aligned with the calendar.duration_unit (
Optional[str]) – Specifies the calendar interval unit.start_time (
Union[int,float,None]) – The date and time when you want the first interval to start. Be sure to choose a time that configures the intervals the way that you want. For example, if you want weekly intervals starting on Mondays at 6 a.m., be sure to specify a start time that is a Monday at 6 a.m. When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:1698778057As soon as one calendar interval ends, another automatically begins.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins calendar_interval_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.CalendarIntervalProperty( duration=123, duration_unit="durationUnit", start_time=123 )
Attributes
- duration
Specifies the duration of each calendar interval.
For example, if
Durationis1andDurationUnitisMONTH, each interval is one month, aligned with the calendar.
- duration_unit
Specifies the calendar interval unit.
- start_time
The date and time when you want the first interval to start.
Be sure to choose a time that configures the intervals the way that you want. For example, if you want weekly intervals starting on Mondays at 6 a.m., be sure to specify a start time that is a Monday at 6 a.m.
When used in a raw HTTP Query API, it is formatted as be epoch time in seconds. For example:
1698778057As soon as one calendar interval ends, another automatically begins.
DependencyConfigProperty
- class CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty(*, dependency_key_attributes=None, dependency_operation_name=None)
Bases:
objectIdentifies the dependency using the
DependencyKeyAttributesandDependencyOperationName.- Parameters:
dependency_key_attributes (
Union[Mapping[str,str],IResolvable,None]) – If this SLO is related to a metric collected by Application Signals, you must use this field to specify which dependency the SLO metric is related to. -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.dependency_operation_name (
Optional[str]) – When the SLO monitors a specific operation of the dependency, this field specifies the name of that operation in the dependency.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins dependency_config_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" )
Attributes
- dependency_key_attributes
If this SLO is related to a metric collected by Application Signals, you must use this field to specify which dependency the SLO metric is related to.
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.
- dependency_operation_name
When the SLO monitors a specific operation of the dependency, this field specifies the name of that operation in the dependency.
DimensionProperty
- class CfnServiceLevelObjectivePropsMixin.DimensionProperty(*, name=None, value=None)
Bases:
objectA dimension is a name/value pair that is part of the identity of a metric.
Because dimensions are part of the unique identifier for a metric, whenever you add a unique name/value pair to one of your metrics, you are creating a new variation of that metric. For example, many Amazon EC2 metrics publish
InstanceIdas a dimension name, and the actual instance ID as the value for that dimension.You can assign up to 30 dimensions to a metric.
- Parameters:
name (
Optional[str]) – The name of the dimension. Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (:). ASCII control characters are not supported as part of dimension names.value (
Optional[str]) – The value of the dimension. Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins dimension_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )
Attributes
- name
The name of the dimension.
Dimension names must contain only ASCII characters, must include at least one non-whitespace character, and cannot start with a colon (
:). ASCII control characters are not supported as part of dimension names.
- value
The value of the dimension.
Dimension values must contain only ASCII characters and must include at least one non-whitespace character. ASCII control characters are not supported as part of dimension values.
ExclusionWindowProperty
- class CfnServiceLevelObjectivePropsMixin.ExclusionWindowProperty(*, reason=None, recurrence_rule=None, start_time=None, window=None)
Bases:
objectThe time window to be excluded from the SLO performance metrics.
- Parameters:
reason (
Optional[str]) – The reason for the time exclusion windows. For example, maintenance. Default: - “No reason”recurrence_rule (
Union[IResolvable,RecurrenceRuleProperty,Dict[str,Any],None]) – The recurrence rule for the time exclusion window.start_time (
Optional[str]) – The start time of the time exclusion window.window (
Union[IResolvable,WindowProperty,Dict[str,Any],None]) – The time exclusion window.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins exclusion_window_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.ExclusionWindowProperty( reason="reason", recurrence_rule=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RecurrenceRuleProperty( expression="expression" ), start_time="startTime", window=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.WindowProperty( duration=123, duration_unit="durationUnit" ) )
Attributes
- reason
The reason for the time exclusion windows.
For example, maintenance.
- recurrence_rule
The recurrence rule for the time exclusion window.
- start_time
The start time of the time exclusion window.
GoalProperty
- class CfnServiceLevelObjectivePropsMixin.GoalProperty(*, attainment_goal=None, interval=None, warning_threshold=None)
Bases:
objectThis structure contains the attributes that determine the goal of an SLO.
This includes the time period for evaluation and the attainment threshold.
- Parameters:
attainment_goal (
Union[int,float,None]) – The threshold that determines if the goal is being met. If this is a period-based SLO, the attainment goal is the percentage of good periods that meet the threshold requirements to the total periods within the interval. For example, an attainment goal of 99.9% means that within your interval, you are targeting 99.9% of the periods to be in healthy state. If this is a request-based SLO, the attainment goal is the percentage of requests that must be successful to meet the attainment goal. If you omit this parameter, 99 is used to represent 99% as the attainment goal.interval (
Union[IResolvable,IntervalProperty,Dict[str,Any],None]) – The time period used to evaluate the SLO. It can be either a calendar interval or rolling interval. If you omit this parameter, a rolling interval of 7 days is used.warning_threshold (
Union[int,float,None]) – The percentage of remaining budget over total budget that you want to get warnings for. If you omit this parameter, the default of 50.0 is used.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins goal_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.GoalProperty( attainment_goal=123, interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.IntervalProperty( calendar_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.CalendarIntervalProperty( duration=123, duration_unit="durationUnit", start_time=123 ), rolling_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RollingIntervalProperty( duration=123, duration_unit="durationUnit" ) ), warning_threshold=123 )
Attributes
- attainment_goal
The threshold that determines if the goal is being met.
If this is a period-based SLO, the attainment goal is the percentage of good periods that meet the threshold requirements to the total periods within the interval. For example, an attainment goal of 99.9% means that within your interval, you are targeting 99.9% of the periods to be in healthy state.
If this is a request-based SLO, the attainment goal is the percentage of requests that must be successful to meet the attainment goal.
If you omit this parameter, 99 is used to represent 99% as the attainment goal.
- interval
The time period used to evaluate the SLO. It can be either a calendar interval or rolling interval.
If you omit this parameter, a rolling interval of 7 days is used.
- warning_threshold
The percentage of remaining budget over total budget that you want to get warnings for.
If you omit this parameter, the default of 50.0 is used.
IntervalProperty
- class CfnServiceLevelObjectivePropsMixin.IntervalProperty(*, calendar_interval=None, rolling_interval=None)
Bases:
objectThe time period used to evaluate the SLO.
It can be either a calendar interval or rolling interval.
- Parameters:
calendar_interval (
Union[IResolvable,CalendarIntervalProperty,Dict[str,Any],None]) – If the interval is a calendar interval, this structure contains the interval specifications.rolling_interval (
Union[IResolvable,RollingIntervalProperty,Dict[str,Any],None]) – If the interval is a rolling interval, this structure contains the interval specifications.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins interval_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.IntervalProperty( calendar_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.CalendarIntervalProperty( duration=123, duration_unit="durationUnit", start_time=123 ), rolling_interval=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RollingIntervalProperty( duration=123, duration_unit="durationUnit" ) )
Attributes
- calendar_interval
If the interval is a calendar interval, this structure contains the interval specifications.
- rolling_interval
If the interval is a rolling interval, this structure contains the interval specifications.
MetricDataQueryProperty
- class CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty(*, account_id=None, expression=None, id=None, metric_stat=None, return_data=None)
Bases:
objectUse this structure to define a metric or metric math expression that you want to use as for a service level objective.
Each
MetricDataQueryin theMetricDataQueriesarray specifies either a metric to retrieve, or a metric math expression to be performed on retrieved metrics. A singleMetricDataQueriesarray can include as many as 20MetricDataQuerystructures in the array. The 20 structures can include as many as 10 structures that contain aMetricStatparameter to retrieve a metric, and as many as 10 structures that contain theExpressionparameter to perform a math expression. Of thoseExpressionstructures, exactly one must have true as the value forReturnData. The result of this expression used for the SLO.For more information about metric math expressions, see Use metric math .
Within each
MetricDataQueryobject, you must specify eitherExpressionorMetricStatbut not both.- Parameters:
account_id (
Optional[str]) – The ID of the account where this metric is located. If you are performing this operation in a monitoring account, use this to specify which source account to retrieve this metric from.expression (
Optional[str]) – This field can contain a metric math expression to be performed on the other metrics that you are retrieving within thisMetricDataQueriesstructure. A math expression can use theIdof the other metrics or queries to refer to those metrics, and can also use theIdof other expressions to use the result of those expressions. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide . Within eachMetricDataQueryobject, you must specify eitherExpressionorMetricStatbut not both.id (
Optional[str]) – A short name used to tie this object to the results in the response. ThisIdmust be unique within aMetricDataQueriesarray. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the metric math expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.metric_stat (
Union[IResolvable,MetricStatProperty,Dict[str,Any],None]) – A metric to be used directly for the SLO, or to be used in the math expression that will be used for the SLO. Within oneMetricDataQueryobject, you must specify eitherExpressionorMetricStatbut not both.return_data (
Union[bool,IResolvable,None]) – Use this only if you are using a metric math expression for the SLO. SpecifytrueforReturnDatafor only the one expression result to use as the alarm. For all other metrics and expressions in the sameCreateServiceLevelObjectiveoperation, specifyReturnDataasfalse.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins metric_data_query_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )
Attributes
- account_id
The ID of the account where this metric is located.
If you are performing this operation in a monitoring account, use this to specify which source account to retrieve this metric from.
- expression
This field can contain a metric math expression to be performed on the other metrics that you are retrieving within this
MetricDataQueriesstructure.A math expression can use the
Idof the other metrics or queries to refer to those metrics, and can also use theIdof other expressions to use the result of those expressions. For more information about metric math expressions, see Metric Math Syntax and Functions in the Amazon CloudWatch User Guide .Within each
MetricDataQueryobject, you must specify eitherExpressionorMetricStatbut not both.
- id
A short name used to tie this object to the results in the response.
This
Idmust be unique within aMetricDataQueriesarray. If you are performing math expressions on this set of data, this name represents that data and can serve as a variable in the metric math expression. The valid characters are letters, numbers, and underscore. The first character must be a lowercase letter.
- metric_stat
A metric to be used directly for the SLO, or to be used in the math expression that will be used for the SLO.
Within one
MetricDataQueryobject, you must specify eitherExpressionorMetricStatbut not both.
- return_data
Use this only if you are using a metric math expression for the SLO.
Specify
trueforReturnDatafor only the one expression result to use as the alarm. For all other metrics and expressions in the sameCreateServiceLevelObjectiveoperation, specifyReturnDataasfalse.
MetricProperty
- class CfnServiceLevelObjectivePropsMixin.MetricProperty(*, dimensions=None, metric_name=None, namespace=None)
Bases:
objectThis structure defines the metric used for a service level indicator, including the metric name, namespace, and dimensions.
- Parameters:
dimensions (
Union[IResolvable,Sequence[Union[IResolvable,DimensionProperty,Dict[str,Any]]],None]) – An array of one or more dimensions to use to define the metric that you want to use. For more information, see Dimensions .metric_name (
Optional[str]) – The name of the metric to use.namespace (
Optional[str]) – The namespace of the metric. For more information, see Namespaces .
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins metric_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" )
Attributes
- dimensions
An array of one or more dimensions to use to define the metric that you want to use.
For more information, see Dimensions .
- metric_name
The name of the metric to use.
- namespace
The namespace of the metric.
For more information, see Namespaces .
MetricStatProperty
- class CfnServiceLevelObjectivePropsMixin.MetricStatProperty(*, metric=None, period=None, stat=None, unit=None)
Bases:
objectThis structure defines the metric to be used as the service level indicator, along with the statistics, period, and unit.
- Parameters:
metric (
Union[IResolvable,MetricProperty,Dict[str,Any],None]) – The metric to use as the service level indicator, including the metric name, namespace, and dimensions.period (
Union[int,float,None]) – The granularity, in seconds, to be used for the metric. For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by aPutMetricDatacall that includes aStorageResolutionof 1 second.stat (
Optional[str]) – 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 .unit (
Optional[str]) – If you omitUnitthen all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch. If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins metric_stat_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" )
Attributes
- metric
The metric to use as the service level indicator, including the metric name, namespace, and dimensions.
- period
The granularity, in seconds, to be used for the metric.
For metrics with regular resolution, a period can be as short as one minute (60 seconds) and must be a multiple of 60. For high-resolution metrics that are collected at intervals of less than one minute, the period can be 1, 5, 10, 30, 60, or any multiple of 60. High-resolution metrics are those metrics stored by a
PutMetricDatacall that includes aStorageResolutionof 1 second.
- stat
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 .
- unit
If you omit
Unitthen all data that was collected with any unit is returned, along with the corresponding units that were specified when the data was reported to CloudWatch.If you specify a unit, the operation returns only data that was collected with that unit specified. If you specify a unit that does not match the data collected, the results of the operation are null. CloudWatch does not perform unit conversions.
MonitoredRequestCountMetricProperty
- class CfnServiceLevelObjectivePropsMixin.MonitoredRequestCountMetricProperty(*, bad_count_metric=None, good_count_metric=None)
Bases:
objectThis 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
TotalRequestCountMetricis divided by the number found forMonitoredRequestCountMetricto determine the percentage of successful requests that this SLO tracks.- Parameters:
bad_count_metric (
Union[IResolvable,Sequence[Union[IResolvable,MetricDataQueryProperty,Dict[str,Any]]],None]) – 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.good_count_metric (
Union[IResolvable,Sequence[Union[IResolvable,MetricDataQueryProperty,Dict[str,Any]]],None]) – 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.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins monitored_request_count_metric_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MonitoredRequestCountMetricProperty( bad_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], good_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] )
Attributes
- bad_count_metric
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.
- good_count_metric
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.
RecurrenceRuleProperty
- class CfnServiceLevelObjectivePropsMixin.RecurrenceRuleProperty(*, expression=None)
Bases:
objectThe recurrence rule for the time exclusion window.
- Parameters:
expression (
Optional[str]) – The following two rules are supported:. - rate(value unit) - The value must be a positive integer and the unit can be hour|day|month. - cron - An expression which consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year).- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins recurrence_rule_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RecurrenceRuleProperty( expression="expression" )
Attributes
- expression
.
rate(value unit) - The value must be a positive integer and the unit can be hour|day|month.
cron - An expression which consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year).
RequestBasedSliMetricProperty
- class CfnServiceLevelObjectivePropsMixin.RequestBasedSliMetricProperty(*, dependency_config=None, key_attributes=None, metric_type=None, monitored_request_count_metric=None, operation_name=None, total_request_count_metric=None)
Bases:
objectThis structure contains the information about the metric that is used for a request-based SLO.
- Parameters:
dependency_config (
Union[IResolvable,DependencyConfigProperty,Dict[str,Any],None]) – Identifies the dependency using theDependencyKeyAttributesandDependencyOperationName.key_attributes (
Union[Mapping[str,str],IResolvable,None]) – 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.metric_type (
Optional[str]) – If the SLO monitors either theLATENCYorAVAILABILITYmetric that Application Signals collects, this field displays which of those metrics is used.monitored_request_count_metric (
Union[IResolvable,MonitoredRequestCountMetricProperty,Dict[str,Any],None]) – 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 inTotalRequestCountMetricwill be divided by the number found forMonitoredRequestCountMetricto determine the percentage of successful requests that this SLO tracks.operation_name (
Optional[str]) – If the SLO monitors a specific operation of the service, this field displays that operation name.total_request_count_metric (
Union[IResolvable,Sequence[Union[IResolvable,MetricDataQueryProperty,Dict[str,Any]]],None]) – 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 inMonitoredRequestCountMetric.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins request_based_sli_metric_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RequestBasedSliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_type="metricType", monitored_request_count_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MonitoredRequestCountMetricProperty( bad_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], good_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] ), operation_name="operationName", total_request_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] )
Attributes
- dependency_config
Identifies the dependency using the
DependencyKeyAttributesandDependencyOperationName.
- key_attributes
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.
- metric_type
If the SLO monitors either the
LATENCYorAVAILABILITYmetric that Application Signals collects, this field displays which of those metrics is used.
- monitored_request_count_metric
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
TotalRequestCountMetricwill be divided by the number found forMonitoredRequestCountMetricto determine the percentage of successful requests that this SLO tracks.
- operation_name
If the SLO monitors a specific operation of the service, this field displays that operation name.
- total_request_count_metric
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.
RequestBasedSliProperty
- class CfnServiceLevelObjectivePropsMixin.RequestBasedSliProperty(*, comparison_operator=None, metric_threshold=None, request_based_sli_metric=None)
Bases:
objectThis structure contains information about the performance metric that a request-based SLO monitors.
- Parameters:
comparison_operator (
Optional[str]) – The arithmetic operation used when comparing the specified metric to the threshold.metric_threshold (
Union[int,float,None]) – This value is the threshold that the observed metric values of the SLI metric are compared to.request_based_sli_metric (
Union[IResolvable,RequestBasedSliMetricProperty,Dict[str,Any],None]) – A structure that contains information about the metric that the SLO monitors.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins request_based_sli_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RequestBasedSliProperty( comparison_operator="comparisonOperator", metric_threshold=123, request_based_sli_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RequestBasedSliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_type="metricType", monitored_request_count_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MonitoredRequestCountMetricProperty( bad_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], good_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] ), operation_name="operationName", total_request_count_metric=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )] ) )
Attributes
- comparison_operator
The arithmetic operation used when comparing the specified metric to the threshold.
- metric_threshold
This value is the threshold that the observed metric values of the SLI metric are compared to.
- request_based_sli_metric
A structure that contains information about the metric that the SLO monitors.
RollingIntervalProperty
- class CfnServiceLevelObjectivePropsMixin.RollingIntervalProperty(*, duration=None, duration_unit=None)
Bases:
objectIf the interval for this SLO is a rolling interval, this structure contains the interval specifications.
- Parameters:
duration (
Union[int,float,None]) – Specifies the duration of each rolling interval. For example, ifDurationis7andDurationUnitisDAY, each rolling interval is seven days.duration_unit (
Optional[str]) – Specifies the rolling interval unit.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins rolling_interval_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.RollingIntervalProperty( duration=123, duration_unit="durationUnit" )
Attributes
- duration
Specifies the duration of each rolling interval.
For example, if
Durationis7andDurationUnitisDAY, each rolling interval is seven days.
- duration_unit
Specifies the rolling interval unit.
SliMetricProperty
- class CfnServiceLevelObjectivePropsMixin.SliMetricProperty(*, dependency_config=None, key_attributes=None, metric_data_queries=None, metric_type=None, operation_name=None, period_seconds=None, statistic=None)
Bases:
objectUse this structure to specify the metric to be used for the SLO.
- Parameters:
dependency_config (
Union[IResolvable,DependencyConfigProperty,Dict[str,Any],None]) – Identifies the dependency using theDependencyKeyAttributesandDependencyOperationName.key_attributes (
Union[Mapping[str,str],IResolvable,None]) – 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 theType,Name, andEnvironmentattributes. 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.metric_data_queries (
Union[IResolvable,Sequence[Union[IResolvable,MetricDataQueryProperty,Dict[str,Any]]],None]) – 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.metric_type (
Optional[str]) – If the SLO is to monitor either theLATENCYorAVAILABILITYmetric that Application Signals collects, use this field to specify which of those metrics is used.operation_name (
Optional[str]) – If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.period_seconds (
Union[int,float,None]) – 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.statistic (
Optional[str]) –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:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins sli_metric_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.SliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_data_queries=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], metric_type="metricType", operation_name="operationName", period_seconds=123, statistic="statistic" )
Attributes
- dependency_config
Identifies the dependency using the
DependencyKeyAttributesandDependencyOperationName.
- key_attributes
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, andEnvironmentattributes.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.
- metric_data_queries
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.
- metric_type
If the SLO is to monitor either the
LATENCYorAVAILABILITYmetric that Application Signals collects, use this field to specify which of those metrics is used.
- operation_name
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
- period_seconds
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.
- statistic
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 .
SliProperty
- class CfnServiceLevelObjectivePropsMixin.SliProperty(*, comparison_operator=None, metric_threshold=None, sli_metric=None)
Bases:
objectThis structure specifies the information about the service and the performance metric that an SLO is to monitor.
- Parameters:
comparison_operator (
Optional[str]) – The arithmetic operation to use when comparing the specified metric to the threshold.metric_threshold (
Union[int,float,None]) – The value that the SLI metric is compared to.sli_metric (
Union[IResolvable,SliMetricProperty,Dict[str,Any],None]) – Use this structure to specify the metric to be used for the SLO.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins sli_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.SliProperty( comparison_operator="comparisonOperator", metric_threshold=123, sli_metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.SliMetricProperty( dependency_config=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DependencyConfigProperty( dependency_key_attributes={ "dependency_key_attributes_key": "dependencyKeyAttributes" }, dependency_operation_name="dependencyOperationName" ), key_attributes={ "key_attributes_key": "keyAttributes" }, metric_data_queries=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricDataQueryProperty( account_id="accountId", expression="expression", id="id", metric_stat=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricStatProperty( metric=applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.MetricProperty( dimensions=[applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.DimensionProperty( name="name", value="value" )], metric_name="metricName", namespace="namespace" ), period=123, stat="stat", unit="unit" ), return_data=False )], metric_type="metricType", operation_name="operationName", period_seconds=123, statistic="statistic" ) )
Attributes
- comparison_operator
The arithmetic operation to use when comparing the specified metric to the threshold.
- metric_threshold
The value that the SLI metric is compared to.
- sli_metric
Use this structure to specify the metric to be used for the SLO.
WindowProperty
- class CfnServiceLevelObjectivePropsMixin.WindowProperty(*, duration=None, duration_unit=None)
Bases:
objectThe start and end time of the time exclusion window.
- Parameters:
duration (
Union[int,float,None]) – The start and end time of the time exclusion window.duration_unit (
Optional[str]) – The unit of measurement to use during the time window exclusion.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_applicationsignals import mixins as applicationsignals_mixins window_property = applicationsignals_mixins.CfnServiceLevelObjectivePropsMixin.WindowProperty( duration=123, duration_unit="durationUnit" )
Attributes
- duration
The start and end time of the time exclusion window.
- duration_unit
The unit of measurement to use during the time window exclusion.