Documentation ¶
Index ¶
- func CfnServiceLevelObjective_CFN_RESOURCE_TYPE_NAME() *string
- func CfnServiceLevelObjective_IsCfnElement(x interface{}) *bool
- func CfnServiceLevelObjective_IsCfnResource(x interface{}) *bool
- func CfnServiceLevelObjective_IsConstruct(x interface{}) *bool
- func NewCfnServiceLevelObjective_Override(c CfnServiceLevelObjective, scope constructs.Construct, id *string, ...)
- type CfnServiceLevelObjective
- type CfnServiceLevelObjectiveProps
- type CfnServiceLevelObjective_CalendarIntervalProperty
- type CfnServiceLevelObjective_DimensionProperty
- type CfnServiceLevelObjective_GoalProperty
- type CfnServiceLevelObjective_IntervalProperty
- type CfnServiceLevelObjective_MetricDataQueryProperty
- type CfnServiceLevelObjective_MetricProperty
- type CfnServiceLevelObjective_MetricStatProperty
- type CfnServiceLevelObjective_RollingIntervalProperty
- type CfnServiceLevelObjective_SliMetricProperty
- type CfnServiceLevelObjective_SliProperty
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CfnServiceLevelObjective_CFN_RESOURCE_TYPE_NAME ¶
func CfnServiceLevelObjective_CFN_RESOURCE_TYPE_NAME() *string
func CfnServiceLevelObjective_IsCfnElement ¶
func CfnServiceLevelObjective_IsCfnElement(x interface{}) *bool
Returns `true` if a construct is a stack element (i.e. part of the synthesized cloudformation template).
Uses duck-typing instead of `instanceof` to allow stack elements from different versions of this library to be included in the same stack.
Returns: The construct as a stack element or undefined if it is not a stack element.
func CfnServiceLevelObjective_IsCfnResource ¶
func CfnServiceLevelObjective_IsCfnResource(x interface{}) *bool
Check whether the given object is a CfnResource.
func CfnServiceLevelObjective_IsConstruct ¶
func CfnServiceLevelObjective_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`.
func NewCfnServiceLevelObjective_Override ¶
func NewCfnServiceLevelObjective_Override(c CfnServiceLevelObjective, scope constructs.Construct, id *string, props *CfnServiceLevelObjectiveProps)
Types ¶
type CfnServiceLevelObjective ¶
type CfnServiceLevelObjective interface { awscdk.CfnResource awscdk.IInspectable awscdk.ITaggableV2 // The ARN of this SLO. AttrArn() *string // The date and time that this SLO was created. AttrCreatedTime() *float64 // The time that this SLO was most recently updated. AttrLastUpdatedTime() *float64 // Tag Manager which manages the tags for this resource. CdkTagManager() awscdk.TagManager // Options for this resource, such as condition, update policy etc. CfnOptions() awscdk.ICfnResourceOptions CfnProperties() *map[string]interface{} // AWS resource type. CfnResourceType() *string // Returns: the stack trace of the point where this Resource was created from, sourced // from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most // node +internal+ entries filtered. CreationStack() *[]*string // An optional description for this SLO. Description() *string SetDescription(val *string) // This structure contains the attributes that determine the goal of an SLO. Goal() interface{} SetGoal(val interface{}) // The logical ID for this CloudFormation stack element. // // The logical ID of the element // is calculated from the path of the resource node in the construct tree. // // To override this value, use `overrideLogicalId(newLogicalId)`. // // Returns: the logical ID as a stringified token. This value will only get // resolved during synthesis. LogicalId() *string // A name for this SLO. Name() *string SetName(val *string) // The tree node. Node() constructs.Node // Return a string that will be resolved to a CloudFormation `{ Ref }` for this element. // // If, by any chance, the intrinsic reference of a resource is not a string, you could // coerce it to an IResolvable through `Lazy.any({ produce: resource.ref })`. Ref() *string // A structure containing information about the performance metric that this SLO monitors. Sli() interface{} SetSli(val interface{}) // The stack in which this element is defined. // // CfnElements must be defined within a stack scope (directly or indirectly). Stack() awscdk.Stack // A list of key-value pairs to associate with the SLO. Tags() *[]*awscdk.CfnTag SetTags(val *[]*awscdk.CfnTag) // Deprecated. // Deprecated: use `updatedProperties` // // Return properties modified after initiation // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperites() *map[string]interface{} // Return properties modified after initiation. // // Resources that expose mutable properties should override this function to // collect and return the properties object for this resource. UpdatedProperties() *map[string]interface{} // Syntactic sugar for `addOverride(path, undefined)`. AddDeletionOverride(path *string) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // // This can be used for resources across stacks (or nested stack) boundaries // and the dependency will automatically be transferred to the relevant scope. AddDependency(target awscdk.CfnResource) // Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned. // Deprecated: use addDependency. AddDependsOn(target awscdk.CfnResource) // Add a value to the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // AddMetadata(key *string, value interface{}) // Adds an override to the synthesized CloudFormation resource. // // To add a // property override, either use `addPropertyOverride` or prefix `path` with // "Properties." (i.e. `Properties.TopicName`). // // If the override is nested, separate each nested level using a dot (.) in the path parameter. // If there is an array as part of the nesting, specify the index in the path. // // To include a literal `.` in the property name, prefix with a `\`. In most // programming languages you will need to write this as `"\\."` because the // `\` itself will need to be escaped. // // For example, // “`typescript // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes', ['myattribute']); // cfnResource.addOverride('Properties.GlobalSecondaryIndexes.1.ProjectionType', 'INCLUDE'); // “` // would add the overrides // “`json // "Properties": { // "GlobalSecondaryIndexes": [ // { // "Projection": { // "NonKeyAttributes": [ "myattribute" ] // ... // } // ... // }, // { // "ProjectionType": "INCLUDE" // ... // }, // ] // ... // } // “` // // The `value` argument to `addOverride` will not be processed or translated // in any way. Pass raw JSON values in here with the correct capitalization // for CloudFormation. If you pass CDK classes or structs, they will be // rendered with lowercased key names, and CloudFormation will reject the // template. AddOverride(path *string, value interface{}) // Adds an override that deletes the value of a property from the resource definition. AddPropertyDeletionOverride(propertyPath *string) // Adds an override to a resource property. // // Syntactic sugar for `addOverride("Properties.<...>", value)`. AddPropertyOverride(propertyPath *string, value interface{}) // Sets the deletion policy of the resource based on the removal policy specified. // // The Removal Policy controls what happens to this resource when it stops // being managed by CloudFormation, either because you've removed it from the // CDK application or because you've made a change that requires the resource // to be replaced. // // The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS // account for data recovery and cleanup later (`RemovalPolicy.RETAIN`). In some // cases, a snapshot can be taken of the resource prior to deletion // (`RemovalPolicy.SNAPSHOT`). A list of resources that support this policy // can be found in the following link:. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options // ApplyRemovalPolicy(policy awscdk.RemovalPolicy, options *awscdk.RemovalPolicyOptions) // Returns a token for an runtime attribute of this resource. // // Ideally, use generated attribute accessors (e.g. `resource.arn`), but this can be used for future compatibility // in case there is no generated attribute. GetAtt(attributeName *string, typeHint awscdk.ResolutionTypeHint) awscdk.Reference // Retrieve a value value from the CloudFormation Resource Metadata. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html // // Note that this is a different set of metadata from CDK node metadata; this // metadata ends up in the stack template under the resource, whereas CDK // node metadata ends up in the Cloud Assembly. // GetMetadata(key *string) interface{} // Examines the CloudFormation resource and discloses attributes. Inspect(inspector awscdk.TreeInspector) // Retrieves an array of resources this resource depends on. // // This assembles dependencies on resources across stacks (including nested stacks) // automatically. ObtainDependencies() *[]interface{} // Get a shallow copy of dependencies between this resource and other resources in the same stack. ObtainResourceDependencies() *[]awscdk.CfnResource // Overrides the auto-generated logical ID with a specific ID. OverrideLogicalId(newLogicalId *string) // Indicates that this resource no longer depends on another resource. // // This can be used for resources across stacks (including nested stacks) // and the dependency will automatically be removed from the relevant scope. RemoveDependency(target awscdk.CfnResource) RenderProperties(props *map[string]interface{}) *map[string]interface{} // Replaces one dependency with another. ReplaceDependency(target awscdk.CfnResource, newTarget awscdk.CfnResource) // Can be overridden by subclasses to determine if this resource will be rendered into the cloudformation template. // // Returns: `true` if the resource should be included or `false` is the resource // should be omitted. ShouldSynthesize() *bool // Returns a string representation of this construct. // // Returns: a string representation of this resource. ToString() *string ValidateProperties(_properties interface{}) }
Creates 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 or operation’s availability or latency. CloudWatch measures this target frequently you can find whether it has been breached.
When you create an SLO, you set an *attainment goal* for it. An *attainment goal* is the ratio 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.
After you have created an SLO, you can retrieve error budget reports for it. An *error budget* is the number of periods or amount of time that your service can accumulate during an interval before your overall SLO budget health is breached and the SLO is considered to be unmet. 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.
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:GetServiceGraph` - `logs:StartQuery` - `logs:GetQueryResults` - `cloudwatch:GetMetricData` - `cloudwatch:ListMetrics` - `tag:GetResources` - `autoscaling:DescribeAutoScalingGroups`
You can easily 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.
For more information about SLOs, see [Service level objectives (SLOs)](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-ServiceLevelObjectives.html) .
Example:
// 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" cfnServiceLevelObjective := awscdk.Aws_applicationsignals.NewCfnServiceLevelObjective(this, jsii.String("MyCfnServiceLevelObjective"), &CfnServiceLevelObjectiveProps{ Name: jsii.String("name"), Sli: &SliProperty{ ComparisonOperator: jsii.String("comparisonOperator"), MetricThreshold: jsii.Number(123), SliMetric: &SliMetricProperty{ 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), }, }, MetricType: jsii.String("metricType"), OperationName: jsii.String("operationName"), PeriodSeconds: jsii.Number(123), Statistic: jsii.String("statistic"), }, }, // the properties below are optional Description: jsii.String("description"), Goal: &GoalProperty{ AttainmentGoal: jsii.Number(123), Interval: &IntervalProperty{ CalendarInterval: &CalendarIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), StartTime: jsii.Number(123), }, RollingInterval: &RollingIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), }, }, WarningThreshold: jsii.Number(123), }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, })
func NewCfnServiceLevelObjective ¶
func NewCfnServiceLevelObjective(scope constructs.Construct, id *string, props *CfnServiceLevelObjectiveProps) CfnServiceLevelObjective
type CfnServiceLevelObjectiveProps ¶
type CfnServiceLevelObjectiveProps struct { // A name for this SLO. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html#cfn-applicationsignals-servicelevelobjective-name // Name *string `field:"required" json:"name" yaml:"name"` // A structure containing information about the performance metric that this SLO monitors. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html#cfn-applicationsignals-servicelevelobjective-sli // Sli interface{} `field:"required" json:"sli" yaml:"sli"` // An optional description for this SLO. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html#cfn-applicationsignals-servicelevelobjective-description // // Default: - "No description". // Description *string `field:"optional" json:"description" yaml:"description"` // This structure contains the attributes that determine the goal of an SLO. // // This includes the time period for evaluation and the attainment threshold. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html#cfn-applicationsignals-servicelevelobjective-goal // Goal interface{} `field:"optional" json:"goal" yaml:"goal"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationsignals-servicelevelobjective.html#cfn-applicationsignals-servicelevelobjective-tags // Tags *[]*awscdk.CfnTag `field:"optional" json:"tags" yaml:"tags"` }
Properties for defining a `CfnServiceLevelObjective`.
Example:
// 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" cfnServiceLevelObjectiveProps := &CfnServiceLevelObjectiveProps{ Name: jsii.String("name"), Sli: &SliProperty{ ComparisonOperator: jsii.String("comparisonOperator"), MetricThreshold: jsii.Number(123), SliMetric: &SliMetricProperty{ 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), }, }, MetricType: jsii.String("metricType"), OperationName: jsii.String("operationName"), PeriodSeconds: jsii.Number(123), Statistic: jsii.String("statistic"), }, }, // the properties below are optional Description: jsii.String("description"), Goal: &GoalProperty{ AttainmentGoal: jsii.Number(123), Interval: &IntervalProperty{ CalendarInterval: &CalendarIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), StartTime: jsii.Number(123), }, RollingInterval: &RollingIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), }, }, WarningThreshold: jsii.Number(123), }, Tags: []cfnTag{ &cfnTag{ Key: jsii.String("key"), Value: jsii.String("value"), }, }, }
type CfnServiceLevelObjective_CalendarIntervalProperty ¶
type CfnServiceLevelObjective_CalendarIntervalProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-duration // Duration *float64 `field:"required" json:"duration" yaml:"duration"` // Specifies the calendar interval unit. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-durationunit // DurationUnit *string `field:"required" json:"durationUnit" yaml:"durationUnit"` // 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: `1698778057` // // As soon as one calendar interval ends, another automatically begins. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-calendarinterval.html#cfn-applicationsignals-servicelevelobjective-calendarinterval-starttime // StartTime *float64 `field:"required" json:"startTime" yaml:"startTime"` }
If the interval for this service level objective is a calendar interval, this structure contains the interval specifications.
Example:
// 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" calendarIntervalProperty := &CalendarIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), StartTime: jsii.Number(123), }
type CfnServiceLevelObjective_DimensionProperty ¶
type CfnServiceLevelObjective_DimensionProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-dimension.html#cfn-applicationsignals-servicelevelobjective-dimension-name // Name *string `field:"required" json:"name" yaml:"name"` // 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-dimension.html#cfn-applicationsignals-servicelevelobjective-dimension-value // Value *string `field:"required" json:"value" yaml:"value"` }
A 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 `InstanceId` as a dimension name, and the actual instance ID as the value for that dimension.
You can assign up to 30 dimensions to a metric.
Example:
// 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" dimensionProperty := &DimensionProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }
type CfnServiceLevelObjective_GoalProperty ¶
type CfnServiceLevelObjective_GoalProperty struct { // The threshold that determines if the goal is being met. // // An *attainment goal* is the ratio 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 you omit this parameter, 99 is used to represent 99% as the attainment goal. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-attainmentgoal // AttainmentGoal *float64 `field:"optional" json:"attainmentGoal" yaml:"attainmentGoal"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-interval // Interval interface{} `field:"optional" json:"interval" yaml:"interval"` // 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-goal.html#cfn-applicationsignals-servicelevelobjective-goal-warningthreshold // WarningThreshold *float64 `field:"optional" json:"warningThreshold" yaml:"warningThreshold"` }
This structure contains the attributes that determine the goal of an SLO.
This includes the time period for evaluation and the attainment threshold.
Example:
// 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" goalProperty := &GoalProperty{ AttainmentGoal: jsii.Number(123), Interval: &IntervalProperty{ CalendarInterval: &CalendarIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), StartTime: jsii.Number(123), }, RollingInterval: &RollingIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), }, }, WarningThreshold: jsii.Number(123), }
type CfnServiceLevelObjective_IntervalProperty ¶
type CfnServiceLevelObjective_IntervalProperty struct { // If the interval is a calendar interval, this structure contains the interval specifications. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-interval.html#cfn-applicationsignals-servicelevelobjective-interval-calendarinterval // CalendarInterval interface{} `field:"optional" json:"calendarInterval" yaml:"calendarInterval"` // If the interval is a rolling interval, this structure contains the interval specifications. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-interval.html#cfn-applicationsignals-servicelevelobjective-interval-rollinginterval // RollingInterval interface{} `field:"optional" json:"rollingInterval" yaml:"rollingInterval"` }
The time period used to evaluate the SLO.
It can be either a calendar interval or rolling interval.
Example:
// 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" intervalProperty := &IntervalProperty{ CalendarInterval: &CalendarIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), StartTime: jsii.Number(123), }, RollingInterval: &RollingIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), }, }
type CfnServiceLevelObjective_MetricDataQueryProperty ¶
type CfnServiceLevelObjective_MetricDataQueryProperty struct { // A short name used to tie this object to the results in the response. // // This `Id` must be unique within a `MetricDataQueries` array. 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-id // Id *string `field:"required" json:"id" yaml:"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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-accountid // AccountId *string `field:"optional" json:"accountId" yaml:"accountId"` // This field can contain a metric math expression to be performed on the other metrics that you are retrieving within this `MetricDataQueries` structure. // // A math expression can use the `Id` of the other metrics or queries to refer to those metrics, and can also use the `Id` of other expressions to use the result of those expressions. For more information about metric math expressions, see [Metric Math Syntax and Functions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html#metric-math-syntax) in the *Amazon CloudWatch User Guide* . // // Within each `MetricDataQuery` object, you must specify either `Expression` or `MetricStat` but not both. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-expression // Expression *string `field:"optional" json:"expression" yaml:"expression"` // 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 `MetricDataQuery` object, you must specify either `Expression` or `MetricStat` but not both. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-metricstat // MetricStat interface{} `field:"optional" json:"metricStat" yaml:"metricStat"` // Use this only if you are using a metric math expression for the SLO. // // Specify `true` for `ReturnData` for only the one expression result to use as the alarm. For all other metrics and expressions in the same `CreateServiceLevelObjective` operation, specify `ReturnData` as `false` . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricdataquery.html#cfn-applicationsignals-servicelevelobjective-metricdataquery-returndata // ReturnData interface{} `field:"optional" json:"returnData" yaml:"returnData"` }
Use this structure to define a metric or metric math expression that you want to use as for a service level objective.
Each `MetricDataQuery` in the `MetricDataQueries` array specifies either a metric to retrieve, or a metric math expression to be performed on retrieved metrics. A single `MetricDataQueries` array can include as many as 20 `MetricDataQuery` structures in the array. The 20 structures can include as many as 10 structures that contain a `MetricStat` parameter to retrieve a metric, and as many as 10 structures that contain the `Expression` parameter to perform a math expression. Of those `Expression` structures, exactly one must have true as the value for `ReturnData` . The result of this expression used for the SLO.
For more information about metric math expressions, see [Use metric math](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html) .
Within each `MetricDataQuery` object, you must specify either `Expression` or `MetricStat` but not both.
Example:
// 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" metricDataQueryProperty := &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), }
type CfnServiceLevelObjective_MetricProperty ¶
type CfnServiceLevelObjective_MetricProperty struct { // An array of one or more dimensions to use to define the metric that you want to use. // // For more information, see [Dimensions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Dimension) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-dimensions // Dimensions interface{} `field:"optional" json:"dimensions" yaml:"dimensions"` // The name of the metric to use. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-metricname // MetricName *string `field:"optional" json:"metricName" yaml:"metricName"` // The namespace of the metric. // // For more information, see [Namespaces](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metric.html#cfn-applicationsignals-servicelevelobjective-metric-namespace // Namespace *string `field:"optional" json:"namespace" yaml:"namespace"` }
This structure defines the metric used for a service level indicator, including the metric name, namespace, and dimensions.
Example:
// 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" metricProperty := &MetricProperty{ Dimensions: []interface{}{ &DimensionProperty{ Name: jsii.String("name"), Value: jsii.String("value"), }, }, MetricName: jsii.String("metricName"), Namespace: jsii.String("namespace"), }
type CfnServiceLevelObjective_MetricStatProperty ¶
type CfnServiceLevelObjective_MetricStatProperty struct { // The metric to use as the service level indicator, including the metric name, namespace, and dimensions. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-metric // Metric interface{} `field:"required" json:"metric" yaml:"metric"` // 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 `PutMetricData` call that includes a `StorageResolution` of 1 second. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-period // Period *float64 `field:"required" json:"period" yaml:"period"` // 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-stat // Stat *string `field:"required" json:"stat" yaml:"stat"` // If you omit `Unit` then 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: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-metricstat.html#cfn-applicationsignals-servicelevelobjective-metricstat-unit // Unit *string `field:"optional" json:"unit" yaml:"unit"` }
This structure defines the metric to be used as the service level indicator, along with the statistics, period, and unit.
Example:
// 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" metricStatProperty := &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"), }
type CfnServiceLevelObjective_RollingIntervalProperty ¶
type CfnServiceLevelObjective_RollingIntervalProperty struct { // Specifies the duration of each rolling interval. // // For example, if `Duration` is `7` and `DurationUnit` is `DAY` , each rolling interval is seven days. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-duration // Duration *float64 `field:"required" json:"duration" yaml:"duration"` // Specifies the rolling interval unit. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-rollinginterval.html#cfn-applicationsignals-servicelevelobjective-rollinginterval-durationunit // DurationUnit *string `field:"required" json:"durationUnit" yaml:"durationUnit"` }
If the interval for this SLO is a rolling interval, this structure contains the interval specifications.
Example:
// 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" rollingIntervalProperty := &RollingIntervalProperty{ Duration: jsii.Number(123), DurationUnit: jsii.String("durationUnit"), }
type CfnServiceLevelObjective_SliMetricProperty ¶
type CfnServiceLevelObjective_SliMetricProperty struct { // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-keyattributes // KeyAttributes interface{} `field:"optional" json:"keyAttributes" yaml:"keyAttributes"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-metricdataqueries // MetricDataQueries interface{} `field:"optional" json:"metricDataQueries" yaml:"metricDataQueries"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-metrictype // MetricType *string `field:"optional" json:"metricType" yaml:"metricType"` // If the SLO is to monitor a specific operation of the service, use this field to specify the name of that operation. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-operationname // OperationName *string `field:"optional" json:"operationName" yaml:"operationName"` // 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. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-periodseconds // PeriodSeconds *float64 `field:"optional" json:"periodSeconds" yaml:"periodSeconds"` // 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](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Statistics-definitions.html) . // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-slimetric.html#cfn-applicationsignals-servicelevelobjective-slimetric-statistic // Statistic *string `field:"optional" json:"statistic" yaml:"statistic"` }
Use this structure to specify the metric to be used for the SLO.
Example:
// 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{ 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), }, }, MetricType: jsii.String("metricType"), OperationName: jsii.String("operationName"), PeriodSeconds: jsii.Number(123), Statistic: jsii.String("statistic"), }
type CfnServiceLevelObjective_SliProperty ¶
type CfnServiceLevelObjective_SliProperty struct { // The arithmetic operation to use when comparing the specified metric to the threshold. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-comparisonoperator // ComparisonOperator *string `field:"required" json:"comparisonOperator" yaml:"comparisonOperator"` // The value that the SLI metric is compared to. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-metricthreshold // MetricThreshold *float64 `field:"required" json:"metricThreshold" yaml:"metricThreshold"` // Use this structure to specify the metric to be used for the SLO. // See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationsignals-servicelevelobjective-sli.html#cfn-applicationsignals-servicelevelobjective-sli-slimetric // SliMetric interface{} `field:"required" json:"sliMetric" yaml:"sliMetric"` }
This structure specifies the information about the service and the performance metric that an SLO is to monitor.
Example:
// 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" sliProperty := &SliProperty{ ComparisonOperator: jsii.String("comparisonOperator"), MetricThreshold: jsii.Number(123), SliMetric: &SliMetricProperty{ 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), }, }, MetricType: jsii.String("metricType"), OperationName: jsii.String("operationName"), PeriodSeconds: jsii.Number(123), Statistic: jsii.String("statistic"), }, }
Source Files ¶
- CfnServiceLevelObjective.go
- CfnServiceLevelObjectiveProps.go
- CfnServiceLevelObjective_CalendarIntervalProperty.go
- CfnServiceLevelObjective_DimensionProperty.go
- CfnServiceLevelObjective_GoalProperty.go
- CfnServiceLevelObjective_IntervalProperty.go
- CfnServiceLevelObjective_MetricDataQueryProperty.go
- CfnServiceLevelObjective_MetricProperty.go
- CfnServiceLevelObjective_MetricStatProperty.go
- CfnServiceLevelObjective_RollingIntervalProperty.go
- CfnServiceLevelObjective_SliMetricProperty.go
- CfnServiceLevelObjective_SliProperty.go
- CfnServiceLevelObjective__checks.go
- main.go