awscloudwatchactions

package
v2.21.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApplicationScalingAction_Override

func NewApplicationScalingAction_Override(a ApplicationScalingAction, stepScalingAction awsapplicationautoscaling.StepScalingAction)

func NewAutoScalingAction_Override

func NewAutoScalingAction_Override(a AutoScalingAction, stepScalingAction awsautoscaling.StepScalingAction)

func NewEc2Action_Override

func NewEc2Action_Override(e Ec2Action, instanceAction Ec2InstanceAction)

func NewSnsAction_Override

func NewSnsAction_Override(s SnsAction, topic awssns.ITopic)

func NewSsmAction_Override added in v2.11.0

func NewSsmAction_Override(s SsmAction, severity OpsItemSeverity, category OpsItemCategory)

Types

type ApplicationScalingAction

type ApplicationScalingAction interface {
	awscloudwatch.IAlarmAction
	// Returns an alarm action configuration to use an ApplicationScaling StepScalingAction as an alarm action.
	Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig
}

Use an ApplicationAutoScaling StepScalingAction as an Alarm Action.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import appscaling "github.com/aws/aws-cdk-go/awscdk/aws_applicationautoscaling"import awscdk "github.com/aws/aws-cdk-go/awscdk"import cloudwatch_actions "github.com/aws/aws-cdk-go/awscdk/aws_cloudwatch_actions"

var stepScalingAction stepScalingAction
applicationScalingAction := cloudwatch_actions.NewApplicationScalingAction(stepScalingAction)

type AutoScalingAction

type AutoScalingAction interface {
	awscloudwatch.IAlarmAction
	// Returns an alarm action configuration to use an AutoScaling StepScalingAction as an alarm action.
	Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig
}

Use an AutoScaling StepScalingAction as an Alarm Action.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import autoscaling "github.com/aws/aws-cdk-go/awscdk/aws_autoscaling"import awscdk "github.com/aws/aws-cdk-go/awscdk"import cloudwatch_actions "github.com/aws/aws-cdk-go/awscdk/aws_cloudwatch_actions"

var stepScalingAction stepScalingAction
autoScalingAction := cloudwatch_actions.NewAutoScalingAction(stepScalingAction)

func NewAutoScalingAction

func NewAutoScalingAction(stepScalingAction awsautoscaling.StepScalingAction) AutoScalingAction

type Ec2Action

type Ec2Action interface {
	awscloudwatch.IAlarmAction
	// Returns an alarm action configuration to use an EC2 action as an alarm action.
	Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig
}

Use an EC2 action as an Alarm action.

Example:

// Alarm must be configured with an EC2 per-instance metric
var alarm alarm
// Attach a reboot when alarm triggers
alarm.addAlarmAction(
actions.NewEc2Action(actions.ec2InstanceAction_REBOOT))

func NewEc2Action

func NewEc2Action(instanceAction Ec2InstanceAction) Ec2Action

type Ec2InstanceAction

type Ec2InstanceAction string

Types of EC2 actions available.

Example:

// Alarm must be configured with an EC2 per-instance metric
var alarm alarm
// Attach a reboot when alarm triggers
alarm.addAlarmAction(
actions.NewEc2Action(actions.ec2InstanceAction_REBOOT))
const (
	// Stop the instance.
	Ec2InstanceAction_STOP Ec2InstanceAction = "STOP"
	// Terminatethe instance.
	Ec2InstanceAction_TERMINATE Ec2InstanceAction = "TERMINATE"
	// Recover the instance.
	Ec2InstanceAction_RECOVER Ec2InstanceAction = "RECOVER"
	// Reboot the instance.
	Ec2InstanceAction_REBOOT Ec2InstanceAction = "REBOOT"
)

type OpsItemCategory added in v2.11.0

type OpsItemCategory string

Types of OpsItem category available.

Example:

var alarm alarm
// Create an OpsItem with specific severity and category when alarm triggers
alarm.addAlarmAction(
actions.NewSsmAction(actions.opsItemSeverity_CRITICAL, actions.opsItemCategory_PERFORMANCE))
const (
	// Set the category to availability.
	OpsItemCategory_AVAILABILITY OpsItemCategory = "AVAILABILITY"
	// Set the category to cost.
	OpsItemCategory_COST OpsItemCategory = "COST"
	// Set the category to performance.
	OpsItemCategory_PERFORMANCE OpsItemCategory = "PERFORMANCE"
	// Set the category to recovery.
	OpsItemCategory_RECOVERY OpsItemCategory = "RECOVERY"
	// Set the category to security.
	OpsItemCategory_SECURITY OpsItemCategory = "SECURITY"
)

type OpsItemSeverity added in v2.11.0

type OpsItemSeverity string

Types of OpsItem severity available.

Example:

var alarm alarm
// Create an OpsItem with specific severity and category when alarm triggers
alarm.addAlarmAction(
actions.NewSsmAction(actions.opsItemSeverity_CRITICAL, actions.opsItemCategory_PERFORMANCE))
const (
	// Set the severity to critical.
	OpsItemSeverity_CRITICAL OpsItemSeverity = "CRITICAL"
	// Set the severity to high.
	OpsItemSeverity_HIGH OpsItemSeverity = "HIGH"
	// Set the severity to medium.
	OpsItemSeverity_MEDIUM OpsItemSeverity = "MEDIUM"
	// Set the severity to low.
	OpsItemSeverity_LOW OpsItemSeverity = "LOW"
)

type SnsAction

type SnsAction interface {
	awscloudwatch.IAlarmAction
	// Returns an alarm action configuration to use an SNS topic as an alarm action.
	Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig
}

Use an SNS topic as an alarm action.

Example:

import cw_actions "github.com/aws/aws-cdk-go/awscdk"
var alarm alarm

topic := sns.NewTopic(this, jsii.String("Topic"))
alarm.addAlarmAction(cw_actions.NewSnsAction(topic))

func NewSnsAction

func NewSnsAction(topic awssns.ITopic) SnsAction

type SsmAction added in v2.11.0

type SsmAction interface {
	awscloudwatch.IAlarmAction
	// Returns an alarm action configuration to use an SSM OpsItem action as an alarm action.
	Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig
}

Use an SSM OpsItem action as an Alarm action.

Example:

var alarm alarm
// Create an OpsItem with specific severity and category when alarm triggers
alarm.addAlarmAction(
actions.NewSsmAction(actions.opsItemSeverity_CRITICAL, actions.opsItemCategory_PERFORMANCE))

func NewSsmAction added in v2.11.0

func NewSsmAction(severity OpsItemSeverity, category OpsItemCategory) SsmAction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL