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

@aws-sdk/client-codebuild

Package Overview
Dependencies
Maintainers
5
Versions
434
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-codebuild

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

  • 3.712.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
155K
increased by17.13%
Maintainers
5
Weekly downloads
 
Created

What is @aws-sdk/client-codebuild?

@aws-sdk/client-codebuild is a part of the AWS SDK for JavaScript, which allows developers to interact with AWS CodeBuild, a fully managed continuous integration service that compiles source code, runs tests, and produces software packages that are ready to deploy.

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

Start a Build

This feature allows you to start a new build for a specified CodeBuild project. The code sample demonstrates how to initiate a build using the StartBuildCommand.

const { CodeBuildClient, StartBuildCommand } = require('@aws-sdk/client-codebuild');

const client = new CodeBuildClient({ region: 'us-west-2' });
const params = {
  projectName: 'my-project',
};

const run = async () => {
  try {
    const data = await client.send(new StartBuildCommand(params));
    console.log('Build started:', data);
  } catch (err) {
    console.error('Error starting build:', err);
  }
};

run();

List Builds

This feature allows you to list all the builds in your AWS account. The code sample demonstrates how to retrieve and print the list of build IDs using the ListBuildsCommand.

const { CodeBuildClient, ListBuildsCommand } = require('@aws-sdk/client-codebuild');

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

const run = async () => {
  try {
    const data = await client.send(new ListBuildsCommand({}));
    console.log('Builds:', data.ids);
  } catch (err) {
    console.error('Error listing builds:', err);
  }
};

run();

Get Build Details

This feature allows you to get detailed information about specific builds. The code sample demonstrates how to retrieve details for specified build IDs using the BatchGetBuildsCommand.

const { CodeBuildClient, BatchGetBuildsCommand } = require('@aws-sdk/client-codebuild');

const client = new CodeBuildClient({ region: 'us-west-2' });
const params = {
  ids: ['build-id-1', 'build-id-2'],
};

const run = async () => {
  try {
    const data = await client.send(new BatchGetBuildsCommand(params));
    console.log('Build details:', data.builds);
  } catch (err) {
    console.error('Error getting build details:', err);
  }
};

run();

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

FAQs

Package last updated on 13 Dec 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