Nutella Peanut-Butter Marshmallow

    This package has been deprecated

    Author message:

    Please use npm i @al/environments

    @alertlogic/environments
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.0 • Public • Published

    @alertlogic/environments

    A client for interacting with the Alert Logic Environments Public API.

    This library uses @alertlogic/client as its HTTP provider interface.

    Disclaimer

    Until the release of version 1.0.0 all current minor version increments may be backwards incompatible. Please bear this in mind when developing against this library. Should you have any further questions, please do not hesitate to contact us as npm@alertlogic.com

    Installation

      npm install @alertlogic/environments --save
    

    Usage

      var EnvironmentsClient = require('@alertlogic/environments').EnvironmentsClient //commonjs - e.g. node
      import { EnvironmentsClient } from '@alertlogic/environments'; //ES2015 - e.g. Angular, TS projects
    

    Add Environment

      EnvironmentsClient.addEnvironment(accountId, environment)
        accountId: '1234',
        environment: '{"type":"aws", "type_id": "123456789012", "defender_support":true, "defender_location_id":"defender-us-denver", "discover":true, "scan":false}'
    

    Delete Environment

      EnvironmentsClient.deleteEnvironment(accountId, environmentId)
        accountId: '1234',
        environmentId: 'UUID-GOES-HERE'
    

    Get Environment

      EnvironmentsClient.getEnvironment(accountId, environmentId, queryParams)
        accountId: '1234',
        environmentId: 'UUID-GOES-HERE',
        queryParams: {
          type: 'aws',
          type_id: ,
          defender_support: true|false,
          discover: true|false,
          scan: true|false,
          mode: 'automatic|guided|readonly|none',
          deleted_since: ,
        }
    

    Get accounts with environments

      EnvironmentsClient.getAccounts(accountId)
        accountId: '1234'
        queryParams: {
          type: 'aws',
          type_id: ,
          defender_support: true|false,
          discover: true|false,
          scan: true|false,
          mode: 'automatic|guided|readonly|none',
          deleted_since: ,
        }
    

    Get Environments

      EnvironmentsClient.getEnvironments(accountId, queryParams)
        accountId: '1234'
        queryParams: {
          type: 'aws',
          type_id: ,
          defender_support: true|false,
          discover: true|false,
          scan: true|false,
          mode: 'automatic|guided|readonly|none',
          deleted_since: ,
        }
    

    Update Environment

      EnvironmentsClient.updateEnvironment(accountId, environmentId, environment)
        accountId: '1234',
        environmentId: 'UUID-GOES-HERE',
        environment: '{"name":"environment5", "credential_id": "77C12B2C-8340-4AFD-AB25-4D0581443A5E", "scope": { "include": [{"type": "vpc", "key": "/aws/us-east-1/vpc/vpc-1234"}], "exclude": [{"type": "subnet","key": "/aws/us-east-1/subnet/subnet-35f42c6c"}]}, "enabled":true}'
    

    Update Environment Status

      EnvironmentsClient.updateEnvironmentStatus(accountId, environmentId, status)
        accountId: '1234',
        environmentId: 'UUID-GOES-HERE',
        status: '{"status":"ok", "timestamp": 1471277293, "details":"status is ok now"}'
    

    Interactive

    Loads the library into memory and stays in an interactive node shell.

      npm run interactive
    

    NOTE - You must build the sources before running this command, see Building section below

    Tests

      npm test
    

    Contributing

    The sources are written in Typescript and follow the tslint airbnb style.

    Building

    To generate a production build

    npm run build
    

    To generate a development build

    npm run build-dev
    

    Builds will be be generated into a dist folder and will contain commonjs and umd bundles that will be consumed depending on the module system in whichever environment you are using.

    Install

    npm i @alertlogic/environments

    DownloadsWeekly Downloads

    6

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    89.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • autobuild-al
    • kkuzmin
    • jdragovichalertlogic
    • npm_alertlogic