Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-scheduler

Package Overview
Dependencies
Maintainers
5
Versions
236
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-scheduler

AWS SDK for JavaScript Scheduler Client for Node.js, Browser and React Native

  • 3.696.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
527K
increased by11.02%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-scheduler?

@aws-sdk/client-scheduler is an AWS SDK client that allows you to interact with the Amazon EventBridge Scheduler service. This service enables you to create, manage, and execute scheduled tasks and events in AWS. You can use it to automate tasks, trigger events at specific times, and manage schedules programmatically.

What are @aws-sdk/client-scheduler's main functionalities?

Create a Schedule

This code sample demonstrates how to create a new schedule using the @aws-sdk/client-scheduler package. The schedule triggers a Lambda function every 5 minutes.

const { SchedulerClient, CreateScheduleCommand } = require('@aws-sdk/client-scheduler');

const client = new SchedulerClient({ region: 'us-west-2' });

const params = {
  Name: 'MySchedule',
  ScheduleExpression: 'rate(5 minutes)',
  Target: {
    Arn: 'arn:aws:lambda:us-west-2:123456789012:function:MyFunction',
    RoleArn: 'arn:aws:iam::123456789012:role/MyRole'
  }
};

const command = new CreateScheduleCommand(params);

client.send(command).then(
  (data) => console.log(data),
  (error) => console.error(error)
);

List Schedules

This code sample demonstrates how to list all existing schedules using the @aws-sdk/client-scheduler package.

const { SchedulerClient, ListSchedulesCommand } = require('@aws-sdk/client-scheduler');

const client = new SchedulerClient({ region: 'us-west-2' });

const command = new ListSchedulesCommand({});

client.send(command).then(
  (data) => console.log(data.Schedules),
  (error) => console.error(error)
);

Delete a Schedule

This code sample demonstrates how to delete an existing schedule using the @aws-sdk/client-scheduler package.

const { SchedulerClient, DeleteScheduleCommand } = require('@aws-sdk/client-scheduler');

const client = new SchedulerClient({ region: 'us-west-2' });

const params = { Name: 'MySchedule' };

const command = new DeleteScheduleCommand(params);

client.send(command).then(
  (data) => console.log(data),
  (error) => console.error(error)
);

Other packages similar to @aws-sdk/client-scheduler

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc