AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the Amazon CloudWatch Application Signals CreateServiceLevelObjective API operation.

Syntax

New-CWASServiceLevelObjective
-Name <String>
-Goal_AttainmentGoal <Double>
-MonitoredRequestCountMetric_BadCountMetric <MetricDataQuery[]>
-BurnRateConfiguration <BurnRateConfiguration[]>
-RequestBasedSliConfig_ComparisonOperator <ServiceLevelIndicatorComparisonOperator>
-SliConfig_ComparisonOperator <ServiceLevelIndicatorComparisonOperator>
-RequestBasedSliConfig_RequestBasedSliMetricConfig_DependencyConfig_DependencyKeyAttributes <Hashtable>
-SliConfig_SliMetricConfig_DependencyConfig_DependencyKeyAttributes <Hashtable>
-RequestBasedSliConfig_RequestBasedSliMetricConfig_DependencyConfig_DependencyOperationName <String>
-SliConfig_SliMetricConfig_DependencyConfig_DependencyOperationName <String>
-Description <String>
-CalendarInterval_Duration <Int32>
-RollingInterval_Duration <Int32>
-CalendarInterval_DurationUnit <DurationUnit>
-RollingInterval_DurationUnit <DurationUnit>
-MonitoredRequestCountMetric_GoodCountMetric <MetricDataQuery[]>
-RequestBasedSliMetricConfig_KeyAttribute <Hashtable>
-SliMetricConfig_KeyAttribute <Hashtable>
-SliMetricConfig_MetricDataQuery <MetricDataQuery[]>
-RequestBasedSliConfig_MetricThreshold <Double>
-SliConfig_MetricThreshold <Double>
-RequestBasedSliMetricConfig_MetricType <ServiceLevelIndicatorMetricType>
-SliMetricConfig_MetricType <ServiceLevelIndicatorMetricType>
-RequestBasedSliMetricConfig_OperationName <String>
-SliMetricConfig_OperationName <String>
-SliMetricConfig_PeriodSecond <Int32>
-CalendarInterval_StartTime <DateTime>
-SliMetricConfig_Statistic <String>
-Tag <Tag[]>
-RequestBasedSliMetricConfig_TotalRequestCountMetric <MetricDataQuery[]>
-Goal_WarningThreshold <Double>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonApplicationSignalsConfig>

Description

Creates 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 or operation’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. You can set SLO targets for your applications 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. 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. 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 requests during 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.
For more information about SLOs, see Service level objectives (SLOs). When you perform a CreateServiceLevelObjective 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:GetServiceGraph
  • logs:StartQuery
  • logs:GetQueryResults
  • cloudwatch:GetMetricData
  • cloudwatch:ListMetrics
  • tag:GetResources
  • autoscaling:DescribeAutoScalingGroups

Parameters

-BurnRateConfiguration <BurnRateConfiguration[]>
Use this array to create burn rates for this SLO. Each burn rate is a metric that indicates how fast the service is consuming the error budget, relative to the attainment goal of the SLO. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBurnRateConfigurations
-CalendarInterval_Duration <Int32>
Specifies the duration of each calendar interval. For example, if Duration is 1 and DurationUnit is MONTH, each interval is one month, aligned with the calendar.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGoal_Interval_CalendarInterval_Duration
-CalendarInterval_DurationUnit <DurationUnit>
Specifies the calendar interval unit.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGoal_Interval_CalendarInterval_DurationUnit
-CalendarInterval_StartTime <DateTime>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGoal_Interval_CalendarInterval_StartTime
Amazon.PowerShell.Cmdlets.CWAS.AmazonApplicationSignalsClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Description <String>
An optional description for this SLO.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Goal_AttainmentGoal <Double>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Goal_WarningThreshold <Double>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MonitoredRequestCountMetric_BadCountMetric <MetricDataQuery[]>
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. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_MonitoredRequestCountMetric_BadCountMetric
-MonitoredRequestCountMetric_GoodCountMetric <MetricDataQuery[]>
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. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_MonitoredRequestCountMetric_GoodCountMetric
-Name <String>
A name for this SLO.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-RequestBasedSliConfig_ComparisonOperator <ServiceLevelIndicatorComparisonOperator>
The arithmetic operation to use when comparing the specified metric to the threshold. This parameter is required if this SLO is tracking the Latency metric.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestBasedSliConfig_MetricThreshold <Double>
The value that the SLI metric is compared to. This parameter is required if this SLO is tracking the Latency metric.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestBasedSliConfig_RequestBasedSliMetricConfig_DependencyConfig_DependencyKeyAttributes <Hashtable>
This is a string-to-string map. It can include the following fields.
  • Type designates the type of object this is.
  • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.
  • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.
  • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.
  • Environment specifies the location where this object is hosted, or what it belongs to.
Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestBasedSliConfig_RequestBasedSliMetricConfig_DependencyConfig_DependencyOperationName <String>
The name of the called operation in the dependency.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-RequestBasedSliMetricConfig_KeyAttribute <Hashtable>
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, and Environment attributes.This is a string-to-string map. It can include the following fields.
  • Type designates the type of object this is.
  • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.
  • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.
  • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.
  • Environment specifies the location where this object is hosted, or what it belongs to.
Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_KeyAttributes
-RequestBasedSliMetricConfig_MetricType <ServiceLevelIndicatorMetricType>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_MetricType
-RequestBasedSliMetricConfig_OperationName <String>
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_OperationName
-RequestBasedSliMetricConfig_TotalRequestCountMetric <MetricDataQuery[]>
Use this structure to define the metric that you want to use as the "total requests" number for a request-based SLO. This result will be divided by the "good request" or "bad request" value defined in MonitoredRequestCountMetric. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRequestBasedSliConfig_RequestBasedSliMetricConfig_TotalRequestCountMetric
-RollingInterval_Duration <Int32>
Specifies the duration of each rolling interval. For example, if Duration is 7 and DurationUnit is DAY, each rolling interval is seven days.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGoal_Interval_RollingInterval_Duration
-RollingInterval_DurationUnit <DurationUnit>
Specifies the rolling interval unit.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesGoal_Interval_RollingInterval_DurationUnit
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'Slo'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.ApplicationSignals.Model.CreateServiceLevelObjectiveResponse). Specifying the name of a property of type Amazon.ApplicationSignals.Model.CreateServiceLevelObjectiveResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SliConfig_ComparisonOperator <ServiceLevelIndicatorComparisonOperator>
The arithmetic operation to use when comparing the specified metric to the threshold.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SliConfig_MetricThreshold <Double>
This parameter is used only when a request-based SLO tracks the Latency metric. Specify the threshold value that the observed Latency metric values are to be compared to.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SliConfig_SliMetricConfig_DependencyConfig_DependencyKeyAttributes <Hashtable>
This is a string-to-string map. It can include the following fields.
  • Type designates the type of object this is.
  • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.
  • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.
  • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.
  • Environment specifies the location where this object is hosted, or what it belongs to.
Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SliConfig_SliMetricConfig_DependencyConfig_DependencyOperationName <String>
The name of the called operation in the dependency.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SliMetricConfig_KeyAttribute <Hashtable>
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, and Environment attributes.This is a string-to-string map. It can include the following fields.
  • Type designates the type of object this is.
  • ResourceType specifies the type of the resource. This field is used only when the value of the Type field is Resource or AWS::Resource.
  • Name specifies the name of the object. This is used only if the value of the Type field is Service, RemoteService, or AWS::Service.
  • Identifier identifies the resource objects of this resource. This is used only if the value of the Type field is Resource or AWS::Resource.
  • Environment specifies the location where this object is hosted, or what it belongs to.
Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_KeyAttributes
-SliMetricConfig_MetricDataQuery <MetricDataQuery[]>
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. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_MetricDataQueries
-SliMetricConfig_MetricType <ServiceLevelIndicatorMetricType>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_MetricType
-SliMetricConfig_OperationName <String>
If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_OperationName
-SliMetricConfig_PeriodSecond <Int32>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_PeriodSeconds
-SliMetricConfig_Statistic <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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSliConfig_SliMetricConfig_Statistic
-Tag <Tag[]>
A list of key-value pairs to associate with the SLO. You can associate as many as 50 tags with an SLO. To be able to associate tags with the SLO when you create the SLO, you must have the cloudwatch:TagResource permission.Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesTags

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.ApplicationSignals.Model.ServiceLevelObjective object. The service call response (type Amazon.ApplicationSignals.Model.CreateServiceLevelObjectiveResponse) can be returned by specifying '-Select *'.

Supported Version

AWS Tools for PowerShell: 2.x.y.z