Documentation ¶
Overview ¶
The CDK Construct Library for Amazon Scheduler Targets
Index ¶
- func NewCodeBuildStartBuild_Override(c CodeBuildStartBuild, project awscodebuild.IProject, ...)
- func NewCodePipelineStartPipelineExecution_Override(c CodePipelineStartPipelineExecution, pipeline awscodepipeline.IPipeline, ...)
- func NewEventBridgePutEvents_Override(e EventBridgePutEvents, entry *EventBridgePutEventsEntry, ...)
- func NewInspectorStartAssessmentRun_Override(i InspectorStartAssessmentRun, template awsinspector.CfnAssessmentTemplate, ...)
- func NewKinesisDataFirehosePutRecord_Override(k KinesisDataFirehosePutRecord, ...)
- func NewKinesisStreamPutRecord_Override(k KinesisStreamPutRecord, stream awskinesis.IStream, ...)
- func NewLambdaInvoke_Override(l LambdaInvoke, func_ awslambda.IFunction, props *ScheduleTargetBaseProps)
- func NewSageMakerStartPipelineExecution_Override(s SageMakerStartPipelineExecution, pipeline awssagemaker.IPipeline, ...)
- func NewScheduleTargetBase_Override(s ScheduleTargetBase, baseProps *ScheduleTargetBaseProps, targetArn *string)
- func NewSnsPublish_Override(s SnsPublish, topic awssns.ITopic, props *ScheduleTargetBaseProps)
- func NewSqsSendMessage_Override(s SqsSendMessage, queue awssqs.IQueue, props *SqsSendMessageProps)
- func NewStepFunctionsStartExecution_Override(s StepFunctionsStartExecution, stateMachine awsstepfunctions.IStateMachine, ...)
- type CodeBuildStartBuild
- type CodePipelineStartPipelineExecution
- type EventBridgePutEvents
- type EventBridgePutEventsEntry
- type InspectorStartAssessmentRun
- type KinesisDataFirehosePutRecord
- type KinesisStreamPutRecord
- type KinesisStreamPutRecordProps
- type LambdaInvoke
- type SageMakerPipelineParameter
- type SageMakerStartPipelineExecution
- type SageMakerStartPipelineExecutionProps
- type ScheduleTargetBase
- type ScheduleTargetBaseProps
- type SnsPublish
- type SqsSendMessage
- type SqsSendMessageProps
- type StepFunctionsStartExecution
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCodeBuildStartBuild_Override ¶
func NewCodeBuildStartBuild_Override(c CodeBuildStartBuild, project awscodebuild.IProject, props *ScheduleTargetBaseProps)
Experimental.
func NewCodePipelineStartPipelineExecution_Override ¶
func NewCodePipelineStartPipelineExecution_Override(c CodePipelineStartPipelineExecution, pipeline awscodepipeline.IPipeline, props *ScheduleTargetBaseProps)
Experimental.
func NewEventBridgePutEvents_Override ¶
func NewEventBridgePutEvents_Override(e EventBridgePutEvents, entry *EventBridgePutEventsEntry, props *ScheduleTargetBaseProps)
Experimental.
func NewInspectorStartAssessmentRun_Override ¶
func NewInspectorStartAssessmentRun_Override(i InspectorStartAssessmentRun, template awsinspector.CfnAssessmentTemplate, props *ScheduleTargetBaseProps)
Experimental.
func NewKinesisDataFirehosePutRecord_Override ¶
func NewKinesisDataFirehosePutRecord_Override(k KinesisDataFirehosePutRecord, deliveryStream awscdkkinesisfirehosealpha.IDeliveryStream, props *ScheduleTargetBaseProps)
Experimental.
func NewKinesisStreamPutRecord_Override ¶
func NewKinesisStreamPutRecord_Override(k KinesisStreamPutRecord, stream awskinesis.IStream, props *KinesisStreamPutRecordProps)
Experimental.
func NewLambdaInvoke_Override ¶
func NewLambdaInvoke_Override(l LambdaInvoke, func_ awslambda.IFunction, props *ScheduleTargetBaseProps)
Experimental.
func NewSageMakerStartPipelineExecution_Override ¶
func NewSageMakerStartPipelineExecution_Override(s SageMakerStartPipelineExecution, pipeline awssagemaker.IPipeline, props *SageMakerStartPipelineExecutionProps)
Experimental.
func NewScheduleTargetBase_Override ¶
func NewScheduleTargetBase_Override(s ScheduleTargetBase, baseProps *ScheduleTargetBaseProps, targetArn *string)
Experimental.
func NewSnsPublish_Override ¶
func NewSnsPublish_Override(s SnsPublish, topic awssns.ITopic, props *ScheduleTargetBaseProps)
Experimental.
func NewSqsSendMessage_Override ¶
func NewSqsSendMessage_Override(s SqsSendMessage, queue awssqs.IQueue, props *SqsSendMessageProps)
Experimental.
func NewStepFunctionsStartExecution_Override ¶
func NewStepFunctionsStartExecution_Override(s StepFunctionsStartExecution, stateMachine awsstepfunctions.IStateMachine, props *ScheduleTargetBaseProps)
Experimental.
Types ¶
type CodeBuildStartBuild ¶
type CodeBuildStartBuild interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an AWS CodeBuild as a target for AWS EventBridge Scheduler.
Example:
import codebuild "github.com/aws/aws-cdk-go/awscdk" var project project awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewCodeBuildStartBuild(project), })
Experimental.
func NewCodeBuildStartBuild ¶
func NewCodeBuildStartBuild(project awscodebuild.IProject, props *ScheduleTargetBaseProps) CodeBuildStartBuild
Experimental.
type CodePipelineStartPipelineExecution ¶
type CodePipelineStartPipelineExecution interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an AWS CodePipeline pipeline as a target for AWS EventBridge Scheduler.
Example:
import codepipeline "github.com/aws/aws-cdk-go/awscdk" var pipeline pipeline awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewCodePipelineStartPipelineExecution(pipeline), })
Experimental.
func NewCodePipelineStartPipelineExecution ¶
func NewCodePipelineStartPipelineExecution(pipeline awscodepipeline.IPipeline, props *ScheduleTargetBaseProps) CodePipelineStartPipelineExecution
Experimental.
type EventBridgePutEvents ¶
type EventBridgePutEvents interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Send an event to an AWS EventBridge by AWS EventBridge Scheduler.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" eventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{ EventBusName: jsii.String("DomainEvents"), }) eventEntry := &EventBridgePutEventsEntry{ EventBus: EventBus, Source: jsii.String("PetService"), Detail: awscdkscheduleralpha.ScheduleTargetInput_FromObject(map[string]*string{ "Name": jsii.String("Fluffy"), }), DetailType: jsii.String("🐶"), } awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: targets.NewEventBridgePutEvents(eventEntry), })
Experimental.
func NewEventBridgePutEvents ¶
func NewEventBridgePutEvents(entry *EventBridgePutEventsEntry, props *ScheduleTargetBaseProps) EventBridgePutEvents
Experimental.
type EventBridgePutEventsEntry ¶
type EventBridgePutEventsEntry struct { // The event body. // // Can either be provided as an object or as a JSON-serialized string. // // Example: // awscdkscheduleralpha.ScheduleTargetInput_FromText(jsii.String("{\"instance-id\": \"i-1234567890abcdef0\", \"state\": \"terminated\"}")) // awscdkscheduleralpha.ScheduleTargetInput_FromObject(map[string]*string{ // "Message": jsii.String("Hello from a friendly event :)"), // }) // // Experimental. Detail awscdkscheduleralpha.ScheduleTargetInput `field:"required" json:"detail" yaml:"detail"` // Used along with the source field to help identify the fields and values expected in the detail field. // // For example, events by CloudTrail have detail type "AWS API Call via CloudTrail". // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html // // Experimental. DetailType *string `field:"required" json:"detailType" yaml:"detailType"` // The event bus the entry will be sent to. // Experimental. EventBus awsevents.IEventBus `field:"required" json:"eventBus" yaml:"eventBus"` // The service or application that caused this event to be generated. // // Example value: `com.example.service` // See: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html // // Experimental. Source *string `field:"required" json:"source" yaml:"source"` }
An entry to be sent to EventBridge.
Example:
import events "github.com/aws/aws-cdk-go/awscdk" eventBus := events.NewEventBus(this, jsii.String("EventBus"), &EventBusProps{ EventBusName: jsii.String("DomainEvents"), }) eventEntry := &EventBridgePutEventsEntry{ EventBus: EventBus, Source: jsii.String("PetService"), Detail: awscdkscheduleralpha.ScheduleTargetInput_FromObject(map[string]*string{ "Name": jsii.String("Fluffy"), }), DetailType: jsii.String("🐶"), } awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: targets.NewEventBridgePutEvents(eventEntry), })
See: https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEventsRequestEntry.html
Experimental.
type InspectorStartAssessmentRun ¶
type InspectorStartAssessmentRun interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an Amazon Inspector as a target for AWS EventBridge Scheduler.
Example:
import inspector "github.com/aws/aws-cdk-go/awscdk" var assessmentTemplate cfnAssessmentTemplate awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewInspectorStartAssessmentRun(assessmentTemplate), })
Experimental.
func NewInspectorStartAssessmentRun ¶
func NewInspectorStartAssessmentRun(template awsinspector.CfnAssessmentTemplate, props *ScheduleTargetBaseProps) InspectorStartAssessmentRun
Experimental.
type KinesisDataFirehosePutRecord ¶
type KinesisDataFirehosePutRecord interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an Amazon Kinesis Data Firehose as a target for AWS EventBridge Scheduler.
Example:
import firehose "github.com/aws/aws-cdk-go/awscdkkinesisfirehosealpha" var deliveryStream iDeliveryStream payload := map[string]*string{ "Data": jsii.String("record"), } awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewKinesisDataFirehosePutRecord(deliveryStream, &ScheduleTargetBaseProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromObject(payload), }), })
Experimental.
func NewKinesisDataFirehosePutRecord ¶
func NewKinesisDataFirehosePutRecord(deliveryStream awscdkkinesisfirehosealpha.IDeliveryStream, props *ScheduleTargetBaseProps) KinesisDataFirehosePutRecord
Experimental.
type KinesisStreamPutRecord ¶
type KinesisStreamPutRecord interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an Amazon Kinesis Data Streams as a target for AWS EventBridge Scheduler.
Example:
import kinesis "github.com/aws/aws-cdk-go/awscdk" stream := kinesis.NewStream(this, jsii.String("MyStream")) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewKinesisStreamPutRecord(stream, &KinesisStreamPutRecordProps{ PartitionKey: jsii.String("key"), }), })
Experimental.
func NewKinesisStreamPutRecord ¶
func NewKinesisStreamPutRecord(stream awskinesis.IStream, props *KinesisStreamPutRecordProps) KinesisStreamPutRecord
Experimental.
type KinesisStreamPutRecordProps ¶
type KinesisStreamPutRecordProps struct { // The SQS queue to be used as deadLetterQueue. // // The events not successfully delivered are automatically retried for a specified period of time, // depending on the retry policy of the target. // If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. // Default: - no dead-letter queue. // // Experimental. DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"` // Input passed to the target. // Default: - no input. // // Experimental. Input awscdkscheduleralpha.ScheduleTargetInput `field:"optional" json:"input" yaml:"input"` // The maximum age of a request that Scheduler sends to a target for processing. // // Minimum value of 60. // Maximum value of 86400. // Default: Duration.hours(24) // // Experimental. MaxEventAge awscdk.Duration `field:"optional" json:"maxEventAge" yaml:"maxEventAge"` // The maximum number of times to retry when the target returns an error. // // Minimum value of 0. // Maximum value of 185. // Default: 185. // // Experimental. RetryAttempts *float64 `field:"optional" json:"retryAttempts" yaml:"retryAttempts"` // An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf. // // If none provided templates target will automatically create an IAM role with all the minimum necessary // permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets // will grant minimal required permissions. // Default: - created by target. // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The shard to which EventBridge Scheduler sends the event. // // The length must be between 1 and 256. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-kinesisparameters.html // // Experimental. PartitionKey *string `field:"required" json:"partitionKey" yaml:"partitionKey"` }
Properties for a Kinesis Data Streams Target.
Example:
import kinesis "github.com/aws/aws-cdk-go/awscdk" stream := kinesis.NewStream(this, jsii.String("MyStream")) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewKinesisStreamPutRecord(stream, &KinesisStreamPutRecordProps{ PartitionKey: jsii.String("key"), }), })
Experimental.
type LambdaInvoke ¶
type LambdaInvoke interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an AWS Lambda function as a target for AWS EventBridge Scheduler.
Example:
var fn function target := targets.NewLambdaInvoke(fn, &ScheduleTargetBaseProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromObject(map[string]*string{ "payload": jsii.String("useful"), }), }) schedule := awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(10))), Target: Target, Description: jsii.String("This is a test schedule that invokes a lambda function every 10 minutes."), })
Experimental.
func NewLambdaInvoke ¶
func NewLambdaInvoke(func_ awslambda.IFunction, props *ScheduleTargetBaseProps) LambdaInvoke
Experimental.
type SageMakerPipelineParameter ¶
type SageMakerPipelineParameter struct { // Name of parameter to start execution of a SageMaker Model Building Pipeline. // Experimental. Name *string `field:"required" json:"name" yaml:"name"` // Value of parameter to start execution of a SageMaker Model Building Pipeline. // Experimental. Value *string `field:"required" json:"value" yaml:"value"` }
Properties for a pipeline parameter.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import scheduler_targets_alpha "github.com/aws/aws-cdk-go/awscdkschedulertargetsalpha" sageMakerPipelineParameter := &SageMakerPipelineParameter{ Name: jsii.String("name"), Value: jsii.String("value"), }
Experimental.
type SageMakerStartPipelineExecution ¶
type SageMakerStartPipelineExecution interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use a SageMaker pipeline as a target for AWS EventBridge Scheduler.
Example:
import sagemaker "github.com/aws/aws-cdk-go/awscdk" var pipeline iPipeline awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewSageMakerStartPipelineExecution(pipeline, &SageMakerStartPipelineExecutionProps{ PipelineParameterList: []sageMakerPipelineParameter{ &sageMakerPipelineParameter{ Name: jsii.String("parameter-name"), Value: jsii.String("parameter-value"), }, }, }), })
Experimental.
func NewSageMakerStartPipelineExecution ¶
func NewSageMakerStartPipelineExecution(pipeline awssagemaker.IPipeline, props *SageMakerStartPipelineExecutionProps) SageMakerStartPipelineExecution
Experimental.
type SageMakerStartPipelineExecutionProps ¶
type SageMakerStartPipelineExecutionProps struct { // The SQS queue to be used as deadLetterQueue. // // The events not successfully delivered are automatically retried for a specified period of time, // depending on the retry policy of the target. // If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. // Default: - no dead-letter queue. // // Experimental. DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"` // Input passed to the target. // Default: - no input. // // Experimental. Input awscdkscheduleralpha.ScheduleTargetInput `field:"optional" json:"input" yaml:"input"` // The maximum age of a request that Scheduler sends to a target for processing. // // Minimum value of 60. // Maximum value of 86400. // Default: Duration.hours(24) // // Experimental. MaxEventAge awscdk.Duration `field:"optional" json:"maxEventAge" yaml:"maxEventAge"` // The maximum number of times to retry when the target returns an error. // // Minimum value of 0. // Maximum value of 185. // Default: 185. // // Experimental. RetryAttempts *float64 `field:"optional" json:"retryAttempts" yaml:"retryAttempts"` // An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf. // // If none provided templates target will automatically create an IAM role with all the minimum necessary // permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets // will grant minimal required permissions. // Default: - created by target. // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // List of parameter names and values to use when executing the SageMaker Model Building Pipeline. // // The length must be between 0 and 200. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-sagemakerpipelineparameters.html#cfn-scheduler-schedule-sagemakerpipelineparameters-pipelineparameterlist // // Default: - no pipeline parameter list. // // Experimental. PipelineParameterList *[]*SageMakerPipelineParameter `field:"optional" json:"pipelineParameterList" yaml:"pipelineParameterList"` }
Properties for a SageMaker Target.
Example:
import sagemaker "github.com/aws/aws-cdk-go/awscdk" var pipeline iPipeline awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(60))), Target: targets.NewSageMakerStartPipelineExecution(pipeline, &SageMakerStartPipelineExecutionProps{ PipelineParameterList: []sageMakerPipelineParameter{ &sageMakerPipelineParameter{ Name: jsii.String("parameter-name"), Value: jsii.String("parameter-value"), }, }, }), })
Experimental.
type ScheduleTargetBase ¶
type ScheduleTargetBase interface { // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Base class for Schedule Targets. Experimental.
type ScheduleTargetBaseProps ¶
type ScheduleTargetBaseProps struct { // The SQS queue to be used as deadLetterQueue. // // The events not successfully delivered are automatically retried for a specified period of time, // depending on the retry policy of the target. // If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. // Default: - no dead-letter queue. // // Experimental. DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"` // Input passed to the target. // Default: - no input. // // Experimental. Input awscdkscheduleralpha.ScheduleTargetInput `field:"optional" json:"input" yaml:"input"` // The maximum age of a request that Scheduler sends to a target for processing. // // Minimum value of 60. // Maximum value of 86400. // Default: Duration.hours(24) // // Experimental. MaxEventAge awscdk.Duration `field:"optional" json:"maxEventAge" yaml:"maxEventAge"` // The maximum number of times to retry when the target returns an error. // // Minimum value of 0. // Maximum value of 185. // Default: 185. // // Experimental. RetryAttempts *float64 `field:"optional" json:"retryAttempts" yaml:"retryAttempts"` // An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf. // // If none provided templates target will automatically create an IAM role with all the minimum necessary // permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets // will grant minimal required permissions. // Default: - created by target. // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` }
Base properties for a Schedule Target.
Example:
import sns "github.com/aws/aws-cdk-go/awscdk" topic := sns.NewTopic(this, jsii.String("Topic")) payload := map[string]*string{ "message": jsii.String("Hello scheduler!"), } target := targets.NewSnsPublish(topic, &ScheduleTargetBaseProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromObject(payload), }) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: Target, })
Experimental.
type SnsPublish ¶
type SnsPublish interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an Amazon SNS topic as a target for AWS EventBridge Scheduler.
Example:
import sns "github.com/aws/aws-cdk-go/awscdk" topic := sns.NewTopic(this, jsii.String("Topic")) payload := map[string]*string{ "message": jsii.String("Hello scheduler!"), } target := targets.NewSnsPublish(topic, &ScheduleTargetBaseProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromObject(payload), }) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: Target, })
Experimental.
func NewSnsPublish ¶
func NewSnsPublish(topic awssns.ITopic, props *ScheduleTargetBaseProps) SnsPublish
Experimental.
type SqsSendMessage ¶
type SqsSendMessage interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an Amazon SQS Queue as a target for AWS EventBridge Scheduler.
Example:
payload := "test" messageGroupId := "id" queue := sqs.NewQueue(this, jsii.String("MyQueue"), &QueueProps{ Fifo: jsii.Boolean(true), ContentBasedDeduplication: jsii.Boolean(true), }) target := targets.NewSqsSendMessage(queue, &SqsSendMessageProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromText(payload), MessageGroupId: jsii.String(MessageGroupId), }) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Target: Target, })
Experimental.
func NewSqsSendMessage ¶
func NewSqsSendMessage(queue awssqs.IQueue, props *SqsSendMessageProps) SqsSendMessage
Experimental.
type SqsSendMessageProps ¶
type SqsSendMessageProps struct { // The SQS queue to be used as deadLetterQueue. // // The events not successfully delivered are automatically retried for a specified period of time, // depending on the retry policy of the target. // If an event is not delivered before all retry attempts are exhausted, it will be sent to the dead letter queue. // Default: - no dead-letter queue. // // Experimental. DeadLetterQueue awssqs.IQueue `field:"optional" json:"deadLetterQueue" yaml:"deadLetterQueue"` // Input passed to the target. // Default: - no input. // // Experimental. Input awscdkscheduleralpha.ScheduleTargetInput `field:"optional" json:"input" yaml:"input"` // The maximum age of a request that Scheduler sends to a target for processing. // // Minimum value of 60. // Maximum value of 86400. // Default: Duration.hours(24) // // Experimental. MaxEventAge awscdk.Duration `field:"optional" json:"maxEventAge" yaml:"maxEventAge"` // The maximum number of times to retry when the target returns an error. // // Minimum value of 0. // Maximum value of 185. // Default: 185. // // Experimental. RetryAttempts *float64 `field:"optional" json:"retryAttempts" yaml:"retryAttempts"` // An execution role is an IAM role that EventBridge Scheduler assumes in order to interact with other AWS services on your behalf. // // If none provided templates target will automatically create an IAM role with all the minimum necessary // permissions to interact with the templated target. If you wish you may specify your own IAM role, then the templated targets // will grant minimal required permissions. // Default: - created by target. // // Experimental. Role awsiam.IRole `field:"optional" json:"role" yaml:"role"` // The FIFO message group ID to use as the target. // // This must be specified when the target is a FIFO queue. If you specify // a FIFO queue as a target, the queue must have content-based deduplication enabled. // // A length of `messageGroupId` must be between 1 and 128. // See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-scheduler-schedule-sqsparameters.html#cfn-scheduler-schedule-sqsparameters-messagegroupid // // Default: - no message group ID. // // Experimental. MessageGroupId *string `field:"optional" json:"messageGroupId" yaml:"messageGroupId"` }
Properties for a SQS Queue Target.
Example:
payload := "test" messageGroupId := "id" queue := sqs.NewQueue(this, jsii.String("MyQueue"), &QueueProps{ Fifo: jsii.Boolean(true), ContentBasedDeduplication: jsii.Boolean(true), }) target := targets.NewSqsSendMessage(queue, &SqsSendMessageProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromText(payload), MessageGroupId: jsii.String(MessageGroupId), }) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Minutes(jsii.Number(1))), Target: Target, })
Experimental.
type StepFunctionsStartExecution ¶
type StepFunctionsStartExecution interface { ScheduleTargetBase awscdkscheduleralpha.IScheduleTarget // Experimental. TargetArn() *string // Experimental. AddTargetActionToRole(role awsiam.IRole) // Create a return a Schedule Target Configuration for the given schedule. // // Returns: a Schedule Target Configuration. // Experimental. Bind(schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig // Experimental. BindBaseTargetConfig(_schedule awscdkscheduleralpha.ISchedule) *awscdkscheduleralpha.ScheduleTargetConfig }
Use an AWS Step function as a target for AWS EventBridge Scheduler.
Example:
import "github.com/aws/aws-cdk-go/awscdk" import tasks "github.com/aws/aws-cdk-go/awscdk" payload := map[string]*string{ "Name": jsii.String("MyParameter"), "Value": jsii.String("🌥️"), } putParameterStep := tasks.NewCallAwsService(this, jsii.String("PutParameter"), &CallAwsServiceProps{ Service: jsii.String("ssm"), Action: jsii.String("putParameter"), IamResources: []*string{ jsii.String("*"), }, Parameters: map[string]interface{}{ "Name.$": jsii.String("$.Name"), "Value.$": jsii.String("$.Value"), "Type": jsii.String("String"), "Overwrite": jsii.Boolean(true), }, }) stateMachine := sfn.NewStateMachine(this, jsii.String("StateMachine"), &StateMachineProps{ DefinitionBody: sfn.DefinitionBody_FromChainable(putParameterStep), }) awscdkscheduleralpha.NewSchedule(this, jsii.String("Schedule"), &ScheduleProps{ Schedule: awscdkscheduleralpha.ScheduleExpression_Rate(awscdk.Duration_Hours(jsii.Number(1))), Target: targets.NewStepFunctionsStartExecution(stateMachine, &ScheduleTargetBaseProps{ Input: awscdkscheduleralpha.ScheduleTargetInput_FromObject(payload), }), })
Experimental.
func NewStepFunctionsStartExecution ¶
func NewStepFunctionsStartExecution(stateMachine awsstepfunctions.IStateMachine, props *ScheduleTargetBaseProps) StepFunctionsStartExecution
Experimental.
Source Files ¶
- CodeBuildStartBuild.go
- CodeBuildStartBuild__checks.go
- CodePipelineStartPipelineExecution.go
- CodePipelineStartPipelineExecution__checks.go
- EventBridgePutEvents.go
- EventBridgePutEventsEntry.go
- EventBridgePutEvents__checks.go
- InspectorStartAssessmentRun.go
- InspectorStartAssessmentRun__checks.go
- KinesisDataFirehosePutRecord.go
- KinesisDataFirehosePutRecord__checks.go
- KinesisStreamPutRecord.go
- KinesisStreamPutRecordProps.go
- KinesisStreamPutRecord__checks.go
- LambdaInvoke.go
- LambdaInvoke__checks.go
- SageMakerPipelineParameter.go
- SageMakerStartPipelineExecution.go
- SageMakerStartPipelineExecutionProps.go
- SageMakerStartPipelineExecution__checks.go
- ScheduleTargetBase.go
- ScheduleTargetBaseProps.go
- ScheduleTargetBase__checks.go
- SnsPublish.go
- SnsPublish__checks.go
- SqsSendMessage.go
- SqsSendMessageProps.go
- SqsSendMessage__checks.go
- StepFunctionsStartExecution.go
- StepFunctionsStartExecution__checks.go
- main.go