3.1.1 • Published 4 years ago

@raydeck/serverless-resources v3.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Usage

serverless-resources [options] [command]

Commands

info

Get information in JSON format for this command

Usage

serverless-resources info [options]

Options

  • -y --yaml Format as YAML
  • -s --service \<service> Service name (default infers from the serverless.yml
  • -p --path \<path> Path to serverless base definition (default is cwd)
  • -r --region \<region> AWS Region - defaults to environment value
  • -t --stage \<stage> Stage to target, usually dev or prod
  • -a --aws-profile \<profile> Name of AWS profile to use

@raydeck/serverless-resources - v3.1.1

Index

Functions

Functions

fixYaml

fixYaml(yamlObj: object, path: string): object

Defined in index.ts:32

Fill in an object with external file references

internal

Parameters:

NameTypeDescription
yamlObjobjectobject to be fixed
pathstringpath reference for finding other matches (really for config.json)

Returns: object

  • [ key: string]: any

fixYamlFile

fixYamlFile(path: string): object

Defined in index.ts:18

Fix a yaml file at path specified -

internal

Parameters:

NameTypeDescription
pathstringpath to yaml file

Returns: object

  • [ key: string]: any

getAppSync

getAppSync(appResources: object, cmd: object): Promise‹undefined | GraphqlApi›

Defined in index.ts:440

Get profile for Appsync resource in this stack

Parameters:

appResources: object

Resources as returened by getResources above

cmd: object

arguments from CLI tool

NameType
awsProfile?undefined | string
json?undefined | false | true
path?undefined | string
region?undefined | string
service?undefined | string
stage?undefined | string
yaml?undefined | false | true

Returns: Promise‹undefined | GraphqlApi›


getArnForDatabaseTable

getArnForDatabaseTable(TableName: string, region: string): Promise‹undefined | string›

Defined in index.ts:133

Get the arn by table name

internal

Parameters:

NameTypeDefaultDescription
TableNamestring-DDB table name
regionstring"us-east-1"AWS region

Returns: Promise‹undefined | string›


getArnForLambda

getArnForLambda(FunctionName: string, region: string): Promise‹undefined | string›

Defined in index.ts:216

get the arn of a lambda from the function name

internal

Parameters:

NameTypeDefaultDescription
FunctionNamestring-name of the lambda function
regionstring"us-east-1"AWS region

Returns: Promise‹undefined | string›


getArnForQueue

getArnForQueue(url: string, region: string): Promise‹undefined | string›

Defined in index.ts:89

Parameters:

NameType
urlstring
regionstring

Returns: Promise‹undefined | string›


getArnForRole

getArnForRole(role: string, region: string): Promise‹undefined | string›

Defined in index.ts:268

Get the ARN of a role by name

internal

Parameters:

NameTypeDefaultDescription
rolestring-Name of the role
regionstring"us-east-1"AWS Region

Returns: Promise‹undefined | string›


getGSIsForDatabaseTable

getGSIsForDatabaseTable(TableName: string, region: string): Promise‹object[]›

Defined in index.ts:156

Get Global Secondary Inidices of a table

internal

Parameters:

NameTypeDefaultDescription
TableNamestring-DDB Table name
regionstring"us-east-1"AWS region

Returns: Promise‹object[]›


getLSIsForDatabaseTable

getLSIsForDatabaseTable(TableName: string, region: string): Promise‹object[]›

Defined in index.ts:186

Get Local Secondary Indicies for a table

internal

Parameters:

NameTypeDefaultDescription
TableNamestring-DDB Table name
regionstring"us-east-1"AWS region

Returns: Promise‹object[]›


getOutputs

getOutputs(cmd: object): Promise‹object›

Defined in index.ts:282

Get outputs of a single stack at the path in question

Parameters:

cmd: object

Command line options from the tool

NameType
awsProfile?undefined | string
json?undefined | false | true
path?undefined | string
region?undefined | string
service?undefined | string
stage?undefined | string
yaml?undefined | false | true

Returns: Promise‹object›


getResources

getResources(cmd: object): Promise‹object›

Defined in index.ts:327

Get resources of the stack at this path

Parameters:

cmd: object

Inputs from command line tool

NameType
awsProfile?undefined | string
path?undefined | string
region?undefined | string
service?undefined | string
stage?undefined | string

Returns: Promise‹object›


getServiceName

getServiceName(path?: undefined | string): any

Defined in index.ts:80

Get name of stack we are building right here

internal

Parameters:

NameTypeDescription
path?undefined | stringcurrent path to serverless.yml file (will append /serverless.yml if missing)

Returns: any


getStreamArnForDatabaseTable

getStreamArnForDatabaseTable(TableName: string, region: string): Promise‹undefined | string›

Defined in index.ts:110

Get Stream for database

internal

Parameters:

NameTypeDefaultDescription
TableNamestring-DDB table name
regionstring"us-east-1"region

Returns: Promise‹undefined | string›


getUnqualifiedArnForLambda

getUnqualifiedArnForLambda(FunctionName: string, region: string): Promise‹undefined | string›

Defined in index.ts:237

Get the unqualified arn of a lambda

internal

Parameters:

NameTypeDefaultDescription
FunctionNamestring-Name of Function
regionstring"us-east-1"AWS Region

Returns: Promise‹undefined | string›


isDDBResource

isDDBResource(resource: object): boolean

Defined in index.ts:259

Detect whether a given resource is for DDB

internal

Parameters:

resource: object

Resource object

NameType
ResourceTypestring

Returns: boolean