Socket
Socket
Sign inDemoInstall

@aws-sdk/client-amplify

Package Overview
Dependencies
31
Maintainers
4
Versions
378
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-amplify


Version published
Maintainers
4
Created

Package description

What is @aws-sdk/client-amplify?

@aws-sdk/client-amplify is a part of the AWS SDK for JavaScript, which allows developers to interact with AWS Amplify, a service for building and deploying mobile and web applications. This package provides methods to manage Amplify apps, branches, domains, and webhooks.

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

Create an Amplify App

This feature allows you to create a new Amplify app by specifying the app name, repository, and platform. The code sample demonstrates how to use the CreateAppCommand to create an app.

const { AmplifyClient, CreateAppCommand } = require('@aws-sdk/client-amplify');

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

const createApp = async () => {
  const params = {
    name: 'MyAmplifyApp',
    repository: 'https://github.com/my-repo',
    platform: 'WEB'
  };
  const command = new CreateAppCommand(params);
  const response = await client.send(command);
  console.log(response);
};

createApp();

List Amplify Apps

This feature allows you to list all the Amplify apps in your account. The code sample demonstrates how to use the ListAppsCommand to retrieve and print the list of apps.

const { AmplifyClient, ListAppsCommand } = require('@aws-sdk/client-amplify');

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

const listApps = async () => {
  const command = new ListAppsCommand({});
  const response = await client.send(command);
  console.log(response.apps);
};

listApps();

Create a Branch

This feature allows you to create a new branch in an existing Amplify app. The code sample demonstrates how to use the CreateBranchCommand to create a branch.

const { AmplifyClient, CreateBranchCommand } = require('@aws-sdk/client-amplify');

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

const createBranch = async () => {
  const params = {
    appId: 'd1e2f3g4h5',
    branchName: 'new-feature-branch'
  };
  const command = new CreateBranchCommand(params);
  const response = await client.send(command);
  console.log(response);
};

createBranch();

Delete an Amplify App

This feature allows you to delete an existing Amplify app. The code sample demonstrates how to use the DeleteAppCommand to delete an app by specifying its appId.

const { AmplifyClient, DeleteAppCommand } = require('@aws-sdk/client-amplify');

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

const deleteApp = async () => {
  const params = {
    appId: 'd1e2f3g4h5'
  };
  const command = new DeleteAppCommand(params);
  const response = await client.send(command);
  console.log(response);
};

deleteApp();

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

Readme

Source

@aws-sdk/client-amplify

NPM version NPM downloads

For SDK usage, please step to SDK reademe.

FAQs

Last updated on 09 Jan 2020

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc