awsautoscalinghooktargets

package
v2.21.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFunctionHook_Override

func NewFunctionHook_Override(f FunctionHook, fn awslambda.IFunction, encryptionKey awskms.IKey)

func NewQueueHook_Override

func NewQueueHook_Override(q QueueHook, queue awssqs.IQueue)

func NewTopicHook_Override

func NewTopicHook_Override(t TopicHook, topic awssns.ITopic)

Types

type FunctionHook

type FunctionHook interface {
	awsautoscaling.ILifecycleHookTarget
	// If the `IRole` does not exist in `options`, will create an `IRole` and an SNS Topic and attach both to the lifecycle hook.
	//
	// If the `IRole` does exist in `options`, will only create an SNS Topic and attach it to the lifecycle hook.
	Bind(_scope constructs.Construct, options *awsautoscaling.BindHookTargetOptions) *awsautoscaling.LifecycleHookTargetConfig
}

Use a Lambda Function as a hook target.

Internally creates a Topic to make the connection.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import autoscaling_hooktargets "github.com/aws/aws-cdk-go/awscdk/aws_autoscaling_hooktargets"import awscdk "github.com/aws/aws-cdk-go/awscdk"import kms "github.com/aws/aws-cdk-go/awscdk/aws_kms"import awscdk "github.com/aws/aws-cdk-go/awscdk"import lambda "github.com/aws/aws-cdk-go/awscdk/aws_lambda"

var function_ function
var key key
functionHook := autoscaling_hooktargets.NewFunctionHook(function_, key)

func NewFunctionHook

func NewFunctionHook(fn awslambda.IFunction, encryptionKey awskms.IKey) FunctionHook

type QueueHook

type QueueHook interface {
	awsautoscaling.ILifecycleHookTarget
	// If an `IRole` is found in `options`, grant it access to send messages.
	//
	// Otherwise, create a new `IRole` and grant it access to send messages.
	//
	// Returns: the `IRole` with access to send messages and the ARN of the queue it has access to send messages to.
	Bind(_scope constructs.Construct, options *awsautoscaling.BindHookTargetOptions) *awsautoscaling.LifecycleHookTargetConfig
}

Use an SQS queue as a hook target.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import autoscaling_hooktargets "github.com/aws/aws-cdk-go/awscdk/aws_autoscaling_hooktargets"import awscdk "github.com/aws/aws-cdk-go/awscdk"import sqs "github.com/aws/aws-cdk-go/awscdk/aws_sqs"

var queue queue
queueHook := autoscaling_hooktargets.NewQueueHook(queue)

func NewQueueHook

func NewQueueHook(queue awssqs.IQueue) QueueHook

type TopicHook

type TopicHook interface {
	awsautoscaling.ILifecycleHookTarget
	// If an `IRole` is found in `options`, grant it topic publishing permissions.
	//
	// Otherwise, create a new `IRole` and grant it topic publishing permissions.
	//
	// Returns: the `IRole` with topic publishing permissions and the ARN of the topic it has publishing permission to.
	Bind(_scope constructs.Construct, options *awsautoscaling.BindHookTargetOptions) *awsautoscaling.LifecycleHookTargetConfig
}

Use an SNS topic as a hook target.

Example:

import awscdk "github.com/aws/aws-cdk-go/awscdk"import autoscaling_hooktargets "github.com/aws/aws-cdk-go/awscdk/aws_autoscaling_hooktargets"import awscdk "github.com/aws/aws-cdk-go/awscdk"import sns "github.com/aws/aws-cdk-go/awscdk/aws_sns"

var topic topic
topicHook := autoscaling_hooktargets.NewTopicHook(topic)

func NewTopicHook

func NewTopicHook(topic awssns.ITopic) TopicHook

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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