Documentation ¶
Index ¶
- func NewApplicationScalingAction_Override(a ApplicationScalingAction, ...)
- func NewAutoScalingAction_Override(a AutoScalingAction, stepScalingAction awsautoscaling.StepScalingAction)
- func NewEc2Action_Override(e Ec2Action, instanceAction Ec2InstanceAction)
- func NewLambdaAction_Override(l LambdaAction, lambdaFunction interface{})
- func NewSnsAction_Override(s SnsAction, topic awssns.ITopic)
- func NewSsmAction_Override(s SsmAction, severity OpsItemSeverity, category OpsItemCategory)
- func NewSsmIncidentAction_Override(s SsmIncidentAction, responsePlanName *string)
- type ApplicationScalingAction
- type AutoScalingAction
- type Ec2Action
- type Ec2InstanceAction
- type LambdaAction
- type OpsItemCategory
- type OpsItemSeverity
- type SnsAction
- type SsmAction
- type SsmIncidentAction
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 NewLambdaAction_Override ¶ added in v2.119.0
func NewLambdaAction_Override(l LambdaAction, lambdaFunction interface{})
func NewSnsAction_Override ¶
func NewSsmAction_Override ¶ added in v2.11.0
func NewSsmAction_Override(s SsmAction, severity OpsItemSeverity, category OpsItemCategory)
func NewSsmIncidentAction_Override ¶ added in v2.38.0
func NewSsmIncidentAction_Override(s SsmIncidentAction, responsePlanName *string)
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:
// 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" import "github.com/aws/aws-cdk-go/awscdk" var stepScalingAction stepScalingAction applicationScalingAction := awscdk.Aws_cloudwatch_actions.NewApplicationScalingAction(stepScalingAction)
func NewApplicationScalingAction ¶
func NewApplicationScalingAction(stepScalingAction awsapplicationautoscaling.StepScalingAction) ApplicationScalingAction
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:
// 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" import "github.com/aws/aws-cdk-go/awscdk" var stepScalingAction stepScalingAction autoScalingAction := awscdk.Aws_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 LambdaAction ¶ added in v2.119.0
type LambdaAction interface { awscloudwatch.IAlarmAction // Returns an alarm action configuration to use a Lambda action as an alarm action. // See: https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html // Bind(scope constructs.Construct, alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig }
Use a Lambda action as an Alarm action.
Example:
import lambda "github.com/aws/aws-cdk-go/awscdk" var alarm alarm var fn function var alias alias var version version // Attach a Lambda Function when alarm triggers alarm.AddAlarmAction( actions.NewLambdaAction(fn)) // Attach a Lambda Function Alias when alarm triggers alarm.AddAlarmAction( actions.NewLambdaAction(alias)) // Attach a Lambda Function version when alarm triggers alarm.AddAlarmAction( actions.NewLambdaAction(version))
func NewLambdaAction ¶ added in v2.119.0
func NewLambdaAction(lambdaFunction interface{}) LambdaAction
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 ¶
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
type SsmIncidentAction ¶ added in v2.38.0
type SsmIncidentAction interface { awscloudwatch.IAlarmAction // Returns an alarm action configuration to use an SSM Incident as an alarm action based on an Incident Manager Response Plan. Bind(_scope constructs.Construct, _alarm awscloudwatch.IAlarm) *awscloudwatch.AlarmActionConfig }
Use an SSM Incident Response Plan as an Alarm action.
Example:
var alarm alarm // Create an Incident Manager incident based on a specific response plan alarm.AddAlarmAction( actions.NewSsmIncidentAction(jsii.String("ResponsePlanName")))
func NewSsmIncidentAction ¶ added in v2.38.0
func NewSsmIncidentAction(responsePlanName *string) SsmIncidentAction
Source Files ¶
- ApplicationScalingAction.go
- ApplicationScalingAction__checks.go
- AutoScalingAction.go
- AutoScalingAction__checks.go
- Ec2Action.go
- Ec2Action__checks.go
- Ec2InstanceAction.go
- LambdaAction.go
- LambdaAction__checks.go
- OpsItemCategory.go
- OpsItemSeverity.go
- SnsAction.go
- SnsAction__checks.go
- SsmAction.go
- SsmAction__checks.go
- SsmIncidentAction.go
- SsmIncidentAction__checks.go
- main.go
Click to show internal directories.
Click to hide internal directories.