ScheduleGroup
The ScheduleGroup resource lets you manage AWS Scheduler ScheduleGroups for organizing and controlling scheduled tasks.
Minimal Example
Section titled “Minimal Example”Create a basic ScheduleGroup with a name and tags.
import AWS from "alchemy/aws/control";
const basicScheduleGroup = await AWS.Scheduler.ScheduleGroup("basicScheduleGroup", { name: "MyFirstScheduleGroup", tags: [ { Key: "Environment", Value: "Development" }, { Key: "Project", Value: "SchedulerDemo" } ]});
Advanced Configuration
Section titled “Advanced Configuration”Configure a ScheduleGroup with additional properties like adopting existing resources.
const advancedScheduleGroup = await AWS.Scheduler.ScheduleGroup("advancedScheduleGroup", { name: "MyAdvancedScheduleGroup", tags: [ { Key: "Environment", Value: "Production" }, { Key: "Project", Value: "SchedulerDemo" } ], adopt: true // This will adopt an existing resource if it already exists});
Using ScheduleGroup with Multiple Tags
Section titled “Using ScheduleGroup with Multiple Tags”Create a ScheduleGroup that utilizes multiple tags for better organization.
const taggedScheduleGroup = await AWS.Scheduler.ScheduleGroup("taggedScheduleGroup", { name: "MyTaggedScheduleGroup", tags: [ { Key: "Department", Value: "Engineering" }, { Key: "Owner", Value: "Alice" }, { Key: "Status", Value: "Active" } ]});
Create a ScheduleGroup with Specific Names
Section titled “Create a ScheduleGroup with Specific Names”Demonstrate creating multiple ScheduleGroups with distinct names for different environments.
const devScheduleGroup = await AWS.Scheduler.ScheduleGroup("devScheduleGroup", { name: "DevelopmentSchedulerGroup"});
const prodScheduleGroup = await AWS.Scheduler.ScheduleGroup("prodScheduleGroup", { name: "ProductionSchedulerGroup"});