Documentation
¶
Index ¶
- Variables
- type DeadLetterConfig
- type ECSTaskRunner
- type EcsAwsvpcConfiguration
- type EcsCapacityProviderStrategyItem
- type EcsNetworkConfiguration
- type EcsParameters
- type EcsPlacementConstraint
- type EcsPlacementStrategy
- type EcsTag
- type EventBridgeParameters
- type EventBusPutter
- type FlexibleTimeWindow
- type Handler
- func (h *Handler) ChaosOperations() []string
- func (h *Handler) ChaosRegions() []string
- func (h *Handler) ChaosServiceName() string
- func (h *Handler) ExtractOperation(c *echo.Context) string
- func (h *Handler) ExtractResource(c *echo.Context) string
- func (h *Handler) GetRunner() *Runner
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Runner() *Runner
- func (h *Handler) SetRunner(r *Runner)
- func (h *Handler) Shutdown(_ context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type InMemoryBackend
- func (b *InMemoryBackend) AccountID() string
- func (b *InMemoryBackend) AddScheduleGroupInternal(g *ScheduleGroup)
- func (b *InMemoryBackend) AddScheduleInternal(s *Schedule)
- func (b *InMemoryBackend) CreateSchedule(ctx context.Context, name, groupName, expr, description, timezone string, ...) (*Schedule, error)
- func (b *InMemoryBackend) CreateScheduleGroup(ctx context.Context, name, description string, initialTags map[string]string) (*ScheduleGroup, error)
- func (b *InMemoryBackend) DeleteSchedule(ctx context.Context, name, groupName string) error
- func (b *InMemoryBackend) DeleteScheduleGroup(ctx context.Context, name string) error
- func (b *InMemoryBackend) GetSchedule(ctx context.Context, name, groupName string) (*Schedule, error)
- func (b *InMemoryBackend) GetScheduleGroup(ctx context.Context, name string) (*ScheduleGroup, error)
- func (b *InMemoryBackend) ListScheduleGroups(ctx context.Context, namePrefix, nextToken string, maxResults int) ([]*ScheduleGroup, string)
- func (b *InMemoryBackend) ListSchedules(ctx context.Context, groupName, namePrefix, state, nextToken string, ...) ([]*Schedule, string)
- func (b *InMemoryBackend) ListTagsForResource(ctx context.Context, resourceARN string) (map[string]string, error)
- func (b *InMemoryBackend) Region() string
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) TagResource(ctx context.Context, resourceARN string, kv map[string]string) error
- func (b *InMemoryBackend) UntagResource(ctx context.Context, resourceARN string, tagKeys []string) error
- func (b *InMemoryBackend) UpdateSchedule(ctx context.Context, name, groupName, expr, description, timezone string, ...) (*Schedule, error)
- type InputTransformer
- type KinesisParameters
- type KinesisRecordPutter
- type LambdaInvoker
- type Provider
- type RetryPolicy
- type Runner
- func (r *Runner) SetECSTaskRunner(e ECSTaskRunner)
- func (r *Runner) SetEventBusPutter(p EventBusPutter)
- func (r *Runner) SetKinesisRecordPutter(k KinesisRecordPutter)
- func (r *Runner) SetLambdaInvoker(l LambdaInvoker)
- func (r *Runner) SetSNSPublisher(p SNSPublisher)
- func (r *Runner) SetSQSFIFOSender(s SQSFIFOSender)
- func (r *Runner) SetSQSSender(s SQSSender)
- func (r *Runner) SetSageMakerPipelineStarter(s SageMakerPipelineStarter)
- func (r *Runner) SetStepFunctionsStarter(s StepFunctionsStarter)
- func (r *Runner) Start(ctx context.Context)
- type SNSPublisher
- type SQSFIFOSender
- type SQSSender
- type SageMakerPipelineParameter
- type SageMakerPipelineParameters
- type SageMakerPipelineStarter
- type Schedule
- type ScheduleGroup
- type ScheduleOption
- type SqsParameters
- type StepFunctionsStarter
- type StorageBackend
- type Target
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = awserr.New("ResourceNotFoundException", awserr.ErrNotFound) ErrAlreadyExists = awserr.New("ConflictException", awserr.ErrConflict) ErrValidation = awserr.New("ValidationException", awserr.ErrInvalidParameter) )
var ( // ErrInvalidRateExpression is returned for malformed rate() expressions. ErrInvalidRateExpression = errors.New("invalid rate expression") // ErrInvalidRateValue is returned when the numeric value in a rate() expression is not valid. ErrInvalidRateValue = errors.New("invalid rate value") // ErrUnknownRateUnit is returned when the unit in a rate() expression is not recognised. ErrUnknownRateUnit = errors.New("unknown rate unit") // ErrInvalidCronExpression is returned for malformed cron() expressions. ErrInvalidCronExpression = errors.New("invalid cron expression") // ErrInvalidAtExpression is returned for malformed at() expressions. ErrInvalidAtExpression = errors.New("invalid at expression") )
var ErrNilAppContext = errors.New("nil AppContext passed to Scheduler Provider.Init")
ErrNilAppContext is returned by Init when a nil AppContext is passed.
var ErrUnknownCronValue = errors.New("unknown cron value")
ErrUnknownCronValue is returned when a cron field token cannot be parsed.
Functions ¶
This section is empty.
Types ¶
type DeadLetterConfig ¶
type DeadLetterConfig struct {
Arn string `json:"arn"`
}
DeadLetterConfig holds the ARN of an SQS queue used as a dead-letter queue.
type ECSTaskRunner ¶
type ECSTaskRunner interface {
RunSchedulerTask(ctx context.Context, taskDefARN, launchType string, taskCount int) error
}
ECSTaskRunner can run an ECS task.
type EcsAwsvpcConfiguration ¶
type EcsAwsvpcConfiguration struct {
AssignPublicIP string `json:"assignPublicIp,omitempty"`
SecurityGroups []string `json:"securityGroups,omitempty"`
Subnets []string `json:"subnets"`
}
EcsAwsvpcConfiguration holds VPC networking options for ECS tasks.
type EcsCapacityProviderStrategyItem ¶
type EcsCapacityProviderStrategyItem struct {
CapacityProvider string `json:"capacityProvider"`
Base int `json:"base,omitempty"`
Weight int `json:"weight,omitempty"`
}
EcsCapacityProviderStrategyItem is one entry in an ECS capacity provider strategy.
type EcsNetworkConfiguration ¶
type EcsNetworkConfiguration struct {
AwsvpcConfiguration *EcsAwsvpcConfiguration `json:"awsvpcConfiguration,omitempty"`
}
EcsNetworkConfiguration holds the awsvpc network configuration for ECS tasks.
type EcsParameters ¶
type EcsParameters struct {
NetworkConfiguration *EcsNetworkConfiguration `json:"networkConfiguration,omitempty"`
PropagateTags string `json:"propagateTags,omitempty"`
TaskDefinitionArn string `json:"taskDefinitionArn"`
LaunchType string `json:"launchType,omitempty"`
PlatformVersion string `json:"platformVersion,omitempty"`
Group string `json:"group,omitempty"`
ReferenceID string `json:"referenceId,omitempty"`
PlacementConstraints []EcsPlacementConstraint `json:"placementConstraints,omitempty"`
PlacementStrategy []EcsPlacementStrategy `json:"placementStrategy,omitempty"`
Tags []EcsTag `json:"tags,omitempty"`
CapacityProviderStrategy []EcsCapacityProviderStrategyItem `json:"capacityProviderStrategy,omitempty"`
TaskCount int `json:"taskCount,omitempty"`
EnableECSManagedTags bool `json:"enableECSManagedTags,omitempty"`
EnableExecuteCommand bool `json:"enableExecuteCommand,omitempty"`
}
EcsParameters holds parameters for ECS task targets.
type EcsPlacementConstraint ¶
type EcsPlacementConstraint struct {
Expression string `json:"expression,omitempty"`
Type string `json:"type,omitempty"`
}
EcsPlacementConstraint constrains ECS task placement.
type EcsPlacementStrategy ¶
type EcsPlacementStrategy struct {
Field string `json:"field,omitempty"`
Type string `json:"type,omitempty"`
}
EcsPlacementStrategy defines ECS task placement strategy.
type EventBridgeParameters ¶
type EventBridgeParameters struct {
DetailType string `json:"detailType"`
Source string `json:"source"`
}
EventBridgeParameters holds parameters for EventBridge bus targets.
type EventBusPutter ¶
type EventBusPutter interface {
PutSchedulerEvent(ctx context.Context, busARN, source, detailType, detail string) error
}
EventBusPutter can put events onto an EventBridge bus.
type FlexibleTimeWindow ¶
type Handler ¶
type Handler struct {
Backend StorageBackend
// contains filtered or unexported fields
}
Handler is the Echo HTTP handler for EventBridge Scheduler operations.
func NewHandler ¶
func NewHandler(backend StorageBackend) *Handler
NewHandler creates a new Scheduler handler.
func (*Handler) ChaosOperations ¶
ChaosOperations returns all operations that can be fault-injected.
func (*Handler) ChaosRegions ¶
ChaosRegions returns all regions this Scheduler instance handles.
func (*Handler) ChaosServiceName ¶
ChaosServiceName returns the lowercase AWS service name for fault rule matching.
func (*Handler) ExtractOperation ¶
ExtractOperation extracts the Scheduler action from the X-Amz-Target header or REST path.
func (*Handler) ExtractResource ¶
ExtractResource extracts the schedule or schedule group name from the request body or REST path.
func (*Handler) GetRunner ¶
GetRunner returns the handler's Runner so callers can configure target invokers.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations returns the list of supported Scheduler operations.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns the Echo handler function for Scheduler requests.
func (*Handler) MatchPriority ¶
MatchPriority returns the routing priority.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset implements service.Resettable by delegating to the backend.
func (*Handler) RouteMatcher ¶
RouteMatcher returns a function that matches Scheduler requests. Matches both X-Amz-Target (JSON protocol) and REST API paths (/schedules/... , /schedule-groups/...). For /tags/{ResourceArn} paths, only matches when the ARN belongs to the Scheduler service (i.e. contains ":scheduler:") to avoid intercepting tag requests destined for other services.
func (*Handler) SetRunner ¶
SetRunner replaces the default runner with the given one. Useful for wiring target invokers before StartWorker is called.
func (*Handler) Shutdown ¶
Shutdown implements service.Shutdowner. It stops the schedule runner goroutine.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend stores schedules and schedule groups nested by region (multiple regions can each have a same-named schedule/group, fully isolated from one another). Phase 3.3 of the datalayer refactor replaces the region-nested map[string]map[string]*T pair for each resource with a single flat *store.Table[T], keyed by the composite "region|id" string (see regionKey below), with companion *store.Index values grouping entries by region (replacing the old outer map nesting) and by "region|ARN" (replacing the old per-region ARN reverse map used by TagResource/UntagResource/ListTagsForResource). See store_setup.go.
Schedule already carries its own exported Region field (part of the AWS wire shape), so schedules is registered directly off that field. ScheduleGroup has no such field -- its ARN always embeds the region it was created in (see CreateScheduleGroup/seedDefaultGroup), so scheduleGroupRegionOf derives it from there instead of adding a new field.
Both tables are "dirty" in the store_setup.go/persistence.go sense: their Tags field is a live *tags.Tags (backed by a Prometheus-instrumented map), which persistence.go swaps for a plain map[string]string via a DTO on Snapshot/Restore to preserve the existing per-resource Prometheus metric naming -- so neither table is registered on a shared b.registry; each is built with store.New only.
func NewInMemoryBackend ¶
func NewInMemoryBackend(accountID, region string) *InMemoryBackend
func (*InMemoryBackend) AccountID ¶
func (b *InMemoryBackend) AccountID() string
AccountID returns the AWS account ID this backend is configured for.
func (*InMemoryBackend) AddScheduleGroupInternal ¶
func (b *InMemoryBackend) AddScheduleGroupInternal(g *ScheduleGroup)
AddScheduleGroupInternal inserts a schedule group directly for testing purposes. Must only be used from test code.
func (*InMemoryBackend) AddScheduleInternal ¶
func (b *InMemoryBackend) AddScheduleInternal(s *Schedule)
AddScheduleInternal inserts a schedule directly for testing purposes. Must only be used from test code.
func (*InMemoryBackend) CreateSchedule ¶
func (b *InMemoryBackend) CreateSchedule( ctx context.Context, name, groupName, expr, description, timezone string, target Target, state string, ftw FlexibleTimeWindow, opts ...ScheduleOption, ) (*Schedule, error)
CreateSchedule creates a new schedule in the named group.
func (*InMemoryBackend) CreateScheduleGroup ¶
func (b *InMemoryBackend) CreateScheduleGroup( ctx context.Context, name, description string, initialTags map[string]string, ) (*ScheduleGroup, error)
CreateScheduleGroup creates a new schedule group with the given name and optional tags.
func (*InMemoryBackend) DeleteSchedule ¶
func (b *InMemoryBackend) DeleteSchedule(ctx context.Context, name, groupName string) error
DeleteSchedule removes a schedule by name and group.
func (*InMemoryBackend) DeleteScheduleGroup ¶
func (b *InMemoryBackend) DeleteScheduleGroup(ctx context.Context, name string) error
DeleteScheduleGroup removes the schedule group with the given name. The built-in "default" group cannot be deleted. All schedules within the group are also deleted.
func (*InMemoryBackend) GetSchedule ¶
func (b *InMemoryBackend) GetSchedule(ctx context.Context, name, groupName string) (*Schedule, error)
GetSchedule returns a schedule by name and group.
func (*InMemoryBackend) GetScheduleGroup ¶
func (b *InMemoryBackend) GetScheduleGroup(ctx context.Context, name string) (*ScheduleGroup, error)
GetScheduleGroup returns the schedule group with the given name.
func (*InMemoryBackend) ListScheduleGroups ¶
func (b *InMemoryBackend) ListScheduleGroups( ctx context.Context, namePrefix, nextToken string, maxResults int, ) ([]*ScheduleGroup, string)
ListScheduleGroups returns schedule groups optionally filtered by name prefix. When maxResults > 0 and nextToken is non-empty it resumes after the token (last seen name). Returns the page of groups and the next continuation token (empty when no more results).
func (*InMemoryBackend) ListSchedules ¶
func (b *InMemoryBackend) ListSchedules( ctx context.Context, groupName, namePrefix, state, nextToken string, maxResults int, ) ([]*Schedule, string)
ListSchedules returns schedules optionally filtered by group name, name prefix, and state. When maxResults > 0 and nextToken is non-empty it resumes after the token (last seen name). Returns the page of schedules and the next continuation token (empty when no more results).
func (*InMemoryBackend) ListTagsForResource ¶
func (*InMemoryBackend) Region ¶
func (b *InMemoryBackend) Region() string
Region returns the AWS region this backend is configured for.
func (*InMemoryBackend) Reset ¶
func (b *InMemoryBackend) Reset()
Reset clears all in-memory state and re-seeds the default schedule group in the backend's default region.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads backend state from a JSON snapshot. It implements persistence.Persistable.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises the backend state to JSON. It implements persistence.Persistable.
func (*InMemoryBackend) TagResource ¶
func (*InMemoryBackend) UntagResource ¶
func (*InMemoryBackend) UpdateSchedule ¶
func (b *InMemoryBackend) UpdateSchedule( ctx context.Context, name, groupName, expr, description, timezone string, target Target, state string, ftw FlexibleTimeWindow, opts ...ScheduleOption, ) (*Schedule, error)
UpdateSchedule updates an existing schedule.
type InputTransformer ¶
type InputTransformer struct {
InputPathsMap map[string]string `json:"inputPathsMap,omitempty"`
InputTemplate string `json:"inputTemplate"`
}
InputTransformer maps input path expressions to a template string.
type KinesisParameters ¶
type KinesisParameters struct {
PartitionKey string `json:"partitionKey"`
}
KinesisParameters holds parameters for Kinesis stream targets.
type KinesisRecordPutter ¶
type KinesisRecordPutter interface {
PutSchedulerRecord(ctx context.Context, streamARN, partitionKey string, data []byte) error
}
KinesisRecordPutter can put a record onto a Kinesis stream.
type LambdaInvoker ¶
type LambdaInvoker interface {
InvokeFunction(ctx context.Context, name string, invocationType string, payload []byte) ([]byte, int, error)
}
LambdaInvoker can invoke a Lambda function by name with a payload.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for EventBridge Scheduler.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init initializes the Scheduler service backend and handler.
type RetryPolicy ¶
type RetryPolicy struct {
MaximumEventAgeInSeconds int `json:"maximumEventAgeInSeconds"`
MaximumRetryAttempts int `json:"maximumRetryAttempts"`
}
RetryPolicy configures retry behaviour for a schedule target. MaximumEventAgeInSeconds: 60-86400 (default 86400). MaximumRetryAttempts: 0-185 (default 185).
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner evaluates schedule expressions and invokes targets when due.
func NewRunner ¶
func NewRunner(backend StorageBackend) *Runner
NewRunner creates a new Runner for the given scheduler backend.
func (*Runner) SetECSTaskRunner ¶
func (r *Runner) SetECSTaskRunner(e ECSTaskRunner)
SetECSTaskRunner configures the ECS task runner for schedule targets.
func (*Runner) SetEventBusPutter ¶
func (r *Runner) SetEventBusPutter(p EventBusPutter)
SetEventBusPutter configures the EventBridge bus sender for schedule targets.
func (*Runner) SetKinesisRecordPutter ¶
func (r *Runner) SetKinesisRecordPutter(k KinesisRecordPutter)
SetKinesisRecordPutter configures the Kinesis record putter for schedule targets.
func (*Runner) SetLambdaInvoker ¶
func (r *Runner) SetLambdaInvoker(l LambdaInvoker)
SetLambdaInvoker configures the Lambda invoker for schedule targets.
func (*Runner) SetSNSPublisher ¶
func (r *Runner) SetSNSPublisher(p SNSPublisher)
SetSNSPublisher configures the SNS publisher for schedule targets.
func (*Runner) SetSQSFIFOSender ¶
func (r *Runner) SetSQSFIFOSender(s SQSFIFOSender)
SetSQSFIFOSender configures the FIFO SQS sender for schedule targets.
func (*Runner) SetSQSSender ¶
SetSQSSender configures the SQS sender for schedule targets.
func (*Runner) SetSageMakerPipelineStarter ¶
func (r *Runner) SetSageMakerPipelineStarter(s SageMakerPipelineStarter)
SetSageMakerPipelineStarter configures the SageMaker pipeline starter for schedule targets.
func (*Runner) SetStepFunctionsStarter ¶
func (r *Runner) SetStepFunctionsStarter(s StepFunctionsStarter)
SetStepFunctionsStarter configures the StepFunctions starter for schedule targets.
type SNSPublisher ¶
SNSPublisher can publish a message to an SNS topic by ARN.
type SQSFIFOSender ¶
type SQSFIFOSender interface {
SendMessageToFIFOQueue(ctx context.Context, queueARN, messageBody, messageGroupID string) error
}
SQSFIFOSender can send a message to a FIFO SQS queue with a MessageGroupId.
type SQSSender ¶
type SQSSender interface {
SendMessageToQueue(ctx context.Context, queueARN, messageBody string) error
}
SQSSender can send a message to an SQS queue by ARN.
type SageMakerPipelineParameter ¶
SageMakerPipelineParameter is a name/value pair for SageMaker pipeline execution.
type SageMakerPipelineParameters ¶
type SageMakerPipelineParameters struct {
PipelineParameterList []SageMakerPipelineParameter `json:"pipelineParameterList,omitempty"`
}
SageMakerPipelineParameters holds parameters for SageMaker pipeline targets.
type SageMakerPipelineStarter ¶
type SageMakerPipelineStarter interface {
StartPipelineExecution(ctx context.Context, pipelineARN string, params map[string]string) error
}
SageMakerPipelineStarter can start a SageMaker pipeline execution.
type Schedule ¶
type Schedule struct {
Tags *tags.Tags `json:"tags,omitempty"`
CreationDate time.Time `json:"creationDate"`
LastModificationDate time.Time `json:"lastModificationDate"`
StartDate *time.Time `json:"startDate,omitempty"`
EndDate *time.Time `json:"endDate,omitempty"`
Target Target `json:"target"`
Name string `json:"name"`
ARN string `json:"arn"`
ScheduleExpression string `json:"scheduleExpression"`
ScheduleExpressionTimezone string `json:"scheduleExpressionTimezone,omitempty"`
Description string `json:"description,omitempty"`
GroupName string `json:"groupName"`
State string `json:"state"`
ActionAfterCompletion string `json:"actionAfterCompletion,omitempty"`
KmsKeyArn string `json:"kmsKeyArn,omitempty"`
AccountID string `json:"accountID"`
Region string `json:"region"`
FlexibleTimeWindow FlexibleTimeWindow `json:"flexibleTimeWindow"`
}
Schedule represents an EventBridge Scheduler schedule.
type ScheduleGroup ¶
type ScheduleGroup struct {
CreationDate time.Time `json:"creationDate"`
LastModificationDate time.Time `json:"lastModificationDate"`
Tags *tags.Tags `json:"tags,omitempty"`
Description string `json:"description,omitempty"`
Name string `json:"name"`
ARN string `json:"arn"`
State string `json:"state"`
}
ScheduleGroup represents an EventBridge Scheduler schedule group.
type ScheduleOption ¶
type ScheduleOption func(*Schedule)
ScheduleOption applies an optional field to a schedule during creation or update.
func WithActionAfterCompletion ¶
func WithActionAfterCompletion(action string) ScheduleOption
WithActionAfterCompletion sets what happens after the schedule completes (DELETE or NONE).
func WithEndDate ¶
func WithEndDate(t time.Time) ScheduleOption
WithEndDate sets the optional end date on a schedule.
func WithKmsKeyArn ¶
func WithKmsKeyArn(arn string) ScheduleOption
WithKmsKeyArn sets an optional customer-managed KMS key ARN on a schedule.
func WithStartDate ¶
func WithStartDate(t time.Time) ScheduleOption
WithStartDate sets the optional start date on a schedule.
type SqsParameters ¶
type SqsParameters struct {
MessageGroupID string `json:"messageGroupId,omitempty"`
}
SqsParameters holds parameters for SQS targets.
type StepFunctionsStarter ¶
StepFunctionsStarter can start a StepFunctions state machine execution.
type StorageBackend ¶
type StorageBackend interface {
// Schedule operations
CreateSchedule(
ctx context.Context,
name, groupName, expr, description, timezone string,
target Target,
state string,
ftw FlexibleTimeWindow,
opts ...ScheduleOption,
) (*Schedule, error)
GetSchedule(ctx context.Context, name, groupName string) (*Schedule, error)
ListSchedules(
ctx context.Context,
groupName, namePrefix, state, nextToken string,
maxResults int,
) ([]*Schedule, string)
DeleteSchedule(ctx context.Context, name, groupName string) error
UpdateSchedule(
ctx context.Context,
name, groupName, expr, description, timezone string,
target Target,
state string,
ftw FlexibleTimeWindow,
opts ...ScheduleOption,
) (*Schedule, error)
// Schedule group operations
CreateScheduleGroup(
ctx context.Context,
name, description string,
initialTags map[string]string,
) (*ScheduleGroup, error)
GetScheduleGroup(ctx context.Context, name string) (*ScheduleGroup, error)
DeleteScheduleGroup(ctx context.Context, name string) error
ListScheduleGroups(ctx context.Context, namePrefix, nextToken string, maxResults int) ([]*ScheduleGroup, string)
// Tag operations
TagResource(ctx context.Context, resourceARN string, kv map[string]string) error
UntagResource(ctx context.Context, resourceARN string, tagKeys []string) error
ListTagsForResource(ctx context.Context, resourceARN string) (map[string]string, error)
// Lifecycle
Reset()
Region() string
AccountID() string
Snapshot(ctx context.Context) []byte
Restore(ctx context.Context, data []byte) error
}
StorageBackend defines the interface for EventBridge Scheduler backend implementations. All mutating methods must be safe for concurrent use. The region for each operation is resolved from the supplied context (falling back to the backend's default region).
type Target ¶
type Target struct {
RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
DeadLetterConfig *DeadLetterConfig `json:"deadLetterConfig,omitempty"`
InputTransformer *InputTransformer `json:"inputTransformer,omitempty"`
EventBridgeParameters *EventBridgeParameters `json:"eventBridgeParameters,omitempty"`
KinesisParameters *KinesisParameters `json:"kinesisParameters,omitempty"`
SqsParameters *SqsParameters `json:"sqsParameters,omitempty"`
SageMakerPipelineParameters *SageMakerPipelineParameters `json:"sageMakerPipelineParameters,omitempty"`
EcsParameters *EcsParameters `json:"ecsParameters,omitempty"`
// Input is an optional custom event payload sent to the target instead of the default
// scheduler event. When empty the runner constructs a default EventBridge Scheduler event.
Input string `json:"input,omitempty"`
ARN string `json:"arn"`
RoleARN string `json:"roleARN"`
}